|
|
|
@ -17,7 +17,6 @@ import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.dataDao.FlowableccMybatisDao;
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.dataDao.IHisFlowableActinstDao;
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.dataDao.IRunFlowableActinstDao;
|
|
|
|
|
import cn.jyjz.flowable.domain.dto.HistoricTaskInstanceDto;
|
|
|
|
|
import cn.jyjz.flowable.factory.FlowServiceFactory;
|
|
|
|
|
import cn.jyjz.flowable.service.IFlowTaskService;
|
|
|
|
@ -107,7 +106,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
@Resource
|
|
|
|
|
private DepartmentService departmentService;
|
|
|
|
|
@Resource
|
|
|
|
|
private IHisFlowableActinstDao hisFlowableActinstDao;
|
|
|
|
|
private OcrCheckDescribeHisService ocrCheckDescribeHisService;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private OcrUsersearchService ocrUsersearchService;
|
|
|
|
@ -1820,29 +1819,58 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ResultVo repetitionTask() {
|
|
|
|
|
List<RepeatedContentVo> repeatedContentVoList = flowableccMybatisDao.repetitionTask();
|
|
|
|
|
public ResultVo repetitionTask(Integer type) {
|
|
|
|
|
List<RepeatedContentVo> repeatedContentVoList = flowableccMybatisDao.repetitionTask(type);
|
|
|
|
|
List<String> formIdsToUpdate = new ArrayList<>();
|
|
|
|
|
if (repeatedContentVoList.size() > 0 && repeatedContentVoList.get(0).getRepeatedTaskList().size() > 0) {
|
|
|
|
|
String formIds = repeatedContentVoList.get(0).getRepeatedTaskList().get(0).getFormId();
|
|
|
|
|
String[] formIdsArray = formIds.split(",");
|
|
|
|
|
for (String formId : formIdsArray) {
|
|
|
|
|
formIdsToUpdate.add(formId.trim()); // 去除字符串首尾的空格并添加到集合中
|
|
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(repeatedContentVoList)) {
|
|
|
|
|
List<OcrCheckDescribeHis> checkDescribeHis = new ArrayList<>();
|
|
|
|
|
for (RepeatedContentVo contentVo : repeatedContentVoList) {
|
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(contentVo.getPictureIds())) {
|
|
|
|
|
String[] pictureIds = contentVo.getPictureIds().split(",");
|
|
|
|
|
formIdsToUpdate.addAll(Arrays.asList(pictureIds));
|
|
|
|
|
List<OcrCheckDescribeHis> list = ocrCheckDescribeHisService.list(new LambdaQueryWrapper<OcrCheckDescribeHis>().in(OcrCheckDescribeHis::getPictureId, pictureIds));
|
|
|
|
|
Map<String, List<OcrCheckDescribeHis>> resultMap = new HashMap<>();
|
|
|
|
|
if (!CollectionUtils.isEmpty(list)) {
|
|
|
|
|
resultMap = list.stream().collect(Collectors.groupingBy(OcrCheckDescribeHis::getPictureId));
|
|
|
|
|
}
|
|
|
|
|
for (String pictureId : pictureIds) {
|
|
|
|
|
Set<String> set = new HashSet<>();
|
|
|
|
|
OcrCheckDescribeHis describeHis;
|
|
|
|
|
List<OcrCheckDescribeHis> ocrCheckDescribeHis = resultMap.get(pictureId);
|
|
|
|
|
if (!CollectionUtils.isEmpty(ocrCheckDescribeHis)) {
|
|
|
|
|
describeHis = ocrCheckDescribeHis.get(0);
|
|
|
|
|
String[] split = describeHis.getCheckResult().split(",");
|
|
|
|
|
set.addAll(Arrays.asList(split));
|
|
|
|
|
} else {
|
|
|
|
|
describeHis = new OcrCheckDescribeHis();
|
|
|
|
|
}
|
|
|
|
|
set.addAll(Arrays.asList(pictureIds));
|
|
|
|
|
set.remove(pictureId);
|
|
|
|
|
describeHis.setDescribe(contentVo.getContent());
|
|
|
|
|
describeHis.setPictureId(pictureId);
|
|
|
|
|
describeHis.setCheckResult(String.join(",", set));
|
|
|
|
|
checkDescribeHis.add(describeHis);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
ocrCheckDescribeHisService.saveOrUpdateBatch(checkDescribeHis);
|
|
|
|
|
UpdateWrapper<OcrTaskchildPicture> updateWrapper = new UpdateWrapper<>();
|
|
|
|
|
updateWrapper.in("PICTUREID", formIdsToUpdate)
|
|
|
|
|
.eq("is_repeated_nodules", 0);
|
|
|
|
|
OcrTaskchildPicture updateEntity = new OcrTaskchildPicture();
|
|
|
|
|
updateEntity.setIsRepeatedNodules(1);
|
|
|
|
|
ocrTaskchildPictureService.update(updateEntity, updateWrapper);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return ResultVoUtil.success(repeatedContentVoList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Page<OcrTaskchildPicture> repetitionTaskList(Integer pageNo, Integer pageSize) {
|
|
|
|
|
public Page<OcrTaskchildPicture> repetitionTaskList(Integer pageNo, Integer pageSize, Integer type) {
|
|
|
|
|
Page<OcrTaskchildPicture> page = new Page<>(pageNo, pageSize);
|
|
|
|
|
Page<OcrTaskchildPicture> result = flowableccMybatisDao.repetitionTaskList(page);
|
|
|
|
|
Page<OcrTaskchildPicture> result = flowableccMybatisDao.repetitionTaskList(page, type);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|