From c75b24de998c41506343b8d794d6d2c55f5c2006 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Mon, 11 Dec 2023 20:21:53 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BF=E6=A8=A1=E5=9D=97=E8=A3=85?= =?UTF-8?q?=E8=BD=A6=EF=BC=8C=E5=8D=B8=E8=BD=A6=E6=8F=90=E4=BA=A4=202.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/IDistributionStockListClient.java | 3 + .../logpm/trunkline/vo/UnloadPackageVO.java | 1 + .../feign/DistributionStockListClient.java | 5 ++ .../mapper/DistributionStockListMapper.java | 3 +- .../mapper/DistributionStockListMapper.xml | 6 ++ .../IDistributionStockListService.java | 3 +- .../DistributionStockListServiceImpl.java | 10 +-- .../impl/SyncOrderInfoServiceImpl.java | 43 ++++++------ .../controller/CarsLoadController.java | 34 +++++++++ .../TripartiteTransferController.java | 31 --------- .../mapper/TrunklineCarsLoadScanMapper.xml | 3 +- .../mapper/TrunklineCarsLoadingLogMapper.xml | 2 +- .../mapper/TrunklineCarsOrderMapper.xml | 7 +- .../mapper/TrunklineCarsUnloadLogMapper.xml | 4 -- .../impl/TrunklineCarsLoadServiceImpl.java | 69 ++++++++++++------- .../impl/WarehouseUpdownTypeServiceImpl.java | 5 ++ 16 files changed, 136 insertions(+), 93 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java index a42b09c92..c5846b971 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java @@ -127,4 +127,7 @@ public interface IDistributionStockListClient { @GetMapping(API_PREFIX+"/getEntityByMarketNameAndMaterialCodeAndIncomingBatch") DistributionStockListEntity getEntityByMarketNameAndMaterialCodeAndIncomingBatch(@RequestParam("marketName") String marketName, @RequestParam("materialCode") String materialCode, @RequestParam("incomingBatch") String incomingBatch, @RequestParam("warehouseId") Long warehouseId); + + @GetMapping(API_PREFIX+"/updeteSourceTypeById") + void updeteSourceTypeById(@RequestParam String sourceType, @RequestParam Long stockListId); } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java index 83950c4fd..11a3728eb 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java @@ -9,6 +9,7 @@ public class UnloadPackageVO implements Serializable { private String orderPackageCode; private Integer num; + private Integer unloadNum; private String trayName; private String trayCode; private String scanStatus; diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java index a8548b99f..78eb03c67 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java @@ -195,4 +195,9 @@ public class DistributionStockListClient implements IDistributionStockListClient return distributionStockListService.getOne(queryWrapper); } + @Override + public void updeteSourceTypeById(String sourceType, Long stockListId) { + distributionStockListService.updeteSourceTypeById(sourceType,stockListId); + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java index 738aba33d..219635c86 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java @@ -21,7 +21,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.distribution.dto.DistributionStockListDTO; import com.logpm.distribution.entity.DistributionStockListEntity; -import com.logpm.distribution.excel.DistributionStockListExcel; import com.logpm.distribution.vo.DistributionStockListAllocationVO; import com.logpm.distribution.vo.DistributionStockListVO; import com.logpm.distribution.vo.DistributionStockupStockListInfoVO; @@ -118,4 +117,6 @@ public interface DistributionStockListMapper extends BaseMapper + + update logpm_distribution_stock_list + set source_type = #{sourceType} + where id = #{stockListId} + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java index 4b1d19ba8..ac7a33ed4 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java @@ -16,7 +16,6 @@ */ package com.logpm.distribution.service; -import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.distribution.dto.DistributionStockListDTO; import com.logpm.distribution.entity.DistributionStockListEntity; @@ -175,6 +174,8 @@ public interface IDistributionStockListService extends BaseService select scan_code orderPackageCode, num num, + unload_num unloadNum, tray_code trayCode, tray_name trayName, scan_status scanStatus from logpm_trunkline_cars_load_scan where load_id = #{loadId} - and warehouse_id = #{warehouseId} + and final_node_id = #{warehouseId} and waybill_no = #{waybillNo} and order_code = #{orderCode} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml index 00715c3a6..4f5b202a5 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml @@ -1,6 +1,6 @@ - + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml index eae6331d7..c63a931d8 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml @@ -53,10 +53,9 @@ ltco.order_code orderCode, ltco.plan_num planNum, sum(ltcls.num) loadingNum, - sum(ltcus.num) unloadingNum + sum(ltcls.unload_num) unloadingNum from logpm_trunkline_cars_order ltco - left join logpm_trunkline_cars_load_scan ltcls on ltcls.waybill_no = ltco.waybill_no - left join logpm_trunkline_cars_unload_scan ltcus on ltcus.waybill_no = ltco.waybill_no + left join logpm_trunkline_cars_load_scan ltcls on ltcls.waybill_no = ltco.waybill_no and ltco.order_code = ltcls.order_code and ltco.load_id = ltcls.load_id where ltco.load_id = #{loadId} and ltco.node_id = #{nodeId} and ltco.type = 2 @@ -71,7 +70,7 @@ real_num loadingNum, unload_num unloadNum from logpm_trunkline_cars_order - where is_deleted = 0, + where is_deleted = 0 and load_id = #{loadId} and final_node_id = #{warehouseId} and `type` = 2 diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml index c0504682b..29752c060 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml @@ -39,8 +39,4 @@ and waybill_no = #{waybillNo} - - - diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index 411382555..ef327d5be 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -1,6 +1,5 @@ package com.logpm.trunkline.service.impl; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -14,8 +13,12 @@ import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionStockArticleEntity; import com.logpm.distribution.feign.IDistributionParcelListClient; import com.logpm.distribution.feign.IDistributionStockArticleClient; +import com.logpm.trunkline.bean.Resp; import com.logpm.trunkline.dto.*; -import com.logpm.trunkline.entity.*; +import com.logpm.trunkline.entity.TrunklineCarsLoadEntity; +import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity; +import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity; +import com.logpm.trunkline.entity.TrunklineCarsOrderEntity; import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper; import com.logpm.trunkline.service.*; import com.logpm.trunkline.vo.*; @@ -1487,6 +1490,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl plList = distributionParcelListClient.findEntityListByOrderCode(orderCode, warehouseId); - for (DistributionParcelListEntity parcelListEntity : plList) { - Integer quantity = parcelListEntity.getQuantity(); - String firsts = parcelListEntity.getFirsts(); - JSONObject detail = new JSONObject(); - detail.put("productName",firsts); - detail.put("stockNum",quantity); - plDetail.add(detail); +// JSONArray plDetail = new JSONArray(); +// List plList = distributionParcelListClient.findEntityListByOrderCode(orderCode, warehouseId); +// for (DistributionParcelListEntity parcelListEntity : plList) { +// Integer quantity = parcelListEntity.getQuantity(); +// String firsts = parcelListEntity.getFirsts(); +// JSONObject detail = new JSONObject(); +// detail.put("productName",firsts); +// detail.put("stockNum",quantity); +// plDetail.add(detail); +// } +// jsonObject.put("details",plDetail); + DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId); + if(!Objects.isNull(stockArticleEntity)){ + jsonObject.put("waybillNo",stockArticleEntity.getWaybillNumber()); + }else{ + jsonObject.put("waybillNo",""); } - jsonObject.put("details",plDetail); zeroList.add(jsonObject); } if("3".equals(associationType)){ @@ -1878,6 +1897,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl updownGoodsByStock = warehouseUpdownGoodsService.getUpdownGoodsByStock(marketId, materialCode, incomingBatch,warehouseId);