|
|
|
@ -6,6 +6,7 @@ import cn.hutool.core.lang.UUID;
|
|
|
|
|
import cn.hutool.core.util.EnumUtil; |
|
|
|
|
import cn.hutool.core.util.NumberUtil; |
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
|
import cn.hutool.core.util.RandomUtil; |
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
import cn.hutool.http.HttpUtil; |
|
|
|
|
import cn.hutool.json.JSONArray; |
|
|
|
@ -104,11 +105,14 @@ public class NodeDataPushListener {
|
|
|
|
|
List<PushOrderDetailEntity> orderDetailEntities = pushOrderDetailService.list(Wrappers.<PushOrderDetailEntity>lambdaQuery() |
|
|
|
|
.in(PushOrderDetailEntity::getCustomItemNo, sendOrderCode) |
|
|
|
|
); |
|
|
|
|
Boolean flag = Boolean.FALSE; |
|
|
|
|
if (CollUtil.isEmpty(orderDetailEntities)) { |
|
|
|
|
// 去老系统查
|
|
|
|
|
if (StrUtil.isNotEmpty(jinPaiProperties.getOldSystemHost()) && StrUtil.isNotEmpty(jinPaiProperties.getFindOldDataUrl())) { |
|
|
|
|
try { |
|
|
|
|
log.info("去老系统查询:{}", sendOrderCode); |
|
|
|
|
String result = HttpUtil.get(jinPaiProperties.getOldSystemHost() + jinPaiProperties.getFindOldDataUrl() + "?orderCode=" + sendOrderCode); |
|
|
|
|
log.info("老系统查询结果:{}", result); |
|
|
|
|
if (StrUtil.isNotEmpty(result)) { |
|
|
|
|
JSONObject jsonObject = JSONUtil.parseObj(result); |
|
|
|
|
Integer code = jsonObject.getInt("code"); |
|
|
|
@ -116,6 +120,7 @@ public class NodeDataPushListener {
|
|
|
|
|
JSONArray data = jsonObject.getJSONArray("data"); |
|
|
|
|
if (CollUtil.isNotEmpty(data)) { |
|
|
|
|
orderDetailEntities = data.toList(PushOrderDetailEntity.class); |
|
|
|
|
flag = Boolean.TRUE; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -189,7 +194,7 @@ public class NodeDataPushListener {
|
|
|
|
|
js.set("endSite", mainJson.getStr("warehouseName")); |
|
|
|
|
js.set("passSite", mainJson.getStr("acceptWarehouseName")); |
|
|
|
|
js.set("doRemark", ""); |
|
|
|
|
js.set("reqSn", pushOrderEntity.getId()); |
|
|
|
|
js.set("reqSn", (RandomUtil.randomLong(19, 19) - RandomUtil.randomLong(19) + RandomUtil.randomLong(19)) + ""); |
|
|
|
|
js.set("syscode", "huitong"); |
|
|
|
|
js.set("carNo", mainJson.getStr("carNumber")); |
|
|
|
|
js.set("carHangNo", ""); |
|
|
|
|