|
@@ -1,6 +1,5 @@
|
|
|
package com.zd.alg.forward.serivce.impl;
|
|
package com.zd.alg.forward.serivce.impl;
|
|
|
|
|
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.zd.alg.forward.config.AlgorithmYml;
|
|
import com.zd.alg.forward.config.AlgorithmYml;
|
|
|
import com.zd.alg.forward.domain.AlgorithmResponseResult;
|
|
import com.zd.alg.forward.domain.AlgorithmResponseResult;
|
|
@@ -90,6 +89,8 @@ public class AlgorithmServiceImpl implements AlgorithmService {
|
|
|
vo.setOriginalImage(fileUrl);
|
|
vo.setOriginalImage(fileUrl);
|
|
|
vo.setResultImage(algorithm.getAlgorithmResult());
|
|
vo.setResultImage(algorithm.getAlgorithmResult());
|
|
|
vo.setIsAlert(responseResult.getIsPass());
|
|
vo.setIsAlert(responseResult.getIsPass());
|
|
|
|
|
+ Boolean State = (responseResult.getObjects() != null && responseResult.getObjects().size() > 0) ? Boolean.TRUE : Boolean.FALSE;
|
|
|
|
|
+ vo.setState(State);
|
|
|
return vo;
|
|
return vo;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -154,7 +155,6 @@ public class AlgorithmServiceImpl implements AlgorithmService {
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public AlgorithmResponseResult getResponseResult(ImgPostResponse<AnalysisReturnData> send) {
|
|
public AlgorithmResponseResult getResponseResult(ImgPostResponse<AnalysisReturnData> send) {
|
|
|
- log.info("【算法响应数据】==============>>>>{}",JSON.toJSONString(send));
|
|
|
|
|
AlgorithmResponseResult responseResult = new AlgorithmResponseResult();
|
|
AlgorithmResponseResult responseResult = new AlgorithmResponseResult();
|
|
|
if (send != null) {
|
|
if (send != null) {
|
|
|
responseResult.setCode(send.getStatus_code());
|
|
responseResult.setCode(send.getStatus_code());
|