|
@@ -111,6 +111,12 @@ public class CheckService {
|
|
|
if (StringUtils.isNull(labCheckInObj)) {
|
|
if (StringUtils.isNull(labCheckInObj)) {
|
|
|
return R.fail(700, "未配置检查项");
|
|
return R.fail(700, "未配置检查项");
|
|
|
}
|
|
}
|
|
|
|
|
+ //上传原始图片
|
|
|
|
|
+ String orgImgUrl = "";
|
|
|
|
|
+ R<SysFile> r = remoteFileService.upload(file);
|
|
|
|
|
+ if (r.getCode() == 200) {
|
|
|
|
|
+ orgImgUrl = r.getData().getUrl();
|
|
|
|
|
+ }
|
|
|
String labSkipped = "0";
|
|
String labSkipped = "0";
|
|
|
String labCheckCount = "2";
|
|
String labCheckCount = "2";
|
|
|
Object labSkippedObj = map.get("skipped");
|
|
Object labSkippedObj = map.get("skipped");
|
|
@@ -130,7 +136,7 @@ public class CheckService {
|
|
|
MultiValueMap<String, Object> params = getStringObjectMultiValueMap(checkValid, String.valueOf(id));
|
|
MultiValueMap<String, Object> params = getStringObjectMultiValueMap(checkValid, String.valueOf(id));
|
|
|
HttpEntity<MultiValueMap<String, Object>> files = getHttpEntityMap(toFile, params);
|
|
HttpEntity<MultiValueMap<String, Object>> files = getHttpEntityMap(toFile, params);
|
|
|
//添加一条算法请求记录
|
|
//添加一条算法请求记录
|
|
|
- R<Long> alg = insertRequestRecordLog(file, subId, checkValid);
|
|
|
|
|
|
|
+ R<Long> alg = insertRequestRecordLog(orgImgUrl, subId, checkValid);
|
|
|
logger.info("==============>>>算法数据添加结果,alg="+ JSONObject.toJSONString(alg));
|
|
logger.info("==============>>>算法数据添加结果,alg="+ JSONObject.toJSONString(alg));
|
|
|
ImgPostResponse<AnalysisReturnData> send = HttpUtils.sendV5(restTemplateLocal, files, algorithmYml);
|
|
ImgPostResponse<AnalysisReturnData> send = HttpUtils.sendV5(restTemplateLocal, files, algorithmYml);
|
|
|
//算法记录更新
|
|
//算法记录更新
|
|
@@ -195,21 +201,14 @@ public class CheckService {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 添加日志记录
|
|
* 添加日志记录
|
|
|
- * @param file
|
|
|
|
|
|
|
+ * @param fileUrl
|
|
|
* @param subId
|
|
* @param subId
|
|
|
* @param checkValid
|
|
* @param checkValid
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- private R<Long> insertRequestRecordLog(MultipartFile file, Long subId, AlgorithmYml.CheckValid checkValid) {
|
|
|
|
|
|
|
+ private R<Long> insertRequestRecordLog(String fileUrl, Long subId, AlgorithmYml.CheckValid checkValid) {
|
|
|
Algorithm algorithm = new Algorithm();
|
|
Algorithm algorithm = new Algorithm();
|
|
|
- String img = "";
|
|
|
|
|
- try {
|
|
|
|
|
- R<SysFile> originalFile = remoteFileService.upload(file);
|
|
|
|
|
- img = originalFile.getData().getUrl();
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- logger.error("【算法服务】添加日志记录异常",e);
|
|
|
|
|
- }
|
|
|
|
|
- algorithm.setOriginalImg(img);
|
|
|
|
|
|
|
+ algorithm.setOriginalImg(fileUrl);
|
|
|
algorithm.setSubId(subId);
|
|
algorithm.setSubId(subId);
|
|
|
algorithm.setAlgorithmType("image");
|
|
algorithm.setAlgorithmType("image");
|
|
|
algorithm.setAlgorithmName(checkValid.getAlgorithmName());
|
|
algorithm.setAlgorithmName(checkValid.getAlgorithmName());
|