|
|
|
@ -876,5 +876,43 @@ public class SyncOrderInfoToPlatform {
|
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@XxlJob("syncWaybillOrderInfo") |
|
|
|
|
public ReturnT<String> syncWaybillOrderInfo(String param) { |
|
|
|
|
log.info("############syncWaybillOrderInfo: 同步运单下订单信息 开始"); |
|
|
|
|
List<JSONObject> waybillJSONs = warehouseMappingDataService.findSyncWaybillOrderInfo(); |
|
|
|
|
|
|
|
|
|
if(StringUtil.isBlank(param)){ |
|
|
|
|
log.warn("###########syncWaybillOrderInfo: 仓库id为空"); |
|
|
|
|
throw new CustomerException(405,"仓库id为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Long warehouseId = Long.parseLong(param); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
log.warn("###########syncWaybillOrderInfo: 仓库信息为空"); |
|
|
|
|
throw new CustomerException(405,"仓库信息为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Integer oldId = warehouseEntity.getOldId(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
waybillJSONs.forEach(waybillJSON -> { |
|
|
|
|
|
|
|
|
|
Integer id = waybillJSON.getInt("id"); |
|
|
|
|
String waybillNo = waybillJSON.getStr("waybillNo"); |
|
|
|
|
|
|
|
|
|
List<String> list = advanceClient.findListByWaybillNo(waybillNo); |
|
|
|
|
|
|
|
|
|
syncOrderInfoService.handleData(list,oldId,warehouseId,null,null); |
|
|
|
|
|
|
|
|
|
warehouseMappingDataService.updateSyncWaybillOrderRecordById(id,1); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
log.info("############syncWaybillOrderInfo: 同步运单信息 完成"); |
|
|
|
|
|
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|