From a1c49737f49caa41544d07c1fd4014620dc8e9e0 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 7 Mar 2024 11:47:36 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionStockArticleController.java | 12 ++++++++++ .../DistributionStockArticleMapper.java | 7 ++++++ .../mapper/DistributionStockArticleMapper.xml | 6 +++++ .../IDistributionStockArticleService.java | 8 +++++++ .../DistributionDeliveryListServiceImpl.java | 4 +++- .../DistributionStockArticleServiceImpl.java | 22 +++++++++++++++++++ 6 files changed, 58 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java index 127111516..faaeb3b4b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java @@ -465,6 +465,18 @@ public class DistributionStockArticleController extends BladeController { } + /** + * 导入物料基础信息 + */ + @PostMapping("deliveryInfo") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "导入物料基础信息", notes = "传入excel") + public R getdeliveryInfo(Integer type,String Code) { + + return distributionStockArticleService.getdeliveryInfo(type,Code); + } + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java index d0ac9abfb..1140d0fd6 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java @@ -170,4 +170,11 @@ public interface DistributionStockArticleMapper extends BaseMapper getOrderListByWaybill(@Param("waybillNumber") String waybillNumber); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index 939d577d6..88cce85e5 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -1052,5 +1052,11 @@ WHERE ldsa.order_code = #{orderCode} AND ldsa.warehouse_id = #{warehouseId} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java index 13a32671e..8fe7de884 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java @@ -219,4 +219,12 @@ public interface IDistributionStockArticleService extends BaseService>>>>>>>>>>>>>> 车次状态维护2 代码执行 deliveryLoadingNum={}",deliveryLoadingNum); int loadingNum = 0; - int signingNum = 0; int deliveryQuantity = deliveryListEntity.getDeliveryNumber() + (Objects.isNull(deliveryListEntity.getInventoryNub()) ? 0 : deliveryListEntity.getInventoryNub()); if (Func.isNotEmpty(deliveryLoadingNum)) { loadingNum += deliveryLoadingNum.getInventoryLoadingQuantity() + deliveryLoadingNum.getPackageLoadingQuantity(); @@ -6847,6 +6846,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())); log.info(">>>>>>>>>>>>>>> 车次状态维护4 代码执行 anyMatch={}",anyMatch); + log.info(">>>>>>>>>>>>>>> 当前车次复核数量:{}", list.stream().filter(s -> s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())).count() +); if (anyMatch) { deliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.yiwancheng.getValue()); } 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 17ed76bc1..90fa29ae8 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 @@ -1627,6 +1627,28 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl listByWaybillNumber = baseMapper.getOrderListByWaybill(code); + + break; + case 2: + //订单 + break; + default: + return R.fail("查无此信息"); + } + return null; + } + @Override public DistributionStockArticleEntity findZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) { From 9df2d10daf45ff1207f3629e6dad213c858c824a Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 7 Mar 2024 12:03:26 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=8E=A5=E5=8F=A3=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BasicdataVehicleServiceImpl.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java index 64c0083b3..1cccc09f3 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java @@ -167,7 +167,6 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl>>>",data); try { - boolean flag = false; ListdrivermiddleEntities = new ArrayList<>(); //对导入数据进行处理 for (BasicdataVehicleImportExcel datum : data) { @@ -193,12 +192,18 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl Date: Thu, 7 Mar 2024 14:30:58 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/basicdata/service/impl/BasicdataClientServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java index a00758288..3ca0cc29f 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java @@ -456,6 +456,7 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl>>>>>>>>>>>>>:{}",split[finalJ]); String dictValue = freightBiz.stream().filter(q -> q.getDictValue().equals(split[finalJ])).findFirst().get().getDictKey(); business.setTypeService(dictValue); list.add(business); From b4b154096292aef7c161294e47d9c14593c4430d Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 7 Mar 2024 15:55:05 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E3=80=81=E8=BF=90?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../distribution/vo/DeliveryOrderInfoVO.java | 15 ++++ .../DistributionDeliveryAppController.java | 12 +++ .../DistributionStockArticleController.java | 6 +- .../mapper/DistributionStockArticleMapper.xml | 2 +- .../DistributionStockArticleServiceImpl.java | 87 +++++++++++++++++-- 5 files changed, 112 insertions(+), 10 deletions(-) create mode 100644 blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DeliveryOrderInfoVO.java diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DeliveryOrderInfoVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DeliveryOrderInfoVO.java new file mode 100644 index 000000000..09c6594b5 --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DeliveryOrderInfoVO.java @@ -0,0 +1,15 @@ +package com.logpm.distribution.vo; + +import lombok.Data; + +/** + * 订单查询VO + */ +@Data +public class DeliveryOrderInfoVO { + + + private Integer deliveryNum; + + private Integer signingNum; +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java index 0fdf1327a..aa68290f2 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java @@ -6,6 +6,7 @@ import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO; import com.logpm.distribution.service.IDistributionDeliveryInfoService; import com.logpm.distribution.service.IDistributionDeliveryListService; +import com.logpm.distribution.service.IDistributionStockArticleService; import com.logpm.distribution.vo.DisStockListDetailVO; import com.logpm.distribution.vo.app.*; import io.swagger.annotations.Api; @@ -34,6 +35,8 @@ public class DistributionDeliveryAppController { private final IDistributionDeliveryInfoService distributionDeliveryInfoService; + private final IDistributionStockArticleService distributionStockArticleService; + @@ -298,4 +301,13 @@ public class DistributionDeliveryAppController { return R.data(r); } + /** + * 扫描查询配送任务下的包件信息 + */ + @GetMapping("/deliveryInfo") + @ApiOperationSupport(order = 11) + public R getdeliveryInfo( @RequestParam Integer type,@RequestParam String code ) { + return distributionStockArticleService.getdeliveryInfo(type,code); + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java index faaeb3b4b..c5c4730f4 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java @@ -468,12 +468,12 @@ public class DistributionStockArticleController extends BladeController { /** * 导入物料基础信息 */ - @PostMapping("deliveryInfo") + @GetMapping("deliveryInfo") @ApiOperationSupport(order = 12) @ApiOperation(value = "导入物料基础信息", notes = "传入excel") - public R getdeliveryInfo(Integer type,String Code) { + public R getdeliveryInfo(@RequestParam Integer type,@RequestParam String code) { - return distributionStockArticleService.getdeliveryInfo(type,Code); + return distributionStockArticleService.getdeliveryInfo(type,code); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index 88cce85e5..49488b181 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -1054,7 +1054,7 @@ 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 90fa29ae8..ef0a0a65a 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 @@ -49,6 +49,7 @@ import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.common.IsOrNoConstant; +import org.springblade.common.constant.loading.LoadingStatusConstant; import org.springblade.common.constant.order.OrderReservationStatusConstant; import org.springblade.common.constant.order.OrderStatusConstant; import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant; @@ -129,7 +130,10 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl selectDistributionStockArticlePage(IPage page, DistributionStockArticleVO distributionStockArticle) { @@ -1634,19 +1638,90 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl listByWaybillNumber = baseMapper.getOrderListByWaybill(code); - - break; + List ids = baseMapper.getOrderListByWaybill(code); + List reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.query().lambda() + .in(DistributionReservationStockarticleEntity::getStockArticleId, ids) + .ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + if (Func.isNotEmpty(reservationStockarticleEntityList)){ + for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) { + if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())){ + //查询包件数量 + List packageEntityList = distributionReservationPackageService.list(Wrappers.query().lambda() + .eq(DistributionReservationPackageEntity::getStockArticleId, reservationStockarticleEntity.getStockArticleId()) + .ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + if (Func.isNotEmpty(packageEntityList)){ + a += packageEntityList.size(); + } + }else if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.yes.getValue())){ + //查询零担配送数量 + List zeroPackageEntityList = distributionReservationZeroPackageService.list(Wrappers.query().lambda() + .eq(DistributionReservationZeroPackageEntity::getStockArticleId, reservationStockarticleEntity.getStockArticleId()) + .ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + if (Func.isNotEmpty(zeroPackageEntityList)){ + a += zeroPackageEntityList.stream().mapToInt(DistributionReservationZeroPackageEntity::getQuantity).sum(); + } + }else { + log.error(method+"配送订单无类型"); + return R.fail("数据错误!!!"); + } + } + } + List list = distributionLoadscanService.list(Wrappers.query().lambda() + .in(DistributionLoadscanEntity::getOrderId, ids) + .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) + ); + if (Func.isNotEmpty(list)){ + b = list.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum(); + } + deliveryOrderInfoVO.setDeliveryNum(a); + deliveryOrderInfoVO.setSigningNum(b); + return R.data(deliveryOrderInfoVO); case 2: - //订单 - break; + DistributionStockArticleEntity one = this.getOne(Wrappers.query().lambda() + .eq(DistributionStockArticleEntity::getOrderCode, code) + ); + if (Func.isNotEmpty(one)){ + if (one.getIsZero().equals(IsOrNoConstant.no.getValue())){ + //查询包件数量 + List packageEntityList = distributionReservationPackageService.list(Wrappers.query().lambda() + .eq(DistributionReservationPackageEntity::getStockArticleId, one.getId()) + .ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + if (Func.isNotEmpty(packageEntityList)){ + a += packageEntityList.size(); + } + }else if (one.getIsZero().equals(IsOrNoConstant.yes.getValue())){ + //查询零担配送数量 + List zeroPackageEntityList = distributionReservationZeroPackageService.list(Wrappers.query().lambda() + .eq(DistributionReservationZeroPackageEntity::getStockArticleId, one.getId()) + .ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + if (Func.isNotEmpty(zeroPackageEntityList)){ + a += zeroPackageEntityList.stream().mapToInt(DistributionReservationZeroPackageEntity::getQuantity).sum(); + } + }else { + log.error(method+"配送订单无类型"); + return R.fail("数据错误!!!"); + } + } + //订单 + deliveryOrderInfoVO.setDeliveryNum(a); + deliveryOrderInfoVO.setSigningNum(b); + return R.data(deliveryOrderInfoVO); default: + log.error(method+"缺少参数type"); return R.fail("查无此信息"); } - return null; }