|
|
@@ -682,7 +682,7 @@ public class OmsTransOrderController extends BaseRESTfulController {
|
|
|
return success("没有需要重传的数据(传输类型:" + ("0".equals(busiType) ? "采购" : "销售")
|
|
|
+ ",时间范围:" + (startDate == null ? "不限" : startDate) + " ~ " + (endDate == null ? "不限" : endDate) + ")");
|
|
|
}
|
|
|
- int index= 0,section = 300;//分片大小
|
|
|
+ int index= 0,section = 50;//分片大小(客户平台单批处理慢,50条/片约3-5秒,避免读超时)
|
|
|
int total = listXt.size();
|
|
|
int successCount = 0;
|
|
|
log.info("重传火运实绩->环保:busiType=" + busiType + ",时间范围 " + startDate + " ~ " + endDate + ",共 " + total + " 条");
|
|
|
@@ -696,7 +696,8 @@ public class OmsTransOrderController extends BaseRESTfulController {
|
|
|
}
|
|
|
Map<String,Object>[] paramArray = tempList.toArray(new Map[tempList.size()]);
|
|
|
try {
|
|
|
- daZongUtil.executeEnvironment("/train/saveOrUpdate", paramArray);
|
|
|
+ //重传为批量推送,读取超时放到60秒(默认sendPost只有10秒,客户平台处理不完会Read timed out)
|
|
|
+ daZongUtil.executeEnvironment("/train/saveOrUpdate", paramArray, 5000, 60000);
|
|
|
} catch (Exception e) {
|
|
|
log.error("重传火运实绩失败:第 " + index + " 片(" + tempList.size() + " 条)", e);
|
|
|
throw new Exception("重传中止:第 " + index + " 片(" + tempList.size() + " 条)推送失败,已成功 "
|
|
|
@@ -715,7 +716,7 @@ public class OmsTransOrderController extends BaseRESTfulController {
|
|
|
// tempList = listHa.subList((index - 1) * section, listHa.size());
|
|
|
// }
|
|
|
// Map<String,Object>[] paramArray = tempList.toArray(new Map[tempList.size()]);
|
|
|
- // daZongUtil.executeEnvironment("/ha/train/saveOrUpdate", paramArray);
|
|
|
+ // daZongUtil.executeEnvironment("/ha/train/saveOrUpdate", paramArray, 5000, 60000);
|
|
|
//}
|
|
|
return success("重传完成:传输类型 " + ("0".equals(busiType) ? "采购" : "销售")
|
|
|
+ ",共 " + total + " 条,分 " + index + " 片推送成功");
|