master
周文涛 2 years ago
parent 6674c51c6e
commit 46e22c6ab5

@ -71,11 +71,11 @@ public class HandleCallbacklnit implements ApplicationRunner {
}
List<OcrIdentify> ocrIdentifyList = ocrIdentifyService.findNeNoticeList(autoPushNoticeMaxNum);
for (OcrIdentify ocrIdentify : ocrIdentifyList) {
ocrIdentifyService.callbackWly(ocrIdentify.getId());
try {
ocrIdentifyService.callbackWly(ocrIdentify.getId());
Thread.sleep(pushTimeInterval*1000);
} catch (InterruptedException e) {
e.printStackTrace();
log.error(e.getMessage());
}
}
///TODO 优化下代码,重复执行了这段 获取请求时间间隔的代码了。

@ -37,6 +37,7 @@ public class CallBackWlyUtils {
//总明细数量
int detail_detailCount = 0;
for (OcrIdentifyDetail identifyDetail : identifyDetails) {
if (StringUtils.isNotBlank(identifyDetail.getDataStructured())) {
List<JSONObject> jsonObjects1 = JSONArray.parseArray(identifyDetail.getDataStructured()).toJavaList(JSONObject.class);
if (CollectionUtils.isNotEmpty(jsonObjects1)) {
double textRate = jsonObjects.stream().mapToDouble(o->o.getDouble("textRate")).sum();
@ -45,6 +46,7 @@ public class CallBackWlyUtils {
jsonObjects.addAll(jsonObjects1);
}
}
}
//组装回调参数
double imageTagRetrievePercentage = 0.0d;

Loading…
Cancel
Save