From dc0b51ccd9c3d477eac100faa13c72e769a80f72 Mon Sep 17 00:00:00 2001 From: kilo Date: Thu, 2 Nov 2023 18:57:33 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E5=A2=9E=E5=80=BC=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E9=9B=B6=E6=8B=85=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/DistributionAddvaluePackageVO.java | 8 ++ .../DistributionAddvalueAppController.java | 5 - .../DistributionSignforController.java | 2 +- .../DistributionAddvalueDetailMapper.java | 4 +- .../DistributionAddvalueDetailMapper.xml | 8 +- .../mapper/DistributionAddvalueMapper.xml | 1 + .../DistributionAddvaluePackageMapper.java | 2 +- .../mapper/DistributionDeliveryInfoMapper.xml | 4 +- .../mapper/DistributionReservationMapper.xml | 3 +- .../mapper/DistributionSignforMapper.xml | 1 + .../impl/DistributionAddvalueServiceImpl.java | 37 +++---- .../impl/DistributionAsyncServiceImpl.java | 1 - .../DistributionDeliveryListServiceImpl.java | 101 ++++++++++++++++-- .../impl/DistributionSignforServiceImpl.java | 60 +++++++++-- 14 files changed, 187 insertions(+), 50 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionAddvaluePackageVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionAddvaluePackageVO.java index a716b2e07..f05b5a9ee 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionAddvaluePackageVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionAddvaluePackageVO.java @@ -32,6 +32,14 @@ import lombok.EqualsAndHashCode; public class DistributionAddvaluePackageVO extends DistributionAddvaluePackageEntity { private static final long serialVersionUID = 1L; + /** + * 最大操作数量 零担需要先进行装车 + */ private Integer maxQuantity; + /** + * 计划数量 + */ + private Integer planQuantity; + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionAddvalueAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionAddvalueAppController.java index 4135ac484..bf3201df7 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionAddvalueAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionAddvalueAppController.java @@ -95,7 +95,6 @@ public class DistributionAddvalueAppController { return r; } - /** * 编辑保存 */ @@ -107,8 +106,6 @@ public class DistributionAddvalueAppController { return r; } - - /** * 查询编辑增值服务数据 */ @@ -120,8 +117,6 @@ public class DistributionAddvalueAppController { return r; } - - /** * 查询增值服务数据 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java index c995518c2..33ca15b5d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java @@ -130,7 +130,7 @@ public class DistributionSignforController extends BladeController { @ApiOperationSupport(order = 1) @ApiOperation(value = "详情", notes = "传入distributionSignfor") public R> signforPackageList(Long signforId) { - List distributionSignforsnmbVO = distributionSignforService.signforPackageList(signforId); + List distributionSignforsnmbVO= distributionSignforService.signforPackageList(signforId); return R.data(distributionSignforsnmbVO); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueDetailMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueDetailMapper.java index 6cc5af367..f06dbdf17 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueDetailMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueDetailMapper.java @@ -53,7 +53,7 @@ public interface DistributionAddvalueDetailMapper extends BaseMapper - + @@ -27,7 +28,7 @@ - DELETE FROM logpm_distribution_addvalue_detil WHERE addvalue_id = #{addvalueId} + DELETE FROM logpm_distribution_addvalue_detail WHERE addvalue_id = #{addvalueId} @@ -36,7 +37,8 @@ - SELECT * FROM logpm_distribution_addvalue_detail ${ew.customSqlSegment} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml index cd9be75a7..c651c45dc 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml @@ -61,6 +61,7 @@ ldad.num AS num, ldad.flool_num AS floolNum, ldad.distance AS distance, + lda.addvalue_id AS addvalueId, ldad.id AS addvalueDetailId, GROUP_CONCAT(ldap.package_id) AS packageListIds, ldad.record_type AS isAll diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvaluePackageMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvaluePackageMapper.java index 373f0c89b..bc6ce2c25 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvaluePackageMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvaluePackageMapper.java @@ -57,7 +57,7 @@ public interface DistributionAddvaluePackageMapper extends BaseMapper @@ -1037,7 +1038,7 @@ resultType="com.logpm.distribution.vo.DistributionAddvaluePackageVO"> SELECT ldrzp.parcel_list_id, - ldrzp.quantity AS quantity, + ldrzp.quantity AS reservationNum, ldrzp.reservation_id AS reservationId, 3 AS conditions, ldsa.order_code AS orderCode, diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml index 52a095749..5f8c92620 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml @@ -555,6 +555,7 @@ CASE WHEN lds.positioning IS NOT NULL THEN true ELSE false END AS positioning, (SELECT COALESCE(COUNT(*), 0) from logpm_distribution_reservation_stockarticle ldrs WHERE ldrs.reservation_id =ldr.id ) ordNub, COALESCE(lds.received_quantity + lds.receivedin_quantity, 0) signNub, + COALESCE(lds.loaded_number + lds.loadedin_number, 0) signNub, COALESCE(ldr.reservation_num + ldr.reservation_stock_list_num, 0) reservationNum FROM logpm_distribution_signfor lds diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java index 716cc075b..c94cbc85f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java @@ -190,18 +190,20 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImpl packageEntityList = distributionAppAddvalueDTO.getPackageEntityList().stream().filter(p->p.getQuantity()>0).collect(Collectors.toList()); + List packageEntityList = distributionAppAddvalueDTO.getPackageEntityList(); + List packageDTOList = packageEntityList.stream().filter(p -> Func.isNotEmpty(p.getQuantity()) && p.getQuantity() > 0).collect(Collectors.toList()); + if (Func.isEmpty(packageDTOList)){ + return Resp.scanFail("操作失败","无可用包件信息"); + } //查询是否重复添加 DistributionAddvalueEntity addvalueEntity = distributionAddvalueMapper.selectOne(Wrappers.query().lambda() .eq(DistributionAddvalueEntity::getAddvalueId, distributionAppAddvalueDTO.getAddvalueType()) .eq(DistributionAddvalueEntity::getRefId, distributionAppAddvalueDTO.getReservationId()) .eq(DistributionAddvalueEntity::getRefType, 1)); + if (Func.isNotEmpty(addvalueEntity)){ return Resp.scanFail("操作失败", "存在该类型增值服务项,如需更改请编辑"); } - if (Func.isEmpty(packageEntityList)) { - return Resp.scanFail("请添加包件", "请添加包件"); - } DistributionAddvalueDetailEntity distributionAddvalueDetailEntity = new DistributionAddvalueDetailEntity(); if (Func.isEmpty(distributionAppAddvalueDTO.getNum())) { return Resp.scanFail("添加失败", "错误的包件数量"); @@ -211,7 +213,6 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImplquery().lambda() + .eq(DistributionAddvalueEntity::getRefId, distributionAppAddvalueDTO.getReservationId()) + .eq(DistributionAddvalueEntity::getAddvalueId, distributionAppAddvalueDTO.getAddvalueType())); + DistributionAddvalueDetailEntity addvalueDetailEntity = distributionAddvalueDetailService.getOne(Wrappers.query().lambda() + .eq(DistributionAddvalueDetailEntity::getAddvalueId, distributionAddvalueEntity.getId())); + distributionAddvaluePackageMapper.deleteAddvaluePackageList(distributionAppAddvalueDTO.getReservationId(), addvalueDetailEntity.getId()); + distributionAddvalueDetailMapper.deleteAddvalueDetail(distributionAddvalueEntity.getId()); + distributionAddvalueMapper.deleteAddvalue(distributionAppAddvalueDTO.getReservationId(), distributionAppAddvalueDTO.getAddvalueType()); + return Resp.scanSuccess("操作成功","操作成功"); + } switch (distributionAppAddvalueDTO.getAddvalueType()) { case "1": if (Func.isEmpty(distributionAppAddvalueDTO.getFloolNum())) { @@ -377,18 +390,6 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImplquery().lambda() - .eq(DistributionAddvalueEntity::getRefId, distributionAppAddvalueDTO.getReservationId()) - .eq(DistributionAddvalueEntity::getAddvalueId, distributionAppAddvalueDTO.getAddvalueType())); - DistributionAddvalueDetailEntity addvalueDetailEntity = distributionAddvalueDetailService.getOne(Wrappers.query().lambda() - .eq(DistributionAddvalueDetailEntity::getAddvalueId, distributionAddvalueEntity.getId())); - - distributionAddvalueMapper.deleteAddvalue(distributionAppAddvalueDTO.getReservationId(), distributionAppAddvalueDTO.getAddvalueType()); - distributionAddvalueDetailMapper.deleteAddvalueDetail(distributionAddvalueEntity.getId()); - distributionAddvaluePackageMapper.deleteAddvaluePackageList(distributionAppAddvalueDTO.getReservationId(), addvalueDetailEntity.getId()); - } else { //查询出原来的包件信息 DistributionAddvalueVO addvalueVO = distributionAddvalueMapper.selectReservationAddvalue(distributionAppAddvalueDTO.getReservationId(), distributionAppAddvalueDTO.getAddvalueType()); String packageListIds = addvalueVO.getPackageListIds(); @@ -454,7 +455,7 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImpl customList = distributionDeliveryInfoMapper.selectAppcustomListPage(page, distributionDeliveryList.getId()); for (DistributionAppReservationVO distributionAppReservationVO : customList) { - List parcelListEntities = distributionReservationMapper.selectPackageListByReservationId(distributionAppReservationVO.getId()); + List reservationStockarticleEntityList = distributionReservationMapper.selectStockArticleByReservationId(distributionAppReservationVO.getId()); + List distributionStockEntities = new ArrayList<>(); + List loadscanEntityList = new ArrayList<>(); + List trayList = new ArrayList<>(); + for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) { + if (reservationStockarticleEntity.equals(IsOrNoConstant.no.getValue())){ + //查询订制品备货数量 + List packageListStockUpScan = distributionStockMapper.selectList(Wrappers.query().lambda() + .eq(DistributionStockEntity::getType, 1) + .eq(DistributionStockEntity::getParcelListId, reservationStockarticleEntity.getStockArticleId()) + .eq(DistributionStockEntity::getReservationId, reservationStockarticleEntity.getReservationId())); + if (Func.isNotEmpty(packageListStockUpScan)){ + distributionStockEntities.addAll(packageListStockUpScan); + } + //统计托盘数 + //查询所有包件 + List parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId()); + parcelListEntities.forEach(p->{ + WarehouseTrayGoodsEntity warehouseTrayGoodsEntity = new WarehouseTrayGoodsEntity(); + warehouseTrayGoodsEntity.setAssociationId(p.getId()); + warehouseTrayGoodsEntity.setAssociationType("1"); + List trayGoodsClientTrayList = warehouseTrayGoodsClient.getTrayList(warehouseTrayGoodsEntity); + if (Func.isNotEmpty(trayGoodsClientTrayList)){ + trayList.addAll(trayGoodsClientTrayList); + } + }); + //查询订制品装车数量 + List packageListLoadingScan = distributionLoadscanService.list(Wrappers.query().lambda() + .eq(DistributionLoadscanEntity::getReservationId, reservationStockarticleEntity.getReservationId()) + .eq(DistributionLoadscanEntity::getOrderId, reservationStockarticleEntity.getStockArticleId()) + .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); + if (Func.isNotEmpty(packageListLoadingScan)){ + loadscanEntityList.addAll(packageListLoadingScan); + } + + }else if (reservationStockarticleEntity.equals(IsOrNoConstant.yes.getValue())){ + //查询零担备货数量 + List zeroPackageListStockUpScan = distributionStockMapper.selectList(Wrappers.query().lambda() + .eq(DistributionStockEntity::getType, 2) + .eq(DistributionStockEntity::getParcelListId, reservationStockarticleEntity.getStockArticleId()) + .eq(DistributionStockEntity::getReservationId, reservationStockarticleEntity.getReservationId())); + if (Func.isNotEmpty(zeroPackageListStockUpScan)){ + distributionStockEntities.addAll(zeroPackageListStockUpScan); + } + //查询零担装车数量 + List zeroPackageListLoadingScan = distributionLoadscanService.list(Wrappers.query().lambda() + .eq(DistributionLoadscanEntity::getReservationId, reservationStockarticleEntity.getReservationId()) + .eq(DistributionLoadscanEntity::getOrderId, reservationStockarticleEntity.getStockArticleId()) + .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); + if (Func.isNotEmpty(zeroPackageListLoadingScan)){ + loadscanEntityList.addAll(zeroPackageListLoadingScan); + } + } + } + distributionAppReservationVO.setTrayNum(0); + if (Func.isNotEmpty(trayList)){ + Long count = trayList.stream().map(WarehouseTrayGoodsEntity::getTrayId).count(); + distributionAppReservationVO.setTrayNum(count.intValue()); + } List stockListDetailEntityList = distributionReservationMapper.selectInventoryListByReservation(distributionAppReservationVO.getId()); - boolean stockArticleStockupStatus = parcelListEntities.stream().allMatch(s -> Func.isNotEmpty(s.getOrderPackageStockupStatus()) && s.getOrderPackageStockupStatus().equals(OrderPackageStockupStatusConstant.yibeihu.getValue())); - boolean inventoryStockupStatus = stockListDetailEntityList.stream().allMatch(i -> Func.isNotEmpty(i.getStockPackageCode())); - if (stockArticleStockupStatus && inventoryStockupStatus) { +// boolean inventoryStockupStatus = stockListDetailEntityList.stream().allMatch(i -> Func.isNotEmpty(i.getStockPackageCode())); + //备货数和计划数一致时完成备货 + if (distributionStockEntities.size()+stockListDetailEntityList.stream().filter(s->Func.isNotEmpty(s.getStockPackageCode())).count() == distributionAppReservationVO.getReservationNum()){ distributionAppReservationVO.setIsstock("是"); - } else { + }else { distributionAppReservationVO.setIsstock("否"); } - boolean stockArticleLoadingStatus = parcelListEntities.stream().allMatch(s -> Func.isNotEmpty(s.getOrderPackageLoadingStatus()) && s.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue())); - boolean inventoryLoadingStatus = stockListDetailEntityList.stream().allMatch(i -> Func.isNotEmpty(i.getStockPackageCode()) && i.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())); - if (stockArticleLoadingStatus && inventoryLoadingStatus) { + int packageListScanNum = loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum(); + long inventoryListScanNum = stockListDetailEntityList.stream().filter(i -> Func.isNotEmpty(i.getStockPackageCode()) && i.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())).count(); + + if (packageListScanNum + inventoryListScanNum ==distributionAppReservationVO.getReservationNum() ) { distributionAppReservationVO.setIsload("是"); } else { distributionAppReservationVO.setIsload("否"); - } + + + + + +// List parcelListEntities = distributionReservationMapper.selectPackageListByReservationId(distributionAppReservationVO.getId()); +// +// boolean stockArticleStockupStatus = parcelListEntities.stream().allMatch(s -> Func.isNotEmpty(s.getOrderPackageStockupStatus()) && s.getOrderPackageStockupStatus().equals(OrderPackageStockupStatusConstant.yibeihu.getValue())); +// if (stockArticleStockupStatus && inventoryStockupStatus) { +// distributionAppReservationVO.setIsstock("是"); +// } else { +// distributionAppReservationVO.setIsstock("否"); +// } +// boolean stockArticleLoadingStatus = parcelListEntities.stream().allMatch(s -> Func.isNotEmpty(s.getOrderPackageLoadingStatus()) && s.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue())); +// boolean inventoryLoadingStatus = stockListDetailEntityList.stream().allMatch(i -> Func.isNotEmpty(i.getStockPackageCode()) && i.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())); +// if (stockArticleLoadingStatus && inventoryLoadingStatus) { +// distributionAppReservationVO.setIsload("是"); +// } else { +// distributionAppReservationVO.setIsload("否"); +// } + + // //查询备货是否完成 // int aLong = distributionStockMapper.selectCount(new QueryWrapper().lambda() // .eq(DistributionStockEntity::getReservationId, distributionAppReservationVO.getId()) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 276d4559c..eebc5ea33 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -287,7 +287,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl parcelListEntities = baseMapper.getSignforPackageList(signforEntity.getReservationId()); - List reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.query().lambda().eq(DistributionReservationStockarticleEntity::getReservationId, signforEntity.getReservationId()).ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue())); + List reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.query().lambda() + .eq(DistributionReservationStockarticleEntity::getReservationId, signforEntity.getReservationId()) + .ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue())); List parcelListVOS = new ArrayList<>(); if (Func.isNotEmpty(reservationStockarticleEntityList)){ reservationStockarticleEntityList.forEach(rs->{ @@ -1843,6 +1845,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl parcelListEntityList = distributionReservationMapper.selectPackageByReservationAndStockArticle(rs.getReservationId(), rs.getStockArticleId()); List parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList); parcelListVOList.forEach(p -> { + p.setReservationNum(p.getQuantity()); + p.setLoadingNub(0); + p.setSigningNub(0); DistributionLoadscanEntity distributionLoadscanEntity = distributionLoadscanMapper.selectOne(Wrappers.query().lambda().eq(DistributionLoadscanEntity::getPackageId, p.getId())); if (Func.isNotEmpty(distributionLoadscanEntity)) { //该包件存在扫描记录 @@ -1861,6 +1866,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl distributionParcelNumberDTOS = distributionReservationMapper.selectZeroPackageListByReservationId(rs.getReservationId()); + distributionParcelNumberDTOS.forEach(zp->{ + DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(zp.getParcelListId()); + DistributionParcelListVO parcelListVO = DistributionParcelListWrapper.build().entityVO(parcelListEntity); +// DistributionParcelListVO parcelListVO = Func.copy(parcelListEntity, DistributionParcelListVO.class); +// parcelListVO.setReservationNum(zp.get); + parcelListVO.setReservationNum(zp.getReservationNum()); + parcelListVO.setLoadingNub(0); + parcelListVO.setSigningNub(0); + DistributionLoadscanEntity distributionLoadscanEntity = distributionLoadscanMapper.selectOne(Wrappers.query().lambda() + .eq(DistributionLoadscanEntity::getPackageId, zp.getParcelListId()) + .eq(DistributionLoadscanEntity::getReservationId,rs.getReservationId())); + if (Func.isNotEmpty(distributionLoadscanEntity)) { + //该包件存在扫描记录 + String scanStatus = distributionLoadscanEntity.getScanStatus(); + switch (scanStatus) { + case "1": + parcelListVO.setScanStatus(LoadingStatusConstant.quxiao.getName()); + break; + case "2": + parcelListVO.setScanStatus(LoadingStatusConstant.saomiao.getName()); + break; + case "3": + parcelListVO.setScanStatus(LoadingStatusConstant.queren.getName()); + break; + case "4": + parcelListVO.setScanStatus(LoadingStatusConstant.yijianzhuangche.getName()); + break; + } + parcelListVO.setLoadingNub(distributionLoadscanEntity.getLoadedNub()); + parcelListVO.setSigningNub(distributionLoadscanEntity.getReceivedQuantity()); + if (Func.isNotEmpty(distributionLoadscanEntity.getSigningTime())) { + parcelListVO.setSigningTime(distributionLoadscanEntity.getSigningTime()); + } + if (Func.isNotEmpty(distributionLoadscanEntity.getScanUser())) { + parcelListVO.setScanUser(distributionLoadscanEntity.getScanUser()); + } + if (Func.isNotEmpty(distributionLoadscanEntity.getDriverName())) { + parcelListVO.setDriverName(distributionLoadscanEntity.getDriverName()); + } + } + parcelListVOS.add(parcelListVO); + }); } }); } - - return parcelListVOS; } From cb52e3a7713c7183a3dcfeaab66a38a5c934d1d7 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Thu, 2 Nov 2023 20:49:35 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E7=9A=84=E6=9F=A5=E8=AF=A2=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasicdataWarehouseController.java | 19 ++++++++++++++++++- .../factory/receiver/OrderStatusHandler.java | 1 - 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java index 7ecfb97b0..6d6bbfd1f 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java @@ -18,6 +18,7 @@ package com.logpm.basicdata.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.logpm.basicdata.dto.BasicdataWarehouseDTO; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; @@ -33,9 +34,11 @@ import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.secure.BladeUser; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.BladeConstant; @@ -66,6 +69,8 @@ public class BasicdataWarehouseController extends BladeController { private final IBasicdataWarehouseClient basicdataWarehouseClient; + private final BladeRedis bladeRedis; + /** * 仓库 详情 */ @@ -178,6 +183,7 @@ public class BasicdataWarehouseController extends BladeController { @ApiOperation(value = "新增", notes = "传入warehouseWarehouse") public R save(@Valid @RequestBody BasicdataWarehouseEntity warehouseWarehouse) { warehouseWarehouse.setEnableStatus("2"); + CacheUtil.evict("getMyWarehouseList","basicdata","WarehouseList"); return R.status(warehouseService.save(warehouseWarehouse)); } @@ -198,6 +204,7 @@ public class BasicdataWarehouseController extends BladeController { @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入warehouseWarehouse") public R submit(@Valid @RequestBody BasicdataWarehouseEntity warehouseWarehouse) { + CacheUtil.evict("getMyWarehouseList","basicdata","WarehouseList"); return R.status(warehouseService.saveOrUpdate(warehouseWarehouse)); } @@ -211,6 +218,9 @@ public class BasicdataWarehouseController extends BladeController { @ApiOperationSupport(order = 7) @ApiOperation(value = "逻辑删除", notes = "传入ids") public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + + CacheUtil.evict("getMyWarehouseList","basicdata","WarehouseList"); + boolean result = warehouseService.removeWarehouse(ids); if (result) { return R.status(true); @@ -274,7 +284,14 @@ public class BasicdataWarehouseController extends BladeController { @GetMapping("/getMyWarehouseList") @ApiOperationSupport(order = 3) public R> getMyWarehouseList() { - List basicdataGoodsShelfVOList = warehouseService.getMyWarehouseList(); + + List basicdataGoodsShelfVOList = CacheUtil.get("getMyWarehouseList", "basicdata", "WarehouseList",List.class); + + if(ObjectUtils.isNull(basicdataGoodsShelfVOList)){ + basicdataGoodsShelfVOList = warehouseService.getMyWarehouseList(); + CacheUtil.put("getMyWarehouseList","basicdata","WarehouseList",basicdataGoodsShelfVOList); + } + return R.data(basicdataGoodsShelfVOList); } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java index 9c75565c4..46233ed0e 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java @@ -97,7 +97,6 @@ public class OrderStatusHandler { break; case FactoryConstant.OUPAI: - // todo cangku peizhi xinxi cunzai went // r = ouPaiFactoryService.handleStatusData(orderStatusDTO); // if (r.getCode() == 400 || r.getCode() == 200) { // log.info("TAG {} ##################orderStatusHandler: 该条数据不用处理 orderNo={}", FactoryConstant.OUPAI, orderSelfNum); From 25da9cbdc672fa3732e2ced1057e918f84530f72 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Thu, 2 Nov 2023 21:33:35 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E7=9A=84=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/cache/CacheObjNames.java | 33 +++++++++++++++++++ .../BasicdataWarehouseController.java | 16 ++++++--- .../impl/BasicdataWarehouseServiceImpl.java | 14 +++----- 3 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 blade-biz-common/src/main/java/org/springblade/common/cache/CacheObjNames.java diff --git a/blade-biz-common/src/main/java/org/springblade/common/cache/CacheObjNames.java b/blade-biz-common/src/main/java/org/springblade/common/cache/CacheObjNames.java new file mode 100644 index 000000000..960924ddd --- /dev/null +++ b/blade-biz-common/src/main/java/org/springblade/common/cache/CacheObjNames.java @@ -0,0 +1,33 @@ +package org.springblade.common.cache; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.Getter; + +/** + * 系统查询缓存名称定义 + */ +@AllArgsConstructor +@Getter +public enum CacheObjNames { + + /** + * 基础数据模块 当前登陆人操作仓库的缓存 + */ + basic_data_warehourse_list("getMyWarehouseList","basicdataWarehouseList"); + + + /** + * 缓存名称 + */ + final String cacheName; + + + /** + * 缓存前缀 + */ + final String keyPrefix; + + + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java index 6d6bbfd1f..dfa8f2ad6 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java @@ -33,6 +33,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; +import org.springblade.common.cache.CacheObjNames; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.excel.util.ExcelUtil; @@ -40,6 +41,7 @@ import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.secure.BladeUser; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.utils.DateUtil; @@ -182,8 +184,9 @@ public class BasicdataWarehouseController extends BladeController { @ApiOperationSupport(order = 4) @ApiOperation(value = "新增", notes = "传入warehouseWarehouse") public R save(@Valid @RequestBody BasicdataWarehouseEntity warehouseWarehouse) { + BladeUser user = AuthUtil.getUser(); + CacheUtil.evict(CacheObjNames.basic_data_warehourse_list.getCacheName(), CacheObjNames.basic_data_warehourse_list.getKeyPrefix(),user.getUserId()); warehouseWarehouse.setEnableStatus("2"); - CacheUtil.evict("getMyWarehouseList","basicdata","WarehouseList"); return R.status(warehouseService.save(warehouseWarehouse)); } @@ -204,7 +207,8 @@ public class BasicdataWarehouseController extends BladeController { @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入warehouseWarehouse") public R submit(@Valid @RequestBody BasicdataWarehouseEntity warehouseWarehouse) { - CacheUtil.evict("getMyWarehouseList","basicdata","WarehouseList"); + BladeUser user = AuthUtil.getUser(); + CacheUtil.evict(CacheObjNames.basic_data_warehourse_list.getCacheName(), CacheObjNames.basic_data_warehourse_list.getKeyPrefix(),user.getUserId()); return R.status(warehouseService.saveOrUpdate(warehouseWarehouse)); } @@ -218,8 +222,9 @@ public class BasicdataWarehouseController extends BladeController { @ApiOperationSupport(order = 7) @ApiOperation(value = "逻辑删除", notes = "传入ids") public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + BladeUser user = AuthUtil.getUser(); - CacheUtil.evict("getMyWarehouseList","basicdata","WarehouseList"); + CacheUtil.evict(CacheObjNames.basic_data_warehourse_list.getCacheName(), CacheObjNames.basic_data_warehourse_list.getKeyPrefix(),user.getUserId()); boolean result = warehouseService.removeWarehouse(ids); if (result) { @@ -285,11 +290,12 @@ public class BasicdataWarehouseController extends BladeController { @ApiOperationSupport(order = 3) public R> getMyWarehouseList() { - List basicdataGoodsShelfVOList = CacheUtil.get("getMyWarehouseList", "basicdata", "WarehouseList",List.class); + BladeUser user = AuthUtil.getUser(); + List basicdataGoodsShelfVOList = CacheUtil.get(CacheObjNames.basic_data_warehourse_list.getCacheName(), CacheObjNames.basic_data_warehourse_list.getKeyPrefix(), user.getUserId(),List.class); if(ObjectUtils.isNull(basicdataGoodsShelfVOList)){ basicdataGoodsShelfVOList = warehouseService.getMyWarehouseList(); - CacheUtil.put("getMyWarehouseList","basicdata","WarehouseList",basicdataGoodsShelfVOList); + CacheUtil.put(CacheObjNames.basic_data_warehourse_list.getCacheName(), CacheObjNames.basic_data_warehourse_list.getKeyPrefix(),user.getUserId(),basicdataGoodsShelfVOList); } return R.data(basicdataGoodsShelfVOList); diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java index 631c1500b..13d5fe7b5 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java @@ -179,16 +179,10 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl warehouseEntityList = baseMapper.selectList(Wrappers.query().lambda().in(BasicdataWarehouseEntity::getDepartment, deptIds)); -// String json = redis.get(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_KEY, user.getUserId())); -// if (warehouseEntityList.size() <= 1) { -// redis.setEx(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_KEY, user.getUserId()), warehouseEntityList.get(0), 30 * 24 * 60 * 60L); -// } - return warehouseEntityList; + if(deptIds.isEmpty()){ + return null; + } + return baseMapper.selectList(Wrappers.query().lambda().in(BasicdataWarehouseEntity::getDepartment, deptIds)); } @Override From e6d4ca1a2415c9ecf11cf6e74ad490e70fa2795e Mon Sep 17 00:00:00 2001 From: kilo Date: Thu, 2 Nov 2023 22:10:54 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E9=85=8D=E9=80=81=E7=AD=BE=E6=94=B6?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DistributionAddvalueServiceImpl.java | 2 +- .../DistributionDeliveryListServiceImpl.java | 24 ++++++++++--------- .../DistributionReservationServiceImpl.java | 6 +++++ .../impl/DistributionSignforServiceImpl.java | 15 ++++++++++++ 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java index c94cbc85f..515cd470b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java @@ -345,8 +345,8 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImplquery().lambda() .eq(DistributionAddvalueDetailEntity::getAddvalueId, distributionAddvalueEntity.getId())); distributionAddvaluePackageMapper.deleteAddvaluePackageList(distributionAppAddvalueDTO.getReservationId(), addvalueDetailEntity.getId()); - distributionAddvalueDetailMapper.deleteAddvalueDetail(distributionAddvalueEntity.getId()); distributionAddvalueMapper.deleteAddvalue(distributionAppAddvalueDTO.getReservationId(), distributionAppAddvalueDTO.getAddvalueType()); + distributionAddvalueDetailMapper.deleteAddvalueDetail(distributionAddvalueEntity.getId()); return Resp.scanSuccess("操作成功","操作成功"); } switch (distributionAppAddvalueDTO.getAddvalueType()) { diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 7b823d5c4..21a66eb65 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -50,6 +50,7 @@ import com.logpm.warehouse.vo.TrayTypeDataVO; import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; import org.apache.commons.lang.StringUtils; +import org.apache.ibatis.scripting.xmltags.ForEachSqlNode; import org.jetbrains.annotations.NotNull; import org.springblade.common.constant.DistributionTypeConstant; import org.springblade.common.constant.Inventory.InventoryLoadingStatusConstant; @@ -1268,6 +1269,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl { + List parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(distrilbutionloadingscanDTO.getReservationId(), ord.getStockArticleId()); for (DistributionParcelListEntity parcelListEntity : parcelListEntities) { DistributionLoadscanEntity loadscanEntity = new DistributionLoadscanEntity(); @@ -1313,15 +1315,15 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImplquery().lambda().eq(DistributionStockListEntity::getId, loadscaninvnEntity.getInventoryId())); stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - loadscaninvnEntity.getPackageNub()); stockListEntity.setQuantityOccupied(stockListEntity.getQuantityOccupied() - loadscaninvnEntity.getPackageNub()); @@ -1520,7 +1522,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl loadscanEntityList = new ArrayList<>(); List trayList = new ArrayList<>(); for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) { - if (reservationStockarticleEntity.equals(IsOrNoConstant.no.getValue())){ + if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())){ //查询订制品备货数量 List packageListStockUpScan = distributionStockMapper.selectList(Wrappers.query().lambda() .eq(DistributionStockEntity::getType, 1) @@ -2475,7 +2477,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl zeroPackageListStockUpScan = distributionStockMapper.selectList(Wrappers.query().lambda() .eq(DistributionStockEntity::getType, 2) @@ -2507,9 +2509,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl Func.isNotEmpty(i.getStockPackageCode()) && i.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())).count(); - + Integer packageListScanNum = loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum(); + Long inventoryListScanNum = stockListDetailEntityList.stream().filter(i -> Func.isNotEmpty(i.getStockPackageCode()) && i.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())).count(); + distributionAppReservationVO.setLoadingNub(packageListScanNum + inventoryListScanNum.intValue()); if (packageListScanNum + inventoryListScanNum ==distributionAppReservationVO.getReservationNum() ) { distributionAppReservationVO.setIsload("是"); } else { diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java index 10953e25f..56c60b3fc 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java @@ -2709,6 +2709,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl { + if (Func.isNotEmpty(s.getAllocation())){ + s.setAllocation(null); + } DistributionStockArticleDTO stockArticleDTO = Func.copy(s, DistributionStockArticleDTO.class); if (s.getIsZero().equals("0")) { WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(s.getWaybillNumber()); @@ -2786,6 +2789,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl customList = baseMapper.selectAppcustomListPage(page, distributionDeliveryList.getId()); for (DistributionAppSignforVO distributionAppReservationVO : customList) { + //查询装车数量 + List packageScanList = distributionLoadscanService.list(Wrappers.query().lambda() + .eq(DistributionLoadscanEntity::getReservationId, distributionAppReservationVO.getId()) + .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); + AtomicInteger loadingNum = new AtomicInteger(); + List inventoryScanList = distributionLoadscaninvnService.list(Wrappers.query().lambda() + .eq(DistributionLoadscaninvnEntity::getReservationId, distributionAppReservationVO.getId()) + .ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); + if (Func.isNotEmpty(packageScanList)){ + loadingNum.getAndAdd(packageScanList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum()); + } + if (Func.isNotEmpty(inventoryScanList)){ + loadingNum.getAndAdd(inventoryScanList.stream().mapToInt(DistributionLoadscaninvnEntity::getLoadedNub).sum()); + } + distributionAppReservationVO.setLoadedNumber(loadingNum.get()); //查询配送状态 distributionAppReservationVO.setDeliveryStatus("配送中"); if (distributionAppReservationVO.getDriverSigning().equals("2") || distributionAppReservationVO.getSigningStatus().equals("2")) { From 6f6d50e071889099e3d916094db6dec3af33a64b Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Fri, 3 Nov 2023 13:57:46 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E6=AC=A7=E6=B4=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81=E7=9A=84=E4=BB=93=E5=BA=93?= =?UTF-8?q?ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/OuPaiFactoryServiceImpl.java | 2 +- .../logpm/factory/receiver/OrderStatusHandler.java | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java index 8e52214a9..1d3315235 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java @@ -363,7 +363,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { } JSONObject detailObject = new JSONObject(); - detailObject.put("WarehouseOid", receivingOrderEntity.getEndWarehouseOid()); + detailObject.put("WarehouseOid", receivingOrderEntity.getCurrentWarehouseOid()); detailObject.put("WarehouseBelong", "oppein"); detailObject.put("Creator", orderStatusDTO.getUsername()); detailObject.put("PackageCode", unitNo); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java index 46233ed0e..9c91623a2 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java @@ -97,13 +97,13 @@ public class OrderStatusHandler { break; case FactoryConstant.OUPAI: -// r = ouPaiFactoryService.handleStatusData(orderStatusDTO); -// if (r.getCode() == 400 || r.getCode() == 200) { -// log.info("TAG {} ##################orderStatusHandler: 该条数据不用处理 orderNo={}", FactoryConstant.OUPAI, orderSelfNum); -//// channel.basicAck(deliveryTag,true); -// } else { -// throw new CustomerException(r.getCode(), r.getMsg()); -// } + r = ouPaiFactoryService.handleStatusData(orderStatusDTO); + if (r.getCode() == 400 || r.getCode() == 200) { + log.info("TAG {} ##################orderStatusHandler: 该条数据不用处理 orderNo={}", FactoryConstant.OUPAI, orderSelfNum); +// channel.basicAck(deliveryTag,true); + } else { + throw new CustomerException(r.getCode(), r.getMsg()); + } default: From 2828968be5dbb81ff143a7f032104c116c437b86 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Fri, 3 Nov 2023 14:06:32 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E6=AC=A7=E6=B4=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81=E7=9A=84=E4=BB=93=E5=BA=93?= =?UTF-8?q?ID1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oupai/service/impl/OuPaiFactoryServiceImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java index 1d3315235..968d450f2 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java @@ -362,6 +362,16 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { return Resp.fail(400, "未查询到该单据推送收货单信息"); } + if(StringUtil.isBlank(receivingOrderEntity.getCurrentWarehouseOid())){ + log.info(" 该订单为没有收货仓 不进行推送 >>> getCurrentWarehouseOid={} ", receivingOrderEntity.getCurrentWarehouseOid()); + return Resp.fail(400, "收货仓信息不能为null"); + } + if(!receivingOrderEntity.getCurrentWarehouseName().contains("仓")){ + log.info(" 该订单为没有收货仓信息不正确 getCurrentWarehouseName={} ", receivingOrderEntity.getCurrentWarehouseName()); + return Resp.fail(400, "该订单为没有收货仓信息不正确"); + } + + JSONObject detailObject = new JSONObject(); detailObject.put("WarehouseOid", receivingOrderEntity.getCurrentWarehouseOid()); detailObject.put("WarehouseBelong", "oppein"); From dd9470be57ec5addcb999557ee723906a7837bdf Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Fri, 3 Nov 2023 14:56:03 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E5=90=AF=E7=94=A8=E6=AC=A7=E6=B4=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=80=80=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../factory/oupai/service/impl/OuPaiFactoryServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java index 968d450f2..3a9e553de 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java @@ -92,9 +92,9 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { // 对返回i的数据进行处理 按照 发车单-->订单-->包件 完成保存 handleData(code); -// if (ObjectUtils.isNotNull(code)) { -// asyncDataService.handlerOuPaiDataToHt(code); -// } + if (ObjectUtils.isNotNull(code)) { + asyncDataService.handlerOuPaiDataToHt(code); + } return code; } From 6ce5be92aa3cedf7c352f64fe02bbb9810cb626c Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Fri, 3 Nov 2023 14:56:56 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E5=90=AF=E7=94=A8=E6=AC=A7=E6=B4=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=80=80=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blade-service/logpm-old-project/pom.xml | 6 + .../config/RabbitMqConfiguration.java | 125 ++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java diff --git a/blade-service/logpm-old-project/pom.xml b/blade-service/logpm-old-project/pom.xml index 85610f7c6..4d509a622 100644 --- a/blade-service/logpm-old-project/pom.xml +++ b/blade-service/logpm-old-project/pom.xml @@ -23,6 +23,12 @@ org.springblade blade-starter-swagger + + + org.springframework.boot + spring-boot-starter-amqp + + org.springblade diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java new file mode 100644 index 000000000..c736abbd6 --- /dev/null +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java @@ -0,0 +1,125 @@ +package com.logpm.oldproject.config; + +import com.alibaba.nacos.shaded.com.google.common.collect.Maps; +import lombok.extern.slf4j.Slf4j; +import org.springblade.common.constant.RabbitConstant; +import org.springframework.amqp.core.*; +import org.springframework.amqp.rabbit.connection.ConnectionFactory; +import org.springframework.amqp.rabbit.connection.CorrelationData; +import org.springframework.amqp.rabbit.core.RabbitTemplate; +import org.springframework.amqp.rabbit.retry.MessageRecoverer; +import org.springframework.amqp.rabbit.retry.RepublishMessageRecoverer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.util.Map; + +/** + * RabbitMQ配置,主要是配置队列,如果提前存在该队列,可以省略本配置类 + * + * @author yangkai.shen + */ +@Slf4j +@Configuration +public class RabbitMqConfiguration { + + @Bean + public RabbitTemplate createRabbitTemplate(ConnectionFactory connectionFactory){ + RabbitTemplate template = new RabbitTemplate(); + template.setConnectionFactory(connectionFactory); + template.setMandatory(true); + template.setConfirmCallback(new RabbitTemplate.ConfirmCallback() { + @Override + public void confirm(CorrelationData correlationData, boolean b, String s) { + System.out.println("确认回调-相关数据:"+correlationData); + System.out.println("确认回调-确认情况:"+b); + System.out.println("确认回调-原因:"+s); +// Long id = Long.parseLong(correlationData.getId()); +// UpdateWrapper updateWrapper = new UpdateWrapper<>(); +// if(b){ +// //修改处理日志为已处理 +// updateWrapper.set("status",0) +// .eq("id",id); +// +// }else{ +// //修改处理日志为已处理 +// updateWrapper.set("status",2) +// .eq("id",id); +// } +// panOrderStatusLogService.update(updateWrapper); + } + }); + + template.setReturnsCallback(new RabbitTemplate.ReturnsCallback() { + @Override + public void returnedMessage(ReturnedMessage returnedMessage) { + System.out.println("返回回调-消息:"+returnedMessage.getMessage()); + System.out.println("返回回调-回应码:"+returnedMessage.getReplyCode()); + System.out.println("返回回调-回应信息:"+returnedMessage.getReplyText()); + System.out.println("返回回调-交换机:"+returnedMessage.getExchange()); + System.out.println("返回回调-路由键:"+returnedMessage.getRoutingKey()); + } + }); + return template; + } + + @Bean + public DirectExchange errorMessageExchange(){ + return new DirectExchange(RabbitConstant.ERROR_EXCHANGE); + } + @Bean + public Queue errorQueue(){ + return new Queue(RabbitConstant.ERROR_QUEUE, true); + } + @Bean + public Binding errorBinding(Queue errorQueue, DirectExchange errorMessageExchange){ + return BindingBuilder.bind(errorQueue).to(errorMessageExchange).with(RabbitConstant.ERROR_ROUTING); + } + + /** + * 消费失败队列 + * @param rabbitTemplate + * @return + */ + @Bean + public MessageRecoverer republishMessageRecoverer(RabbitTemplate rabbitTemplate){ + return new RepublishMessageRecoverer(rabbitTemplate, RabbitConstant.ERROR_EXCHANGE, RabbitConstant.ERROR_ROUTING); + } + + + /** + * 延迟队列 + */ + @Bean + public Queue orderStatusQueue() { + return new Queue(RabbitConstant.ORDER_STATUS_QUEUE, true); + } + + /** + * 延迟队列交换器, x-delayed-type 和 x-delayed-message 固定 + */ + @Bean + public CustomExchange orderStatusExchange() { + Map args = Maps.newHashMap(); + args.put("x-delayed-type", "direct"); + return new CustomExchange(RabbitConstant.ORDER_STATUS_EXCHANGE, "x-delayed-message", true, false, args); + } + + /** + * 延迟队列绑定自定义交换器 + * + * @param orderStatusQueue 队列 + * @param orderStatusExchange 延迟交换器 + */ + @Bean + public Binding orderStatusBinding(Queue orderStatusQueue, CustomExchange orderStatusExchange) { + return BindingBuilder.bind(orderStatusQueue).to(orderStatusExchange).with(RabbitConstant.ORDER_STATUS_ROUTING).noargs(); + } + + + + + + + +} From 14f74973a431ddb1634fb251ddf44b0aadf1b5db Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 3 Nov 2023 18:01:49 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E6=BB=9E=E7=95=99=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=E5=8C=85=E4=BB=B6=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionRetentionScanEntity.java | 181 ++++++++++++++++ .../vo/DistributionSignforVO.java | 7 + .../entity/WarehouseRetentionScanEntity.java | 183 ++++++++++++++++ .../feign/IWarehouseRetentionScanClient.java | 50 +++++ .../vo/WarehouseRetentionScanVO.java | 34 +++ .../mapper/DistributionSignforMapper.java | 13 +- .../mapper/DistributionSignforMapper.xml | 3 + .../impl/DistributionSignforServiceImpl.java | 2 + .../api/WarehouseRetentionApiController.java | 144 ++++++++----- .../WarehouseRetentionScanController.java | 154 ++++++++++++++ .../com/logpm/warehouse/dto/RetentionDTO.java | 1 - .../dto/WarehouseRetentionScanDTO.java | 34 +++ .../excel/WarehouseRetentionScanExcel.java | 201 ++++++++++++++++++ .../feign/WarehouseRetentionScanClient.java | 55 +++++ .../mapper/WarehouseRetentionScanMapper.java | 57 +++++ .../mapper/WarehouseRetentionScanMapper.xml | 52 +++++ .../IWarehouseRetentionScanService.java | 55 +++++ .../WarehouseRetentionScanServiceImpl.java | 57 +++++ 18 files changed, 1223 insertions(+), 60 deletions(-) create mode 100644 blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionRetentionScanEntity.java create mode 100644 blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java create mode 100644 blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java create mode 100644 blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionScanVO.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseRetentionScanController.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseRetentionScanDTO.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehouseRetentionScanExcel.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionRetentionScanEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionRetentionScanEntity.java new file mode 100644 index 000000000..f5b0202b8 --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionRetentionScanEntity.java @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import java.io.Serializable; + +/** + * 滞留扫描操作表 实体类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Data +@TableName("logpm_distribution_retention_scan") +@ApiModel(value = "DistributionRetentionScan对象", description = "滞留扫描操作表") +public class DistributionRetentionScanEntity implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 租户号 + */ + @ApiModelProperty(value = "租户号") + private String tenantId; + /** + * 是否已删除 + */ + @ApiModelProperty(value = "是否已删除") + private Integer isDeleted; + /** + * 预留1 + */ + @ApiModelProperty(value = "预留1") + private String reserve1; + /** + * 预留2 + */ + @ApiModelProperty(value = "预留2") + private String reserve2; + /** + * 预留3 + */ + @ApiModelProperty(value = "预留3") + private String reserve3; + /** + * 预留4 + */ + @ApiModelProperty(value = "预留4") + private String reserve4; + /** + * 预留5 + */ + @ApiModelProperty(value = "预留5") + private String reserve5; + /** + * 配送车次号 + */ + @ApiModelProperty(value = "配送车次号") + private String trainNumber; + /** + * 订单ID + */ + @ApiModelProperty(value = "订单ID") + private Long orderId; + /** + * 库存品ID + */ + @ApiModelProperty(value = "库存品ID") + private Long inventoryId; + /** + * 滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品 + */ + @ApiModelProperty(value = "滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品") + private Integer conditions; + /** + * 物料编码(库存品) + */ + @ApiModelProperty(value = "物料编码(库存品)") + private String materialNumber; + /** + * 物料名称(库存品) + */ + @ApiModelProperty(value = "物料名称(库存品)") + private String materialName; + /** + * 预约客户ID + */ + @ApiModelProperty(value = "预约客户ID") + private Long reservationId; + /** + * 订单自编号(库存品没有) + */ + @ApiModelProperty(value = "订单自编号(库存品没有)") + private String orderCode; + /** + * 预约单号 + */ + @ApiModelProperty(value = "预约单号") + private String reservationCode; + /** + * 扫描类型:1-包件、2-订单、3-托盘、4... + */ + @ApiModelProperty(value = "扫描类型:1-包件、2-订单、3-托盘、4...") + private Integer scanType; + /** + * 包件ID + */ + @ApiModelProperty(value = "包件ID") + private Long orderPackageId; + /** + * 包条码 + */ + @ApiModelProperty(value = "包条码") + private String orderPackageCode; + /** + * 滞留数量 + */ + @ApiModelProperty(value = "滞留数量") + private Integer retentionQuantity; + /** + * 滞留扫描操作人名称 + */ + @ApiModelProperty(value = "滞留扫描操作人名称") + private String retentionScanUsername; + /** + * 滞留扫描操作人Id + */ + @ApiModelProperty(value = "滞留扫描操作人Id") + private String retentionScanUserId; + /** + * 滞留操作备注 + */ + @ApiModelProperty(value = "滞留操作备注") + private String remarks; + /** + * 滞留扫描时间 + */ + @ApiModelProperty(value = "滞留扫描时间") + private Date retentionScanTime; + /** + * 滞留方式 1-PDA、2-PC + */ + @ApiModelProperty(value = "滞留方式 1-PDA、2-PC") + private Integer retentionWay; + /** + * 配送任务ID + */ + @ApiModelProperty(value = "配送任务ID") + private Long deliveryListId; + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java index bc17283f5..aaedc946d 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java @@ -16,6 +16,7 @@ */ package com.logpm.distribution.vo; +import com.logpm.distribution.entity.DistributionSignPrintEntity; import com.logpm.distribution.entity.DistributionSignforEntity; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -150,6 +151,12 @@ public class DistributionSignforVO extends DistributionSignforEntity { @ApiModelProperty(value = "卸车班组") private String sijiSigningStatus; + /** + * 签收图片路径,多个 + */ + @ApiModelProperty(value = "卸车班组") + private List printVOList; + /** * 客户订单列表 */ diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java new file mode 100644 index 000000000..9482f7773 --- /dev/null +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java @@ -0,0 +1,183 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serializable; + +/** + * 滞留扫描记录 实体类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Data +@TableName("logpm_warehouse_retention_scan") +@ApiModel(value = "WarehouseRetentionRecord对象", description = "滞留扫描记录") +public class WarehouseRetentionScanEntity extends TenantEntity implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 租户号 + */ + @ApiModelProperty(value = "租户号") + private String tenantId; + /** + * 是否已删除 + */ + @ApiModelProperty(value = "是否已删除") + private Integer isDeleted; + /** + * 预留1 + */ + @ApiModelProperty(value = "预留1") + private String reserve1; + /** + * 预留2 + */ + @ApiModelProperty(value = "预留2") + private String reserve2; + /** + * 预留3 + */ + @ApiModelProperty(value = "预留3") + private String reserve3; + /** + * 预留4 + */ + @ApiModelProperty(value = "预留4") + private String reserve4; + /** + * 预留5 + */ + @ApiModelProperty(value = "预留5") + private String reserve5; + /** + * 配送车次号 + */ + @ApiModelProperty(value = "配送车次号") + private String trainNumber; + /** + * 订单ID + */ + @ApiModelProperty(value = "订单ID") + private Long orderId; + /** + * 库存品ID + */ + @ApiModelProperty(value = "库存品ID") + private Long inventoryId; + /** + * 滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品 + */ + @ApiModelProperty(value = "滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品") + private Integer conditions; + /** + * 物料编码(库存品) + */ + @ApiModelProperty(value = "物料编码(库存品)") + private String materialNumber; + /** + * 物料名称(库存品) + */ + @ApiModelProperty(value = "物料名称(库存品)") + private String materialName; + /** + * 预约客户ID + */ + @ApiModelProperty(value = "预约客户ID") + private Long reservationId; + /** + * 订单自编号(库存品没有) + */ + @ApiModelProperty(value = "订单自编号(库存品没有)") + private String orderCode; + /** + * 预约单号 + */ + @ApiModelProperty(value = "预约单号") + private String reservationCode; + /** + * 扫描类型:1-包件、2-订单、3-托盘、4... + */ + @ApiModelProperty(value = "扫描类型:1-包件、2-订单、3-托盘、4...") + private Integer scanType; + /** + * 包件ID + */ + @ApiModelProperty(value = "包件ID") + private Long orderPackageId; + /** + * 包条码 + */ + @ApiModelProperty(value = "包条码") + private String orderPackageCode; + /** + * 滞留数量 + */ + @ApiModelProperty(value = "滞留数量") + private Integer retentionQuantity; + /** + * 滞留扫描操作人名称 + */ + @ApiModelProperty(value = "滞留扫描操作人名称") + private String retentionScanUsername; + /** + * 滞留扫描操作人Id + */ + @ApiModelProperty(value = "滞留扫描操作人Id") + private String retentionScanUserId; + /** + * 滞留操作备注 + */ + @ApiModelProperty(value = "滞留操作备注") + private String remarks; + /** + * 滞留扫描时间 + */ + @ApiModelProperty(value = "滞留扫描时间") + private Date retentionScanTime; + /** + * 滞留方式 1-PDA、2-PC + */ + @ApiModelProperty(value = "滞留方式 1-PDA、2-PC") + private Integer retentionWay; + /** + * 配送任务ID + */ + @ApiModelProperty(value = "配送任务ID") + private Long deliveryListId; + +} diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java new file mode 100644 index 000000000..17bf7aca0 --- /dev/null +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.feign; + +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import org.springblade.core.mp.support.BladePage; +import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * 滞留扫描记录 Feign接口类 + * + * @author BladeX + * @since 2023-11-03 + */ +@FeignClient( + value = "warehouseRetentionScan" +) +public interface IWarehouseRetentionScanClient { + + String API_PREFIX = "retentionScan/client"; + String TOP = API_PREFIX + "/top"; + + /** + * 获取滞留扫描记录列表 + * + * @param current 页号 + * @param size 页数 + * @return BladePage + */ + @GetMapping(TOP) + BladePage retentionScanTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size); + +} diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionScanVO.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionScanVO.java new file mode 100644 index 000000000..2fdb632da --- /dev/null +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionScanVO.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.vo; + +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 滞留扫描记录 视图实体类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WarehouseRetentionScanVO extends WarehouseRetentionScanEntity { + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java index 1c6364847..2bff9844d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java @@ -24,10 +24,7 @@ import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.excel.DistributionSignforExcel; -import com.logpm.distribution.vo.DistributionLoadscanAbnormalVO; -import com.logpm.distribution.vo.DistributionReservationStocklistVO; -import com.logpm.distribution.vo.DistributionSignforVO; -import com.logpm.distribution.vo.DistributionStockArticleVO; +import com.logpm.distribution.vo.*; import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO; import com.logpm.distribution.vo.app.DistributionAppParcelListVO; import com.logpm.distribution.vo.app.DistributionAppSignforVO; @@ -227,4 +224,12 @@ public interface DistributionSignforMapper extends BaseMapper selectAbnormalPackageList(@Param("reservationId")Long reservationId,@Param("deliveryListId") Long deliveryId); + + + /** + * 查询签收图片 + * @param reservationId + * @return + */ + List selectSignImgsUrl(@Param("reservationId")Long reservationId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml index 5f8c92620..896b546f1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml @@ -930,4 +930,7 @@ WHERE ldla.reservation_id = #{reservationId} and ldla.delivery_list_id = #{deliveryListId} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index df8280f52..9e2c73021 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -401,6 +401,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl orderIds = reservationStockarticleEntityList.stream().map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); List stockArticleEntities = distributionStockArticleService.listByIds(orderIds); + List printEntities = baseMapper.selectSignImgsUrl(distributionSignforVO.getReservationId()); + distributionSignforVO.setPrintVOList(printEntities); if (Func.isNotEmpty(stockArticleEntities)){ distributionSignforVO.setOrderInfo(DistributionStockArticleWrapper.build().listVO(stockArticleEntities)); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseRetentionApiController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseRetentionApiController.java index 46a924e3c..3999338ab 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseRetentionApiController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseRetentionApiController.java @@ -25,60 +25,94 @@ public class WarehouseRetentionApiController { private final IWarehouseRetentionRecordService warehouseRetentionRecordService; - @ResponseBody - @PostMapping("/retentionPackageList") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "滞留包件列表", notes = "传入trayTypeDTO") - public R> retentionPackageList(@RequestBody RetentionDTO retentionDTO) { - String method = "###########retentionPackageList: "; - log.info(method+"滞留包件列表 retentionDTO={}",retentionDTO); - Integer pageNum = retentionDTO.getPageNum(); - Integer pageSize = retentionDTO.getPageSize(); - - if(Objects.isNull(pageNum)){ - retentionDTO.setPageNum(1); - } - if(Objects.isNull(pageSize)){ - retentionDTO.setPageSize(10); - } - - try{ - //查询订制品打托列表 - IPage pages = warehouseRetentionRecordService.retentionPackageList(retentionDTO); - return R.data(pages); - }catch (CustomerException e){ - log.warn(e.message); - return R.fail(e.code,e.message); - }catch (Exception e){ - log.error(method+"系统异常,联系管理员",e); - return R.fail(500,"系统异常,联系管理员"); - } - } - - - @ResponseBody - @PostMapping("/retentionScanPackage") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "滞留扫描包件码", notes = "传入trayTypeDTO") - public R retentionScanPackage(@RequestBody RetentionDTO retentionDTO) { - String method = "###########retentionScanPackage: "; - log.info(method + "滞留扫描包件码 retentionDTO={}", retentionDTO); - String orderPackageCode = retentionDTO.getOrderPackageCode();//包件码 - try{ - if(StringUtil.isBlank(orderPackageCode)){ - log.warn("############retentionScanPackage: 包件码不能为空 orderPackageCode={}",orderPackageCode); - return R.fail(403,"包件码不能为空"); - } - - //查询订制品打托列表 - return warehouseRetentionRecordService.retentionScanPackage(orderPackageCode); - }catch (CustomerException e){ - log.warn(e.message); - return R.fail(e.code,e.message); - }catch (Exception e){ - log.error(method+"系统异常,联系管理员",e); - return R.fail(500,"系统异常,联系管理员"); - } - } + + + +// @ResponseBody +// @PostMapping("/retentionPackageList") +// @ApiOperationSupport(order = 1) +// @ApiOperation(value = "滞留包件列表", notes = "传入trayTypeDTO") +// public R> retentionPackageList(@RequestBody RetentionDTO retentionDTO) { +// String method = "###########retentionPackageList: "; +// log.info(method+"滞留包件列表 retentionDTO={}",retentionDTO); +// Integer pageNum = retentionDTO.getPageNum(); +// Integer pageSize = retentionDTO.getPageSize(); +// +// if(Objects.isNull(pageNum)){ +// retentionDTO.setPageNum(1); +// } +// if(Objects.isNull(pageSize)){ +// retentionDTO.setPageSize(10); +// } +// +// try{ +// //查询订制品打托列表 +// IPage pages = warehouseRetentionRecordService.retentionPackageList(retentionDTO); +// return R.data(pages); +// }catch (CustomerException e){ +// log.warn(e.message); +// return R.fail(e.code,e.message); +// }catch (Exception e){ +// log.error(method+"系统异常,联系管理员",e); +// return R.fail(500,"系统异常,联系管理员"); +// } +// } +// +// +// @ResponseBody +// @PostMapping("/retentionScanPackage") +// @ApiOperationSupport(order = 1) +// @ApiOperation(value = "滞留扫描包件码", notes = "传入trayTypeDTO") +// public R retentionScanPackage(@RequestBody RetentionDTO retentionDTO) { +// String method = "###########retentionScanPackage: "; +// log.info(method + "滞留扫描包件码 retentionDTO={}", retentionDTO); +// String orderPackageCode = retentionDTO.getOrderPackageCode();//包件码 +// try{ +// if(StringUtil.isBlank(orderPackageCode)){ +// log.warn("############retentionScanPackage: 包件码不能为空 orderPackageCode={}",orderPackageCode); +// return R.fail(403,"包件码不能为空"); +// } +// +// //查询订制品打托列表 +// return warehouseRetentionRecordService.retentionScanPackage(orderPackageCode); +// }catch (CustomerException e){ +// log.warn(e.message); +// return R.fail(e.code,e.message); +// }catch (Exception e){ +// log.error(method+"系统异常,联系管理员",e); +// return R.fail(500,"系统异常,联系管理员"); +// } +// } + + + + +// @ResponseBody +// @PostMapping("/retentionScanPackage") +// @ApiOperationSupport(order = 1) +// @ApiOperation(value = "滞留扫描包件码", notes = "传入trayTypeDTO") +// public R retentionScanPackage(@RequestBody RetentionDTO retentionDTO) { +// String method = "###########retentionScanPackage: "; +// log.info(method + "滞留扫描包件码 retentionDTO={}", retentionDTO); +// String orderPackageCode = retentionDTO.getOrderPackageCode();//包件码 +// try{ +// if(StringUtil.isBlank(orderPackageCode)){ +// log.warn("############retentionScanPackage: 包件码不能为空 orderPackageCode={}",orderPackageCode); +// return R.fail(403,"包件码不能为空"); +// } +// +// //查询订制品打托列表 +// return warehouseRetentionRecordService.retentionScanPackage(orderPackageCode); +// }catch (CustomerException e){ +// log.warn(e.message); +// return R.fail(e.code,e.message); +// }catch (Exception e){ +// log.error(method+"系统异常,联系管理员",e); +// return R.fail(500,"系统异常,联系管理员"); +// } +// } + + + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseRetentionScanController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseRetentionScanController.java new file mode 100644 index 000000000..7a8fc93aa --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseRetentionScanController.java @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.controller; + +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import com.logpm.warehouse.excel.WarehouseRetentionScanExcel; +import com.logpm.warehouse.service.IWarehouseRetentionScanService; +import com.logpm.warehouse.vo.WarehouseRetentionScanVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import org.springblade.core.secure.BladeUser; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; +import com.logpm.warehouse.excel.WarehouseRetentionRecordExcel; +import com.logpm.warehouse.service.IWarehouseRetentionRecordService; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.excel.util.ExcelUtil; +import org.springblade.core.tool.constant.BladeConstant; +import springfox.documentation.annotations.ApiIgnore; +import java.util.Map; +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +/** + * 滞留扫描记录 控制器 + * + * @author BladeX + * @since 2023-11-03 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/warehouseRetentionScan") +@Api(value = "滞留扫描记录", tags = "滞留扫描记录接口") +public class WarehouseRetentionScanController extends BladeController { + + private final IWarehouseRetentionScanService warehouseRetentionScanService; + + /** + * 滞留扫描记录 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入warehouseRetentionScan") + public R detail(WarehouseRetentionScanEntity warehouseRetentionScan) { + WarehouseRetentionScanEntity detail = warehouseRetentionScanService.getOne(Condition.getQueryWrapper(warehouseRetentionScan)); + return R.data(detail); + } + /** + * 滞留扫描记录 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入warehouseRetentionScan") + public R> list(@ApiIgnore @RequestParam Map warehouseRetentionScan, Query query) { + IPage pages = warehouseRetentionScanService.page(Condition.getPage(query), Condition.getQueryWrapper(warehouseRetentionScan, WarehouseRetentionScanEntity.class)); + return R.data(pages); + } + + /** + * 滞留扫描记录 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入warehouseRetentionScan") + public R> page(WarehouseRetentionScanVO warehouseRetentionScan, Query query) { + IPage pages = warehouseRetentionScanService.selectWarehouseRetentionRecordPage(Condition.getPage(query), warehouseRetentionScan); + return R.data(pages); + } + + /** + * 滞留扫描记录 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入warehouseRetentionScan") + public R save(@Valid @RequestBody WarehouseRetentionScanEntity warehouseRetentionScan) { + return R.status(warehouseRetentionScanService.save(warehouseRetentionScan)); + } + + /** + * 滞留扫描记录 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入warehouseRetentionScan") + public R update(@Valid @RequestBody WarehouseRetentionScanEntity warehouseRetentionScan) { + return R.status(warehouseRetentionScanService.updateById(warehouseRetentionScan)); + } + + /** + * 滞留扫描记录 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入warehouseRetentionScan") + public R submit(@Valid @RequestBody WarehouseRetentionScanEntity warehouseRetentionScan) { + return R.status(warehouseRetentionScanService.saveOrUpdate(warehouseRetentionScan)); + } + + /** + * 滞留扫描记录 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(warehouseRetentionScanService.removeByIds(Func.toLongList(ids))); + } + + + /** + * 导出数据 + */ + @GetMapping("/export-warehouseRetentionScan") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "导出数据", notes = "传入warehouseRetentionScan") + public void exportWarehouseRetentionScan(@ApiIgnore @RequestParam Map warehouseRetentionScan, BladeUser bladeUser, HttpServletResponse response) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(warehouseRetentionScan, WarehouseRetentionScanEntity.class); + //if (!AuthUtil.isAdministrator()) { + // queryWrapper.lambda().eq(WarehouseRetentionScan::getTenantId, bladeUser.getTenantId()); + //} + queryWrapper.lambda().eq(WarehouseRetentionScanEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); + List list = warehouseRetentionScanService.exportWarehouseRetentionRecord(queryWrapper); + ExcelUtil.export(response, "滞留扫描记录数据" + DateUtil.time(), "滞留扫描记录数据表", list, WarehouseRetentionScanExcel.class); + } + +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java index d1ed25541..d21f0962c 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java @@ -14,5 +14,4 @@ public class RetentionDTO implements Serializable { private String endDate; private String orderPackageCode; - } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseRetentionScanDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseRetentionScanDTO.java new file mode 100644 index 000000000..e3347140f --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseRetentionScanDTO.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.dto; + +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 滞留扫描记录 数据传输对象实体类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WarehouseRetentionScanDTO extends WarehouseRetentionScanEntity { + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehouseRetentionScanExcel.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehouseRetentionScanExcel.java new file mode 100644 index 000000000..953bed997 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehouseRetentionScanExcel.java @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.excel; + + +import lombok.Data; + +import java.util.Date; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import java.io.Serializable; + + +/** + * 滞留扫描记录 Excel实体类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class WarehouseRetentionScanExcel implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("租户号") + private String tenantId; + /** + * 是否已删除 + */ + @ColumnWidth(20) + @ExcelProperty("是否已删除") + private Integer isDeleted; + /** + * 预留1 + */ + @ColumnWidth(20) + @ExcelProperty("预留1") + private String reserve1; + /** + * 预留2 + */ + @ColumnWidth(20) + @ExcelProperty("预留2") + private String reserve2; + /** + * 预留3 + */ + @ColumnWidth(20) + @ExcelProperty("预留3") + private String reserve3; + /** + * 预留4 + */ + @ColumnWidth(20) + @ExcelProperty("预留4") + private String reserve4; + /** + * 预留5 + */ + @ColumnWidth(20) + @ExcelProperty("预留5") + private String reserve5; + /** + * 配送车次号 + */ + @ColumnWidth(20) + @ExcelProperty("配送车次号") + private String trainNumber; + /** + * 订单ID + */ + @ColumnWidth(20) + @ExcelProperty("订单ID") + private Long orderId; + /** + * 库存品ID + */ + @ColumnWidth(20) + @ExcelProperty("库存品ID") + private Long inventoryId; + /** + * 滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品 + */ + @ColumnWidth(20) + @ExcelProperty("滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品") + private Integer conditions; + /** + * 物料编码(库存品) + */ + @ColumnWidth(20) + @ExcelProperty("物料编码(库存品)") + private String materialNumber; + /** + * 物料名称(库存品) + */ + @ColumnWidth(20) + @ExcelProperty("物料名称(库存品)") + private String materialName; + /** + * 预约客户ID + */ + @ColumnWidth(20) + @ExcelProperty("预约客户ID") + private Long reservationId; + /** + * 订单自编号(库存品没有) + */ + @ColumnWidth(20) + @ExcelProperty("订单自编号(库存品没有)") + private String orderCode; + /** + * 预约单号 + */ + @ColumnWidth(20) + @ExcelProperty("预约单号") + private String reservationCode; + /** + * 扫描类型:1-包件、2-订单、3-托盘、4... + */ + @ColumnWidth(20) + @ExcelProperty("扫描类型:1-包件、2-订单、3-托盘、4...") + private Integer scanType; + /** + * 包件ID + */ + @ColumnWidth(20) + @ExcelProperty("包件ID") + private Long orderPackageId; + /** + * 包条码 + */ + @ColumnWidth(20) + @ExcelProperty("包条码") + private String orderPackageCode; + /** + * 滞留数量 + */ + @ColumnWidth(20) + @ExcelProperty("滞留数量") + private Integer retentionQuantity; + /** + * 滞留扫描操作人名称 + */ + @ColumnWidth(20) + @ExcelProperty("滞留扫描操作人名称") + private String retentionScanUsername; + /** + * 滞留扫描操作人Id + */ + @ColumnWidth(20) + @ExcelProperty("滞留扫描操作人Id") + private String retentionScanUserId; + /** + * 滞留操作备注 + */ + @ColumnWidth(20) + @ExcelProperty("滞留操作备注") + private String remarks; + /** + * 滞留扫描时间 + */ + @ColumnWidth(20) + @ExcelProperty("滞留扫描时间") + private Date retentionScanTime; + /** + * 滞留方式 1-PDA、2-PC + */ + @ColumnWidth(20) + @ExcelProperty("滞留方式 1-PDA、2-PC") + private Integer retentionWay; + /** + * 配送任务ID + */ + @ColumnWidth(20) + @ExcelProperty("配送任务ID") + private Long deliveryListId; + +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java new file mode 100644 index 000000000..d7972a750 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.feign; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import com.logpm.warehouse.service.IWarehouseRetentionScanService; +import lombok.AllArgsConstructor; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import com.logpm.warehouse.service.IWarehouseRetentionRecordService; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +/** + * 滞留扫描记录 Feign实现类 + * + * @author BladeX + * @since 2023-11-03 + */ +@ApiIgnore() +@RestController +@AllArgsConstructor +public class WarehouseRetentionScanClient implements IWarehouseRetentionScanClient { + + private final IWarehouseRetentionScanService warehouseRetentionScanService; + + @Override + @GetMapping(TOP) + public BladePage retentionScanTop(Integer current, Integer size) { + Query query = new Query(); + query.setCurrent(current); + query.setSize(size); + IPage page = warehouseRetentionScanService.page(Condition.getPage(query)); + return BladePage.of(page); + } + +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.java new file mode 100644 index 000000000..b3334d03c --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.mapper; + +import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import com.logpm.warehouse.excel.WarehouseRetentionScanExcel; +import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; +import com.logpm.warehouse.excel.WarehouseRetentionRecordExcel; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.warehouse.vo.WarehouseRetentionScanVO; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * 滞留扫描记录 Mapper 接口 + * + * @author BladeX + * @since 2023-11-03 + */ +public interface WarehouseRetentionScanMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param warehouseRetentionScanVO + * @return + */ + List selectWarehouseRetentionRecordPage(IPage page, WarehouseRetentionScanVO warehouseRetentionScanVO); + + + /** + * 获取导出数据 + * + * @param queryWrapper + * @return + */ + List exportWarehouseRetentionRecord(@Param("ew") Wrapper queryWrapper); + +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml new file mode 100644 index 000000000..7330ce208 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java new file mode 100644 index 000000000..5c43e2950 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import com.logpm.warehouse.excel.WarehouseRetentionScanExcel; +import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.logpm.warehouse.vo.WarehouseRetentionScanVO; + +import java.util.List; + +/** + * 滞留扫描记录 服务类 + * + * @author BladeX + * @since 2023-11-03 + */ +public interface IWarehouseRetentionScanService extends IService { + /** + * 自定义分页 + * + * @param page + * @param warehouseRetentionScanVO + * @return + */ + IPage selectWarehouseRetentionRecordPage(IPage page, WarehouseRetentionScanVO warehouseRetentionScanVO); + + + /** + * 导出数据 + * + * @param queryWrapper + * @return + */ + List exportWarehouseRetentionRecord(Wrapper queryWrapper); + +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java new file mode 100644 index 000000000..5b1e2265d --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.service.impl; + +import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import com.logpm.warehouse.excel.WarehouseRetentionScanExcel; +import com.logpm.warehouse.mapper.WarehouseRetentionScanMapper; +import com.logpm.warehouse.service.IWarehouseRetentionScanService; +import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; +import com.logpm.warehouse.excel.WarehouseRetentionRecordExcel; +import com.logpm.warehouse.vo.WarehouseRetentionScanVO; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 滞留扫描记录 服务实现类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Service +public class WarehouseRetentionScanServiceImpl extends BaseServiceImpl implements IWarehouseRetentionScanService { + + @Override + public IPage selectWarehouseRetentionRecordPage(IPage page, WarehouseRetentionScanVO warehouseRetentionScanVO) { + return page.setRecords(baseMapper.selectWarehouseRetentionRecordPage(page, warehouseRetentionScanVO)); + } + + + @Override + public List exportWarehouseRetentionRecord(Wrapper queryWrapper) { + List warehouseRetentionRecordList = baseMapper.exportWarehouseRetentionRecord(queryWrapper); + //warehouseRetentionRecordList.forEach(warehouseRetentionRecord -> { + // warehouseRetentionRecord.setTypeName(DictCache.getValue(DictEnum.YES_NO, WarehouseRetentionRecord.getType())); + //}); + return warehouseRetentionRecordList; + } + +} From b4c4c0112840d25c0f86d047f48ea5203409e760 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Sat, 4 Nov 2023 15:31:23 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPan=20=E5=BC=80?= =?UTF-8?q?=E5=8D=95=E4=BC=9A=E6=8E=A8=E7=9A=84=E6=97=B6=E5=80=99=20?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oldproject/feign/IAdvanceClient.java | 10 +++++ .../impl/PanFactoryDataServiceImpl.java | 1 + .../factory/receiver/OpenOrderHandler.java | 45 +++++++++++-------- .../logpm/oldproject/feign/AdvanceClient.java | 6 ++- .../oldproject/mapper/AdvanceMapper.java | 1 + .../logpm/oldproject/mapper/AdvanceMapper.xml | 4 ++ .../oldproject/service/IAdvanceService.java | 7 +++ .../service/impl/AdvanceServiceImpl.java | 5 +++ 8 files changed, 59 insertions(+), 20 deletions(-) diff --git a/blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java b/blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java index b3810e619..f66963354 100644 --- a/blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java +++ b/blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java @@ -85,6 +85,16 @@ public interface IAdvanceClient { AdvanceEntity fingById(@RequestParam Integer advanceId); + /** + * 根据运单号和订单号查询老系统的开单对应的订单 + * @param logiBillNo + * @param orderCode + * @return + */ + @GetMapping(API_PREFIX + "/findAdvanceEntityByLogiBillNoAndOrderCode") + List findAdvanceEntityByLogiBillNoAndOrderCode(@RequestParam String logiBillNo,@RequestParam String orderCode); + + diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java index 3da84f752..515ea55bf 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java @@ -148,6 +148,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { //根据客户订单号去查询WMS装车清单号 QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("order_no", orderNo); + queryWrapper.eq("delivery_number", orderInfoDTO.getDeliveryNumber()); PanFactoryOrder panFactoryOrder = factoryOrderService.getOne(queryWrapper); if (Objects.isNull(panFactoryOrder)) { logger.info("#############handleData: 未找到订单数据 合同自编码orderNo={}", orderNo); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OpenOrderHandler.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OpenOrderHandler.java index 2cffa1d31..9fdddf4ab 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OpenOrderHandler.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OpenOrderHandler.java @@ -18,6 +18,7 @@ import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import java.util.List; import java.util.Map; import java.util.Objects; @@ -57,34 +58,40 @@ public class OpenOrderHandler { } //通过订单自编号去查询该条订单是属于哪个工厂 String orderSelfNum =orderNo; - AdvanceEntity advanceEntity = advanceClient.getQueryDataOne(orderSelfNum); - if(Objects.isNull(advanceEntity)){ + // 汇通运单号 + String logiBillNo = orderInfoDTO.getLogiBillNo(); + List advanceEntitys = advanceClient.findAdvanceEntityByLogiBillNoAndOrderCode(logiBillNo,orderSelfNum); + if(Objects.isNull(advanceEntitys)){ log.info("##################openOrderStatusHandler: 未找到对应订单 orderNo={}",orderNo); -// channel.basicAck(deliveryTag,true); return; } - String type = advanceEntity.getType();//品牌 + for (AdvanceEntity advanceEntity : advanceEntitys) { + String type = advanceEntity.getType();//品牌 - orderInfoDTO.setOrderNo(orderNo); - R r = null; - switch (type){ - case FactoryConstant.PIANO: - r = panFactoryDataService.handleData(orderInfoDTO); - int code = r.getCode(); - if(code == 400 || code == 200){ - log.info("##################openOrderStatusHandler: 该条数据不用处理 orderNo={}",orderNo); -// channel.basicAck(deliveryTag,true); - }else{ - throw new CustomerException(code,r.getMsg()); - } - break; + orderInfoDTO.setOrderNo(orderNo); + orderInfoDTO.setDeliveryNumber(advanceEntity.getMctsTruckNo()); + R r = null; + switch (type){ + case FactoryConstant.PIANO: + r = panFactoryDataService.handleData(orderInfoDTO); + int code = r.getCode(); + if(code == 400 || code == 200){ + log.info("##################openOrderStatusHandler: 该条数据不用处理 orderNo={}",orderNo); + }else{ + throw new CustomerException(code,r.getMsg()); + } + break; // case FactoryConstant.MENGT: // r = mtFactoryDataService.handleData(orderInfoDTO); // break; - default: - log.info("##################openOrderStatusHandler: 未知品牌 type={}",type); + default: + log.info("##################openOrderStatusHandler: 未知品牌 type={}",type); // channel.basicAck(deliveryTag,true); + } } + + + } 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 994cf3caf..d88dd8c1f 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 @@ -85,5 +85,9 @@ public class AdvanceClient implements IAdvanceClient { public AdvanceEntity fingById(Integer advanceId) { return service.fingById(advanceId); } - + @GetMapping(API_PREFIX + "/findAdvanceEntityByLogiBillNoAndOrderCode") + @Override + public List findAdvanceEntityByLogiBillNoAndOrderCode(String logiBillNo, String orderCode) { + return service.findAdvanceEntityByLogiBillNoAndOrderCode(logiBillNo,orderCode); + } } diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.java index 890abb543..5ce389720 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.java @@ -49,4 +49,5 @@ public interface AdvanceMapper { List getEntityByMctsTruck(@Param("orderSelfNum") String orderSelfNum, @Param("mctsTruck") String mctsTruck); + List findAdvanceEntityByLogiBillNoAndOrderCode(@Param("logiBillNo") String logiBillNo, @Param("orderCode")String orderCode); } diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.xml b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.xml index 0b531157f..3666b0b22 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.xml +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.xml @@ -57,5 +57,9 @@ and delete_time = 0 + + diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IAdvanceService.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IAdvanceService.java index da72ac72e..fa3053f58 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IAdvanceService.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IAdvanceService.java @@ -43,4 +43,11 @@ public interface IAdvanceService { List getEntityByMctsTruck(String orderSelfNum, String mctsTruck); + /** + * 根据订单编号和运单号查询老信息的订单信息 + * @param logiBillNo + * @param orderCode + * @return + */ + List findAdvanceEntityByLogiBillNoAndOrderCode(String logiBillNo, String orderCode); } diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceServiceImpl.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceServiceImpl.java index e7a4f153a..2371f9481 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceServiceImpl.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceServiceImpl.java @@ -69,4 +69,9 @@ public class AdvanceServiceImpl implements IAdvanceService { public List getEntityByMctsTruck(String orderSelfNum, String mctsTruck) { return advanceMapper.getEntityByMctsTruck(orderSelfNum,mctsTruck); } + + @Override + public List findAdvanceEntityByLogiBillNoAndOrderCode(String logiBillNo, String orderCode) { + return advanceMapper.findAdvanceEntityByLogiBillNoAndOrderCode(logiBillNo,orderCode); + } } From 7c946bf4e8ea6802a065e3d87173687bc9632122 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Sat, 4 Nov 2023 15:32:05 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPan=20=E5=BC=80?= =?UTF-8?q?=E5=8D=95=E4=BC=9A=E6=8E=A8=E7=9A=84=E6=97=B6=E5=80=99=20?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/RabbitMqConfiguration.java | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java index c736abbd6..353ebe67c 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java @@ -1,3 +1,4 @@ +/* package com.logpm.oldproject.config; import com.alibaba.nacos.shaded.com.google.common.collect.Maps; @@ -14,11 +15,13 @@ import org.springframework.context.annotation.Configuration; import java.util.Map; +*/ /** * RabbitMQ配置,主要是配置队列,如果提前存在该队列,可以省略本配置类 * * @author yangkai.shen - */ + *//* + @Slf4j @Configuration public class RabbitMqConfiguration { @@ -76,28 +79,34 @@ public class RabbitMqConfiguration { return BindingBuilder.bind(errorQueue).to(errorMessageExchange).with(RabbitConstant.ERROR_ROUTING); } - /** + */ +/** * 消费失败队列 * @param rabbitTemplate * @return - */ + *//* + @Bean public MessageRecoverer republishMessageRecoverer(RabbitTemplate rabbitTemplate){ return new RepublishMessageRecoverer(rabbitTemplate, RabbitConstant.ERROR_EXCHANGE, RabbitConstant.ERROR_ROUTING); } - /** + */ +/** * 延迟队列 - */ + *//* + @Bean public Queue orderStatusQueue() { return new Queue(RabbitConstant.ORDER_STATUS_QUEUE, true); } - /** + */ +/** * 延迟队列交换器, x-delayed-type 和 x-delayed-message 固定 - */ + *//* + @Bean public CustomExchange orderStatusExchange() { Map args = Maps.newHashMap(); @@ -105,12 +114,14 @@ public class RabbitMqConfiguration { return new CustomExchange(RabbitConstant.ORDER_STATUS_EXCHANGE, "x-delayed-message", true, false, args); } - /** + */ +/** * 延迟队列绑定自定义交换器 * * @param orderStatusQueue 队列 * @param orderStatusExchange 延迟交换器 - */ + *//* + @Bean public Binding orderStatusBinding(Queue orderStatusQueue, CustomExchange orderStatusExchange) { return BindingBuilder.bind(orderStatusQueue).to(orderStatusExchange).with(RabbitConstant.ORDER_STATUS_ROUTING).noargs(); @@ -123,3 +134,4 @@ public class RabbitMqConfiguration { } +*/ From c4de3ef91158c2b0119339a24e5d81e3ed780cce Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Sat, 4 Nov 2023 17:15:23 +0800 Subject: [PATCH 12/18] =?UTF-8?q?1.=E5=BA=93=E5=86=85=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E4=B8=8B=E6=9E=B6=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96=202.?= =?UTF-8?q?=E5=B9=B2=E7=BA=BF=E5=AE=9E=E4=BD=93=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/entity/BasicDelineNodeEntity.java | 52 ++++++-- .../logpm/trunkline/dto/BillladingDTO.java | 12 ++ .../entity/TrunklineAdvanceDetailEntity.java | 92 ++++++++++++++ .../entity/TrunklineAdvanceEntity.java | 116 ++++++++++++++++++ .../entity/TrunklineBillladingEntity.java | 112 +++++++++++++++++ .../TrunklineBillladingPackageEntity.java | 41 +++++++ .../TrunklineBillladingWaybillEntity.java | 56 +++++++++ .../entity/TrunklineDetailProductEntity.java | 50 ++++++++ .../vo/TrunklineAdvanceDetailVO.java | 8 ++ .../trunkline/vo/TrunklineAdvanceVO.java | 8 ++ .../vo/TrunklineBillladingPackageVO.java | 8 ++ .../trunkline/vo/TrunklineBillladingVO.java | 17 +++ .../vo/TrunklineBillladingWaybillVO.java | 11 ++ .../vo/TrunklineDetailProductVO.java | 8 ++ .../controller/BasicDelineController.java | 21 ++-- .../controller/BasicDelineNodeController.java | 5 +- .../logpm/basic/dto/BasicDelineNodeDTO.java | 2 +- .../basic/mapper/BasicDelineNodeMapper.java | 2 +- .../basic/mapper/BasicDelineNodeMapper.xml | 16 +-- .../service/IBasicDelineNodeService.java | 2 +- .../basic/service/IBasicDelineService.java | 6 + .../impl/BasicDelineNodeServiceImpl.java | 4 +- .../service/impl/BasicDelineServiceImpl.java | 65 ++++++++++ .../impl/SyncOrderInfoServiceImpl.java | 2 +- blade-service/logpm-trunkline/pom.xml | 6 + .../controller/BillladingController.java | 61 +++++++++ .../mapper/TrunklineAdvanceDetailMapper.java | 9 ++ .../mapper/TrunklineAdvanceDetailMapper.xml | 6 + .../mapper/TrunklineAdvanceMapper.java | 9 ++ .../mapper/TrunklineAdvanceMapper.xml | 6 + .../mapper/TrunklineBillladingMapper.java | 16 +++ .../mapper/TrunklineBillladingMapper.xml | 78 ++++++++++++ .../TrunklineBillladingPackageMapper.java | 9 ++ .../TrunklineBillladingWaybillMapper.java | 9 ++ .../TrunklineBillladingWaybillMapper.xml | 6 + .../mapper/TrunklineDetailProductMapper.java | 9 ++ .../ITrunklineAdvanceDetailService.java | 7 ++ .../service/ITrunklineAdvanceService.java | 7 ++ .../ITrunklineBillladingPackageServicie.java | 7 ++ .../service/ITrunklineBillladingService.java | 13 ++ .../ITrunklineBillladingWaybillService.java | 7 ++ .../ITrunklineDetailProductService.java | 7 ++ .../TrunklineAdvanceDetailServiceImpl.java | 15 +++ .../impl/TrunklineAdvanceServiceImpl.java | 15 +++ ...TrunklineBillladingPackageServiceImpl.java | 15 +++ .../impl/TrunklineBillladingServiceImpl.java | 30 +++++ ...TrunklineBillladingWaybillServiceImpl.java | 15 +++ .../TrunklineDetailProductServiceImpl.java | 15 +++ .../mapper/WarehouseTaryAllocationMapper.java | 1 + .../WarehouseTaryAllocationServiceImpl.java | 1 + .../impl/WarehouseTrayTypeServiceImpl.java | 5 + .../impl/WarehouseUpdownTypeServiceImpl.java | 4 +- 52 files changed, 1062 insertions(+), 42 deletions(-) create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BillladingDTO.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceEntity.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineDetailProductEntity.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceDetailVO.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceVO.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingPackageVO.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingVO.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineDetailProductVO.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceService.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingPackageServicie.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingService.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingWaybillService.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineDetailProductService.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineDetailProductServiceImpl.java diff --git a/blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicDelineNodeEntity.java b/blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicDelineNodeEntity.java index 918451d43..c19eb66fb 100644 --- a/blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicDelineNodeEntity.java +++ b/blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicDelineNodeEntity.java @@ -35,6 +35,42 @@ import org.springblade.core.tenant.mp.TenantEntity; @EqualsAndHashCode(callSuper = true) public class BasicDelineNodeEntity extends TenantEntity { + /** + * 预留1 + */ + @ApiModelProperty(value = "预留1") + private String reserve1; + /** + * 预留2 + */ + @ApiModelProperty(value = "预留2") + private String reserve2; + /** + * 预留3 + */ + @ApiModelProperty(value = "预留3") + private String reserve3; + /** + * 预留4 + */ + @ApiModelProperty(value = "预留4") + private String reserve4; + /** + * 预留5 + */ + @ApiModelProperty(value = "预留5") + private String reserve5; + + /** + * 仓库id + */ + @ApiModelProperty(value = "仓库id") + private Long warehouseId; + /** + * 仓库名称 + */ + @ApiModelProperty(value = "仓库名称") + private String warehouseName; /** * 关联提货路线Id */ @@ -71,19 +107,9 @@ public class BasicDelineNodeEntity extends TenantEntity { @ApiModelProperty(value = "纬度") private String latitude; /** - * 预留3 - */ - @ApiModelProperty(value = "预留3") - private String reserve3; - /** - * 预留4 + * 备注 */ - @ApiModelProperty(value = "预留4") - private String reserve4; - /** - * 预留5 - */ - @ApiModelProperty(value = "预留5") - private String reserve5; + @ApiModelProperty(value = "备注") + private String remark; } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BillladingDTO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BillladingDTO.java new file mode 100644 index 000000000..affb80396 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BillladingDTO.java @@ -0,0 +1,12 @@ +package com.logpm.trunkline.dto; + +import com.logpm.trunkline.entity.TrunklineBillladingEntity; +import lombok.Data; + +@Data +public class BillladingDTO extends TrunklineBillladingEntity { + + private Integer pageNum; + private Integer pageSize; + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java new file mode 100644 index 000000000..5da3f739d --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java @@ -0,0 +1,92 @@ +package com.logpm.trunkline.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +@Data +@TableName("logpm_trunkline_advance_detail") +@ApiModel(value = "TrunklineAdvanceDetail对象", description = "暂存单包件数据表") +@EqualsAndHashCode(callSuper = true) +public class TrunklineAdvanceDetailEntity extends TenantEntity { + + /** 预留1 */ + @ApiModelProperty(name = "预留1",notes = "") + private String reserve1 ; + /** 预留2 */ + @ApiModelProperty(name = "预留2",notes = "") + private String reserve2 ; + /** 预留3 */ + @ApiModelProperty(name = "预留3",notes = "") + private String reserve3 ; + /** 预留4 */ + @ApiModelProperty(name = "预留4",notes = "") + private String reserve4 ; + /** 预留5 */ + @ApiModelProperty(name = "预留5",notes = "") + private String reserve5 ; + /** 仓库id */ + @ApiModelProperty(name = "仓库id",notes = "") + private Long warehouseId ; + /** 仓库名称 */ + @ApiModelProperty(name = "仓库名称",notes = "") + private String warehouseName ; + /** 暂存单id */ + @ApiModelProperty(name = "暂存单id",notes = "") + private Long advanceId ; + /** 订单自编号 */ + @ApiModelProperty(name = "订单自编号",notes = "") + private String orderCode ; + /** 品牌 */ + @ApiModelProperty(name = "品牌",notes = "") + private String brand ; + /** 订单来源 */ + @ApiModelProperty(name = "订单来源",notes = "") + private String systemType ; + /** 一级品类名称 */ + @ApiModelProperty(name = "一级品类名称",notes = "") + private String firstPackName ; + /** 一级品类编码 */ + @ApiModelProperty(name = "一级品类编码",notes = "") + private String firstPackCode ; + /** 二级品类名称 */ + @ApiModelProperty(name = "二级品类名称",notes = "") + private String secondPackName ; + /** 二级品类编码 */ + @ApiModelProperty(name = "二级品类编码",notes = "") + private String secondPackCode ; + /** 三级品类名称 */ + @ApiModelProperty(name = "三级品类名称",notes = "") + private String thirdPackName ; + /** 三级品类编码 */ + @ApiModelProperty(name = "三级品类编码",notes = "") + private String thirdPackCode ; + /** 基地名称 */ + @ApiModelProperty(name = "基地名称",notes = "") + private String siteName ; + /** 基地编码 */ + @ApiModelProperty(name = "基地编码",notes = "") + private String siteCode ; + /** 数量 */ + @ApiModelProperty(name = "数量",notes = "") + private Integer quantity ; + /** 包件码 */ + @ApiModelProperty(name = "包件码",notes = "") + private String orderPackageCode ; + /** 车次号 */ + @ApiModelProperty(name = "车次号",notes = "") + private String trainNumber ; + /** 服务号 */ + @ApiModelProperty(name = "服务号",notes = "") + private String serviceNum ; + /** 运单号 */ + @ApiModelProperty(name = "运单号",notes = "") + private String waybillNo ; + /** 包件状态 */ + @ApiModelProperty(name = "包件状态 0未入库 1已入库",notes = "") + private String packageStatus ; + +} 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 new file mode 100644 index 000000000..356ecc949 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceEntity.java @@ -0,0 +1,116 @@ +package com.logpm.trunkline.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +@Data +@TableName("logpm_trunkline_advance") +@ApiModel(value = "TrunklineAdvance对象", description = "暂存单数据表") +@EqualsAndHashCode(callSuper = true) +public class TrunklineAdvanceEntity extends TenantEntity { + + /** 预留1 */ + @ApiModelProperty(name = "预留1",notes = "") + private String reserve1 ; + /** 预留2 */ + @ApiModelProperty(name = "预留2",notes = "") + private String reserve2 ; + /** 预留3 */ + @ApiModelProperty(name = "预留3",notes = "") + private String reserve3 ; + /** 预留4 */ + @ApiModelProperty(name = "预留4",notes = "") + private String reserve4 ; + /** 预留5 */ + @ApiModelProperty(name = "预留5",notes = "") + private String reserve5 ; + /** 仓库id */ + @ApiModelProperty(name = "仓库id",notes = "") + private Long warehouseId ; + /** 仓库名称 */ + @ApiModelProperty(name = "仓库名称",notes = "") + private String warehouseName ; + /** 订单自编码 */ + @ApiModelProperty(name = "订单自编码",notes = "") + private String orderCode ; + /** 基地 */ + @ApiModelProperty(name = "基地",notes = "") + private String siteName ; + /** 区域 */ + @ApiModelProperty(name = "区域",notes = "") + private String area ; + /** 订单类型 */ + @ApiModelProperty(name = "订单类型",notes = "") + private String orderType ; + /** 品牌 */ + @ApiModelProperty(name = "品牌",notes = "") + private String brand ; + /** 订单总数 */ + @ApiModelProperty(name = "订单总数",notes = "") + private Integer totalNum ; + /** 品名 */ + @ApiModelProperty(name = "品名",notes = "") + private String packName ; + /** 品名编码 */ + @ApiModelProperty(name = "品名编码",notes = "") + private String packCode ; + /** 商场编码 */ + @ApiModelProperty(name = "商场编码",notes = "") + private String dealerCode ; + /** 商场名称 */ + @ApiModelProperty(name = "商场名称",notes = "") + private String dealerName ; + /** 承运商 */ + @ApiModelProperty(name = "承运商",notes = "") + private String carrierName ; + /** 客户名称 */ + @ApiModelProperty(name = "客户名称",notes = "") + private String customerName ; + /** 客户电话 */ + @ApiModelProperty(name = "客户电话",notes = "") + private String customerPhone ; + /** 客户地址 */ + @ApiModelProperty(name = "客户地址",notes = "") + private String customerAddress ; + /** 订单来源 */ + @ApiModelProperty(name = "订单来源",notes = "") + private String systemType ; + /** 门店编码 */ + @ApiModelProperty(name = "门店编码",notes = "") + private String storeCode ; + /** 门店名称 */ + @ApiModelProperty(name = "门店名称",notes = "") + private String storeName ; + /** 服务号 */ + @ApiModelProperty(name = "服务号",notes = "") + private String serviceNum ; + /** 齐套状态 0未齐套 1齐套 2多仓齐套 */ + @ApiModelProperty(name = "齐套状态 0未齐套 1齐套 2多仓齐套",notes = "") + private String matingType ; + /** 发货人名称 */ + @ApiModelProperty(name = "发货人名称",notes = "") + private String senderName ; + /** 发货人电话 */ + @ApiModelProperty(name = "发货人电话",notes = "") + private String senderPhone ; + /** 发货人地址 */ + @ApiModelProperty(name = "发货人地址",notes = "") + private String senderAddress ; + /** 开单状态 0未开单 1已开单 */ + @ApiModelProperty(name = "开单状态 0未开单 1已开单",notes = "") + private String waybillStatus ; + /** 运单号 */ + @ApiModelProperty(name = "运单号",notes = "") + private String waybillNo ; + /** 车次号 */ + @ApiModelProperty(name = "车次号",notes = "") + private String trainNumber ; + /** 冻结状态 0未冻结 1已冻结 */ + @ApiModelProperty(name = "冻结状态 0未冻结 1已冻结",notes = "") + private String freezeStatus ; + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java new file mode 100644 index 000000000..59111d0c7 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java @@ -0,0 +1,112 @@ +package com.logpm.trunkline.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.util.Date; + +@Data +@TableName("logpm_trunkline_billlading") +@ApiModel(value = "TrunklineBilllading对象", description = "干线提货表") +@EqualsAndHashCode(callSuper = true) +public class TrunklineBillladingEntity extends TenantEntity { + + /** 预留1 */ + @ApiModelProperty(name = "预留1",notes = "") + private String reserve1 ; + /** 预留2 */ + @ApiModelProperty(name = "预留2",notes = "") + private String reserve2 ; + /** 预留3 */ + @ApiModelProperty(name = "预留3",notes = "") + private String reserve3 ; + /** 预留4 */ + @ApiModelProperty(name = "预留4",notes = "") + private String reserve4 ; + /** 预留5 */ + @ApiModelProperty(name = "预留5",notes = "") + private String reserve5 ; + /** 仓库id */ + @ApiModelProperty(name = "仓库id",notes = "") + private Long warehouseId ; + /** 仓库名称 */ + @ApiModelProperty(name = "仓库名称",notes = "") + private String warehouseName ; + /** 提货单号 */ + @ApiModelProperty(name = "提货单号",notes = "") + private String billladingCode ; + /** 车牌号 */ + @ApiModelProperty(name = "车牌号",notes = "") + private String carNumber ; + /** 司机id */ + @ApiModelProperty(name = "司机id",notes = "") + private Long driverId ; + /** 司机名称 */ + @ApiModelProperty(name = "司机名称",notes = "") + private String driverName ; + /** 司机电话 */ + @ApiModelProperty(name = "司机电话",notes = "") + private String driverPhone ; + /** 承运商 */ + @ApiModelProperty(name = "承运商",notes = "") + private String carrierName ; + /** 线路关联id */ + @ApiModelProperty(name = "线路关联id",notes = "") + private Long lineId ; + /** 线路名称 */ + @ApiModelProperty(name = "线路名称",notes = "") + private String lineNameTitle ; + /** 预计件数 */ + @ApiModelProperty(name = "预计件数",notes = "") + private int planNum ; + /** 预计重量 */ + @ApiModelProperty(name = "预计重量",notes = "") + private Double planWeight ; + /** 预计体积 */ + @ApiModelProperty(name = "预计体积",notes = "") + private Double planVolume ; + /** 实际件数 */ + @ApiModelProperty(name = "实际件数",notes = "") + private int realNum ; + /** 实际重量 */ + @ApiModelProperty(name = "实际重量",notes = "") + private Double realWeight ; + /** 实际体积 */ + @ApiModelProperty(name = "实际体积",notes = "") + private Double realVolume ; + /** 计费模式 1按件 2按重量 3按体积 */ + @ApiModelProperty(name = "计费模式 1按件 2按重量 3按体积",notes = "") + private String chargeType ; + /** 提货费用 */ + @ApiModelProperty(name = "提货费用",notes = "") + private Double totalFee ; + /** 提货单状态 1=未开始,2=提货中,3=已完成,4=已取消 */ + @ApiModelProperty(name = "提货单状态 1=未开始,2=提货中,3=已完成,4=已取消",notes = "") + private String billladingStatus ; + /** 提货开始时间 */ + @ApiModelProperty(name = "提货开始时间",notes = "") + private Date startTime ; + /** 提货完成时间 */ + @ApiModelProperty(name = "提货完成时间",notes = "") + private Date endTime ; + /** 结算时间 */ + @ApiModelProperty(name = "结算时间",notes = "") + private Date settlementTime ; + /** 结算人id */ + @ApiModelProperty(name = "结算人id",notes = "") + private Long settlementId ; + /** 结算人名称 */ + @ApiModelProperty(name = "结算人名称",notes = "") + private String settlementName ; + /** 备注 */ + @ApiModelProperty(name = "备注",notes = "") + private String remark ; + /** 创建用户名称 */ + @ApiModelProperty(name = "创建用户名称",notes = "") + private String createUserName ; + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java new file mode 100644 index 000000000..342ffba59 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java @@ -0,0 +1,41 @@ +package com.logpm.trunkline.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +@Data +@TableName("logpm_trunkline_billlading_package") +@ApiModel(value = "TrunklineBillladingPackage对象", description = "提货单包件明细表") +@EqualsAndHashCode(callSuper = true) +public class TrunklineBillladingPackageEntity extends TenantEntity { + + /** 预留1 */ + @ApiModelProperty(name = "预留1",notes = "") + private String reserve1 ; + /** 预留2 */ + @ApiModelProperty(name = "预留2",notes = "") + private String reserve2 ; + /** 预留3 */ + @ApiModelProperty(name = "预留3",notes = "") + private String reserve3 ; + /** 预留4 */ + @ApiModelProperty(name = "预留4",notes = "") + private String reserve4 ; + /** 预留5 */ + @ApiModelProperty(name = "预留5",notes = "") + private String reserve5 ; + /** 仓库id */ + @ApiModelProperty(name = "仓库id",notes = "") + private Long warehouseId ; + /** 仓库名称 */ + @ApiModelProperty(name = "仓库名称",notes = "") + private String warehouseName ; + /** 包件码 */ + @ApiModelProperty(name = "包件码",notes = "") + private String orderPackageCode ; + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java new file mode 100644 index 000000000..36b631c8e --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java @@ -0,0 +1,56 @@ +package com.logpm.trunkline.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.math.BigDecimal; + +@Data +@TableName("logpm_trunkline_billlading_waybill") +@ApiModel(value = "TrunklineBillladingWaybill对象", description = "提货运单关联表") +@EqualsAndHashCode(callSuper = true) +public class TrunklineBillladingWaybillEntity extends TenantEntity { + + /** 预留1 */ + @ApiModelProperty(name = "预留1",notes = "") + private String reserve1 ; + /** 预留2 */ + @ApiModelProperty(name = "预留2",notes = "") + private String reserve2 ; + /** 预留3 */ + @ApiModelProperty(name = "预留3",notes = "") + private String reserve3 ; + /** 预留4 */ + @ApiModelProperty(name = "预留4",notes = "") + private String reserve4 ; + /** 预留5 */ + @ApiModelProperty(name = "预留5",notes = "") + private String reserve5 ; + /** 仓库id */ + @ApiModelProperty(name = "仓库id",notes = "") + private Long warehouseId ; + /** 提货单id */ + @ApiModelProperty(name = "提货单id",notes = "") + private Long billladingId ; + /** 提货单号 */ + @ApiModelProperty(name = "提货单号",notes = "") + private String billadingCode ; + /** 运单号 */ + @ApiModelProperty(name = "运单号",notes = "") + private String waybillNo ; + /** 提货数量 */ + @ApiModelProperty(name = "提货数量",notes = "") + private Integer realNum ; + /** 提货重量 */ + @ApiModelProperty(name = "提货重量",notes = "") + private BigDecimal realWeight ; + /** 提货体积 */ + @ApiModelProperty(name = "提货体积",notes = "") + private BigDecimal realVolume ; + + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineDetailProductEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineDetailProductEntity.java new file mode 100644 index 000000000..a585d89a1 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineDetailProductEntity.java @@ -0,0 +1,50 @@ +package com.logpm.trunkline.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +@Data +@TableName("logpm_trunkline_detail_product") +@ApiModel(value = "TrunklineDetailProduct对象", description = "提货运单关联表") +@EqualsAndHashCode(callSuper = true) +public class TrunklineDetailProductEntity extends TenantEntity { + + /** 预留1 */ + @ApiModelProperty(name = "预留1",notes = "") + private String reserve1 ; + /** 预留2 */ + @ApiModelProperty(name = "预留2",notes = "") + private String reserve2 ; + /** 预留3 */ + @ApiModelProperty(name = "预留3",notes = "") + private String reserve3 ; + /** 预留4 */ + @ApiModelProperty(name = "预留4",notes = "") + private String reserve4 ; + /** 预留5 */ + @ApiModelProperty(name = "预留5",notes = "") + private String reserve5 ; + /** 仓库id */ + @ApiModelProperty(name = "仓库id",notes = "") + private Long warehouseId ; + /** 仓库名称 */ + @ApiModelProperty(name = "仓库名称",notes = "") + private String warehouseName ; + /** 包件码 */ + @ApiModelProperty(name = "包件码",notes = "") + private String unitNo ; + /** 货品代码 */ + @ApiModelProperty(name = "货品代码",notes = "") + private String productCode ; + /** 货品名称 */ + @ApiModelProperty(name = "货品名称",notes = "") + private String productName ; + /** 数量 */ + @ApiModelProperty(name = "数量",notes = "") + private Integer quantity ; + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceDetailVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceDetailVO.java new file mode 100644 index 000000000..bd47ed0ac --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceDetailVO.java @@ -0,0 +1,8 @@ +package com.logpm.trunkline.vo; + +import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity; +import lombok.Data; + +@Data +public class TrunklineAdvanceDetailVO extends TrunklineAdvanceDetailEntity { +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceVO.java new file mode 100644 index 000000000..76afa1c32 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceVO.java @@ -0,0 +1,8 @@ +package com.logpm.trunkline.vo; + +import com.logpm.trunkline.entity.TrunklineAdvanceEntity; +import lombok.Data; + +@Data +public class TrunklineAdvanceVO extends TrunklineAdvanceEntity { +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingPackageVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingPackageVO.java new file mode 100644 index 000000000..a68ca455e --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingPackageVO.java @@ -0,0 +1,8 @@ +package com.logpm.trunkline.vo; + +import com.logpm.trunkline.entity.TrunklineBillladingPackageEntity; +import lombok.Data; + +@Data +public class TrunklineBillladingPackageVO extends TrunklineBillladingPackageEntity { +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingVO.java new file mode 100644 index 000000000..e8b653889 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingVO.java @@ -0,0 +1,17 @@ +package com.logpm.trunkline.vo; + +import com.logpm.trunkline.entity.TrunklineBillladingEntity; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class TrunklineBillladingVO extends TrunklineBillladingEntity { + + private Integer nodeNub; + private Integer waybillCount; + private Integer totalNum; + private BigDecimal totalWeight; + private BigDecimal totalVolume; + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java new file mode 100644 index 000000000..accaed7d0 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java @@ -0,0 +1,11 @@ +package com.logpm.trunkline.vo; + +import com.logpm.trunkline.entity.TrunklineBillladingWaybillEntity; +import lombok.Data; + +@Data +public class TrunklineBillladingWaybillVO extends TrunklineBillladingWaybillEntity { + + + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineDetailProductVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineDetailProductVO.java new file mode 100644 index 000000000..fbe8cc8eb --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineDetailProductVO.java @@ -0,0 +1,8 @@ +package com.logpm.trunkline.vo; + +import com.logpm.trunkline.entity.TrunklineDetailProductEntity; +import lombok.Data; + +@Data +public class TrunklineDetailProductVO extends TrunklineDetailProductEntity { +} diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicDelineController.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicDelineController.java index e36da198f..1ca47841d 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicDelineController.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicDelineController.java @@ -30,7 +30,6 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import net.logstash.logback.encoder.org.apache.commons.lang3.StringEscapeUtils; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.mp.support.Condition; @@ -47,6 +46,7 @@ import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.util.List; import java.util.Map; +import java.util.Objects; /** * 提货路线 控制器 @@ -104,10 +104,8 @@ public class BasicDelineController extends BladeController { @ApiOperation(value = "新增", notes = "传入basicDeline") public R save(@Valid @RequestBody BasicDelineDTO basicDeline) { //转义-> - basicDeline.setLineName(StringEscapeUtils.unescapeHtml4(basicDeline.getLineName())); - basicDelineService.save(basicDeline); - //新增关联表 - return R.status(basicDelineMiddleService.saveByDTO(basicDeline)); +// basicDeline.setLineName(StringEscapeUtils.unescapeHtml4(basicDeline.getLineName())); + return basicDelineService.saveDeline(basicDeline); } /** @@ -117,13 +115,12 @@ public class BasicDelineController extends BladeController { @ApiOperationSupport(order = 5) @ApiOperation(value = "修改", notes = "传入basicDeline") public R update(@Valid @RequestBody BasicDelineDTO basicDeline) { - //转义-> - basicDeline.setLineName(StringEscapeUtils.unescapeHtml4(basicDeline.getLineName())); - //删除所有中间表 - basicDelineMiddleService.deleteBydelineId(Func.toLongList(String.valueOf(basicDeline.getId()))); - //新增关联表 - basicDelineMiddleService.saveByDTO(basicDeline); - return R.status(basicDelineService.updateById(basicDeline)); + Long id = basicDeline.getId(); + if(Objects.isNull(id)){ + log.warn("#############update: id不能为空"); + return R.fail(403,"id不能为空"); + } + return basicDelineService.updateDeline(basicDeline); } /** diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicDelineNodeController.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicDelineNodeController.java index db76eed9e..39d664b38 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicDelineNodeController.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicDelineNodeController.java @@ -97,8 +97,9 @@ public class BasicDelineNodeController extends BladeController { @GetMapping("/dictionary") @ApiOperationSupport(order = 3) @ApiOperation(value = "字典", notes = "传入basicDelineNode") - public R> dictionary() { - List basicDelineNodeVOS = basicDelineNodeService.selectBasicDelineNodeDictionary(); + public R> dictionary(BasicDelineNodeDTO basicDelineNode) { + String customer = basicDelineNode.getCustomer(); + List basicDelineNodeVOS = basicDelineNodeService.selectBasicDelineNodeDictionary(customer); return R.data(basicDelineNodeVOS); } diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/dto/BasicDelineNodeDTO.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/dto/BasicDelineNodeDTO.java index c86adac9d..6658a7ef1 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/dto/BasicDelineNodeDTO.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/dto/BasicDelineNodeDTO.java @@ -51,6 +51,6 @@ public class BasicDelineNodeDTO extends BasicDelineNodeEntity { @ApiModelProperty(value = "主表Id") private Long delineId; - + private Integer sort; } diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicDelineNodeMapper.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicDelineNodeMapper.java index cdba385c4..d21d04bb8 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicDelineNodeMapper.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicDelineNodeMapper.java @@ -57,5 +57,5 @@ public interface BasicDelineNodeMapper extends BaseMapper * * @return */ - List selectBasicDelineNodeDictionary(); + List selectBasicDelineNodeDictionary(@Param("customer") String customer); } diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicDelineNodeMapper.xml b/blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicDelineNodeMapper.xml index eb209946f..182c7b423 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicDelineNodeMapper.xml +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicDelineNodeMapper.xml @@ -40,16 +40,13 @@ lbdn.contacts contacts, lbdn.address address, lbdn.telephone telephone, - lbdm.ageing ageing, - lbdm.route route + lbdn.longitude longitude, + lbdn.latitude latitude, + ldbn.remark remark FROM logpm_basic_deline_node lbdn - JOIN logpm_basic_deline_middle lbdm on lbdn.id = lbdm.node_id lbdn.is_deleted = 0 - AND lbdm.is_deleted = 0 - and lbdm.deline_id = #{param.delineId} - and lbdm.node_id = #{param.id} @@ -58,7 +55,12 @@ SELECT * FROM logpm_basic_deline_node ${ew.customSqlSegment} diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineNodeService.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineNodeService.java index 8320d2f44..e0b3b52e1 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineNodeService.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineNodeService.java @@ -55,5 +55,5 @@ public interface IBasicDelineNodeService extends BaseService selectBasicDelineNodeDictionary(); + List selectBasicDelineNodeDictionary(String customer); } diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineService.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineService.java index 2f11f71c6..8d31db2b8 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineService.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineService.java @@ -18,10 +18,12 @@ package com.logpm.basic.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.basic.dto.BasicDelineDTO; import com.logpm.basic.entity.BasicDelineEntity; import com.logpm.basic.excel.BasicDelineExcel; import com.logpm.basic.vo.BasicDelineVO; import org.springblade.core.mp.base.BaseService; +import org.springblade.core.tool.api.R; import java.util.List; @@ -50,4 +52,8 @@ public interface IBasicDelineService extends BaseService { */ List exportBasicDeline(Wrapper queryWrapper); + R saveDeline(BasicDelineDTO basicDelineDTO); + + R updateDeline(BasicDelineDTO basicDeline); + } diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicDelineNodeServiceImpl.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicDelineNodeServiceImpl.java index aca8b3b2b..d79d510be 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicDelineNodeServiceImpl.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicDelineNodeServiceImpl.java @@ -54,8 +54,8 @@ public class BasicDelineNodeServiceImpl extends BaseServiceImpl selectBasicDelineNodeDictionary() { - return baseMapper.selectBasicDelineNodeDictionary(); + public List selectBasicDelineNodeDictionary(String customer) { + return baseMapper.selectBasicDelineNodeDictionary(customer); } } diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicDelineServiceImpl.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicDelineServiceImpl.java index 46ce9cd44..a28c84be1 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicDelineServiceImpl.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicDelineServiceImpl.java @@ -18,14 +18,23 @@ package com.logpm.basic.service.impl; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.basic.dto.BasicDelineDTO; +import com.logpm.basic.dto.BasicDelineNodeDTO; import com.logpm.basic.entity.BasicDelineEntity; +import com.logpm.basic.entity.BasicDelineMiddleEntity; import com.logpm.basic.excel.BasicDelineExcel; import com.logpm.basic.mapper.BasicDelineMapper; +import com.logpm.basic.service.IBasicDelineMiddleService; import com.logpm.basic.service.IBasicDelineService; import com.logpm.basic.vo.BasicDelineVO; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.BeanUtil; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; /** @@ -34,9 +43,13 @@ import java.util.List; * @author lmy * @since 2023-05-24 */ +@Slf4j @Service +@AllArgsConstructor public class BasicDelineServiceImpl extends BaseServiceImpl implements IBasicDelineService { + private final IBasicDelineMiddleService basicDelineMiddleService; + @Override public IPage selectBasicDelinePage(IPage page, BasicDelineVO basicDeline) { return page.setRecords(baseMapper.selectBasicDelinePage(page, basicDeline)); @@ -52,4 +65,56 @@ public class BasicDelineServiceImpl extends BaseServiceImpl delinenode = basicDelineDTO.getDelinenode(); + if(delinenode.size() < 2){ + log.warn("##############saveDeline: 节点选择有误"); + return R.fail(403,"节点选择有误"); + } + BasicDelineEntity basicDelineEntity = new BasicDelineEntity(); + BeanUtil.copy(basicDelineDTO,basicDelineEntity); + save(basicDelineEntity); + Long delineId = basicDelineEntity.getId(); + for (BasicDelineNodeDTO basicDelineNodeDTO:delinenode){ + BasicDelineMiddleEntity basicDelineMiddleEntity = new BasicDelineMiddleEntity(); + basicDelineMiddleEntity.setDelineId(delineId); + basicDelineMiddleEntity.setNodeId(basicDelineNodeDTO.getId()); + basicDelineMiddleEntity.setAgeing(basicDelineNodeDTO.getAgeing()); + basicDelineMiddleEntity.setRoute(basicDelineNodeDTO.getRoute()); + basicDelineMiddleService.save(basicDelineMiddleEntity); + } + return R.success("保存成功"); + } + + @Override + public R updateDeline(BasicDelineDTO basicDeline) { + log.info("#############updateDeline: 更新提货路线"); + List delinenode = basicDeline.getDelinenode(); + if(delinenode.size() < 2){ + log.warn("##############saveDeline: 节点选择有误"); + return R.fail(403,"节点选择有误"); + } + BasicDelineEntity basicDelineEntity = new BasicDelineEntity(); + BeanUtil.copy(basicDeline,basicDelineEntity); + updateById(basicDelineEntity); + Long delineId = basicDelineEntity.getId(); + //先删除以前的关联数据 + List delineIds = new ArrayList<>(); + delineIds.add(delineId); + basicDelineMiddleService.deleteBydelineId(delineIds); + + for (BasicDelineNodeDTO basicDelineNodeDTO:delinenode){ + BasicDelineMiddleEntity basicDelineMiddleEntity = new BasicDelineMiddleEntity(); + basicDelineMiddleEntity.setDelineId(delineId); + basicDelineMiddleEntity.setNodeId(basicDelineNodeDTO.getId()); + basicDelineMiddleEntity.setAgeing(basicDelineNodeDTO.getAgeing()); + basicDelineMiddleEntity.setRoute(basicDelineNodeDTO.getRoute()); + basicDelineMiddleService.save(basicDelineMiddleEntity); + } + + return R.success("更新成功"); + } + } 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 d9c0d990f..8642ad92f 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 @@ -246,7 +246,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { @Override public void supplementOrderInfo(String orderCode, Long newWarehouseId, Integer oldWarehouseId) { //通过订单号查询暂存单 - AdvanceEntity advanceEntity = advanceClient.getQueryDataOne(orderCode); + AdvanceEntity advanceEntity = advanceClient.getQueryDataOne(orderCode);//这个地方有问题 if(Objects.isNull(advanceEntity)){ log.warn("#################saveOrderInfo: 未查询单订单信息 orderCode={}",orderCode); throw new CustomerException(403,"未查询单订单信息"); diff --git a/blade-service/logpm-trunkline/pom.xml b/blade-service/logpm-trunkline/pom.xml index fbd20888c..b6a118986 100644 --- a/blade-service/logpm-trunkline/pom.xml +++ b/blade-service/logpm-trunkline/pom.xml @@ -39,6 +39,12 @@ 3.2.0.RELEASE compile + + org.springblade + logpm-basicdata-api + 3.2.0.RELEASE + compile + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java new file mode 100644 index 000000000..4b89ad954 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java @@ -0,0 +1,61 @@ +package com.logpm.trunkline.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.logpm.basicdata.entity.BasicdataWarehouseEntity; +import com.logpm.basicdata.feign.IBasicdataWarehouseClient; +import com.logpm.trunkline.dto.BillladingDTO; +import com.logpm.trunkline.service.ITrunklineBillladingService; +import com.logpm.trunkline.vo.TrunklineBillladingVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.common.exception.CustomerException; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.*; + +import java.util.Objects; + +@Slf4j +@RestController +@AllArgsConstructor +@RequestMapping("/billlading") +@Api(value = "提货单控制类", tags = "提货单接口") +public class BillladingController { + + private final IBasicdataWarehouseClient warehouseClient; + + private final ITrunklineBillladingService trunklineBillladingService; + + @ResponseBody + @PostMapping("/pageList") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "提货单列表", notes = "传入waybillDTO") + public R pageList(@RequestBody BillladingDTO billladingDTO) { + String method = "############pageList: "; + log.info(method+"请求参数{}",billladingDTO); + try{ + + //当前登录人选择的仓库 + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if(Objects.isNull(myCurrentWarehouse)){ + log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); + return R.fail(403,"仓库信息为空"); + } + billladingDTO.setWarehouseId(myCurrentWarehouse.getId()); + + IPage pages = trunklineBillladingService.pageList(billladingDTO); + + return R.data(pages); + }catch (CustomerException e){ + log.error(e.message,e); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error("############sendOrders: 系统异常",e); + return R.fail(500,"############sendOrders: 系统异常"); + } + } + + +} 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 new file mode 100644 index 000000000..bb1f80689 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java @@ -0,0 +1,9 @@ +package com.logpm.trunkline.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface TrunklineAdvanceDetailMapper extends BaseMapper { +} 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 new file mode 100644 index 000000000..7494f0b97 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.java new file mode 100644 index 000000000..21c3207d8 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.java @@ -0,0 +1,9 @@ +package com.logpm.trunkline.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.logpm.trunkline.entity.TrunklineAdvanceEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface TrunklineAdvanceMapper extends BaseMapper { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml new file mode 100644 index 000000000..f4ae64abc --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.java new file mode 100644 index 000000000..388a861f6 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.java @@ -0,0 +1,16 @@ +package com.logpm.trunkline.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.trunkline.dto.BillladingDTO; +import com.logpm.trunkline.entity.TrunklineBillladingEntity; +import com.logpm.trunkline.vo.TrunklineBillladingVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface TrunklineBillladingMapper extends BaseMapper { + + IPage pageList(IPage page, @Param("param") BillladingDTO billladingDTO); + +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml new file mode 100644 index 000000000..242b9e754 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml @@ -0,0 +1,78 @@ + + + + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.java new file mode 100644 index 000000000..ebe6c39c3 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.java @@ -0,0 +1,9 @@ +package com.logpm.trunkline.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.logpm.trunkline.entity.TrunklineBillladingPackageEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface TrunklineBillladingPackageMapper extends BaseMapper { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.java new file mode 100644 index 000000000..258a45cef --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.java @@ -0,0 +1,9 @@ +package com.logpm.trunkline.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.logpm.trunkline.entity.TrunklineBillladingWaybillEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface TrunklineBillladingWaybillMapper extends BaseMapper { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml new file mode 100644 index 000000000..a69a47ee8 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.java new file mode 100644 index 000000000..8e14bd93a --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.java @@ -0,0 +1,9 @@ +package com.logpm.trunkline.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.logpm.trunkline.entity.TrunklineDetailProductEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface TrunklineDetailProductMapper extends BaseMapper { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java new file mode 100644 index 000000000..688a20d52 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java @@ -0,0 +1,7 @@ +package com.logpm.trunkline.service; + +import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity; +import org.springblade.core.mp.base.BaseService; + +public interface ITrunklineAdvanceDetailService extends BaseService { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceService.java new file mode 100644 index 000000000..9f0ac58cb --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceService.java @@ -0,0 +1,7 @@ +package com.logpm.trunkline.service; + +import com.logpm.trunkline.entity.TrunklineAdvanceEntity; +import org.springblade.core.mp.base.BaseService; + +public interface ITrunklineAdvanceService extends BaseService { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingPackageServicie.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingPackageServicie.java new file mode 100644 index 000000000..5ffb10433 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingPackageServicie.java @@ -0,0 +1,7 @@ +package com.logpm.trunkline.service; + +import com.logpm.trunkline.entity.TrunklineBillladingPackageEntity; +import org.springblade.core.mp.base.BaseService; + +public interface ITrunklineBillladingPackageServicie extends BaseService { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingService.java new file mode 100644 index 000000000..468e57250 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingService.java @@ -0,0 +1,13 @@ +package com.logpm.trunkline.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.trunkline.dto.BillladingDTO; +import com.logpm.trunkline.entity.TrunklineBillladingEntity; +import com.logpm.trunkline.vo.TrunklineBillladingVO; +import org.springblade.core.mp.base.BaseService; + +public interface ITrunklineBillladingService extends BaseService { + + IPage pageList(BillladingDTO billladingDTO); + +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingWaybillService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingWaybillService.java new file mode 100644 index 000000000..a94f4ab97 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingWaybillService.java @@ -0,0 +1,7 @@ +package com.logpm.trunkline.service; + +import com.logpm.trunkline.entity.TrunklineBillladingWaybillEntity; +import org.springblade.core.mp.base.BaseService; + +public interface ITrunklineBillladingWaybillService extends BaseService { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineDetailProductService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineDetailProductService.java new file mode 100644 index 000000000..8fcf8d12e --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineDetailProductService.java @@ -0,0 +1,7 @@ +package com.logpm.trunkline.service; + +import com.logpm.trunkline.entity.TrunklineDetailProductEntity; +import org.springblade.core.mp.base.BaseService; + +public interface ITrunklineDetailProductService extends BaseService { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java new file mode 100644 index 000000000..dc14d9058 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java @@ -0,0 +1,15 @@ +package com.logpm.trunkline.service.impl; + +import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity; +import com.logpm.trunkline.mapper.TrunklineAdvanceDetailMapper; +import com.logpm.trunkline.service.ITrunklineAdvanceDetailService; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +@Slf4j +@Service +@AllArgsConstructor +public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl implements ITrunklineAdvanceDetailService { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java new file mode 100644 index 000000000..58a87899f --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java @@ -0,0 +1,15 @@ +package com.logpm.trunkline.service.impl; + +import com.logpm.trunkline.entity.TrunklineAdvanceEntity; +import com.logpm.trunkline.mapper.TrunklineAdvanceMapper; +import com.logpm.trunkline.service.ITrunklineAdvanceService; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +@Slf4j +@Service +@AllArgsConstructor +public class TrunklineAdvanceServiceImpl extends BaseServiceImpl implements ITrunklineAdvanceService { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java new file mode 100644 index 000000000..cc968333e --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java @@ -0,0 +1,15 @@ +package com.logpm.trunkline.service.impl; + +import com.logpm.trunkline.entity.TrunklineBillladingPackageEntity; +import com.logpm.trunkline.mapper.TrunklineBillladingPackageMapper; +import com.logpm.trunkline.service.ITrunklineBillladingPackageServicie; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +@Slf4j +@Service +@AllArgsConstructor +public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl implements ITrunklineBillladingPackageServicie { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java new file mode 100644 index 000000000..95f0ac8db --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java @@ -0,0 +1,30 @@ +package com.logpm.trunkline.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.logpm.trunkline.dto.BillladingDTO; +import com.logpm.trunkline.entity.TrunklineBillladingEntity; +import com.logpm.trunkline.mapper.TrunklineBillladingMapper; +import com.logpm.trunkline.service.ITrunklineBillladingService; +import com.logpm.trunkline.vo.TrunklineBillladingVO; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +@Slf4j +@Service +@AllArgsConstructor +public class TrunklineBillladingServiceImpl extends BaseServiceImpl implements ITrunklineBillladingService { + + @Override + public IPage pageList(BillladingDTO billladingDTO) { + IPage page = new Page<>(); + page.setCurrent(billladingDTO.getPageNum()); + page.setSize(billladingDTO.getPageSize()); + + IPage pageList = baseMapper.pageList(page,billladingDTO); + + return null; + } +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java new file mode 100644 index 000000000..c50f7c4b0 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java @@ -0,0 +1,15 @@ +package com.logpm.trunkline.service.impl; + +import com.logpm.trunkline.entity.TrunklineBillladingWaybillEntity; +import com.logpm.trunkline.mapper.TrunklineBillladingWaybillMapper; +import com.logpm.trunkline.service.ITrunklineBillladingWaybillService; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +@Slf4j +@Service +@AllArgsConstructor +public class TrunklineBillladingWaybillServiceImpl extends BaseServiceImpl implements ITrunklineBillladingWaybillService { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineDetailProductServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineDetailProductServiceImpl.java new file mode 100644 index 000000000..ff3578623 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineDetailProductServiceImpl.java @@ -0,0 +1,15 @@ +package com.logpm.trunkline.service.impl; + +import com.logpm.trunkline.entity.TrunklineDetailProductEntity; +import com.logpm.trunkline.mapper.TrunklineDetailProductMapper; +import com.logpm.trunkline.service.ITrunklineDetailProductService; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +@Slf4j +@Service +@AllArgsConstructor +public class TrunklineDetailProductServiceImpl extends BaseServiceImpl implements ITrunklineDetailProductService { +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTaryAllocationMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTaryAllocationMapper.java index 9a2deb6d3..c2f37f2bd 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTaryAllocationMapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTaryAllocationMapper.java @@ -14,4 +14,5 @@ public interface WarehouseTaryAllocationMapper extends BaseMapper Date: Mon, 6 Nov 2023 13:57:16 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E8=B4=A7,?= =?UTF-8?q?=E7=9B=98=E7=82=B9=E6=B7=BB=E5=8A=A0=EF=BC=8C=E5=B9=B6=E6=9A=82?= =?UTF-8?q?=E5=81=9C=E7=9B=98=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/constant/DictBizConstant.java | 1 + .../entity/DistributionParcelListEntity.java | 55 ++ .../entity/DistributionStockListEntity.java | 10 +- .../entity/DistributionStockupEntity.java | 7 + .../feign/IDistributionParcelListClient.java | 6 + .../IDistributionStockArticleClient.java | 8 + .../feign/IDistributionStockListClient.java | 15 +- .../vo/DistributionParcelListVO.java | 13 + .../vo/DistributionParcelListZeroVO.java | 12 +- .../vo/DistributionStockListVO.java | 20 + .../vo/DistributionStockupOrderListVO.java | 2 + .../vo/DistributionStockupVO.java | 1 + .../warehouse/entity/QuestDetailEntity.java | 14 +- .../impl/BasicdataClientServiceImpl.java | 7 + .../DistributionStockupAppController.java | 2 + .../DistributionParcelListController.java | 4 +- .../feign/DistributionParcelListClient.java | 7 + .../feign/DistributionStockArticleClient.java | 20 + .../feign/DistributionStockListClient.java | 12 + .../mapper/DistributionParcelListMapper.java | 2 + .../mapper/DistributionParcelListMapper.xml | 74 +- .../mapper/DistributionStockListMapper.java | 7 + .../mapper/DistributionStockListMapper.xml | 22 + .../mapper/DistributionStockupMapper.xml | 15 +- .../mapper/DistrilbutionBillStockMapper.xml | 44 +- .../service/IDistributionAsyncService.java | 20 +- .../IDistributionParcelListService.java | 7 + .../IDistributionStockListService.java | 7 + .../impl/DistributionAsyncServiceImpl.java | 46 ++ .../DistributionParcelListServiceImpl.java | 59 +- .../DistributionStockArticleServiceImpl.java | 29 +- .../DistributionStockListServiceImpl.java | 10 + .../DistrilbutionBillLadingServiceImpl.java | 94 ++- .../DistributionStockArticleWrapper.java | 2 +- .../logpm/warehouse/dto/QuestDetailDTO.java | 2 +- .../logpm/warehouse/dto/TaskSearchDTO.java | 6 +- .../warehouse/mapper/TaskQuestMapper.java | 44 +- .../warehouse/mapper/TaskQuestMapper.xml | 187 ++++- .../warehouse/service/ITaskQuestService.java | 23 + .../service/impl/TaskQuestServiceImpl.java | 755 +++++++++++++++--- 40 files changed, 1443 insertions(+), 228 deletions(-) diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java index 5c8e470de..8e5f94f3d 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java @@ -15,6 +15,7 @@ public class DictBizConstant { public static final String BASIC_GROUNDING = "basic_grounding";//上架状态 public static final String STOCKUP_STATUS = "stockup_status";//备货状态 + public static final String ORDER_STOCKUP_STATUS = "order_stockup_status";//订单备货状态 public static final String ORDER_RESERVATION_STATUS = "order_reservation_status";//订单预约状态 public static final String RESERVATION_STATUS = "reservation_status";//预约状态 diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java index 50e716e84..a1c46e492 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java @@ -141,6 +141,61 @@ public class DistributionParcelListEntity extends TenantEntity { @ApiModelProperty(value = "客户id") @TableField(exist = false) private Long marketId; + + /** + * 商场名称 + */ + @ApiModelProperty(value = "商场名称") + @TableField(exist = false) + private String mallName; + /** + * 商场名称 + */ + @ApiModelProperty(value = "分类") + @TableField(exist = false) + private String genre; + /** + * 商场名称 + */ + @ApiModelProperty(value = "零担标识") + @TableField(exist = false) + private String isZero; + /** + * 商场名称 + */ + @ApiModelProperty(value = "商场iD") + @TableField(exist = false) + private Long mallId; + /** + * 托盘ID + */ + @ApiModelProperty(value = "托盘ID") + @TableField(exist = false) + private String trayId; + /** + * 托盘编码 + */ + @ApiModelProperty(value = "托盘编码") + @TableField(exist = false) + private String trayCode; + /** + * 货位ID + */ + @ApiModelProperty(value = "货位ID") + @TableField(exist = false) + private String allocationId; + /** + * 完整货位 + */ + @ApiModelProperty(value = "完整货位") + @TableField(exist = false) + private String positionCode; + /** + * 库存品ID + */ + @ApiModelProperty(value = "库存品ID") + @TableField(exist = false) + private Long stockId; /** * 物料Id */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java index 2ff7f4ef8..a64c8eef3 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java @@ -275,11 +275,11 @@ public class DistributionStockListEntity extends TenantEntity { */ @ApiModelProperty(value = "拆包ID") private Long pid; - /** - * 托盘ID - */ - @ApiModelProperty(value = "托盘ID") - private Long trayId; +// /** +// * 托盘ID +// */ +// @ApiModelProperty(value = "托盘ID") +// private Long trayId; /** * 托盘名称 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java index 1a5e61d73..c21ea65c6 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java @@ -78,6 +78,13 @@ public class DistributionStockupEntity extends TenantEntity { */ @ApiModelProperty(value = "备货库位") private String stockipAllocation; + + /** + * 托盘位 + */ + @ApiModelProperty(value = "托盘位") + @TableField(exist = false) + private String pallet; /** * 备货区ID */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java index ec567b9fe..6b56d4cd6 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java @@ -17,6 +17,8 @@ package com.logpm.distribution.feign; import com.logpm.distribution.entity.DistributionParcelListEntity; +import com.logpm.distribution.entity.DistributionStockArticleEntity; +import com.logpm.distribution.vo.DistributionParcelListVO; import org.springblade.common.constant.ModuleNameConstant; import org.springblade.core.mp.support.BladePage; import org.springframework.cloud.openfeign.FeignClient; @@ -41,6 +43,7 @@ public interface IDistributionParcelListClient { String API_PREFIX = "/client"; String TOP = API_PREFIX + "/top1"; String TOPPARCELLIST = API_PREFIX + "/getParcelList"; + String GETPARCELLISTINFO = API_PREFIX + "/getParcelListInfo"; @PostMapping(TOPPARCELLIST) List getParcelList(@RequestBody DistributionParcelListEntity parcelListEntity); @@ -102,4 +105,7 @@ public interface IDistributionParcelListClient { @GetMapping(API_PREFIX+"/updateStockArticleIdByOrderCode") void updateStockArticleIdByOrderCode(@RequestParam Long orderId, @RequestParam String orderCode); + + @PostMapping(GETPARCELLISTINFO) + List getParcelListInfo(@RequestBody DistributionParcelListVO parcelListVO); } 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 0d293de12..ec0864d28 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 @@ -41,6 +41,7 @@ public interface IDistributionStockArticleClient { String API_PREFIX = "/client"; String TOP = API_PREFIX + "/top12"; + String GETSTOCKARTICLEINFO = API_PREFIX + "/getStockArticleInfo"; /** * 获取配送在库订单列表 @@ -104,4 +105,11 @@ public interface IDistributionStockArticleClient { @GetMapping(API_PREFIX + "/submitHandleNumByOrderId") void submitHandleNumByOrderId(@RequestParam Integer subNum, @RequestParam Long articleId); + + /** + * 查询订单信息数据 + * @return + */ + @PostMapping(GETSTOCKARTICLEINFO) + List getStockArticleInfo(@RequestBody DistributionStockArticleEntity distributionStockArticleEntity); } 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 c261acfd2..07efc59be 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 @@ -47,6 +47,7 @@ public interface IDistributionStockListClient { String ADDSTOCKLIST = API_PREFIX + "/addStockList"; String UPDATESTOCKLIST = API_PREFIX + "/updateStockList"; String PUTSTOCKLIST = API_PREFIX + "/putStockList"; + String GETSTOCKLISTINFO = API_PREFIX + "/getStockListInfo"; /** * 获取库存品管理列表 @@ -116,12 +117,12 @@ public interface IDistributionStockListClient { List getStockListByWarehouseIdAndMarketAndStockListInfo(@RequestParam("incomingBatch") String incomingBatch,@RequestParam("marketNames") List marketNames,@RequestParam("warehouseId") Long warehouseId); -// /** -// * 修改某个客户信息及物品信息 -// * -// * @return BladePage -// */ -// @PutMapping(PUTSTOCKLIST) -// Boolean putStockList(@RequestBody DistributionStockListEntity distributionStockListEntity); + /** + * 修改某个客户信息及物品信息 + * + * @return BladePage + */ + @PostMapping(GETSTOCKLISTINFO) + List getStockListInfo(@RequestBody DistributionStockListEntity distributionStockListEntity); } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java index 1523e5f82..961be6fd0 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java @@ -100,6 +100,19 @@ public class DistributionParcelListVO extends DistributionParcelListEntity { */ private List warehouseIdList; + /** + * 商场id + */ + private Long mallId; + /** + * 商场id + */ + private String genre; + /** + * 商场id + */ + private String isZero; + /** * 装车数量 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListZeroVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListZeroVO.java index f379ca68a..dfd0e25a6 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListZeroVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListZeroVO.java @@ -38,11 +38,21 @@ public class DistributionParcelListZeroVO implements Serializable { */ @ApiModelProperty(value = "填写数量") private Integer TiQuantity; + /** + * 冻结数量 + */ + @ApiModelProperty(value = "冻结数量") + private Integer deliveryQuantity; /** * 配送数量 */ @ApiModelProperty(value = "配送数量") - private Integer deliveryQuantity; + private Integer reservationQuantity; + /** + * 配送数量 + */ + @ApiModelProperty(value = "出库数量") + private Integer outboundQuantity; diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java index 99c8f0977..b7e23522d 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java @@ -102,10 +102,30 @@ public class DistributionStockListVO extends DistributionStockListEntity { */ @ApiModelProperty(value = "托盘id") private String trayCode; + /** + * 托盘id + */ + @ApiModelProperty(value = "托盘id") + private String trayId; + /** + * 库位id + */ + @ApiModelProperty(value = "库位id") + private String allocationId; /** * 货位信息 */ @ApiModelProperty(value = "货位信息") private String positionCode; + /** + * 类型 + */ + @ApiModelProperty(value = "类型") + private Integer conditions; + /** + * 类型 + */ + @ApiModelProperty(value = "shan") + private String mallName; } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupOrderListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupOrderListVO.java index 80558e1aa..0f7f40d7b 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupOrderListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupOrderListVO.java @@ -33,6 +33,8 @@ public class DistributionStockupOrderListVO implements Serializable { private Long areaId; //货区id private String trayId; //托盘id + private String customerAddress; //客户地址 + private String firstsNumber; //品类数量 private Long shelfId; //货架id private Long parcelListId; //包件id private Long stockId; //备货id diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java index b7f18520b..718cacf3b 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java @@ -72,6 +72,7 @@ public class DistributionStockupVO extends DistributionStockupEntity { private Integer number; private String goodsAllocation; //货位 private String stockipAllocation; //货位 + private String pallet; //托盘位 private Integer reservationStockListNum; //数量 private String reservationId; //预约ID private String stockListId; //库存品ID diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java index 2669c6ad3..798fcaac4 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java @@ -16,6 +16,7 @@ */ package com.logpm.warehouse.entity; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -23,6 +24,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.tenant.mp.TenantEntity; +import java.util.List; + /** * 盘点明细 实体类 * @@ -120,6 +123,13 @@ public class QuestDetailEntity extends TenantEntity { */ @ApiModelProperty(value = "在库数量") private Integer stockNum; + + + /** + * 商场名称 + */ + @TableField(exist = false) + private List marketNames; /** * 仓库id */ @@ -146,12 +156,12 @@ public class QuestDetailEntity extends TenantEntity { * 托盘id */ @ApiModelProperty(value = "托盘id") - private Long trayId; + private String trayId; /** * 货位id */ @ApiModelProperty(value = "货位id") - private Long allocationId; + private String allocationId; /** * 是否是新增数据 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 f2397a0df..c5bce739d 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 @@ -269,6 +269,7 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl data, Boolean isCovered) { log.info("客户导入数据"); List storeContactEntities = new ArrayList<>(); // 联系人 @@ -418,6 +419,9 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl map = new HashMap<>(); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java index 7ca33b4aa..184ff88d9 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java @@ -163,10 +163,10 @@ public class DistributionParcelListController extends BladeController { /** * 修改零担在库数量 */ - @GetMapping("/zeroUpdateMaterial") + @PutMapping("/zeroUpdateMaterial") @ApiOperationSupport(order = 2) @ApiOperation(value = "修改零担在库数量", notes = "传入distributionParcelList") - public R> getZeroUpdateMaterial(@ApiIgnore @RequestParam Map distributionParcelList, Query query) { + public R> getZeroUpdateMaterial(@RequestBody Map distributionParcelList, Query query) { int a = distributionParcelListService.getZeroUpdateMaterial(distributionParcelList); return a > 0 ? R.success("修改成功!") : R.fail("修改失败!"); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java index 1d15ec402..e8a8bb27b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java @@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.service.IDistributionParcelListService; +import com.logpm.distribution.vo.DistributionParcelListVO; import lombok.AllArgsConstructor; import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Condition; @@ -172,4 +173,10 @@ public class DistributionParcelListClient implements IDistributionParcelListClie .eq("order_code",orderCode); distributionParcelListService.update(updateWrapper); } + + @Override + @PostMapping(GETPARCELLISTINFO) + public List getParcelListInfo(DistributionParcelListVO parcelListVO) { + return distributionParcelListService.getParcelListInfo(parcelListVO); + } } 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 049aaf615..934f29137 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 @@ -19,6 +19,8 @@ package com.logpm.distribution.feign; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionStockArticleEntity; import com.logpm.distribution.service.IDistributionParcelListService; @@ -191,4 +193,22 @@ public class DistributionStockArticleClient implements IDistributionStockArticle distributionStockArticleService.submitHandleNumByOrderId(subNum,articleId); } + /** + * 查询订单数据 + * @param stockArticleEntity + * @return + */ + @Override + @PostMapping(GETSTOCKARTICLEINFO) + public List getStockArticleInfo(DistributionStockArticleEntity stockArticleEntity) { + return distributionStockArticleService.list(Wrappers.query().lambda() + .eq(DistributionStockArticleEntity::getWarehouseId,stockArticleEntity.getWarehouseId()) + .eq(ObjectUtils.isNotNull(stockArticleEntity.getMallId()),DistributionStockArticleEntity::getMallId,stockArticleEntity.getMallId()) + .eq(ObjectUtils.isNotNull(stockArticleEntity.getId()),DistributionStockArticleEntity::getId,stockArticleEntity.getId()) + .eq(ObjectUtils.isNotNull(stockArticleEntity.getGenre()),DistributionStockArticleEntity::getGenre,stockArticleEntity.getGenre()) + .eq(ObjectUtils.isNotNull(stockArticleEntity.getIsZero()),DistributionStockArticleEntity::getIsZero,stockArticleEntity.getIsZero()) + ); + + } + } 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 01ce2518f..a6713755a 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 @@ -173,4 +173,16 @@ public class DistributionStockListClient implements IDistributionStockListClient return distributionStockListService.list(stockListEntityLambdaQueryWrapper); } + /** + * 查询商场库存平 + * + * @param distributionStockListEntity + * @return + */ + @Override + @PostMapping(GETSTOCKLISTINFO) + public List getStockListInfo(DistributionStockListEntity distributionStockListEntity) { + return distributionStockListService.getStockListInfo(distributionStockListEntity); + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java index 729bc5307..dad2f097c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java @@ -117,4 +117,6 @@ public interface DistributionParcelListMapper extends BaseMapper selectorderCodeByLike(@Param("condition") String condition,@Param("collect") List collect); List selectStockListByOderId(@Param("id")Long id,@Param("collect") List collect); + + List getParcelListInfo(@Param("param")DistributionParcelListVO parcelListVO); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml index b478855fd..1392a7356 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml @@ -34,9 +34,79 @@ + + from logpm_distribution_stock_article ldsa + LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id + + ldsa.warehouse_id = #{param.warehouseId} and ldpl.order_package_status != '70' + and ldsa.mall_id = #{param.mallId} + and ldsa.genre = #{param.genre} + and ldsa.is_zero = #{param.isZero} + + + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml index d7c346bac..87ede2189 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml @@ -180,14 +180,15 @@ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml index 4057901cb..6d45ee5f1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml @@ -114,24 +114,27 @@ SELECT * FROM logpm_distrilbution_bill_stock ${ew.customSqlSegment} + + + + CREATE TABLE ${questNum} ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户号', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '更新人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `is_deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除', + `status` int(11) NULL DEFAULT NULL COMMENT '状态', + `reserve1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留1', + `reserve2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留2', + `reserve3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留3', + `reserve4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留4', + `reserve5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留5', + `quest_detail_id` bigint(20) NULL DEFAULT NULL COMMENT '盘点明细ID', + `cargo_name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '货物状态;10 在库 20 破损 30丢失 40不可修复 50配送 60未入库', + `quest_num` int(10) NOT NULL DEFAULT 1 COMMENT '盘点数量', + `warehouse_id` bigint(20) NULL DEFAULT NULL COMMENT '仓库id', + PRIMARY KEY (`id`) USING BTREE, + INDEX `quest_detail_id_index`(`quest_detail_id`) USING BTREE COMMENT '盘点明细' + ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '${questNum}盘点明细子表' ROW_FORMAT = Dynamic; + + + CREATE TABLE ${questNum} ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户号', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '更新人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `is_deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除', + `status` int(11) NULL DEFAULT NULL COMMENT '状态', + `reserve1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留1', + `reserve2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留2', + `reserve3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留3', + `reserve4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留4', + `reserve5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留5', + `order_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单号', + `quest_id` bigint(20) NULL DEFAULT NULL COMMENT '任务ID', + `order_id` bigint(20) NULL DEFAULT NULL COMMENT '订单ID', + `quest_type` int(11) NULL DEFAULT NULL COMMENT '盘点方式;1. 随机 2 库位3 订单 4 托盘', + `quest_target` int(11) NULL DEFAULT NULL COMMENT '盘点对象;1.定制品 2零担 3 库存品', + `orde_package_code` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '包条码;对应定制品', + `order_package_id` bigint(20) NULL DEFAULT NULL COMMENT '包条ID;对应定制品', + `category_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品类名称;对应零担', + `stock_id` bigint(20) NULL DEFAULT NULL COMMENT '库存品ID;对应库存品', + `quest_status` int(10) NOT NULL DEFAULT 0 COMMENT '盘点状态;0 待盘点 1. 已盘 2未盘点 3已排除', + `stock_num` int(10) NOT NULL DEFAULT 1 COMMENT '在库数量', + `warehouse_id` bigint(20) NULL DEFAULT NULL COMMENT '仓库id', + `position_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '完整货位(按库位)', + `tray_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '托盘码(按托盘)', + `tray_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '托盘id(按托盘)', + `allocation_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '货位id(按库位)', + `grounding_allocation_id` bigint(20) NULL DEFAULT NULL COMMENT '上架后的库位ID', + `is_new` int(20) NULL DEFAULT NULL COMMENT '是否是新增数据', + `grounding_position_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上架后的完整库位', + `material_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料编码(库存品)', + `market_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商场名称(库存品)', + `incoming_batch` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次号(库存品)', + `material_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料名称(库存品)', + `waybill_number` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '运单号', + PRIMARY KEY (`id`) USING BTREE, + INDEX `quest_id_index`(`quest_id`) USING BTREE COMMENT '任务id', + INDEX `order_id_index`(`order_id`) USING BTREE COMMENT '订单id', + INDEX `tenant_id_index`(`tenant_id`) USING BTREE COMMENT '租户id' + ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '${questNum}盘点明细' ROW_FORMAT = Dynamic; + + + INSERT INTO ${questNum}(`id`, `tenant_id`, `create_user`, `create_time`, `update_user`, `update_time`, `create_dept`, + `is_deleted`, `status`, `reserve1`, `reserve2`, `reserve3`, `reserve4`, `reserve5`, `order_code`, `quest_id`, `order_id`, `quest_type`, `quest_target`, + `orde_package_code`, `order_package_id`, `category_name`, `stock_id`, `quest_status`, `stock_num`, `warehouse_id`, `position_code`, `tray_code`, `tray_id`, + `allocation_id`, `grounding_allocation_id`, `is_new`, `grounding_position_code`, `material_code`, `market_name`, `incoming_batch`, `material_name`, + `waybill_number`) VALUES + + (#{item.id}, #{item.tenantId}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime}, #{item.createDept}, #{item.isDeleted} + , #{item.status}, #{item.reserve1}, #{item.reserve2}, #{item.reserve3}, #{item.reserve4}, #{item.reserve5}, #{item.orderCode}, #{item.questId}, #{item.orderId} + , #{item.questType}, #{item.questTarget}, #{item.ordePackageCode}, #{item.orderPackageId}, #{item.categoryName}, #{item.stockId}, #{item.questStatus}, + #{item.stockNum}, #{item.warehouseId} , #{item.positionCode}, #{item.trayCode}, #{item.trayId}, #{item.allocationId}, #{item.groundingAllocationId}, + #{item.isNew}, #{item.groundingPositionCode}, #{item.materialCode}, #{item.marketName} , #{item.incomingBatch}, #{item.materialName}, #{item.waybillNumber} + ) + + + + + + + + + update ${questNum} set quest_status = #{param.questStatus} + WHERE `id` = #{ param.id } + + + + update ${questNum} + + grounding_allocation_id = #{item. groundingAllocationId}, + grounding_position_code = #{item.groundingPositionCode }, + quest_status = #{item.questStatus }, + + + WHERE `id` = #{ param.id } + + + + + - SELECT * FROM logpm_distribution_delivery_list ${ew.customSqlSegment} - + SELECT * FROM logpm_distribution_reservation ${ew.customSqlSegment} + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.java index 5d7876912..6128c9a4b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.java @@ -67,4 +67,11 @@ public interface DistributionDeliveryTripartiteMapper extends BaseMapper select id id,driver_name driverName,vehicle_num vehicleNub FROM logpm_distribution_delivery_tripartite where delivery_id = #{deliveryId} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml index 896b546f1..5bd541f52 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml @@ -931,6 +931,6 @@ ldla.reservation_id = #{reservationId} and ldla.delivery_list_id = #{deliveryListId} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java index 06f39f4b2..25b838b5e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java @@ -289,4 +289,31 @@ public interface IDistributionDeliveryListService extends BaseService getDriverInfo(Long deliveryId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java index daae21d13..e15210774 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java @@ -195,4 +195,6 @@ public interface IDistributionSignforService extends BaseService selectDistributionDeliveryorder(IPage page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO) { List distributionDeliveryInfoVOS = baseMapper.selectDistributionDeliveryOrderPage(page, distributionDeliveryInfoDTO); - for (DistributionStockArticleVO distributionDeliveryInfoVO : distributionDeliveryInfoVOS) { - //查询签收数量 - //查询装车数量 -// distributionDeliveryInfoVO.get -// distributionDeliveryInfoVO.setLoadingNumber(); -// distributionLoadscanService.list(Wrappers.query().lambda().eq()) -// DistributionStockArticleWrapper.build().buildVoInfor(distributionDeliveryInfoVO); - } +// for (DistributionStockArticleVO distributionDeliveryInfoVO : distributionDeliveryInfoVOS) { +// //查询签收数量 +// //查询装车数量 +//// distributionDeliveryInfoVO.get +//// distributionDeliveryInfoVO.setLoadingNumber(); +//// distributionLoadscanService.list(Wrappers.query().lambda().eq()) +//// DistributionStockArticleWrapper.build().buildVoInfor(distributionDeliveryInfoVO); +// } return page.setRecords(distributionDeliveryInfoVOS); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index d9e434d28..660fd7087 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -42,7 +42,9 @@ import com.logpm.distribution.vo.*; import com.logpm.distribution.vo.app.*; import com.logpm.distribution.vo.print.PrintPreviewVO; import com.logpm.distribution.wrapper.*; +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity; +import com.logpm.warehouse.feign.IWarehouseRetentionScanClient; import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient; import com.logpm.warehouse.feign.IWarehouseTrayTypeClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; @@ -151,6 +153,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.query().lambda() .eq(DistributionReservationStockarticleEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId())); @@ -1314,7 +1319,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl { - List parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(distrilbutionloadingscanDTO.getReservationId(), ord.getStockArticleId()); for (DistributionParcelListEntity parcelListEntity : parcelListEntities) { DistributionLoadscanEntity loadscanEntity = new DistributionLoadscanEntity(); @@ -5153,6 +5157,142 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl retentionScanVos = new ArrayList<>(); + switch (retentionType){ + case 1: + //包件--库存品 和包件 + List parcelListEntities = baseMapper.selectPackageListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId()); +// List detailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId()); + if (Func.isNotEmpty(parcelListEntities)){ + List packageInfo = parcelListEntities.stream().filter(p -> Func.isNotEmpty(p.getOrderPackageCode()) && p.getOrderPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList()); + if (packageInfo.size()>1){ + log.error("################包条码重复:{}",distrilbutionloadingscanDTO.getBarcode()); + return Resp.scanFail("操作失败","操作失败"); + } + if (packageInfo.size() == 1){ +// DistributionRetentionScanVo distributionRetentionScanVo = new DistributionRetentionScanVo(); + //此时才是满足条件的包件,能够进行滞留 + //通过配送任务和包件确定预约信息 + DistributionParcelListEntity parcelListEntity = packageInfo.get(0); + DistributionRetentionScanVo retentionPackage = baseMapper.selectRetentionPackage(parcelListEntity.getOrderPackageCode(), distrilbutionloadingscanDTO.getDeliveryId()); + +// distributionRetentionScanVo.setConditions(1); +// distributionRetentionScanVo.setOrderCode(parcelListEntity.getOrderPackageCode()); +// distributionRetentionScanVo.setOrderId(parcelListEntity.getStockArticleId()); +// distributionRetentionScanVo.setOrderPackageId(parcelListEntity.getId()); +// distributionRetentionScanVo.setOrderPackageCode(parcelListEntity.getOrderPackageCode()); +// distributionRetentionScanVo.setReservationCode(reservationEntity.getReservationCode()); +// distributionRetentionScanVo.setReservationId(reservationEntity.getId()); +// distributionRetentionScanVo.setRetentionQuantity(parcelListEntity.getQuantity()); +// retentionScanVos.add(distributionRetentionScanVo); + } + // + } else { + List detailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId()); + if (Func.isNotEmpty(detailEntities)){ + List stockListDetailEntities = detailEntities.stream().filter(i -> Func.isNotEmpty(i.getStockPackageCode()) && Func.equals(i.getStockPackageCode(), distrilbutionloadingscanDTO.getDeliveryId())).collect(Collectors.toList()); + if (stockListDetailEntities.size()> 1){ + log.error("################库存品条码重复:{}",distrilbutionloadingscanDTO.getBarcode()); + return Resp.scanFail("操作失败","操作失败"); + } + + if (stockListDetailEntities.size() == 1){ +// DistributionRetentionScanVo distributionRetentionScanVo = new DistributionRetentionScanVo(); + //此时才是满足条件的包件,能够进行滞留 + //通过配送任务和包件确定预约信息 + DisStockListDetailEntity disStockListDetailEntity = stockListDetailEntities.get(0); + DistributionRetentionScanVo inventoryPackage = baseMapper.selectRetentionInventoryPackage(disStockListDetailEntity.getStockPackageCode(), distrilbutionloadingscanDTO.getDeliveryId()); + retentionScanVos.add(inventoryPackage); + } + }else { + log.error("################查询包件和库存品为空:{}",distrilbutionloadingscanDTO.getDeliveryId()); + return Resp.scanFail("操作失败","不属于该配送任务!!!"); + } + + } + List distributionRetentionScanVos = baseMapper.selectRetentionZeroPackage(distrilbutionloadingscanDTO.getDeliveryId(),distrilbutionloadingscanDTO.getBarcode()); + if (Func.isNotEmpty(distributionRetentionScanVos)){ + retentionScanVos.addAll(distributionRetentionScanVos); + } + break; + case 2: + //托盘 + break; + default: + log.info("################无满足滞留扫描类型"); + break; + } +// warehouseRetentionScanClient.saveRetentionScan(); + if (Func.isEmpty(retentionScanVos)){ + return Resp.scanFail("操作失败","无该信息!!!"); + } + return R.data(retentionScanVos); + } + + @Override + public R getZeroPackageInfo(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { + List reservationStockarticleEntityList = baseMapper.selectReservationStockByDeliveryId(distrilbutionloadingscanDTO.getDeliveryId()); + if (Func.isEmpty(reservationStockarticleEntityList)){ + log.error("#############配送任务查询订单错误,deliveryId:{}",distrilbutionloadingscanDTO.getDeliveryId()); + return null; + } + List orderIds = reservationStockarticleEntityList.stream().filter(rs -> Func.isNotEmpty(rs.getIsZero()) && rs.getIsZero().equals(IsOrNoConstant.yes.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); + if (Func.isEmpty(orderIds)){ + log.error("####################配送任务下无零担信息:{}"); + return Resp.scanFail("查询错误","该任务无零担订单"); + } + List parcelNumberVOS = new ArrayList<>(); + orderIds.forEach(o->{ + List parcelNumberVOList = baseMapper.selectDeliveryZeroOrderDetail(o, distrilbutionloadingscanDTO.getDeliveryId()); + if (Func.isNotEmpty(parcelNumberVOList)){ + parcelNumberVOS.addAll(parcelNumberVOList); + } + }); + if (Func.isEmpty(parcelNumberVOS)){ + return Resp.scanFail("查询失败","该配送任务无该零担订单"); + } + return R.data(parcelNumberVOS); + } + + @Override + public R getInventoryInfo(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { + List detailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId()); + if (Func.isEmpty(detailEntities)){ + log.error("######################查询配送任务零担信息错误,deliveryId:{},",distrilbutionloadingscanDTO.getDeliveryId()); + return null; + } + List stockListDetailEntities = detailEntities.stream().filter(d -> Func.isNotEmpty(d.getStockPackageCode())).filter(d -> d.getStockPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList()); + List disStockListDetailVOS = DistributionDisStockListWrapper.build().listVO(stockListDetailEntities); + List inventoryIds = disStockListDetailVOS.stream().map(DisStockListDetailVO::getStockListId).distinct().collect(Collectors.toList()); + DistributionStockListEntity distributionStockListEntity = distributionStockListService.listByIds(inventoryIds).get(0); + disStockListDetailVOS.stream().forEach(d->{d.setMarketName(distributionStockListEntity.getMarketName());d.setCargoNumber(distributionStockListEntity.getCargoNumber());}); + if (Func.isEmpty(stockListDetailEntities)){ + return Resp.scanFail("查询失败","不属于该配送任务"); + } + return R.data(stockListDetailEntities); + } + + @Override + public List getDriverInfo(Long deliveryId) { + DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(deliveryId); + if (Func.isEmpty(distributionDeliveryListEntity)) { + log.error("############################# 配送任务查询为空,deliveryId为:{}", distributionDeliveryListEntity); + } + //零担订单进行装车 + //这里需要进行判定是进行编辑还是进行的装车 + DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfEntity(); + if (distributionDeliveryListEntity.getKind().equals("1")) { + distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectById(deliveryId); + } else { + DistributionDeliveryTripartiteEntity distributionDeliveryTripartiteEntity = distributionDeliveryTripartiteMapper.selectTripartiteInfo(deliveryId); + BeanUtils.copyProperties(distributionDeliveryTripartiteEntity, distributionDeliverySelfEntity); + } + return null; + } + public Map getDriverCar(String kind, Long deliveryListEntityId) { Map map = new HashMap<>(); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 9e2c73021..b3f62f0ae 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -2216,7 +2216,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl distributionSignPrintList = new ArrayList<>(); distributionSignfor.getMap().forEach((k, v) -> { - List list = iDistributionSignPrintService.list(Wrappers.query().lambda() .eq(DistributionSignPrintEntity::getReservationId, distributionSignfor.getReservationId()) .eq(DistributionSignPrintEntity::getType, k) @@ -2486,5 +2485,16 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl> retentionPackageList(@RequestBody RetentionDTO retentionDTO) { + String method = "###########retentionPackageList: "; + log.info(method + "滞留包件列表 retentionDTO={}", retentionDTO); + Integer pageNum = retentionDTO.getPageNum(); + Integer pageSize = retentionDTO.getPageSize(); + + if (Objects.isNull(pageNum)) { + retentionDTO.setPageNum(1); + } + if (Objects.isNull(pageSize)) { + retentionDTO.setPageSize(10); + } + + try { + //查询订制品打托列表 + IPage pages = warehouseRetentionRecordService.retentionPackageList(retentionDTO); + return R.data(pages); + } catch (CustomerException e) { + log.warn(e.message); + return R.fail(e.code, e.message); + } catch (Exception e) { + log.error(method + "系统异常,联系管理员", e); + return R.fail(500, "系统异常,联系管理员"); + } + } + + + // @GetMapping + @GetMapping("/initRetentionList") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "初始化滞留车次信息", notes = "传入trayTypeDTO") + public R initRetentionList(@RequestParam Long deliveryId) { + WarehouseRetentionRecordVO warehouseRetentionRecordVO = warehouseRetentionRecordService.initRetentionList(deliveryId); + return R.data(warehouseRetentionRecordVO); + } + + @PostMapping("/saveRetentionList") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "保存滞留扫描列表", notes = "传入trayTypeDTO") + public R saveRetentionList(@RequestBody RetentionDTO retentionDTO) { + R r = warehouseRetentionRecordService.saveRetentionList(retentionDTO); + return r; + } + + + +// @GetMapping("/initRetentionList") // @ApiOperationSupport(order = 1) -// @ApiOperation(value = "滞留包件列表", notes = "传入trayTypeDTO") -// public R> retentionPackageList(@RequestBody RetentionDTO retentionDTO) { -// String method = "###########retentionPackageList: "; -// log.info(method+"滞留包件列表 retentionDTO={}",retentionDTO); -// Integer pageNum = retentionDTO.getPageNum(); -// Integer pageSize = retentionDTO.getPageSize(); -// -// if(Objects.isNull(pageNum)){ -// retentionDTO.setPageNum(1); -// } -// if(Objects.isNull(pageSize)){ -// retentionDTO.setPageSize(10); -// } -// -// try{ -// //查询订制品打托列表 -// IPage pages = warehouseRetentionRecordService.retentionPackageList(retentionDTO); -// return R.data(pages); -// }catch (CustomerException e){ -// log.warn(e.message); -// return R.fail(e.code,e.message); -// }catch (Exception e){ -// log.error(method+"系统异常,联系管理员",e); -// return R.fail(500,"系统异常,联系管理员"); -// } +// @ApiOperation(value = "初始化滞留车次信息", notes = "传入trayTypeDTO") +// public R initRetentionList(@RequestParam Long deliveryId) { +// WarehouseRetentionRecordVO warehouseRetentionRecordVO = warehouseRetentionRecordService.initRetentionList(deliveryId); +// return R.data(warehouseRetentionRecordVO); // } + + // // // @ResponseBody @@ -85,8 +116,6 @@ public class WarehouseRetentionApiController { // } - - // @ResponseBody // @PostMapping("/retentionScanPackage") // @ApiOperationSupport(order = 1) @@ -113,6 +142,4 @@ public class WarehouseRetentionApiController { // } - - } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java index d21f0962c..eeef525c9 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java @@ -1,8 +1,13 @@ package com.logpm.warehouse.dto; +import com.logpm.distribution.entity.DisStockListDetailEntity; +import com.logpm.distribution.entity.DistributionParcelListEntity; +import com.logpm.distribution.entity.DistributionParcelNumberEntity; +import com.logpm.distribution.vo.DistributionParcelListVO; import lombok.Data; import java.io.Serializable; +import java.util.List; @Data public class RetentionDTO implements Serializable { @@ -14,4 +19,22 @@ public class RetentionDTO implements Serializable { private String endDate; private String orderPackageCode; + + /** + * 配送任务ID + */ + private Long deliveryId; + + /** + * 配送任务ID + */ + private String remarks; + + + private List parcelListEntityList; + + private List parcelNumberEntityList; + + private List detailEntityList; + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDistributionListDetailDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDistributionListDetailDTO.java new file mode 100644 index 000000000..3be7d0ec1 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDistributionListDetailDTO.java @@ -0,0 +1,14 @@ +package com.logpm.warehouse.dto; + +import com.logpm.distribution.entity.DisStockListDetailEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +public class RetentionDistributionListDetailDTO extends DisStockListDetailEntity { + + private String MaterialName; + + private String materialNumber; +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionParcelListDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionParcelListDTO.java new file mode 100644 index 000000000..d6ddbdfae --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionParcelListDTO.java @@ -0,0 +1,11 @@ +package com.logpm.warehouse.dto; + +import com.logpm.distribution.entity.DistributionParcelListEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + + +@Data +@EqualsAndHashCode(callSuper = true) +public class RetentionParcelListDTO extends DistributionParcelListEntity { +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionZeroParcelDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionZeroParcelDTO.java new file mode 100644 index 000000000..3d13caac6 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionZeroParcelDTO.java @@ -0,0 +1,10 @@ +package com.logpm.warehouse.dto; + +import com.logpm.distribution.entity.DistributionParcelNumberEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +public class RetentionZeroParcelDTO extends DistributionParcelNumberEntity { +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java index d7972a750..730cd1f55 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java @@ -25,6 +25,7 @@ import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; import com.logpm.warehouse.service.IWarehouseRetentionRecordService; +import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; @@ -52,4 +53,9 @@ public class WarehouseRetentionScanClient implements IWarehouseRetentionScanClie return BladePage.of(page); } + @Override + public R saveRetentionScan(WarehouseRetentionScanEntity warehouseRetentionScanEntity) { + return R.status(warehouseRetentionScanService.save(warehouseRetentionScanEntity)); + } + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.java index 4093e7224..27206b781 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.java @@ -62,4 +62,5 @@ public interface WarehouseRetentionRecordMapper extends BaseMapper retentionPackageList(IPage page, @Param("param") RetentionDTO retentionDTO); + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.xml index 079120755..de5790d85 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.xml @@ -61,4 +61,5 @@ order by update_time desc + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionRecordService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionRecordService.java index bcd26b8b6..7c1ff8c94 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionRecordService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionRecordService.java @@ -62,4 +62,18 @@ public interface IWarehouseRetentionRecordService extends BaseService retentionPackageList(RetentionDTO retentionDTO); R retentionScanPackage(String orderPackageCode); + + /** + * PDA查询初始化滞留扫描页 + * @param deliveryId + * @return + */ + WarehouseRetentionRecordVO initRetentionList(Long deliveryId); + + /** + * 保存扫描记录 + * @param retentionDTO + * @return + */ + R saveRetentionList(RetentionDTO retentionDTO); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java index 1e353048a..5b81c9cdc 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java @@ -18,26 +18,48 @@ package com.logpm.warehouse.service.impl; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.logpm.basicdata.entity.BasicdataWarehouseEntity; +import com.logpm.basicdata.feign.IBasicdataWarehouseClient; +import com.logpm.distribution.entity.DisStockListDetailEntity; import com.logpm.distribution.entity.DistributionLoadscanEntity; import com.logpm.distribution.entity.DistributionParcelListEntity; +import com.logpm.distribution.entity.DistributionParcelNumberEntity; +import com.logpm.distribution.feign.IDistributionDeliveryListClient; import com.logpm.distribution.feign.IDistributionLoadscanClient; import com.logpm.distribution.feign.IDistributionParcelListClient; +import com.logpm.distribution.vo.DistributionDeliveryListVO; +import com.logpm.distribution.vo.DistributionDeliverySelfVO; +import com.logpm.oldproject.feign.IWarehouseClient; +import com.logpm.warehouse.bean.Resp; import com.logpm.warehouse.dto.RetentionDTO; +import com.logpm.warehouse.dto.RetentionDistributionListDetailDTO; +import com.logpm.warehouse.dto.RetentionParcelListDTO; +import com.logpm.warehouse.dto.RetentionZeroParcelDTO; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import com.logpm.warehouse.excel.WarehouseRetentionRecordExcel; import com.logpm.warehouse.mapper.WarehouseRetentionRecordMapper; import com.logpm.warehouse.service.IWarehouseRetentionRecordService; +import com.logpm.warehouse.service.IWarehouseRetentionScanService; import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; import com.logpm.warehouse.vo.WarehouseWaybillDetentionVO; import com.logpm.warehouse.wrapper.WarehouseRetentionRecordWrapper; +import com.logpm.warehouse.wrapper.WarehouseRetentionScanWrapper; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.common.constant.retention.RetentionTypeConstant; +import org.springblade.common.exception.CustomerException; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; import org.springframework.stereotype.Service; import java.util.List; import java.util.Objects; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; /** * 滞留记录 服务实现类 @@ -47,10 +69,14 @@ import java.util.Objects; */ @AllArgsConstructor @Service +@Slf4j public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl implements IWarehouseRetentionRecordService { private final IDistributionLoadscanClient distributionLoadscanClient; private final IDistributionParcelListClient distributionParcelListClient; + private final IWarehouseRetentionScanService warehouseRetentionScanService; + private final IDistributionDeliveryListClient deliveryListClient; + private final IBasicdataWarehouseClient warehouseClient; @Override public IPage selectWarehouseRetentionRecordPage(IPage page, WarehouseRetentionRecordVO warehouseRetentionRecord) { @@ -117,4 +143,103 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImplquery().lambda() + .eq(WarehouseRetentionRecordEntity::getRetentionType, RetentionTypeConstant.peisongzhiliu.getValue()) + .eq(WarehouseRetentionRecordEntity::getTaskId, deliveryId)); + if (Func.isEmpty(retentionRecordEntity)){ + return null; + } + WarehouseRetentionRecordVO warehouseRetentionRecordVO = WarehouseRetentionRecordWrapper.build().entityVO(retentionRecordEntity); + //查询是否存在有对应的扫描列表 + List retentionScanEntityList = warehouseRetentionScanService.list(Wrappers.query().lambda() + .eq(WarehouseRetentionScanEntity::getDeliveryId, retentionRecordEntity.getTaskId()) + .eq(WarehouseRetentionScanEntity::getRefId, retentionRecordEntity.getId())); + if (Func.isNotEmpty(retentionScanEntityList)){ + warehouseRetentionRecordVO.setRetentionScanVOList(WarehouseRetentionScanWrapper.build().listVO(retentionScanEntityList)); + } + return warehouseRetentionRecordVO; + } + + @Override + public R saveRetentionList(RetentionDTO retentionDTO) { + DistributionDeliveryListVO deliveryDriverInfo = deliveryListClient.getDeliveryDriverInfo(retentionDTO.getDeliveryId()); + if (Func.isEmpty(deliveryDriverInfo)){ + //查询配送任务 + log.error("##############查询配送任务失败,deliveryId:{}",retentionDTO.getDeliveryId()); + } + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if (Objects.isNull(myCurrentWarehouse)) { + throw new CustomerException(403, "仓库信息不能为空"); + } + if (Func.isEmpty(deliveryDriverInfo.getDeliverySelfVO())){ + log.error("##############查询配送任务司机失败"); + } + List deliverySelfVO = deliveryDriverInfo.getDeliverySelfVO(); + DistributionDeliverySelfVO distributionDeliverySelfVO = null; + if (deliveryDriverInfo.getKind().equals("1")){ + distributionDeliverySelfVO = deliverySelfVO.stream().filter(d -> d.getIsMaster() == 2).collect(Collectors.toList()).get(0); + }else if (deliveryDriverInfo.getKind().equals("2")){ + distributionDeliverySelfVO = deliverySelfVO.get(0); + + } + WarehouseRetentionRecordEntity warehouseRetentionRecordEntity = new WarehouseRetentionRecordEntity(); + warehouseRetentionRecordEntity.setRetentionType(RetentionTypeConstant.peisongzhiliu.getValue()); + warehouseRetentionRecordEntity.setRetentionWarehouseId(myCurrentWarehouse.getId()); + warehouseRetentionRecordEntity.setRetentionWarehouseName(myCurrentWarehouse.getName()); + warehouseRetentionRecordEntity.setRemark(retentionDTO.getRemarks()); + warehouseRetentionRecordEntity.setTaskId(retentionDTO.getDeliveryId()); + warehouseRetentionRecordEntity.setRetentionCarId(distributionDeliverySelfVO.getId()); + warehouseRetentionRecordEntity.setRetentionCarNo(deliveryDriverInfo.getTrainNumber()); + warehouseRetentionRecordEntity.setAssembleCarPersonId(distributionDeliverySelfVO.getDeliveryId()); + warehouseRetentionRecordEntity.setAssembleCarPersonName(distributionDeliverySelfVO.getDriverName()); + //统计数量 + AtomicInteger retentionQuantity = new AtomicInteger(); + List parcelListEntityList = retentionDTO.getParcelListEntityList(); + if (Func.isNotEmpty(parcelListEntityList)){ + parcelListEntityList.forEach(p->{ + WarehouseRetentionScanEntity warehouseRetentionScanEntity = new WarehouseRetentionScanEntity(); + warehouseRetentionScanEntity.setConditions(1); + warehouseRetentionScanEntity.setDeliveryId(deliveryDriverInfo.getId()); + warehouseRetentionScanEntity.setOrderCode(p.getOrderCode()); + warehouseRetentionScanEntity.setOrderPackageCode(p.getOrderPackageCode()); + warehouseRetentionScanEntity.setOrderId(p.getStockArticleId()); + warehouseRetentionScanEntity.setOrderPackageId(p.getId()); + warehouseRetentionScanService.save(warehouseRetentionScanEntity); + retentionQuantity.getAndAdd(p.getQuantity()); + //缺少一个进行解绑的远程 + }); + } + List parcelNumberEntityList = retentionDTO.getParcelNumberEntityList(); + if (Func.isNotEmpty(parcelNumberEntityList)){ + parcelNumberEntityList.forEach(pn->{ + WarehouseRetentionScanEntity warehouseRetentionScanEntity = new WarehouseRetentionScanEntity(); + warehouseRetentionScanEntity.setConditions(2); + warehouseRetentionScanEntity.setDeliveryId(deliveryDriverInfo.getId()); + warehouseRetentionScanEntity.setOrderId(pn.getStockArticleId()); + warehouseRetentionScanEntity.setOrderPackageId(pn.getParcelListId()); + warehouseRetentionScanService.save(warehouseRetentionScanEntity); + retentionQuantity.getAndAdd(pn.getQuantity()); + }); + } + List detailEntityList = retentionDTO.getDetailEntityList(); + if (Func.isNotEmpty(detailEntityList)){ + detailEntityList.forEach(d->{ + WarehouseRetentionScanEntity warehouseRetentionScanEntity = new WarehouseRetentionScanEntity(); + warehouseRetentionScanEntity.setConditions(3); + warehouseRetentionScanEntity.setDeliveryId(deliveryDriverInfo.getId()); + warehouseRetentionScanEntity.setInventoryId(d.getStockListId()); + warehouseRetentionScanEntity.setMaterialName(d.getMaterialName()); + warehouseRetentionScanEntity.setMaterialNumber(d.getMaterialNumber()); + warehouseRetentionScanEntity.setOrderPackageCode(d.getStockPackageCode()); + warehouseRetentionScanEntity.setOrderPackageId(d.getId()); + warehouseRetentionScanService.save(warehouseRetentionScanEntity); + retentionQuantity.getAndAdd(d.getNum()); + }); + } + + this.save(warehouseRetentionRecordEntity); + return Resp.scanSuccess("操作成功","操作成功"); + } } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseRetentionRecordWrapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseRetentionRecordWrapper.java index 4f3dfcea2..dda16518b 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseRetentionRecordWrapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseRetentionRecordWrapper.java @@ -18,8 +18,10 @@ package com.logpm.warehouse.wrapper; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; +import org.springblade.common.constant.DictBizConstant; import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.system.cache.DictBizCache; import java.util.Objects; @@ -38,7 +40,7 @@ public class WarehouseRetentionRecordWrapper extends BaseEntityWrapper { + + public static WarehouseRetentionScanWrapper build() { + return new WarehouseRetentionScanWrapper(); + } + + @Override + public WarehouseRetentionScanVO entityVO(WarehouseRetentionScanEntity warehouseRetentionScanEntity) { + WarehouseRetentionScanVO warehouseRetentionScanVO = Objects.requireNonNull(BeanUtil.copy(warehouseRetentionScanEntity, WarehouseRetentionScanVO.class)); +// warehouseRetentionRecordVO.setRetentionTypeName(DictBizCache.getValue(DictBizConstant.WAREHOUSE_TRAY_BINDING_TYPE, warehouseRetentionRecord.getRetentionType())); + //User createUser = UserCache.getUser(warehouseRetentionRecord.getCreateUser()); + //User updateUser = UserCache.getUser(warehouseRetentionRecord.getUpdateUser()); + //warehouseRetentionRecordVO.setCreateUserName(createUser.getName()); + //warehouseRetentionRecordVO.setUpdateUserName(updateUser.getName()); + + return warehouseRetentionScanVO; + } + + +} From 02ed1d3f9ecc7a6db29b43d79c869ac9949433e5 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Mon, 6 Nov 2023 19:35:39 +0800 Subject: [PATCH 16/18] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BF=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/TrunklineBillladingEntity.java | 6 -- .../entity/TrunklineBillladingLineEntity.java | 56 +++++++++++++++++++ .../TrunklineBillladingPackageEntity.java | 3 + .../TrunklineBillladingWaybillEntity.java | 9 +-- .../vo/TrunklineBillladingLineVO.java | 11 ++++ .../mapper/TrunklineBillladingLineMapper.java | 9 +++ .../mapper/TrunklineBillladingLineMapper.xml | 6 ++ .../TrunklineBillladingPackageMapper.xml | 6 ++ .../mapper/TrunklineDetailProductMapper.xml | 6 ++ .../ITrunklineBillladingLineService.java | 7 +++ .../TrunklineBillladingLineServiceImpl.java | 15 +++++ 11 files changed, 121 insertions(+), 13 deletions(-) create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLineEntity.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingLineVO.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.xml create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java create mode 100644 blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java index 59111d0c7..9f74fbb14 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java @@ -102,11 +102,5 @@ public class TrunklineBillladingEntity extends TenantEntity { /** 结算人名称 */ @ApiModelProperty(name = "结算人名称",notes = "") private String settlementName ; - /** 备注 */ - @ApiModelProperty(name = "备注",notes = "") - private String remark ; - /** 创建用户名称 */ - @ApiModelProperty(name = "创建用户名称",notes = "") - private String createUserName ; } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLineEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLineEntity.java new file mode 100644 index 000000000..c7b09f2e7 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLineEntity.java @@ -0,0 +1,56 @@ +package com.logpm.trunkline.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +@Data +@TableName("logpm_trunkline_billlading_line") +@ApiModel(value = "TrunklineBillladingLine对象", description = "干线提货线路表") +@EqualsAndHashCode(callSuper = true) +public class TrunklineBillladingLineEntity extends TenantEntity { + + /** 预留1 */ + @ApiModelProperty(name = "预留1",notes = "") + private String reserve1 ; + /** 预留2 */ + @ApiModelProperty(name = "预留2",notes = "") + private String reserve2 ; + /** 预留3 */ + @ApiModelProperty(name = "预留3",notes = "") + private String reserve3 ; + /** 预留4 */ + @ApiModelProperty(name = "预留4",notes = "") + private String reserve4 ; + /** 预留5 */ + @ApiModelProperty(name = "预留5",notes = "") + private String reserve5 ; + /** 仓库id */ + @ApiModelProperty(name = "仓库id",notes = "") + private Long warehouseId ; + /** 仓库名称 */ + @ApiModelProperty(name = "仓库名称",notes = "") + private String warehouseName ; + /** 提货单id */ + @ApiModelProperty(name = "提货单id",notes = "") + private Long billladingId ; + /** 客户类型 1 工厂 2 商场 3装饰 4个人 */ + @ApiModelProperty(name = "客户类型 1 工厂 2 商场 3装饰 4个人",notes = "") + private String clientType ; + /** 联系人 */ + @ApiModelProperty(name = "联系人",notes = "") + private String linkMan ; + /** 联系电话 */ + @ApiModelProperty(name = "联系电话",notes = "") + private String linkPhone ; + /** 联系人地址 */ + @ApiModelProperty(name = "联系人地址",notes = "") + private String linkAddress ; + /** 排序 */ + @ApiModelProperty(name = "排序",notes = "") + private Integer sort ; + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java index 342ffba59..fdb0bfc92 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java @@ -37,5 +37,8 @@ public class TrunklineBillladingPackageEntity extends TenantEntity { /** 包件码 */ @ApiModelProperty(name = "包件码",notes = "") private String orderPackageCode ; + /** 提货单id */ + @ApiModelProperty(name = "提货单id",notes = "") + private Long billladingId ; } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java index 36b631c8e..a4b2603e2 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java @@ -7,17 +7,12 @@ import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.tenant.mp.TenantEntity; -import java.math.BigDecimal; - @Data @TableName("logpm_trunkline_billlading_waybill") @ApiModel(value = "TrunklineBillladingWaybill对象", description = "提货运单关联表") @EqualsAndHashCode(callSuper = true) public class TrunklineBillladingWaybillEntity extends TenantEntity { - /** 预留1 */ - @ApiModelProperty(name = "预留1",notes = "") - private String reserve1 ; /** 预留2 */ @ApiModelProperty(name = "预留2",notes = "") private String reserve2 ; @@ -47,10 +42,10 @@ public class TrunklineBillladingWaybillEntity extends TenantEntity { private Integer realNum ; /** 提货重量 */ @ApiModelProperty(name = "提货重量",notes = "") - private BigDecimal realWeight ; + private Double realWeight ; /** 提货体积 */ @ApiModelProperty(name = "提货体积",notes = "") - private BigDecimal realVolume ; + private Double realVolume ; } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingLineVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingLineVO.java new file mode 100644 index 000000000..c838d6de1 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingLineVO.java @@ -0,0 +1,11 @@ +package com.logpm.trunkline.vo; + +import com.logpm.trunkline.entity.TrunklineBillladingLineEntity; +import lombok.Data; + +@Data +public class TrunklineBillladingLineVO extends TrunklineBillladingLineEntity { + + + +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java new file mode 100644 index 000000000..8e7b5fcab --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java @@ -0,0 +1,9 @@ +package com.logpm.trunkline.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.logpm.trunkline.entity.TrunklineBillladingLineEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface TrunklineBillladingLineMapper extends BaseMapper { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml new file mode 100644 index 000000000..b9de6ea86 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml new file mode 100644 index 000000000..4d08ed327 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.xml new file mode 100644 index 000000000..a82c370dc --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java new file mode 100644 index 000000000..a402f8ca1 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java @@ -0,0 +1,7 @@ +package com.logpm.trunkline.service; + +import com.logpm.trunkline.entity.TrunklineBillladingLineEntity; +import org.springblade.core.mp.base.BaseService; + +public interface ITrunklineBillladingLineService extends BaseService { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java new file mode 100644 index 000000000..f99f463c6 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java @@ -0,0 +1,15 @@ +package com.logpm.trunkline.service.impl; + +import com.logpm.trunkline.entity.TrunklineBillladingLineEntity; +import com.logpm.trunkline.mapper.TrunklineBillladingLineMapper; +import com.logpm.trunkline.service.ITrunklineBillladingLineService; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +@Slf4j +@AllArgsConstructor +@Service +public class TrunklineBillladingLineServiceImpl extends BaseServiceImpl implements ITrunklineBillladingLineService { +} From e83c1061e9758c7f9f7b4c1382f292d44a44ab20 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Mon, 6 Nov 2023 19:36:41 +0800 Subject: [PATCH 17/18] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E8=8A=82=E7=82=B9=20=20--=202.=E5=A2=9E=E5=8A=A0=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E6=AC=A7=E6=B4=BE=E7=9A=84=E8=8A=82=E7=82=B9=20?= =?UTF-8?q?=E5=B0=86=E6=88=91=E4=BB=AC=E7=AD=BE=E6=94=B6=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E7=BB=99=E6=AC=A7=E6=B4=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oupai/service/impl/OuPaiFactoryServiceImpl.java | 12 ++++++++++-- .../factory/snm/service/impl/OrderServiceImpl.java | 3 --- blade-service/pom.xml | 5 +++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java index 3a9e553de..2cc2ec573 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java @@ -317,7 +317,8 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { String status = orderStatusDTO.getStatus(); String unitNo = orderStatusDTO.getUnitNo(); String operationTime = orderStatusDTO.getOperationTime(); - if ("1".equals(status) || "2".equals(status) || "3".equals(status) || "5".equals(status) || "6".equals(status) || "7".equals(status) || "8".equals(status) || "9".equals(status)) { + // || "7".equals(status) 增加签收状态推送 + if ("1".equals(status) || "2".equals(status) || "3".equals(status) || "5".equals(status) || "6".equals(status) || "8".equals(status) || "9".equals(status)) { log.warn("#############oupai-handleStatusData: 当前数据的状态不推送 status={}", status); return Resp.fail(400, "当前数据的状态不推送"); } @@ -377,7 +378,14 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { detailObject.put("WarehouseBelong", "oppein"); detailObject.put("Creator", orderStatusDTO.getUsername()); detailObject.put("PackageCode", unitNo); - detailObject.put("Operate", "收货"); + if("4".equals(status)){ + detailObject.put("Operate", "收货"); + }else if("7".equals(status)){ + detailObject.put("Operate", "发货"); + }else{ + log.info(" 该包件的状态不正确 status={} ", status); + return Resp.fail(400, "该包件的状态不正确"); + } // 查询系统的包件对象 LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java index 48cef8aa1..d6626b8c7 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java @@ -219,10 +219,8 @@ public class OrderServiceImpl implements IOrderService { declared.setAccessible(true); //抑制java语言访问检查,反射访问private访问权限的属性值 Object valueTemp = declared.get(responseStationOrderInfoVo); // 获取实体类中属性的值 Class t = f.getType(); - logger.info(">>>>>>>>>>>>>>>>> {}",t.getName()); // 基本数据类型 包含String if (t.getName().equals("java.lang.Integer") || t.getName().equals("java.lang.String") ) { - logger.info(">>> fieldName {} valueTemp {}",fieldName,valueTemp); if (!ObjectUtils.isEmpty(valueTemp)) { // 包含下划线 if (fieldName.indexOf("_") != -1) { @@ -239,7 +237,6 @@ public class OrderServiceImpl implements IOrderService { Field field = c.getDeclaredField(fieldName); field.setAccessible(true); //抑制java语言访问检查,反射访问private访问权限的属性值 field.set(stationOrderEntity, value); - logger.info(">>> fieldName {} valueTemp {}",fieldName,value); } } diff --git a/blade-service/pom.xml b/blade-service/pom.xml index 37f463927..274758e79 100644 --- a/blade-service/pom.xml +++ b/blade-service/pom.xml @@ -47,6 +47,11 @@ blade-biz-common ${bladex.project.version} + + + org.springblade + blade-starter-metrics + org.springblade blade-starter-tenant From 3d44c0a168268f5c02311286ad758ca000227d1a Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Mon, 6 Nov 2023 19:36:41 +0800 Subject: [PATCH 18/18] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E8=8A=82=E7=82=B9=20=20--=202.=E5=A2=9E=E5=8A=A0=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E6=AC=A7=E6=B4=BE=E7=9A=84=E8=8A=82=E7=82=B9=20?= =?UTF-8?q?=E5=B0=86=E6=88=91=E4=BB=AC=E7=AD=BE=E6=94=B6=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E7=BB=99=E6=AC=A7=E6=B4=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oupai/service/impl/OuPaiFactoryServiceImpl.java | 12 ++++++++++-- .../factory/snm/service/impl/OrderServiceImpl.java | 3 --- blade-service/pom.xml | 5 +++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java index 3a9e553de..2cc2ec573 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java @@ -317,7 +317,8 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { String status = orderStatusDTO.getStatus(); String unitNo = orderStatusDTO.getUnitNo(); String operationTime = orderStatusDTO.getOperationTime(); - if ("1".equals(status) || "2".equals(status) || "3".equals(status) || "5".equals(status) || "6".equals(status) || "7".equals(status) || "8".equals(status) || "9".equals(status)) { + // || "7".equals(status) 增加签收状态推送 + if ("1".equals(status) || "2".equals(status) || "3".equals(status) || "5".equals(status) || "6".equals(status) || "8".equals(status) || "9".equals(status)) { log.warn("#############oupai-handleStatusData: 当前数据的状态不推送 status={}", status); return Resp.fail(400, "当前数据的状态不推送"); } @@ -377,7 +378,14 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { detailObject.put("WarehouseBelong", "oppein"); detailObject.put("Creator", orderStatusDTO.getUsername()); detailObject.put("PackageCode", unitNo); - detailObject.put("Operate", "收货"); + if("4".equals(status)){ + detailObject.put("Operate", "收货"); + }else if("7".equals(status)){ + detailObject.put("Operate", "发货"); + }else{ + log.info(" 该包件的状态不正确 status={} ", status); + return Resp.fail(400, "该包件的状态不正确"); + } // 查询系统的包件对象 LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java index 48cef8aa1..d6626b8c7 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java @@ -219,10 +219,8 @@ public class OrderServiceImpl implements IOrderService { declared.setAccessible(true); //抑制java语言访问检查,反射访问private访问权限的属性值 Object valueTemp = declared.get(responseStationOrderInfoVo); // 获取实体类中属性的值 Class t = f.getType(); - logger.info(">>>>>>>>>>>>>>>>> {}",t.getName()); // 基本数据类型 包含String if (t.getName().equals("java.lang.Integer") || t.getName().equals("java.lang.String") ) { - logger.info(">>> fieldName {} valueTemp {}",fieldName,valueTemp); if (!ObjectUtils.isEmpty(valueTemp)) { // 包含下划线 if (fieldName.indexOf("_") != -1) { @@ -239,7 +237,6 @@ public class OrderServiceImpl implements IOrderService { Field field = c.getDeclaredField(fieldName); field.setAccessible(true); //抑制java语言访问检查,反射访问private访问权限的属性值 field.set(stationOrderEntity, value); - logger.info(">>> fieldName {} valueTemp {}",fieldName,value); } } diff --git a/blade-service/pom.xml b/blade-service/pom.xml index 37f463927..274758e79 100644 --- a/blade-service/pom.xml +++ b/blade-service/pom.xml @@ -47,6 +47,11 @@ blade-biz-common ${bladex.project.version} + + + org.springblade + blade-starter-metrics + org.springblade blade-starter-tenant