|
|
|
@ -23,12 +23,12 @@ import com.docus.server.service.IOcrRuleService;
|
|
|
|
|
import com.docus.server.service.IOcrSpecialRuleService;
|
|
|
|
|
import com.docus.server.service.impl.PlatformServiceImpl;
|
|
|
|
|
import com.docus.server.vo.segmentation.ocrcutconfig.OcrCutConfigVO;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Comparator;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
@ -59,6 +59,12 @@ public class StartSegmentHandler {
|
|
|
|
|
private IFileUploadService iFileUploadService;
|
|
|
|
|
@Resource
|
|
|
|
|
private IOcrCutConfigService iOcrCutConfigService;
|
|
|
|
|
@Value("${ocr.defaultAssortId}")
|
|
|
|
|
private String defaultAssortId;
|
|
|
|
|
@Value("${ocr.defaultAssortName}")
|
|
|
|
|
private String defaultAssortName;
|
|
|
|
|
@Value("${ocr.defaultSuffix}")
|
|
|
|
|
private String defaultSuffix;
|
|
|
|
|
|
|
|
|
|
@TrackRetryListener("START_SEGMENT")
|
|
|
|
|
public void startSegment(String patientId) {
|
|
|
|
@ -141,8 +147,8 @@ public class StartSegmentHandler {
|
|
|
|
|
rate = ocrRuleResult.getRate();
|
|
|
|
|
} else {
|
|
|
|
|
if (assortName == null) {
|
|
|
|
|
assortId = "-1";
|
|
|
|
|
assortName = "其他(无关键字)";
|
|
|
|
|
assortId = this.defaultAssortId;
|
|
|
|
|
assortName = this.defaultAssortName;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -161,7 +167,7 @@ public class StartSegmentHandler {
|
|
|
|
|
|
|
|
|
|
FileDTO fileDTO = new FileDTO();
|
|
|
|
|
fileDTO.setAssortId(fileInfo.getAssortId());
|
|
|
|
|
fileDTO.setFileTitle(fileInfo.getAssortName());
|
|
|
|
|
fileDTO.setFileTitle(fileInfo.getAssortName()+this.defaultSuffix);
|
|
|
|
|
fileDTO.setSort(fileInfo.getSort());
|
|
|
|
|
fileDTO.setFileType(2);
|
|
|
|
|
fileDTO.setUploadFileName(fileInfo.getPicName());
|
|
|
|
|