Merge remote-tracking branch 'origin/test' into test

pull/165/head
Brian Lee 1 year ago
commit 7613e06cae

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>数据拉取日志</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="${ctx}/static/js/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
<#include "/head/headlist.html" />
</head>
@ -141,6 +141,7 @@
},
{width: 80, valign: "middle", field: 'responseParam', title: '响应参数', sortable: true},
{width: 80, valign: "middle", field: 'requestParam', title: '请求参数', sortable: true},
{width: 80, valign: "middle", field: 'time', title: '重试次数', sortable: true},
{
width:200,
field: 'id',
@ -148,9 +149,8 @@
formatter:function(value,oData,index) {
var listOperation = "";
$(jspOperation).each(function (i, toolbar) {
console.log(toolbar);
if (toolbar.text === '修改' && oData.status !== 100) {
listOperation = listOperation + "<a href=\"javascript:" + toolbar.actionmethod + "('${resourceid}','" + encodeURIComponent(oData.requestParam) + "');\" class=\"btn " + toolbar.img + " btn-xs\")><i class=\"fa " + "fa-refresh" + "\"></i> " + "重试" + " </a>&nbsp;&nbsp;";
listOperation = listOperation + "<a href=\"javascript:" + toolbar.actionmethod + "('${resourceid}','" + encodeURIComponent(oData.requestParam) + "','" + encodeURIComponent(oData.id) + "');\" class=\"btn " + toolbar.img + " btn-xs\")><i class=\"fa " + "fa-refresh" + "\"></i> " + "重试" + " </a>&nbsp;&nbsp;";
}
});
return listOperation;
@ -167,7 +167,7 @@
_tableListPost.bootstrapTable('refreshOptions',{pageNumber:1});
}
function updateData(jframeid,str){
function updateData(jframeid,str,id){
$(document).ready(function() {
// Encode the parameter string to be URL-safe
// Make an AJAX GET request
@ -175,14 +175,17 @@
url: '${ctx}/test/api/pullPictureByParameter', // Replace with your server endpoint
type: 'GET',
headers: {"logintoken": parent.getLoginToken()},
data: { parameterString: str },
data: { parameterString: str, id },
success: function(response) {
console.log(response);
if (response || "success" === response) {
refreshTable();
toastr.success('Request was successful!');
} else {
toastr.error('Request was failed!');
}
},
error: function(xhr, status, error) {
console.log(error);
toastr.error('Request was failed!');
toastr.error('Request has exception!');
}
});
});

@ -133,7 +133,7 @@ public class Department implements BaseDto,java.io.Serializable {
@Schema(description = "对应的Service名主要是spring的service名")
@TableField(value="SERVICENAME")
private String servicename;
private String servicename ="taskchildPictureService";
@Schema(description = "内置表单使用flowable表单0使用本地数据1使用flowable表单3:外置表单4其他自定义表单")
@TableField(value="BUILTFORM")

@ -682,9 +682,120 @@ public class FlowTaskController extends BaseController {
@GetMapping("/repetitionTask")
@ResponseBody
public ResultVo repetitionTask(HttpServletRequest request,
@RequestParam(value = "type",required = false,defaultValue = "1") Integer type) {
@RequestParam(value = "type", required = false, defaultValue = "0") Integer type,
@RequestParam(name = "izupuser", defaultValue = "", required = false) String izupuser,
@RequestParam(name = "taskName", defaultValue = "", required = false) String taskName,
@RequestParam(name = "izproject", defaultValue = "", required = false) String izproject,
@RequestParam(name = "izplan", defaultValue = "", required = false) String izplan,
@RequestParam(name = "izstatus", defaultValue = "", required = false) String izstatus,
@RequestParam(name = "iztaskrrom", defaultValue = "", required = false) String iztaskrrom,
@RequestParam(name = "izuptime", defaultValue = "", required = false) String izuptime,
@RequestParam(name = "isFail", defaultValue = "false", required = false) String isFail) {
SearchQuery searchQuery = new SearchQuery();
if (org.springframework.util.StringUtils.hasText(izupuser)) {
if (izupuser.contains(",")) {
String[] userIds = izupuser.split(",");
List<String> arrayData = Arrays.asList(userIds);
searchQuery.addIn("fromuserid", arrayData);
} else {
searchQuery.addEqual("fromuserid", izupuser);
}
}
if (StringUtils.isNotBlank(taskName)) {
searchQuery.addLike("fromtaskname", taskName);
}
if (org.springframework.util.StringUtils.hasText(izproject)) {
if (izproject.contains(",")) {
String[] projectIds = izproject.split(","); // 以逗号拆分字符串
List<String> arrayData = Arrays.asList(projectIds);
SearchQueryForm searchQueryForm = new SearchQueryForm();
searchQuery.addIn("fromprojectname", arrayData);
} else {
searchQuery.addEqual("fromprojectname", izproject);
}
}
if (org.springframework.util.StringUtils.hasText(izplan)) {
if (izplan.contains(",")) {
String[] planIds = izplan.split(","); // 以逗号拆分字符串
List<String> arrayData = Arrays.asList(planIds);
SearchQueryForm searchQueryForm = new SearchQueryForm();
searchQuery.addIn("fromplanid", arrayData);
} else {
searchQuery.addEqual("fromplanid", izplan);
}
}
if (org.springframework.util.StringUtils.hasText(izstatus)) {
if (izstatus.contains(",")) {
String[] statusIds = izstatus.split(","); // 以逗号拆分字符串
List<String> arrayData = Arrays.asList(statusIds);
searchQuery.addIn("states", arrayData);
} else {
searchQuery.addEqual("states", izstatus);
}
}
if (Boolean.parseBoolean(isFail)) {
searchQuery.addEqual("isFail", "1");
}
if (org.springframework.util.StringUtils.hasText(iztaskrrom)) {
if (iztaskrrom.contains(",")) {
String[] taskrromIds = iztaskrrom.split(","); // 以逗号拆分字符串
List<String> arrayData = Arrays.asList(taskrromIds);
searchQuery.addIn("fromsourceid", arrayData);
} else {
searchQuery.addEqual("fromsourceid", iztaskrrom);
}
}
if (org.springframework.util.StringUtils.hasText(izuptime)) {
String[] dateRange = izuptime.split("-");
if (dateRange.length == 2) {
try {
SimpleDateFormat sdfInput = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
// 解析开始时间
Long startTimeStamp = sdfInput.parse(dateRange[0].trim() + " 00:00:00").getTime();
// 解析结束时间
Long endTimeStamp = sdfInput.parse(dateRange[1].trim() + " 23:59:59").getTime();
// 如果开始时间不为空,则将其放入查询条件中
if (startTimeStamp != null) {
searchQuery.addGreater("fromuptimeStart", startTimeStamp);
}
// 如果结束时间不为空,则将其放入查询条件中
if (endTimeStamp != null) {
searchQuery.addLess("fromuptimeEnd", endTimeStamp);
}
} catch (ParseException e) {
// 处理日期解析异常
e.printStackTrace();
}
}
}
//租户主键,由前端页面传送
String tenantId = request.getHeader("X-Tenant-Id");
return flowTaskService.repetitionTask(type,tenantId);
if (org.apache.commons.lang3.StringUtils.isBlank(tenantId)) {
return ResultVoUtil.error("租户主键不能为空");
}
User user = this.userService.getSessionUser(request);
if (user.isUserIsSys(xiaoyaoConfig.getWebconfig().getSysLoginUser().split(","))) {
} else {
searchQuery.addEqual("thisLoginUserid", user.getLoginname());
}
searchQuery.addEqual("tenantid", tenantId);
String searchId = request.getParameter("searchId");
if (StringUtils.isNotBlank(searchId)) {
List<OcrUsersearchchild> list = usersearchchildService.list(new LambdaQueryWrapper<OcrUsersearchchild>().eq(OcrUsersearchchild::getUsersearchid, searchId).orderByAsc(OcrUsersearchchild::getOrderNum));
for (OcrUsersearchchild userSearch : list) {
disSearchQuery(searchQuery, userSearch);
}
}
Map<String, Object> query = searchQuery.getQuery();
return flowTaskService.repetitionTask(type, tenantId,query);
}
/**

@ -193,7 +193,7 @@ public interface IFlowTaskService {
*
* @return
*/
ResultVo repetitionTask(Integer type, String tenantId);
ResultVo repetitionTask(Integer type, String tenantId, Map<String, Object> query);
Page<OcrTaskchildPicture> repetitionTaskList(Integer pageNo, Integer pageSize, Integer type, String tenantId);

@ -16,6 +16,9 @@ import cn.jyjz.xiaoyao.common.base.util.SpringUtils;
import cn.jyjz.xiaoyao.common.base.util.StringUtils;
import cn.jyjz.xiaoyao.common.base.vo.UserToken;
import cn.jyjz.xiaoyao.oa.from.service.UserViewapproeService;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
import lombok.extern.slf4j.Slf4j;
import org.flowable.bpmn.model.MultiInstanceLoopCharacteristics;
import org.flowable.bpmn.model.UserTask;
@ -46,6 +49,8 @@ public class FlowInstanceServiceImpl extends FlowServiceFactory implements IFlow
private IFlowTaskService flowTaskService;
@Resource
private UserViewapproeService userViewApproeService;
@Resource
private OcrTaskchildPictureService ocrTaskchildPictureService;
@Override
public boolean startProcessInstanceById(String procDefId, Map<String, Object> variables, HttpServletRequest request, String formid, String servicename, String deptid) {
@ -54,7 +59,6 @@ public class FlowInstanceServiceImpl extends FlowServiceFactory implements IFlow
if (StringUtils.isNotBlank(servicename)) {
iFormCustomService = SpringUtils.getBean(servicename);
}
if (StringUtils.isBlank(formid)) {
//表单主键
formid = iFormCustomService.saveForm(request);
@ -102,7 +106,10 @@ public class FlowInstanceServiceImpl extends FlowServiceFactory implements IFlow
}
processInstance = runtimeService.startProcessInstanceById(procDefId, businessKey, variables);
OcrTaskchildPicture taskchildPicture = ocrTaskchildPictureService.getById(formid);
taskchildPicture.setProcessdefinitionid(processInstance.getProcessDefinitionId());
taskchildPicture.setProcessinstanceid(processInstance.getProcessInstanceId());
ocrTaskchildPictureService.updateById(taskchildPicture);
if (null != iFormCustomService) {
FlowTaskCompleteVO flowTaskCompleteVO = flowTaskService.updateNowTaskAssignee(processInstance.getProcessInstanceId(), processInstance.getProcessDefinitionId(), deptid);

@ -40,7 +40,6 @@ import cn.jyjz.xiaoyao.ocr.dataobject.*;
import cn.jyjz.xiaoyao.ocr.service.*;
import cn.jyjz.xiaoyao.ocr.util.SearchParaFormatting;
import cn.jyjz.xiaoyao.ocr.vo.OcrTaskchildPictureApproVo;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -49,6 +48,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.SneakyThrows;
import org.apache.commons.lang3.ObjectUtils;
import org.flowable.bpmn.constants.BpmnXMLConstants;
import org.flowable.bpmn.model.*;
@ -71,12 +71,14 @@ import org.flowable.task.api.history.HistoricTaskInstance;
import org.flowable.task.api.history.HistoricTaskInstanceQuery;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.util.*;
import java.util.stream.Collectors;
@ -123,6 +125,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
private OcrPrevailCloudLogService prevailCloudLogService;
@Resource
private PrevailCloudApi prevailCloudApi;
@Autowired
private OcrContractorTaskService contractorTaskService;
@Override
public void myTodoTaskList(PageUtils vo, HttpServletRequest request) {
@ -838,6 +842,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
*
* @param processInstanceId
*/
@SneakyThrows
public FlowTaskCompleteVO updateNowTaskAssignee(String processInstanceId, String processDefinitionId, String deptid) {
FlowTaskCompleteVO flowTaskCompleteVO = null;
@ -902,8 +907,31 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
List<String> candidateUsers = userTask.getCandidateUsers();
if (null != candidateUsers && !candidateUsers.isEmpty()) {
Random rand = new Random();
OcrTaskchildPicture taskchildPicture = ocrTaskchildPictureService.getOne(new LambdaQueryWrapper<OcrTaskchildPicture>().eq(OcrTaskchildPicture::getProcessinstanceid, processInstanceId).eq(OcrTaskchildPicture::getProcessdefinitionid, processDefinitionId));
OcrPicture first = ocrPictureService.getOne(new LambdaQueryWrapper<OcrPicture>().eq(OcrPicture::getId, taskchildPicture.getPictureid()));
List<OcrContractorTask> contractorList = contractorTaskService.list(new LambdaQueryWrapper<OcrContractorTask>().eq(OcrContractorTask::getTenantId, taskchildPicture.getTenantid()));
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(contractorList)) {
Class<? extends OcrPicture> aClass = first.getClass();
Field field = aClass.getDeclaredField(contractorList.get(0).getField());
field.setAccessible(true);
String fieldValue = (String) field.get(first);
log.info("厂商名称------{}",fieldValue);
List<String> collect = contractorList.stream().filter(contractorTask -> contractorTask.getContractor().equals(fieldValue)).map(OcrContractorTask::getTaskUserAssignee).collect(Collectors.toList());
List<String> assigneeList = new ArrayList<>();
for (String str : candidateUsers) {
if (collect.contains(str)) {
assigneeList.add(str);
}
}
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(assigneeList)) {
taskService.claim(task.getId(), assigneeList.get(rand.nextInt(assigneeList.size())));
}else {
taskService.claim(task.getId(), candidateUsers.get(rand.nextInt(candidateUsers.size())));
}
} else {
taskService.claim(task.getId(), candidateUsers.get(rand.nextInt(candidateUsers.size())));
}
}
//得到候选组
List<String> candidateGroups = userTask.getCandidateGroups();
@ -1963,8 +1991,9 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}
@Override
public ResultVo repetitionTask(Integer type, String tenantId) {
List<RepeatedContentVo> repeatedContentVoList = flowableccMybatisDao.repetitionTask(type, tenantId);
public ResultVo repetitionTask(Integer type, String tenantId, Map<String, Object> query) {
query.put("type", type);
List<RepeatedContentVo> repeatedContentVoList = flowableccMybatisDao.repetitionTaskNew(query);
List<String> formIdsToUpdate = new ArrayList<>();
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(repeatedContentVoList)) {
List<OcrCheckDescribeHis> checkDescribeHis = new ArrayList<>();
@ -1998,6 +2027,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}
}
if (!CollectionUtils.isEmpty(checkDescribeHis)) {
ocrCheckDescribeHisService.saveOrUpdateBatch(checkDescribeHis);
UpdateWrapper<OcrTaskchildPicture> updateWrapper = new UpdateWrapper<>();
updateWrapper.in("PICTUREID", formIdsToUpdate)
@ -2006,7 +2036,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
updateEntity.setIsRepeatedNodules(1);
ocrTaskchildPictureService.update(updateEntity, updateWrapper);
}
}
return ResultVoUtil.success(repeatedContentVoList);
}

@ -40,7 +40,7 @@ public interface FlowableccMybatisDao extends BaseMapper<Flowablecc> {
*/
List<UserDistionaryVo> selectUserByFromid(String fromid);
List<RepeatedContentVo> repetitionTask(@Param("type") Integer type, @Param("tenantId") String tenantId);
List<RepeatedContentVo> repetitionTaskNew(Map<String, Object> query);
Page<OcrTaskchildPicture> repetitionTaskList(Page<OcrTaskchildPicture> page, @Param("type") Integer type, @Param("tenantId") String tenantId);
}

@ -17,13 +17,15 @@ public interface PrevailCloudApi {
/**
*
*
* @param pictureSourceParameter
* @return
*/
ApiPage<PictureSourceResult> pullPictureSource(PictureSourceParameter pictureSourceParameter) throws Exception;
ApiPage<PictureSourceResult> pullPictureSource(PictureSourceParameter pictureSourceParameter, boolean isRetry) throws Exception;
/**
*
*
* @param pictureSourceParameter
* @return
*/
@ -33,6 +35,7 @@ public interface PrevailCloudApi {
/**
* id
*
* @param tenantNo
*/
void pullAccountInfo(long tenantNo) throws Exception;
@ -44,7 +47,7 @@ public interface PrevailCloudApi {
List<PictureSourceResult> getAllPictureSourceResultApiPage(PictureSourceParameter pictureSourceParameter);
List<PictureSourceResult> getPictureSourceResultApiPage(PictureSourceParameter pictureSourceParameter);
List<PictureSourceResult> getPictureSourceResultApiPage(PictureSourceParameter pictureSourceParameter, boolean isRetry);
}

@ -56,7 +56,7 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
private OcrPrevailCloudLogService prevailCloudLogService;
@Override
public ApiPage<PictureSourceResult> pullPictureSource(PictureSourceParameter pictureSourceParameter) throws Exception {
public ApiPage<PictureSourceResult> pullPictureSource(PictureSourceParameter pictureSourceParameter, boolean isRetry) throws Exception {
//1.检查api配置是否正常
if (!apiConfig.checkConfig()) {
return null;
@ -105,7 +105,7 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
ApiPage<String> apiPage = JSONUtil.toBean(data, ApiPage.class);
//日志增加拉取数量
prevailCloudLog.setResponseParam(prevailCloudLog.getResponseParam()+",拉取数量:"+apiPage.getTotal());
if(apiPage.getTotal()==0){
if(!isRetry && apiPage.getTotal()==0){
prevailCloudLogService.save(prevailCloudLog);
return null;
}
@ -116,7 +116,11 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
resultApiPage.setPageSize(apiPage.getPageSize());
resultApiPage.setTotal(apiPage.getTotal());
resultApiPage.setRecords(listResult);
if (!isRetry) {
prevailCloudLogService.save(prevailCloudLog);
}
return resultApiPage;
} else {
logger.debug("请求图片接口数据失败,参数:{},返回值:{}", json, responseJsonStr);
@ -307,7 +311,7 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
ApiPage<PictureSourceResult> apiPage = null;
List<PictureSourceResult> result = Lists.newArrayListWithCapacity(pictureSourceParameter.getPageSize());
try {
apiPage = this.pullPictureSource(pictureSourceParameter);
apiPage = this.pullPictureSource(pictureSourceParameter, false);
} catch (Exception e) {
e.printStackTrace();
}
@ -330,10 +334,10 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
}
@Override
public List<PictureSourceResult> getPictureSourceResultApiPage(PictureSourceParameter pictureSourceParameter) {
public List<PictureSourceResult> getPictureSourceResultApiPage(PictureSourceParameter pictureSourceParameter, boolean isRetry) {
ApiPage<PictureSourceResult> apiPage = null;
try {
apiPage = this.pullPictureSource(pictureSourceParameter);
apiPage = this.pullPictureSource(pictureSourceParameter, isRetry);
} catch (Exception e) {
e.printStackTrace();
}

@ -13,22 +13,21 @@ import cn.jyjz.xiaoyao.ocr.api.entity.PictureSourceResult;
import cn.jyjz.xiaoyao.ocr.api.thread.PullAllPictureSourceThread;
import cn.jyjz.xiaoyao.ocr.api.utils.ApiConfig;
import cn.jyjz.xiaoyao.ocr.api.utils.ApiPage;
import cn.jyjz.xiaoyao.ocr.common.PrevailCloudConstant;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPrevailCloudLog;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrPrevailCloudLogService;
import cn.jyjz.xiaoyao.ocr.thread.TaskQueue;
import cn.jyjz.xiaoyao.ocr.util.RequestParameterFormat;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.common.collect.Maps;
import lombok.extern.flogger.Flogger;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import sun.nio.ch.ThreadPool;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@ -38,7 +37,11 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* api
@ -87,6 +90,7 @@ public class PrevailCloudApiController {
/**
*
*
* @param request
* @return
*/
@ -169,7 +173,7 @@ public class PrevailCloudApiController {
pictureSourceParameter.setTenantNo(tenantNo);
pictureSourceParameter.setAccountNo(accountNo);
try {
ApiPage<PictureSourceResult> apiPage = prevailCloudApi.pullPictureSource(pictureSourceParameter);
ApiPage<PictureSourceResult> apiPage = prevailCloudApi.pullPictureSource(pictureSourceParameter, false);
if (apiPage == null) {
return "获取数据为空!";
}
@ -251,7 +255,7 @@ public class PrevailCloudApiController {
pictureSourceParameter.setTenantNo(tenantNo);
pictureSourceParameter.setAccountNo(accountNo);
List<PictureSourceResult> resultList = prevailCloudApi.getPictureSourceResultApiPage(pictureSourceParameter);
List<PictureSourceResult> resultList = prevailCloudApi.getPictureSourceResultApiPage(pictureSourceParameter, false);
if (CollectionUtils.isEmpty(resultList)) {
continue;
}
@ -279,11 +283,23 @@ public class PrevailCloudApiController {
}
@GetMapping("/pullPictureByParameter")
public Boolean pullPictureByParameter(String parameterString) {
public Boolean pullPictureByParameter(String parameterString, Long id) {
OcrPrevailCloudLog byId = ocrPrevailCloudLogService.getById(id);
if (byId == null) {
return false;
}
PictureSourceParameter pictureSourceParameter = RequestParameterFormat.fromString(parameterString);
List<PictureSourceResult> resultList = prevailCloudApi.getPictureSourceResultApiPage(pictureSourceParameter);
List<PictureSourceResult> resultList = prevailCloudApi.getPictureSourceResultApiPage(pictureSourceParameter, true);
if (CollectionUtils.isEmpty(resultList)) {
return false;
//更新日志
OcrPrevailCloudLog ocrPrevailCloudLog = OcrPrevailCloudLog.builder()
.status(100)
.id(id)
.time(byId.getTime() + 1)
.build();
ocrPrevailCloudLogService.updateById(ocrPrevailCloudLog);
return true;
}
for (PictureSourceResult pictureSourceResult : resultList) {
@ -299,7 +315,7 @@ public class PrevailCloudApiController {
//赋值默认参数
pictureSourceResult.setRequestParam(pictureSourceParameter);
//将可以处理数据放入处理队列中
TaskQueue.pictureDisposePushData(pictureSourceResult, ocrPictureService, ocrPrevailCloudLogService);
TaskQueue.pictureDisposePushDataUpdateLog(pictureSourceResult, id, ocrPictureService, ocrPrevailCloudLogService);
}
return true;

@ -0,0 +1,13 @@
package cn.jyjz.xiaoyao.ocr.dataDao;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrContractorTask;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* ClassName $className$.java
* Description:
* Author scl.
* Date 2024/6/23 11:20
*/
public interface OcrContractorTaskMapper extends BaseMapper<OcrContractorTask> {
}

@ -0,0 +1,60 @@
package cn.jyjz.xiaoyao.ocr.dataobject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* ClassName $className$.java
* Description:
* Author scl.
* Date 2024/6/23 11:20
*/
/**
*
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "ocr_contractor_task")
public class OcrContractorTask {
/**
* id
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
*
*/
@TableField(value = "contractor")
private String contractor;
/**
* id
*/
@TableField(value = "tenant_id")
private Long tenantId;
/**
*
*/
@TableField(value = "task_user_assignee")
private String taskUserAssignee;
/**
*
*/
@TableField(value = "task_user_name")
private String taskUserName;
/**
*
*/
@TableField(value = "field")
private String field;
}

@ -113,4 +113,10 @@ public class OcrPrevailCloudLog {
*/
@TableField(value = "redundance")
private String redundance;
/**
*
*/
@TableField(value = "time")
private Integer time = 0;
}

@ -0,0 +1,14 @@
package cn.jyjz.xiaoyao.ocr.service;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrContractorTask;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* ClassName $className$.java
* Description:
* Author scl.
* Date 2024/6/23 11:20
*/
public interface OcrContractorTaskService extends IService<OcrContractorTask>{
}

@ -0,0 +1,19 @@
package cn.jyjz.xiaoyao.ocr.service.impl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrContractorTask;
import cn.jyjz.xiaoyao.ocr.dataDao.OcrContractorTaskMapper;
import cn.jyjz.xiaoyao.ocr.service.OcrContractorTaskService;
/**
* ClassName $className$.java
* Description:
* Author scl.
* Date 2024/6/23 11:20
*/
@Service
public class OcrContractorTaskServiceImpl extends ServiceImpl<OcrContractorTaskMapper, OcrContractorTask> implements OcrContractorTaskService{
}

@ -19,18 +19,11 @@ import cn.jyjz.xiaoyao.oa.from.dataobject.Userapprove;
import cn.jyjz.xiaoyao.oa.from.service.UserapproveService;
import cn.jyjz.xiaoyao.ocr.api.PrevailCloudApi;
import cn.jyjz.xiaoyao.ocr.dataDao.OcrTaskchildPictureMybatisDao;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPictureDuplicateHis;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPictureInfo;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPictureAppro;
import cn.jyjz.xiaoyao.ocr.dataobject.*;
import cn.jyjz.xiaoyao.ocr.dto.ApproveNodeDto;
import cn.jyjz.xiaoyao.ocr.dto.FlowResultDto;
import cn.jyjz.xiaoyao.ocr.dto.UserapproveDto;
import cn.jyjz.xiaoyao.ocr.service.IOcrPictureDuplicateHisService;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureInfoService;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
import cn.jyjz.xiaoyao.ocr.service.*;
import cn.jyjz.xiaoyao.ocr.vo.OaUserApproveVo;
import cn.jyjz.xiaoyao.ocr.vo.OcrTaskChildPictureVo;
import cn.jyjz.xiaoyao.ocr.vo.PictureDetailVo;
@ -97,6 +90,9 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
@Autowired
private OcrPictureInfoService ocrPictureInfoService;
@Autowired
private OcrContractorTaskService contractorTaskService;
/**
*
*
@ -231,8 +227,10 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.in("ID", formid);
List<OcrTaskchildPicture> list = this.ocrtaskchildpicturemybatisdao.selectList(queryWrapper);
List<OcrPicture> pictureList = ocrPictureService.listByIds(list.stream().map(OcrTaskchildPicture::getPictureid).collect(Collectors.toList()));
//目前没有做其他信息返回,如果需要再做修改
for (OcrTaskchildPicture ocrTaskchildPicture : list) {
//判断审批人是否为当前登录用户
if (ocrTaskchildPicture.getAssignee().contains(userToken.getLoginname()) &&
(ocrTaskchildPicture.getStates().intValue() != SystemConstantsOa.OA_STATUS_TYPE_END
@ -346,7 +344,9 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
Task taskData = null;
if (null != taskList && !taskList.isEmpty()) {
taskData = taskList.get(0);
ocrTaskchildPicture.setAssignee(taskData.getAssignee());
String assignee = taskData.getAssignee();
//todo
ocrTaskchildPicture.setAssignee(assignee);
}
ocrPicture.setTaskchildpictureid(ocrTaskchildPicture.getId().toString());

@ -22,11 +22,17 @@ import cn.jyjz.xiaoyao.oa.from.service.CandidateuserService;
import cn.jyjz.xiaoyao.oa.from.service.CategoryService;
import cn.jyjz.xiaoyao.ocr.dataDao.OcrTaskchildPictureMybatisDao;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrContractorTask;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import cn.jyjz.xiaoyao.ocr.service.OcrContractorTaskService;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
import cn.jyjz.xiaoyao.upload.upload.UploadSpringUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.velocity.shaded.commons.io.FilenameUtils;
import org.flowable.task.api.Task;
@ -40,9 +46,11 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
*
@ -71,6 +79,12 @@ public class TaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchildPic
@Autowired
private IFlowFormMessageService iFlowFormMessageService;
@Autowired
private OcrPictureService pictureService;
@Autowired
private OcrContractorTaskService contractorTaskService;
@Override
public String saveForm(HttpServletRequest request) {
OcrTaskchildPicture model = null;
@ -228,7 +242,25 @@ public class TaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchildPic
@Override
public boolean updateForm(String fromid, String deploymentid, String processdefinitionid, String assignee, String taskId, String processInstanceId, Task task) {
if (StringUtils.isNotBlank(fromid) && StringUtils.isNotBlank(deploymentid) && StringUtils.isNotBlank(processdefinitionid)) {
String[] assignees = assignee.split(",");
List<String> assigneeList = new ArrayList<>();
OcrTaskchildPicture model = this.ocrTaskchildPictureService.selectDtoById(Long.parseLong(fromid));
OcrPicture first = pictureService.getOne(new LambdaQueryWrapper<OcrPicture>().eq(OcrPicture::getId, model.getPictureid()));
if (org.apache.commons.lang3.StringUtils.isNotBlank(first.getField5())) {
List<OcrContractorTask> contractorList = contractorTaskService.list(new LambdaQueryWrapper<OcrContractorTask>().eq(OcrContractorTask::getContractor, first.getField5()).eq(OcrContractorTask::getTenantId, model.getTenantid()));
if (CollectionUtils.isNotEmpty(contractorList)) {
List<String> collect = contractorList.stream().map(OcrContractorTask::getTaskUserAssignee).collect(Collectors.toList());
for (String str : assignees) {
if (collect.contains(str)) {
assigneeList.add(str);
}
}
}
}
if (CollectionUtils.isNotEmpty(assigneeList)) {
assignee = String.join(",", assigneeList);
assignees = assignee.split(",");
}
model.setProcessinstanceid(processInstanceId);
model.setProcessdefinitionid(processdefinitionid);
model.setDeploymentid(deploymentid);
@ -237,9 +269,9 @@ public class TaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchildPic
model.setTaskname(task.getName());
model.setTaskId(taskId);
}
//todo
model.setStates(SystemConstantsOa.OA_STATUS_TYPE_ING);
//查询审批人姓名
String[] assignees = assignee.split(",");
StringBuffer stringBuffer = new StringBuffer();
for (String tempAssign : assignees) {
User user = userService.findByLoginname(tempAssign);

@ -68,6 +68,7 @@ public class TaskQueue {
.responseParam(pictureSourceResult.toString())
.type(PrevailCloudConstant.DISPOSE_PICTURE_SOURCE)
.status(100)
.time(0)
.build();
ocrPrevailCloudLogService.save(ocrPrevailCloudLog);
resultSet.add(String.valueOf(taskId));
@ -79,6 +80,7 @@ public class TaskQueue {
.responseParam(pictureSourceResult.toString())
.type(PrevailCloudConstant.DISPOSE_PICTURE_SOURCE)
.status(500)
.time(0)
.build();
ocrPrevailCloudLogService.save(ocrPrevailCloudLog);
return false;
@ -86,6 +88,67 @@ public class TaskQueue {
return true;
}
/**
* [] push bi
*
* @param pictureSourceResult //三方拉取 获取到的图片对象
* @return
*/
public static boolean pictureDisposePushDataUpdateLog(PictureSourceResult pictureSourceResult, Long id, OcrPictureService ocrPictureService, OcrPrevailCloudLogService ocrPrevailCloudLogService) {
OcrPrevailCloudLog byId = ocrPrevailCloudLogService.getById(id);
if (byId == null) {
return false;
}
try {
Long taskId = pictureSourceResult.getTaskId();
OcrPicture ocrPicture = ocrPictureService.selectByRemark(String.valueOf(taskId));
if (ocrPicture != null) {
OcrTaskchildPicture taskchildPicture = ocrPictureService.getOcrTaskChildPictureByPictureId(ocrPicture.getId().toString());
if (taskchildPicture != null && pictureSourceResult.getTaskStatus() != null
&& (pictureSourceResult.getTaskStatus() == 6 || pictureSourceResult.getTaskStatus() == 7) && (taskchildPicture.getStates() == 5 || taskchildPicture.getStates() == 3)) {
if (taskchildPicture.getStates() == 5) {
String result = ocrPictureService.getPictureApproveResult(ocrPicture.getId());
pictureSourceResult.setComment(result);
} else {
pictureSourceResult.setComment("ocr审批全部通过由无量云发起了重置审批流程的操作。");
}
ocrPictureService.deletePictureInfo(ocrPicture.getId());
pictureSourceResult.setId(ocrPicture.getId());
} else {
return true;
}
}
//更新日志
OcrPrevailCloudLog ocrPrevailCloudLog = OcrPrevailCloudLog.builder()
.formId(pictureSourceResult.getTaskId())
.requestParam(pictureSourceResult.getRequestParam().toString())
.responseParam(pictureSourceResult.toString())
.type(PrevailCloudConstant.DISPOSE_PICTURE_SOURCE)
.status(100)
.id(id)
.time(byId.getTime() + 1)
.build();
ocrPrevailCloudLogService.updateById(ocrPrevailCloudLog);
resultSet.add(String.valueOf(taskId));
pictureDisposeQueue.put(pictureSourceResult);
} catch (InterruptedException e) {
OcrPrevailCloudLog ocrPrevailCloudLog = OcrPrevailCloudLog.builder()
.formId(pictureSourceResult.getTaskId())
.requestParam(pictureSourceResult.getRequestParam().toString())
.responseParam(pictureSourceResult.toString())
.type(PrevailCloudConstant.DISPOSE_PICTURE_SOURCE)
.status(500)
.time(byId.getTime() + 1)
.id(id)
.build();
ocrPrevailCloudLogService.updateById(ocrPrevailCloudLog);
return false;
}
return true;
}
/**
*
*

@ -135,7 +135,7 @@ public class PictureSourceTimerJob {
pictureSourceParameter.setTenantNo(tenantNo);
pictureSourceParameter.setAccountNo(accountNo);
List<PictureSourceResult> resultList = prevailCloudApi.getPictureSourceResultApiPage(pictureSourceParameter);
List<PictureSourceResult> resultList = prevailCloudApi.getPictureSourceResultApiPage(pictureSourceParameter, false);
if (CollectionUtils.isEmpty(resultList)) {
continue;
}

@ -98,7 +98,7 @@ public class PullPictureDataJob {
pictureSourceParameter.setTenantNo(tenantNo);
pictureSourceParameter.setAccountNo(accountNo);
List<PictureSourceResult> resultList = prevailCloudApi.getPictureSourceResultApiPage(pictureSourceParameter);
List<PictureSourceResult> resultList = prevailCloudApi.getPictureSourceResultApiPage(pictureSourceParameter, false);
if (CollectionUtils.isEmpty(resultList)) {
continue;
}

@ -158,6 +158,187 @@
</trim>
</where>
</sql>
<sql id="Base_Where_union_new">
<where>
<trim prefixOverrides="and|or">
<if test="id != null">
and tcp.ID ${id.dataOp} ${id.likestar}#{id.value}${id.likeend}
</if>
<if test="ocpictureid != null">
and tcp.OCPICTUREID ${ocpictureid.dataOp} ${ocpictureid.likestar}#{ocpictureid.value}${ocpictureid.likeend}
</if>
<if test="pictureresult != null">
and tcp.PICTURERESULT ${pictureresult.dataOp} ${pictureresult.likestar}#{pictureresult.value}${pictureresult.likeend}
</if>
<if test="picturecompare != null">
and tcp.PICTURECOMPARE ${picturecompare.dataOp} ${picturecompare.likestar}#{picturecompare.value}${picturecompare.likeend}
</if>
<if test="deptid != null">
and tcp.DEPTID ${deptid.dataOp} ${deptid.likestar}#{deptid.value}${deptid.likeend}
</if>
<if test="tenantid != null">
and tcp.TENANTID ${tenantid.dataOp} ${tenantid.likestar}#{tenantid.value}${tenantid.likeend}
</if>
<if test="packageid != null">
and tcp.PACKAGEID ${packageid.dataOp} ${packageid.likestar}#{packageid.value}${packageid.likeend}
</if>
<if test="pictureid != null">
and tcp.PICTUREID ${pictureid.dataOp} ${pictureid.likestar}#{pictureid.value}${pictureid.likeend}
</if>
<if test="category != null">
and tcp.CATEGORY ${category.dataOp} ${category.likestar}#{category.value}${category.likeend}
</if>
<if test="categoryid != null">
and tcp.CATEGORYID ${categoryid.dataOp} ${categoryid.likestar}#{categoryid.value}${categoryid.likeend}
</if>
<if test="specification != null">
and tcp.SPECIFICATION ${specification.dataOp} ${specification.likestar}#{specification.value}${specification.likeend}
</if>
<if test="buessinessno != null">
and tcp.BUESSINESSNO ${buessinessno.dataOp} ${buessinessno.likestar}#{buessinessno.value}${buessinessno.likeend}
</if>
<!-- <if test="states != null"> and tcp.STATES ${states.dataOp} ${states.likestar}#{states.value}${states.likeend}</if>-->
<if test="processinstanceid != null">
and tcp.PROCESSINSTANCEID ${processinstanceid.dataOp} ${processinstanceid.likestar}#{processinstanceid.value}${processinstanceid.likeend}
</if>
<if test="processdefinitionid != null">
and tcp.PROCESSDEFINITIONID ${processdefinitionid.dataOp} ${processdefinitionid.likestar}#{processdefinitionid.value}${processdefinitionid.likeend}
</if>
<if test="deploymentid != null">
and tcp.DEPLOYMENTID ${deploymentid.dataOp} ${deploymentid.likestar}#{deploymentid.value}${deploymentid.likeend}
</if>
<if test="assigneename != null">
and tcp.ASSIGNEENAME ${assigneename.dataOp} ${assigneename.likestar}#{assigneename.value}${assigneename.likeend}
</if>
<if test="assignee != null">
and tcp.ASSIGNEE ${assignee.dataOp} ${assignee.likestar}#{assignee.value}${assignee.likeend}
</if>
<if test="updateuser != null">
and tcp.UPDATEUSER ${updateuser.dataOp} ${updateuser.likestar}#{updateuser.value}${updateuser.likeend}
</if>
<if test="updatetime != null">
and tcp.UPDATETIME ${updatetime.dataOp} ${updatetime.likestar}#{updatetime.value}${updatetime.likeend}
</if>
<if test="fileannex != null">
and tcp.FILEANNEX ${fileannex.dataOp} ${fileannex.likestar}#{fileannex.value}${fileannex.likeend}
</if>
<if test="guidang != null">
and tcp.GUIDANG ${guidang.dataOp} ${guidang.likestar}#{guidang.value}${guidang.likeend}
</if>
<if test="createuser != null">
and tcp.CREATEUSER ${createuser.dataOp} ${createuser.likestar}#{createuser.value}${createuser.likeend}
</if>
<if test="createusername != null">
and tcp.CREATEUSERNAME ${createusername.dataOp} ${createusername.likestar}#{createusername.value}${createusername.likeend}
</if>
<if test="createdate != null">
and tcp.CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend}
</if>
<if test="createdateStart != null">
and tcp.CREATEDATE ${createdateStart.dataOp} ${createdateStart.likestar}#{createdateStart.value}${createdateStart.likeend}
</if>
<if test="createdateEnd != null">
and tcp.CREATEDATE ${createdateEnd.dataOp} ${createdateEnd.likestar}#{createdateEnd.value}${createdateEnd.likeend}
</if>
<if test="username != null">
and tcp.USERNAME ${username.dataOp} ${username.likestar}#{username.value}${username.likeend}
</if>
<if test="fromtaskid != null">
and tcp.FROMTASKID ${fromtaskid.dataOp} ${fromtaskid.likestar}#{fromtaskid.value}${fromtaskid.likeend}
</if>
<if test="fromtaskname != null">
and tcp.FROMTASKNAME ${fromtaskname.dataOp} ${fromtaskname.likestar}#{fromtaskname.value}${fromtaskname.likeend}
</if>
<!-- <if test="fromuserid != null"> and tcp.FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}#{fromuserid.value}${fromuserid.likeend}</if>-->
<!-- <if test="fromprojectid != null"> and tcp.FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}#{fromprojectid.value}${fromprojectid.likeend}</if>-->
<!-- <if test="fromplanid != null"> and tcp.FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}#{fromplanid.value}${fromplanid.likeend}</if>-->
<if test="fromuptime != null">
and tcp.FROMUPTIME ${fromuptime.dataOp} ${fromuptime.likestar}#{fromuptime.value}${fromuptime.likeend}
</if>
<if test="fromuserid != null">
and tcp.FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}
<!-- #{fromuserid.value}-->
<if test="fromuserid.value instanceof java.util.List">
<foreach item="item" collection="fromuserid.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!fromuserid.value instanceof java.util.List">
#{fromuserid.value}
</if>
${fromuserid.likeend}
</if>
<if test="fromprojectid != null">
and tcp.FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}
<!-- #{fromuserid.value}-->
<if test="fromprojectid.value instanceof java.util.List">
<foreach item="item" collection="fromprojectid.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!fromprojectid.value instanceof java.util.List">
#{fromprojectid.value}
</if>
${fromprojectid.likeend}
</if>
<if test="fromplanid != null">
and tcp.FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}
<!-- #{fromuserid.value}-->
<if test="fromplanid.value instanceof java.util.List">
<foreach item="item" collection="fromplanid.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!fromplanid.value instanceof java.util.List">
#{fromplanid.value}
</if>
${fromplanid.likeend}
</if>
<if test="states != null">
and tcp.STATES ${states.dataOp} ${states.likestar}
<!-- #{fromuserid.value}-->
<if test="states.value instanceof java.util.List">
<foreach item="item" collection="states.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!states.value instanceof java.util.List">
#{states.value}
</if>
${states.likeend}
</if>
<if test="fromsourceid != null">
and tcp.FROMSOURCEID ${fromsourceid.dataOp} ${fromsourceid.likestar}
<!-- #{fromuserid.value}-->
<if test="fromsourceid.value instanceof java.util.List">
<foreach item="item" collection="fromsourceid.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!fromsourceid.value instanceof java.util.List">
#{fromsourceid.value}
</if>
${fromsourceid.likeend}
</if>
<!-- <if test="fromuserid.value instanceof java.util.List"> and tcp.FROMUSERID-->
<!-- in-->
<!-- <foreach item="item" collection="fromuserid.value" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<if test="havepoints != null">
and tcp.HAVEPOINTS ${havepoints.dataOp} ${havepoints.likestar}#{havepoints.value}${havepoints.likeend}
</if>
<if test="taskname != null">
and tcp.TASKNAME ${taskname.dataOp} ${taskname.likestar}#{taskname.value}${taskname.likeend}
</if>
<if test="userid != null">
and tcp.USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}
</if>
</trim>
</where>
</sql>
<select id="selectUserByFromid" resultMap="BaseResultUserMap" >
select
u.ID AS id,
@ -232,6 +413,55 @@
where t2.TENANTID = #{tenantId,jdbcType=VARCHAR}
</select>
<select id="repetitionTaskNew" resultMap="resultMap">
SELECT t1.count,
t1.content,
t1.id,
t1.imgUrl,
pic.similarity_score similarityScore,
tcp.STATES,
pic.remark as fromTaskId,
pic.taskName,
tcp.TASKNAME nodeName,
tcp.FROMUPTIME fromTime,
tcp.UPDATETIME as updateTime,
tcp.TASKID as taskId,
tcp.ID as formId,
t1.pictureIds
from (select count(field8) count, field8 content, ID id, GROUP_CONCAT(id) pictureIds, imgUrl
FROM ocr_picture
where suspiciousfile = 0
and tenant_id = #{tenantid.value,jdbcType=VARCHAR}
GROUP BY field8
HAVING count(field8) > 1) t1
left JOIN ocr_picture pic on t1.content = pic.field8
left JOIN ocr_taskchild_picture tcp ON pic.ID = tcp.PICTUREID
<include refid="Base_Where_union_new"/>
<if test="type.value == 0">
and tcp.ISFINAIL = 1
</if>
<if test="type.value == 1">
and tcp.ISLAST = 1
</if>
<if test="thisLoginUserid != null and isFail == null">
and FIND_IN_SET(#{thisLoginUserid.value}
, tcp.ASSIGNEE)
</if>
<if test="thisLoginUserid != null and isFail != null">
and (FIND_IN_SET(#{thisLoginUserid.value}
, tcp.ASSIGNEE)
or tcp.STATES = 5)
</if>
<if test="fromuptimeStart != null">
and tcp.fromuptime &gt;= ${fromuptimeStart.value}
</if>
<if test="fromuptimeEnd != null">
and tcp.fromuptime &lt;= ${fromuptimeEnd.value}
</if>
</select>
<select id="repetitionTaskList" resultType="cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture">
SELECT t2.*, t3.similarity_score similarityScore
FROM ocr_taskchild_picture t2

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.jyjz.xiaoyao.ocr.dataDao.OcrContractorTaskMapper">
<resultMap id="BaseResultMap" type="cn.jyjz.xiaoyao.ocr.dataobject.OcrContractorTask">
<!--@mbg.generated-->
<!--@Table ocr_contractor_task-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="contractor" jdbcType="VARCHAR" property="contractor" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="task_user_assignee" jdbcType="VARCHAR" property="taskUserAssignee" />
<result column="task_user_name" jdbcType="VARCHAR" property="taskUserName" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, contractor, tenant_id, task_user_assignee, task_user_name
</sql>
</mapper>
Loading…
Cancel
Save