数量bug修复

segment-new
zhanglb 1 year ago
parent d9e826f788
commit aefdb20f24

@ -264,6 +264,8 @@ public class OcrFileInfoServiceImpl implements IOcrFileInfoService {
@Override
public List<OcrFileInfoVO> clear(Long patientId) {
OcrBasic ocrBasic = iOcrBasicDao.findOneBy("patientId", patientId);
List<OcrFileInfo> ocrFileInfoList = iOcrFileInfoDao.findBy("patientId", patientId);
List<OcrFileInfo> handJobOcrFileInfoList = ocrFileInfoList.stream().filter(f -> f.getManualSegmentation().equals(true)).collect(Collectors.toList());
@ -271,14 +273,18 @@ public class OcrFileInfoServiceImpl implements IOcrFileInfoService {
handJobOcrFileInfoList.forEach(hanJob->{
hanJob.setFailReason("未匹配到关键字");
hanJob.setAssortId(null);
hanJob.setHitKey(null);
hanJob.setAssortName(null);
hanJob.setManualSegmentation(false);
hanJob.setRuleId(null);
hanJob.setFileTitle(null);
});
iOcrManualRecordService.deleteBy("patientId", patientId);
ocrBasic.setFailNum(handJobOcrFileInfoList.size());
ocrBasic.setSuccessNum(ocrFileInfoList.size()-handJobOcrFileInfoList.size());
iOcrManualRecordService.deleteBy("patientId", patientId);
iOcrBasicDao.updateById(ocrBasic);
iOcrFileInfoDao.updateBatchById(handJobOcrFileInfoList,2000);
return OcrFileInfoConvert.INSTANCE.convertVO(ocrFileInfoList);

Loading…
Cancel
Save