规则更新

chj_ocr
DELL 2 years ago
parent 258b40332a
commit 6c19863665

@ -53,11 +53,17 @@
<artifactId>similarity</artifactId>
<version>1.1.6</version>
</dependency>
<!-- 积木报表 mongo redis 支持包
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-nosql-starter</artifactId>
</dependency>-->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
<!-- 积木报表 mongo redis 支持包
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-nosql-starter</artifactId>
</dependency>-->
</dependencies>
</project>

@ -11,6 +11,7 @@ import org.apache.commons.lang.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.util.*;
import org.jeecg.modules.ocr.controller.OcrSimulatorController;
import org.jeecg.modules.ocr.entity.OcrIdentify;
import org.jeecg.modules.ocr.entity.OcrIdentifyDetail;
import org.jeecg.modules.ocr.entity.OcrRuleCheck;
@ -23,6 +24,7 @@ import org.jeecg.modules.ocr.utils.FileOUtils;
import org.jeecg.modules.ocr.utils.ImageUtils;
import org.jeecg.modules.ocr.dto.OcrIdentifyDTO;
import org.jeecg.modules.ocr.dto.OcrRuleCheckDTO;
import org.jeecg.modules.ocr.vo.SimulateChecksVO;
import org.jeecg.modules.system.service.ISysDictService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
@ -34,6 +36,7 @@ import javax.annotation.Resource;
import java.awt.*;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
@ -263,4 +266,25 @@ public class ApiController {
}
@ApiOperation(value = "测试病历单")
@PostMapping(value = "/test_bld")
public Result<?> testCodeLogic() {
SimulateChecksVO simulateChecksVO=new SimulateChecksVO();
simulateChecksVO.setIdentifyId("10086");
List<String> identifyDetailIds = Arrays.asList("119");
simulateChecksVO.setIdentifyDetailIdList(identifyDetailIds);
simulateChecksVO.setRuleCheckId("114");
simulateChecksVO.setPatientName("栾梓涵");
simulateChecksVO.setMedicalRecordNumber("123456");
simulateChecksVO.setAdmissionDate("2023-02-02 10:18:23");
simulateChecksVO.setBornDate("2000-05-06");
simulateChecksVO.setAge("23");
//规则检查配置id
String ruleCheckId = simulateChecksVO.getRuleCheckId();
List<String> identifyDetailIdList = simulateChecksVO.getIdentifyDetailIdList();
AssertUtils.notEmpty(ruleCheckId, "请选择[规则扫描器]");
AssertUtils.hasSize(identifyDetailIdList,"请先上传图片");
return Result.OK(ocrIdentifyService.simulateChecks(simulateChecksVO));
}
}

@ -15,6 +15,7 @@ import org.jeecg.modules.ocr.service.IOcrIdentifyDetailService;
import org.jeecg.modules.ocr.service.IOcrIdentifyService;
import org.jeecg.modules.ocr.vo.SimulateChecksVO;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@ -48,6 +48,7 @@ public class OcrApiCallStatisticsServiceImpl extends ServiceImpl<OcrApiCallStati
ocrApiCallStatistics.setStartTime(new Date());
ocrApiCallStatistics.setEndTime(null);
super.save(ocrApiCallStatistics);
// this.save(ocrApiCallStatistics);
return ocrApiCallStatistics.getId();
}

@ -28,4 +28,14 @@ public class SimulateChecksVO {
private String departmentName;
@ApiModelProperty(value = "时间")
private String time;
@ApiModelProperty(value = "患者姓名")
private String patientName;
@ApiModelProperty(value = "病历号")
private String medicalRecordNumber;
@ApiModelProperty(value = "入院日期")
private String admissionDate;
@ApiModelProperty(value = "出生日期")
private String bornDate;
@ApiModelProperty(value = "年龄")
private String age;
}

Loading…
Cancel
Save