回传匹配度调整
chj_ocr
周文涛 2 years ago
parent ce00cf05c0
commit 4a0b5f2393

@ -62,7 +62,7 @@ public class HandleCallbacklnit implements ApplicationRunner {
autoPushNoticeMaxNum = Integer.valueOf(callbackApiConfig.getValue()); autoPushNoticeMaxNum = Integer.valueOf(callbackApiConfig.getValue());
} }
} }
log.info(pushTimeInterval+"秒请求一次回调");
while (true){ while (true){
try { try {
Thread.sleep(pushTimeInterval*1000); Thread.sleep(pushTimeInterval*1000);

@ -32,14 +32,14 @@ public class CallBackWlyUtils {
//请求对象 //请求对象
CallBackWlyResult result = new CallBackWlyResult(); CallBackWlyResult result = new CallBackWlyResult();
List<JSONObject> jsonObjects = new ArrayList<>(); List<JSONObject> taskResultInfoList=null;
//总明细数量 //总明细数量
int detail_detailCount = 0; int detail_detailCount = 0;
int detailValidationCount=0; int detailValidationCount=0;
String taskResultInfo = ocrIdentify.getTaskResultInfo(); String taskResultInfo = ocrIdentify.getTaskResultInfo();
if (StringUtils.isNotBlank(taskResultInfo)) { if (StringUtils.isNotBlank(taskResultInfo)) {
//循环获取哪些字段通过了 //循环获取哪些字段通过了
List<JSONObject> taskResultInfoList = JSONArray.parseArray(taskResultInfo).toJavaList(JSONObject.class); taskResultInfoList = JSONArray.parseArray(taskResultInfo).toJavaList(JSONObject.class);
detail_detailCount=taskResultInfoList.size(); detail_detailCount=taskResultInfoList.size();
for (JSONObject jsonObject : taskResultInfoList) { for (JSONObject jsonObject : taskResultInfoList) {
Boolean ruleValidation = (Boolean) jsonObject.getOrDefault("ruleValidation", false); Boolean ruleValidation = (Boolean) jsonObject.getOrDefault("ruleValidation", false);
@ -65,10 +65,10 @@ public class CallBackWlyUtils {
result.setImageTagRetrievePercentage(imageTagRetrievePercentage + ""); result.setImageTagRetrievePercentage(imageTagRetrievePercentage + "");
result.setRetrieveReviewCompliance(imageTagRetrievePercentage+""); result.setRetrieveReviewCompliance(imageTagRetrievePercentage+"");
result.setFailureReason(ocrIdentify.getErrorMsg()); result.setFailureReason(ocrIdentify.getErrorMsg());
if (CollectionUtils.isEmpty(jsonObjects)) { if (CollectionUtils.isEmpty(taskResultInfoList)) {
return false; return false;
} }
result.setOcrResult(jsonObjects); result.setOcrResult(taskResultInfoList);
log.info("请求无量云回调接口"); log.info("请求无量云回调接口");
JSONObject semanticResponseJson = null; JSONObject semanticResponseJson = null;

Loading…
Cancel
Save