|
|
|
@ -577,7 +577,7 @@ public class SyncOrderInfoToPlatform {
|
|
|
|
|
|
|
|
|
|
List<WarehouseMappingDataEntity> warehouseMappingDataEntityList = warehouseMappingDataService.getWarehouseMapping(); |
|
|
|
|
if(warehouseMappingDataEntityList.isEmpty()){ |
|
|
|
|
log.warn("###############syncZeroOrderInfo: 当前没有配置需要同步的仓库信息"); |
|
|
|
|
log.warn("###############clearPackageStatus: 当前没有配置需要同步的仓库信息"); |
|
|
|
|
return ReturnT.FAIL; |
|
|
|
|
} |
|
|
|
|
WarehouseMappingDataEntity warehouseMappingDataEntity = warehouseMappingDataEntityList.get(0); |
|
|
|
@ -591,11 +591,17 @@ public class SyncOrderInfoToPlatform {
|
|
|
|
|
Long packageId = l.getLong("packageId"); |
|
|
|
|
String orderPackageCode = l.getStr("orderPackageCode"); |
|
|
|
|
String orderCode = l.getStr("orderCode"); |
|
|
|
|
Integer status = inventoryDetailClient.findStatusByInventoryIdAndOrderPackageCode(inventoryId,orderPackageCode); |
|
|
|
|
if(status.equals(1)){ |
|
|
|
|
warehouseMappingDataService.updatePackageStatus("20",packageId); |
|
|
|
|
distributionStockArticleClient.updateOrderInfo(orderCode,newWarehouseId); |
|
|
|
|
try{ |
|
|
|
|
Integer status = inventoryDetailClient.findStatusByInventoryIdAndOrderPackageCode(inventoryId,orderPackageCode); |
|
|
|
|
if(status.equals(1)){ |
|
|
|
|
warehouseMappingDataService.updatePackageStatus("20",packageId); |
|
|
|
|
distributionStockArticleClient.updateOrderInfo(orderCode,newWarehouseId); |
|
|
|
|
} |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.error("###########clearPackageStatus: 查询数据有问题"); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
@ -608,8 +614,9 @@ public class SyncOrderInfoToPlatform {
|
|
|
|
|
|
|
|
|
|
List<JSONObject> ls = warehouseMappingDataService.findAllOrderCode(); |
|
|
|
|
|
|
|
|
|
log.info("############repairOrderTotalNum: ls.size={}",ls.size()); |
|
|
|
|
for (JSONObject jsonObject : ls) { |
|
|
|
|
|
|
|
|
|
log.info("############repairOrderTotalNum:jsonObject={}",jsonObject); |
|
|
|
|
String orderCode = jsonObject.getStr("orderCode"); |
|
|
|
|
Long warehouseId = jsonObject.getLong("warehouseId"); |
|
|
|
|
|
|
|
|
@ -624,6 +631,8 @@ public class SyncOrderInfoToPlatform {
|
|
|
|
|
stockArticleEntity.setTotalNumber(total); |
|
|
|
|
distributionStockArticleClient.saveOrUpdate(stockArticleEntity); |
|
|
|
|
distributionStockArticleClient.updateOrderInfo(orderCode,warehouseId); |
|
|
|
|
}else{ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|