From eb678167baa69e9bd235ab2e170205e1d2ecf40b Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Wed, 28 Feb 2024 18:53:47 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BF-bug=E4=BF=AE=E5=A4=8D,?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9=E6=9B=B4=E6=96=B0=202.?= =?UTF-8?q?=E8=A1=A5=E4=B8=81-=E6=96=B0=E5=A2=9E=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=80=81=E7=B3=BB=E7=BB=9F=E7=9B=98=E7=82=B9=E7=9A=84=E5=8C=85?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/IInventoryDetailClient.java | 4 ++ .../logpm/trunkline/dto/WaybillDetailDTO.java | 2 +- .../entity/TrunklineAdvanceEntity.java | 3 + .../logpm/trunkline/vo/UnloadPackageVO.java | 2 + .../logpm/trunkline/vo/UnloadScanOrderVO.java | 2 + .../entity/WarehouseWaybillEntity.java | 8 +++ .../feign/InventoryDetailClient.java | 5 ++ .../service/IInventoryDetailService.java | 2 + .../impl/InventoryDetailServiceImpl.java | 21 ++++++ .../jobhandle/SyncOrderInfoToPlatform.java | 34 +++++++++ .../mapper/WarehouseMappingDataMapper.java | 4 ++ .../mapper/WarehouseMappingDataMapper.xml | 15 ++++ .../service/IWarehouseMappingDataService.java | 4 ++ .../impl/WarehouseMappingDataServiceImpl.java | 10 +++ .../trunkline/api/CarsLoadApiController.java | 34 +++++++++ .../controller/CarsLoadController.java | 8 +-- .../controller/OpenOrderController.java | 32 +++++++++ .../mapper/TrunklineAdvanceDetailMapper.java | 2 + .../mapper/TrunklineAdvanceDetailMapper.xml | 19 ++++- .../mapper/TrunklineCarsLoadScanMapper.java | 4 ++ .../mapper/TrunklineCarsLoadScanMapper.xml | 27 ++++++- .../mapper/TrunklineWaybillOrderMapper.xml | 2 +- .../trunkline/service/IOpenOrderService.java | 3 + .../ITrunklineAdvanceDetailService.java | 2 + .../ITrunklineCarsLoadScanService.java | 4 ++ .../service/ITrunklineCarsLoadService.java | 3 + .../service/impl/OpenOrderServiceImpl.java | 57 +++++++++++++-- .../TrunklineAdvanceDetailServiceImpl.java | 5 ++ .../TrunklineCarsLoadScanServiceImpl.java | 10 +++ .../impl/TrunklineCarsLoadServiceImpl.java | 72 +++++++++++++++---- 30 files changed, 369 insertions(+), 31 deletions(-) diff --git a/blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IInventoryDetailClient.java b/blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IInventoryDetailClient.java index 64e37415f..80e36f230 100644 --- a/blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IInventoryDetailClient.java +++ b/blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IInventoryDetailClient.java @@ -24,6 +24,10 @@ public interface IInventoryDetailClient { @GetMapping(API_PREFIX + "/findAllTrayType") List findAllTrayType(@RequestParam String orderCode,@RequestParam Integer inventoryId); + @GetMapping(API_PREFIX + "/findStatusByInventoryIdAndOrderPackageCode") + Integer findStatusByInventoryIdAndOrderPackageCode(@RequestParam Integer inventoryId, @RequestParam String orderPackageCode); + + // @GetMapping(API_PREFIX + "/getEntityByOrderCode") // OrderCountEntity getEntityByOrderCode(@RequestParam String orderCode, @RequestParam Integer oldWarehouseId); diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/WaybillDetailDTO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/WaybillDetailDTO.java index 46219ec7c..ee94aeb16 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/WaybillDetailDTO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/WaybillDetailDTO.java @@ -8,7 +8,7 @@ import java.math.BigDecimal; @Data public class WaybillDetailDTO implements Serializable { - private Long waybillDetailId; + private Long id; private Integer updateType; private Integer chargeType;//计价方式 1件 2方 3公斤 diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceEntity.java index 4bd95dc9d..3b22b75be 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceEntity.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceEntity.java @@ -140,4 +140,7 @@ public class TrunklineAdvanceEntity extends TenantEntity { @ApiModelProperty(name = "是否有包件",notes = "") private Integer hasPackage = 1; + @ApiModelProperty(name = "创建人名称",notes = "") + private String createUserName; + } 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 11a3728eb..574bf1d47 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 @@ -7,11 +7,13 @@ import java.io.Serializable; @Data public class UnloadPackageVO implements Serializable { + private Long loadScanId; private String orderPackageCode; private Integer num; private Integer unloadNum; private String trayName; private String trayCode; private String scanStatus; + private String unloadNodeName; } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadScanOrderVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadScanOrderVO.java index 1a89d3712..e16c096e1 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadScanOrderVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadScanOrderVO.java @@ -13,6 +13,8 @@ public class UnloadScanOrderVO implements Serializable { private String orderCode; private Integer loadingNum; private Integer unloadNum; + private Integer unloadAbnormal; + private Integer totalNumber; private List unloadPackageList = new ArrayList<>(); diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java index 0c47a3e35..b73326184 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java @@ -421,4 +421,12 @@ public class WarehouseWaybillEntity extends TenantEntity { @ApiModelProperty(value = "到站编码") private String destinationCode; + @ApiModelProperty(value = "货号") + private String goodsCode; + + @ApiModelProperty(value = "审核人id") + private Long checkUserId; + @ApiModelProperty(value = "审核人名称") + private String checkUserName; + } diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/InventoryDetailClient.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/InventoryDetailClient.java index 4680e9ac3..61615a4d4 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/InventoryDetailClient.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/InventoryDetailClient.java @@ -29,4 +29,9 @@ public class InventoryDetailClient implements IInventoryDetailClient{ public List findAllTrayType(String orderCode,Integer inventoryId) { return inventoryDetailService.findAllTrayType(orderCode,inventoryId); } + + @Override + public Integer findStatusByInventoryIdAndOrderPackageCode(Integer inventoryId, String orderPackageCode) { + return inventoryDetailService.findStatusByInventoryIdAndOrderPackageCode(inventoryId,orderPackageCode); + } } diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IInventoryDetailService.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IInventoryDetailService.java index 311cd840d..a5c1f6643 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IInventoryDetailService.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IInventoryDetailService.java @@ -13,4 +13,6 @@ public interface IInventoryDetailService { List findAllTrayType(String orderCode,Integer inventoryId); + Integer findStatusByInventoryIdAndOrderPackageCode(Integer inventoryId, String orderPackageCode); + } diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/InventoryDetailServiceImpl.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/InventoryDetailServiceImpl.java index 85558e046..4c3833454 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/InventoryDetailServiceImpl.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/InventoryDetailServiceImpl.java @@ -1,5 +1,6 @@ package com.logpm.oldproject.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.logpm.oldproject.entity.InventoryDetailEntity; import com.logpm.oldproject.mapper.InventoryDetailMapper; import com.logpm.oldproject.service.IInventoryDetailService; @@ -7,6 +8,7 @@ import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; import java.util.List; +import java.util.Objects; @Service @AllArgsConstructor @@ -29,4 +31,23 @@ public class InventoryDetailServiceImpl implements IInventoryDetailService { return inventoryDetailMapper.findAllTrayType(orderCode,inventoryId); } + @Override + public Integer findStatusByInventoryIdAndOrderPackageCode(Integer inventoryId, String orderPackageCode) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("inventory_id",inventoryId) + .eq("unitNo",orderPackageCode); + InventoryDetailEntity inventoryDetailEntity = inventoryDetailMapper.selectOne(queryWrapper); + if(Objects.isNull(inventoryDetailEntity)){ + return 0; + }else{ + Integer status = inventoryDetailEntity.getStatus(); + if(status.equals(1)){ + return 0; + }else if(status.equals(2)){ + return 1; + } + } + return 0; + } + } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java index 7ac90fa94..3ea38c0e0 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java @@ -1,8 +1,10 @@ package com.logpm.patch.jobhandle; +import cn.hutool.json.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; +import com.logpm.distribution.feign.IDistributionStockArticleClient; import com.logpm.oldproject.entity.AdvanceDetailEntity; import com.logpm.oldproject.entity.AdvanceEntity; import com.logpm.oldproject.entity.DetailProductEntity; @@ -61,6 +63,8 @@ public class SyncOrderInfoToPlatform { private final IWayBillClient wayBillClient; private final IAdvanceDetailClient advanceDetailClient; private final IWarehouseWaybillClient warehouseWaybillClient; + private final IInventoryDetailClient inventoryDetailClient; + private final IDistributionStockArticleClient distributionStockArticleClient; @XxlJob("syncOrderInfo") @@ -565,6 +569,36 @@ public class SyncOrderInfoToPlatform { return ReturnT.SUCCESS; } + @XxlJob("clearPackageStatus") + public ReturnT clearPackageStatus(String param) { + log.info("############clearPackageStatus: 清洗包件状态"); + + List warehouseMappingDataEntityList = warehouseMappingDataService.getWarehouseMapping(); + if(warehouseMappingDataEntityList.isEmpty()){ + log.warn("###############syncZeroOrderInfo: 当前没有配置需要同步的仓库信息"); + return ReturnT.FAIL; + } + WarehouseMappingDataEntity warehouseMappingDataEntity = warehouseMappingDataEntityList.get(0); + Long newWarehouseId = warehouseMappingDataEntity.getNewWarehouseId(); + Integer inventoryId = warehouseMappingDataEntity.getInventoryId(); + + List ls = warehouseMappingDataService.findTotalCountByWarehouseId(newWarehouseId); + + for (JSONObject l : ls) { + + 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); + } + } + + return ReturnT.SUCCESS; + } + } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java index 6e818dfd9..eabf5167a 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java @@ -46,4 +46,8 @@ public interface WarehouseMappingDataMapper { void deletedAdvanceByNotId(@Param("advanceId") Long advanceId, @Param("orderCode") String orderCode); void deletedAdcanceDetailByNotId(@Param("advanceId") Long advanceId, @Param("orderCode") String orderCode); + + List findTotalCountByWarehouseId(@Param("newWarehouseId") Long newWarehouseId); + + void updatePackageStatus(@Param("packageStatuss") String packageStatuss, @Param("packageId") Long packageId); } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml b/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml index e1d61dc8e..981c683c0 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml @@ -133,4 +133,19 @@ and advance_id != #{advanceId} + + + + update logpm_distribution_parcel_list + set order_package_status = #{packageStatuss} + where id = #{packageId} + + diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java index b7dfc038f..9e38c6a9f 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java @@ -42,4 +42,8 @@ public interface IWarehouseMappingDataService { void deletedAdvanceByNotId(Long advanceId, String orderCode); void deletedAdcanceDetailByNotId(Long advanceId, String orderCode); + + List findTotalCountByWarehouseId(Long newWarehouseId); + + void updatePackageStatus(String packageStatuss, Long packageId); } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java index ae1ffd608..cfbadcfcf 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java @@ -106,4 +106,14 @@ public class WarehouseMappingDataServiceImpl implements IWarehouseMappingDataSer public void deletedAdcanceDetailByNotId(Long advanceId, String orderCode) { warehouseMappingDataMapper.deletedAdcanceDetailByNotId(advanceId,orderCode); } + + @Override + public List findTotalCountByWarehouseId(Long newWarehouseId) { + return warehouseMappingDataMapper.findTotalCountByWarehouseId(newWarehouseId); + } + + @Override + public void updatePackageStatus(String packageStatuss, Long packageId) { + warehouseMappingDataMapper.updatePackageStatus(packageStatuss,packageId); + } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java index 6e2c9aeaa..53851d7fc 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java @@ -905,4 +905,38 @@ public class CarsLoadApiController { } + @ResponseBody + @PostMapping("/findLoadZeroList") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "查询配载中的零担列表", notes = "传入loadCarsDTO") + public R findLoadZeroList(@RequestBody LoadCarsDTO loadCarsDTO) { + String method = "############findLoadZeroList: "; + log.info(method + "请求参数{}", loadCarsDTO); + Long loadId = loadCarsDTO.getLoadId(); + + try{ + + //当前登录人选择的仓库 + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if(Objects.isNull(myCurrentWarehouse)){ + log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); + return R.fail(405,"仓库信息为空"); + } + loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); + loadCarsDTO.setWarehouseName(myCurrentWarehouse.getName()); + if(Objects.isNull(loadId)){ + log.warn(method+"配载Id为空 loadId={}",loadId); + return R.fail(405,"配载Id为空"); + } + + return carsLoadService.findLoadZeroList(loadCarsDTO); + }catch (CustomerException e){ + log.error(e.message,e); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error(method+"系统异常",e); + return R.fail(500,"系统异常"); + } + } + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java index e246d7eb2..e57b55655 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java @@ -177,10 +177,10 @@ public class CarsLoadController { return R.fail(400,"配载id为空"); } - if(Objects.isNull(assistantId)){ - log.warn(method+"副驾id为空 assistantId={}",assistantId); - return R.fail(400,"副驾id为空"); - } +// if(Objects.isNull(assistantId)){ +// log.warn(method+"副驾id为空 assistantId={}",assistantId); +// return R.fail(400,"副驾id为空"); +// } if(Objects.isNull(driverId)){ log.warn(method+"司机id为空 driverId={}",driverId); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java index c67bfa6b1..54ada61fb 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java @@ -1142,5 +1142,37 @@ public class OpenOrderController { } + @ResponseBody + @PostMapping("/checkWaybill") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "审核运单", notes = "传入openOrderDTO") + public R checkWaybill(@RequestBody OpenOrderDTO openOrderDTO) { + String method = "############checkWaybill: "; + log.info(method + "请求参数{}", openOrderDTO); + + Long waybillId = openOrderDTO.getWaybillId(); + + try{ + + //当前登录人选择的仓库 + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if(Objects.isNull(myCurrentWarehouse)){ + log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); + return R.fail(403,"仓库信息为空"); + } + openOrderDTO.setWarehouseId(myCurrentWarehouse.getId()); + openOrderDTO.setWarehouseName(myCurrentWarehouse.getName()); + + return openOrderService.checkWaybill(openOrderDTO); + }catch (CustomerException e){ + log.error(e.message,e); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error(method+"系统异常",e); + return R.fail(500,"系统异常"); + } + } + + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java index 2be2198bd..5d391ae25 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java @@ -37,4 +37,6 @@ public interface TrunklineAdvanceDetailMapper extends BaseMapper findOrderPackageCodesByAdvanceId(@Param("advanceId") Long advanceId); void deleteAdvanceDetailById(@Param("advanceDetailId") Long advanceDetailId); + + Integer findTotalNumByOrderCode(@Param("orderCode") String orderCode); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml index 8a47d7dd4..7deb63051 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml @@ -10,7 +10,10 @@ + select count(*) + from logpm_trunkline_advance_detail + where order_code = #{orderCode} + and is_deleted = 0 + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java index 9d16328b7..4d6ec9bdf 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java @@ -73,4 +73,8 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper findNotUnloadZeroList(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml index a5db050f5..63649fe9e 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml @@ -139,6 +139,17 @@ and ltcls.type = 1 group by ltcls.waybill_no, ltcls.order_code + + + + @@ -287,4 +299,13 @@ final_node_name = #{finalNodeName} where id = #{loadScanId} + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillOrderMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillOrderMapper.xml index 791c492ff..fcc5ee91d 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillOrderMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillOrderMapper.xml @@ -20,7 +20,7 @@ from logpm_trunkline_waybill_order ltwo left join logpm_trunkline_advance lta on lta.id = ltwo.advance_id where ltwo.is_deleted = 0 - and ltwo.id = #{waybillId} + and ltwo.waybill_id = #{waybillId}