|
|
@@ -137,7 +137,7 @@ public class CheckService {
|
|
|
return R.fail("算法服务错误,请重试!");
|
|
|
}
|
|
|
logger.info("===============5=================");
|
|
|
- R algorithm = saveAlgorithmV5(send, checkValid);
|
|
|
+ R algorithm = saveAlgorithmV5(file,send, checkValid);
|
|
|
if (algorithm.getCode() != 200) {
|
|
|
logger.error("==============="+algorithm.getCode()+"=================");
|
|
|
return algorithm;
|
|
|
@@ -305,6 +305,7 @@ public class CheckService {
|
|
|
algorithm.setSignId(Long.valueOf(data.get("cid").toString()));
|
|
|
algorithm.setAlgorithmName(data.get("algorithmName").toString());
|
|
|
algorithm.setIsAlarm(Integer.parseInt(data.get("isAlarm").toString()));
|
|
|
+ algorithm.setOriginalImg(data.get("originalImg").toString());
|
|
|
algorithm.setStatus(0);
|
|
|
return algorithm;
|
|
|
}
|
|
|
@@ -567,11 +568,13 @@ public class CheckService {
|
|
|
* @param send
|
|
|
* @param checkValid
|
|
|
*/
|
|
|
- private R saveAlgorithmV5(ImgPostResponse<AnalysisReturnData> send,AlgorithmYml.CheckValid checkValid){
|
|
|
+ private R saveAlgorithmV5(MultipartFile file,ImgPostResponse<AnalysisReturnData> send,AlgorithmYml.CheckValid checkValid){
|
|
|
String picture = send.getData().getRet_image();
|
|
|
String header = "data:image/jpeg;base64,"+picture;
|
|
|
MultipartFile multipartFile = Base64DecodedMultipartFile.base64ToMultipart(header);
|
|
|
R<SysFile> sysFileR = remoteFileService.upload(multipartFile);
|
|
|
+ R<SysFile> originalFile = remoteFileService.upload(file);
|
|
|
+ String originalUrl = originalFile.getData().getUrl();
|
|
|
String imageUrl = sysFileR.getData().getUrl();
|
|
|
logger.info("==================================imageUrl:"+imageUrl);
|
|
|
AnalysisReturnData data = send.getData();
|
|
|
@@ -589,6 +592,7 @@ public class CheckService {
|
|
|
map.put("aid", data.getAid());
|
|
|
map.put("cid", data.getCid());
|
|
|
map.put("src_img", imageUrl);
|
|
|
+ map.put("originalImg", originalUrl);
|
|
|
map.put("type", "image");
|
|
|
map.put("algorithmName", checkValid.getAlgorithmName());
|
|
|
logger.info("=======================map.tostring()"+map.toString());
|