bug修复

segment2.0
zhanglb 2 years ago
parent 646e19f80e
commit 2f0ec4be38

@ -34,6 +34,9 @@ public class AddOcrRuleDTO implements Serializable {
@ApiModelProperty(value = "分段id")
private String assortId;
@ApiModelProperty(value = "分段名称")
private Integer assortName;
@ApiModelProperty(value = "占比分")
private Integer matchRatio;

@ -34,6 +34,9 @@ public class EditOcrRuleDTO implements Serializable {
@ApiModelProperty(value = "分段id")
private String assortId;
@ApiModelProperty(value = "分段名称")
private Integer assortName;
@ApiModelProperty(value = "占比分")
private Integer matchRatio;

@ -34,6 +34,9 @@ public class AddOcrRuleTestDTO implements Serializable {
@ApiModelProperty(value = "分段id")
private String assortId;
@ApiModelProperty(value = "分段名称")
private Integer assortName;
@ApiModelProperty(value = "占比分")
private Integer matchRatio;

@ -34,6 +34,9 @@ public class EditOcrRuleTestDTO implements Serializable {
@ApiModelProperty(value = "分段id")
private String assortId;
@ApiModelProperty(value = "分段名称")
private Integer assortName;
@ApiModelProperty(value = "占比分")
private Integer matchRatio;

@ -41,6 +41,10 @@ public class OcrRule implements Serializable {
@TableField("assort_id")
private String assortId;
@ApiModelProperty(value = "分段名称")
@TableField("assort_name")
private String assortName;
@ApiModelProperty(value = "占比分")
@TableField("match_ratio")
private Integer matchRatio;

@ -41,6 +41,10 @@ public class OcrRuleTest implements Serializable {
@TableField("assort_id")
private String assortId;
@ApiModelProperty(value = "分段名称")
@TableField("assort_name")
private String assortName;
@ApiModelProperty(value = "占比分")
@TableField("match_ratio")
private Integer matchRatio;

@ -1,5 +1,6 @@
package com.docus.server.vo.segmentation.ocrrule;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
@ -34,6 +35,9 @@ public class OcrRuleVO implements Serializable {
@ApiModelProperty(value = "分段id")
private String assortId;
@ApiModelProperty(value = "分段名称")
private Integer assortName;
@ApiModelProperty(value = "占比分")
private Integer matchRatio;

@ -34,6 +34,9 @@ public class OcrRuleTestVO implements Serializable {
@ApiModelProperty(value = "分段id")
private String assortId;
@ApiModelProperty(value = "分段名称")
private Integer assortName;
@ApiModelProperty(value = "占比分")
private Integer matchRatio;

@ -91,7 +91,6 @@ public class FileController {
widthEnd = ocrCutConfigVO.getWidthEnd();
}
List<UploadFileVO> segmentation = iFileUploadService.uploadFile(files, "segmentation", height, widthStart, widthEnd);
//将基础信息存到库表里面,后面自动分段后,需要上传到归档系统
@ -130,15 +129,15 @@ public class FileController {
return commonService.getOcr(segmentation.get(0), request);
}
/**
*
*
* @throws Exception
*/
@ApiOperation("批量上传文件到归档系统")
@GetMapping("/uploadPlatform")
public void uploadPlatform() throws Exception {
downloadService.uploadPlatform(null, null);
}
//
// /**
// * 下载平台
// *
// * @throws Exception
// */
// @ApiOperation("批量上传文件到归档系统")
// @GetMapping("/uploadPlatform")
// public void uploadPlatform() throws Exception {
// downloadService.uploadPlatform(null, null);
// }
}

@ -11,6 +11,7 @@ import com.docus.server.infrastructure.dao.IOcrUrlConfigDao;
import com.docus.server.infrastructure.dao.IOcrVersionDao;
import com.docus.server.service.IOcrRuleService;
import com.docus.server.service.IOcrSpecialRuleService;
import com.docus.server.service.impl.PlatformServiceImpl;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@ -38,6 +39,8 @@ public class StartSegmentHandler {
private IOcrUrlConfigDao iOcrUrlConfigDao;
@Resource
private IOcrBasicDao iOcrBasicDao;
@Resource
private PlatformServiceImpl platformService;
@TrackRetryListener("START_SEGMENT")
public void startSegment(String patientId) {
@ -111,6 +114,6 @@ public class StartSegmentHandler {
iOcrFileInfoDao.updateBatchById(fileInfoList,iOcrFileInfoDao.DEFAULT_BATCH_SIZE);
//数据上传到3.0
platformService.uploadPlatform(null, null);
}
}

@ -92,6 +92,7 @@ public class OcrRuleServiceImpl implements IOcrRuleService {
continue;
}
String assortId = ocrRule.getAssortId();
String assortName = ocrRule.getAssortName();
double score = ocrRule.getMatchRatio();
String[] keyWordList = ocrRule.getKeyWord().split("#");
@ -110,6 +111,7 @@ public class OcrRuleServiceImpl implements IOcrRuleService {
for (OcrRuleJson ruleJson : ocrRuleList) {
//匹配二级的关键词列表
assortId = ruleJson.getAssortId();
assortName = ruleJson.getAssortName();
List<OcrRuleSecondJson> ocrRuleSecondJsonList = ruleJson.getKeyWordList();
for (OcrRuleSecondJson ocrRuleSecondJson:ocrRuleSecondJsonList) {
if (Func.isEmpty(ocrRuleSecondJson.getKeyWord())){
@ -126,6 +128,7 @@ public class OcrRuleServiceImpl implements IOcrRuleService {
OcrRuleResult ocrRuleResult = new OcrRuleResult();
ocrRuleResult.setRuleId(ocrRule.getId());
ocrRuleResult.setAssortId(assortId);
ocrRuleResult.setAssortName(assortName);
ocrRuleResult.setHitKey(keyWord);
ocrRuleResult.setRate(rate);
return ocrRuleResult;
@ -138,6 +141,7 @@ public class OcrRuleServiceImpl implements IOcrRuleService {
OcrRuleResult ocrRuleResult = new OcrRuleResult();
ocrRuleResult.setRuleId(ocrRule.getId());
ocrRuleResult.setAssortId(assortId);
ocrRuleResult.setAssortName(assortName);
ocrRuleResult.setHitKey(keyWord);
ocrRuleResult.setRate(rate);
return ocrRuleResult;

@ -42,6 +42,7 @@ public class OcrRuleTestServiceImpl implements IOcrRuleTestService {
List<OcrRuleTest> ocrRuleTestList = iOcrRuleTestDao.findAll();
//判断是否符合某个条件的开始条件
for (OcrRuleTest ocrRuleTest : ocrRuleTestList) {
String assortName = ocrRuleTest.getAssortId();
String assortId = ocrRuleTest.getAssortId();
double score = ocrRuleTest.getMatchRatio();
if (Func.isEmpty(ocrRuleTest.getKeyWord())){
@ -64,6 +65,7 @@ public class OcrRuleTestServiceImpl implements IOcrRuleTestService {
for (OcrRuleJson ruleJson : ocrRuleList) {
//匹配二级的关键词列表
assortId = ruleJson.getAssortId();
assortName = ruleJson.getAssortName();
List<OcrRuleSecondJson> ocrRuleSecondJsonList = ruleJson.getKeyWordList();
for (OcrRuleSecondJson ocrRuleSecondJson : ocrRuleSecondJsonList) {
if (Func.isEmpty(ocrRuleSecondJson.getKeyWord())){

@ -117,7 +117,7 @@ public class OcrSpecialRuleServiceImpl implements IOcrSpecialRuleService {
String assortId = ocrSpecialRule.getAssortId();
String startJson = ocrSpecialRule.getStartJson();
String assortName = ocrSpecialRule.getName();
String assortName = ocrSpecialRule.getAssortName();
List<OcrSpecialRuleJson> ocrSpecialRuleJsons = Func.parseJsonArray(startJson, OcrSpecialRuleJson.class);
for (OcrSpecialRuleJson ocrSpecialRuleJson : ocrSpecialRuleJsons) {

Loading…
Cancel
Save