From 1da25c28db63aae60e2fd3cebf99b6d64a9e7d24 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 12 Dec 2023 12:32:23 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=90=8C=E6=AD=A5=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=95=B0=E6=8D=AE=E7=9A=84=E9=80=BB=E8=BE=91=202.?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A8=E9=80=81=E6=95=B0=E6=8D=AE=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=AE=A2=E5=8D=95=E4=BF=A1=E6=81=AF=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IDistributionStockArticleClient.java | 3 ++ .../feign/DistributionStockArticleClient.java | 5 ++ .../DistributionStockArticleServiceImpl.java | 6 +++ .../impl/PanFactoryDataServiceImpl.java | 28 +++++------ .../logpm/oldproject/feign/AdvanceClient.java | 2 +- .../logpm/oldproject/mapper/OrderMapper.xml | 16 +++--- .../impl/SyncOrderInfoServiceImpl.java | 49 ++++++++++++------- 7 files changed, 70 insertions(+), 39 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java index fed0b0c0c..d77cd01d9 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java @@ -124,4 +124,7 @@ public interface IDistributionStockArticleClient { @GetMapping(API_PREFIX + "/addIncomingNum") void addIncomingNum(@RequestParam Long orderId, @RequestParam Integer num); + + @GetMapping(API_PREFIX + "/updateOrderInfo") + void updateOrderInfo(@RequestParam String orderCode, @RequestParam Long warehouseId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java index 1e1bc5dac..348ebb357 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java @@ -257,4 +257,9 @@ public class DistributionStockArticleClient implements IDistributionStockArticle distributionStockArticleService.addIncomingNumk(orderId,num); } + @Override + public void updateOrderInfo(String orderCode, Long warehouseId) { + distributionStockArticleService.updateOrderInfo(orderCode,warehouseId); + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index 4051eabff..95099a7fe 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -1303,6 +1303,9 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl= totalNumber){ - distributionStockArticleEntity.setCompleteSet(1); - distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.yishouhuo.getValue()); - distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue()); - }else{ - distributionStockArticleEntity.setCompleteSet(0); - distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.bufenshouhuo.getValue()); - distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.bufenruku.getValue()); - } - distributionStockArticleEntity.setHandQuantity(handQuantity + 1); - distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity); +// Integer handQuantity = distributionStockArticleEntity.getHandQuantity(); +// Integer totalNumber = distributionStockArticleEntity.getTotalNumber(); +// +// if(handQuantity+1 >= totalNumber){ +// distributionStockArticleEntity.setCompleteSet(1); +// distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.yishouhuo.getValue()); +// distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue()); +// }else{ +// distributionStockArticleEntity.setCompleteSet(0); +// distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.bufenshouhuo.getValue()); +// distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.bufenruku.getValue()); +// } +// distributionStockArticleEntity.setHandQuantity(handQuantity + 1); +// distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity); } } } diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/AdvanceClient.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/AdvanceClient.java index 97fbb2b44..f3d610ccf 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/AdvanceClient.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/AdvanceClient.java @@ -101,6 +101,6 @@ public class AdvanceClient implements IAdvanceClient { List list = service.findListByAdvanceIds(advanceIds); - return null; + return list; } } diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.xml b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.xml index d504acb05..901ce329b 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.xml +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.xml @@ -51,11 +51,13 @@ AND `i`.`goods_type` = '1' AND ( ( `i`.`in_num` + `i`.`delives_num` ) > 0 ) and `i`.warehouse_id = #{oldWarehouseId} - - AND `i`.`orderSelfNum` = #{param} - ORDER BY `i`.`update_time` DESC) t on `o`.order_code = t.orderSelfNum + where 1=1 + and `o`.is_update = 0 + + AND t.orderSelfNum = #{param} + @@ -111,11 +113,13 @@ AND `i`.`goods_type` = '1' AND ( ( `i`.`in_num` + `i`.`delives_num` ) > 0 ) and `i`.warehouse_id = #{oldWarehouseId} - - AND `i`.`orderSelfNum` = #{param} - ORDER BY `i`.`id` DESC) t on `o`.order_code = t.orderSelfNum + where 1=1 + and `o`.is_update = 0 + + AND t.orderSelfNum = #{param} + LIMIT #{pageNum},#{pageSize} diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java index c2235e090..f71660353 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java @@ -1386,6 +1386,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { Integer carsType = orderDetailEntity.getCarsType(); Integer signState = orderDetailEntity.getSignState(); waybillNo = orderDetailEntity.getWaybillNo(); + Date rukuTime = orderDetailEntity.getCreateTime(); //存入运单信息 WayBillEntity waybillEntity = saveWaybillEntity(waybillNo); @@ -1408,9 +1409,20 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { // if(3==carsType||4 == carsType){ // entity.setOrderPackageStatus(OrderPackageStatusConstant.yichuku.getValue()); // } -// if(2 == signState){ -// entity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue()); -// } + if(2 == signState){ + entity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue()); + }else{ + String warehouseName = waybillEntity.getWarehouseName();//目的仓 + BasicdataWarehouseEntity endhouse = basicdataWarehouseClient.findByName(warehouseName); + Long endWarehouseId = endhouse.getId(); + Long warehouseId = distributionStockArticleEntity.getWarehouseId(); + + if(endWarehouseId.equals(warehouseId)){ + entity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue()); + }else{ + entity.setOrderPackageStatus(OrderPackageStatusConstant.zhongzhuanruku.getValue()); + } + } entity.setOrderPackageFreezeStatus(OrderPackageFreezeStatusConstant.weidongjie.getValue()); entity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue()); entity.setOrderPackageGroundingStatus(OrderPackageGroundingStatusConstant.daishangjia.getValue()); @@ -1431,7 +1443,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { entity.setDealerCode(distributionStockArticleEntity.getDealerCode()); entity.setDealerName(distributionStockArticleEntity.getDealerName()); - entity.setWarehouseEntryTimeEnd(CommonUtil.StringToDate(operationTime)); + entity.setWarehouseEntryTimeEnd(rukuTime); entity.setMaterialCode(vo.getMaterialCode()); entity.setMaterialName(vo.getMaterialName()); @@ -1455,20 +1467,21 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { log.warn("#################handleDataToPlatform: 保存包件信息失败 orderCode={}", entity.getOrderCode()); }else{ log.info("################handleDataToPlatform: 保存包件成功 OrderPackageCode={}",vo.getPacketBarCode()); - Integer handQuantity = distributionStockArticleEntity.getHandQuantity(); - Integer totalNumber = distributionStockArticleEntity.getTotalNumber(); - - if(handQuantity+1 >= totalNumber){ - distributionStockArticleEntity.setCompleteSet(1); - distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.yishouhuo.getValue()); - distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue()); - }else{ - distributionStockArticleEntity.setCompleteSet(0); - distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.bufenshouhuo.getValue()); - distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.bufenruku.getValue()); - } - distributionStockArticleEntity.setHandQuantity(handQuantity + 1); - distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity); +// distributionStockArticleClient.updateOrderInfo(orderCode,distributionStockArticleEntity.getWarehouseId()); +// Integer handQuantity = distributionStockArticleEntity.getHandQuantity(); +// Integer totalNumber = distributionStockArticleEntity.getTotalNumber(); +// +// if(handQuantity+1 >= totalNumber){ +// distributionStockArticleEntity.setCompleteSet(1); +// distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.yishouhuo.getValue()); +// distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue()); +// }else{ +// distributionStockArticleEntity.setCompleteSet(0); +// distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.bufenshouhuo.getValue()); +// distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.bufenruku.getValue()); +// } +// distributionStockArticleEntity.setHandQuantity(handQuantity + 1); +// distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity); } }