diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java index 71d94e570..bd1d52134 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java @@ -213,6 +213,11 @@ public class QualityDeliverEntity extends TenantEntity { */ @ApiModelProperty(value = "重量") private BigDecimal weight; + /** + * 品类 + */ + @ApiModelProperty(value = "品类") + private String category; /** * 成本结算品类 */ @@ -483,7 +488,7 @@ public class QualityDeliverEntity extends TenantEntity { * 签收数量 */ @ApiModelProperty(value = "签收数量") - private String signNum; + private Integer signNum; /** * 签收配送单号 包含配送车次和自提车次 直发商家 对应干线车次 三方中转 三方中转车次号 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/LoadingReportListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/LoadingReportListener.java index 1c881e9b3..da9a4a765 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/LoadingReportListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/LoadingReportListener.java @@ -92,8 +92,7 @@ public class LoadingReportListener { } else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) { qualityDeliverEntity.setOrderCode(detail.getOrderCode()); qualityDeliverEntity.setPlanReservationCode(vo.getReservationCode()); - qualityDeliverEntity.setCostCategory(detail.getProductName()); - qualityDeliverEntity.setRevenueCategory(detail.getProductName()); + qualityDeliverEntity.setCategory(detail.getProductName()); qualityDeliverEntity.setConditions(2); sendReport(bizOperation, qualityDeliverEntity); } else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.INV)) { diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java index 8a080ec8a..e62bf083e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java @@ -128,8 +128,7 @@ public class PlanReportListener { } } else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) { qualityDeliverEntity.setOrderCode(detail.getOrderCode()); - qualityDeliverEntity.setCostCategory(detail.getProductName()); - qualityDeliverEntity.setRevenueCategory(detail.getProductName()); + qualityDeliverEntity.setCategory(detail.getProductName()); qualityDeliverEntity.setConditions(2); qualityDeliverEntity.setPlanNum(detail.getNumber()); if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) { diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverListener.java index 87a73a13b..7e4e9fb61 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverListener.java @@ -103,7 +103,7 @@ public class QualityDeliverListener { // 零担 LambdaQueryWrapper wrapper = Wrappers.lambdaQuery() .eq(QualityDeliverEntity::getOrderCode, qualityDeliverEntity.getOrderCode()) - .eq(QualityDeliverEntity::getCostCategory, qualityDeliverEntity.getCostCategory()) + .eq(QualityDeliverEntity::getCategory, qualityDeliverEntity.getCategory()) .lt(QualityDeliverEntity::getBizStatus, 110); if (StrUtil.isNotEmpty(qualityDeliverEntity.getPlanReservationCode())) { wrapper.eq(QualityDeliverEntity::getPlanReservationCode, qualityDeliverEntity.getPlanReservationCode()); @@ -195,7 +195,8 @@ public class QualityDeliverListener { if (ObjectUtil.equals(PackageTypeEnums.CMP.getCode(), conditions)) { // 订制品 // 构建订制品基础信息 - buildCmpBasicInfo(qualityDeliverEntity); + DistributionParcelListEntity parcelListEntity = parcelListService.selectByOrderPackageCode(qualityDeliverEntity.getOrderPackageCode(), qualityDeliverEntity.getWarehouseId()); + buildCmpBasicInfo(qualityDeliverEntity, parcelListEntity); } if (ObjectUtil.equals(PackageTypeEnums.INV.getCode(), conditions)) { // 库存品 @@ -203,7 +204,9 @@ public class QualityDeliverListener { } if (ObjectUtil.equals(PackageTypeEnums.LTL.getCode(), conditions)) { // 零担 - buildOrderInfo(qualityDeliverEntity, qualityDeliverEntity.getWarehouseId(), qualityDeliverEntity.getOrderCode()); + DistributionParcelListEntity parcelListEntity = parcelListService.findByOrderCodeAndCategory(qualityDeliverEntity.getOrderCode(), qualityDeliverEntity.getCategory(), qualityDeliverEntity.getWarehouseId()); + buildCmpBasicInfo(qualityDeliverEntity, parcelListEntity); + // buildOrderInfo(qualityDeliverEntity, qualityDeliverEntity.getWarehouseId(), qualityDeliverEntity.getOrderCode()); } } @@ -220,7 +223,8 @@ public class QualityDeliverListener { String brandName = stockList.getBrandName(); String sourceType = stockList.getSourceType(); if (StrUtil.equals(sourceType, "1")) { - buildCmpBasicInfo(qualityDeliverEntity); + DistributionParcelListEntity parcelListEntity = parcelListService.selectByOrderPackageCode(qualityDeliverEntity.getOrderPackageCode(), qualityDeliverEntity.getWarehouseId()); + buildCmpBasicInfo(qualityDeliverEntity, parcelListEntity); } else { qualityDeliverEntity.setBrandName(brandName); qualityDeliverEntity.setMallCode(stockList.getMarketCode()); @@ -245,8 +249,7 @@ public class QualityDeliverListener { } - private void buildCmpBasicInfo(QualityDeliverEntity qualityDeliverEntity) { - DistributionParcelListEntity parcelListEntity = parcelListService.selectByOrderPackageCode(qualityDeliverEntity.getOrderPackageCode(), qualityDeliverEntity.getWarehouseId()); + private void buildCmpBasicInfo(QualityDeliverEntity qualityDeliverEntity, DistributionParcelListEntity parcelListEntity) { if (ObjectUtil.isNotEmpty(parcelListEntity)) { // 品牌 qualityDeliverEntity.setBrandName(parcelListEntity.getBrandName()); @@ -282,9 +285,9 @@ public class QualityDeliverListener { qualityDeliverEntity.setEndWarehouseInTime(parcelListEntity.getWarehouseEntryTimeEnd()); // 构建运单相关信息 buildWaybillInfo(qualityDeliverEntity, waybillNumber); - // 构建订单相关信息 - buildOrderInfo(qualityDeliverEntity, qualityDeliverEntity.getWarehouseId(), parcelListEntity.getOrderCode()); } + // 构建订单相关信息 + buildOrderInfo(qualityDeliverEntity, qualityDeliverEntity.getWarehouseId(), qualityDeliverEntity.getOrderCode()); } private void buildOrderInfo(QualityDeliverEntity qualityDeliverEntity, Long warehouseId, String orderCode) { diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReViewReportListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReViewReportListener.java index 5ab6d279b..ec39889d6 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReViewReportListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReViewReportListener.java @@ -80,8 +80,7 @@ public class ReViewReportListener { } else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) { qualityDeliverEntity.setPlanReservationCode(vo.getReservationCode()); qualityDeliverEntity.setOrderCode(detail.getOrderCode()); - qualityDeliverEntity.setCostCategory(detail.getProductName()); - qualityDeliverEntity.setRevenueCategory(detail.getProductName()); + qualityDeliverEntity.setCategory(detail.getProductName()); qualityDeliverEntity.setConditions(2); sendReport(bizOperation, qualityDeliverEntity); } else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.INV)) { diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReservationPlanReportListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReservationPlanReportListener.java index ac8bac123..b0802bf1d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReservationPlanReportListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReservationPlanReportListener.java @@ -105,8 +105,7 @@ public class ReservationPlanReportListener { } if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) { qualityDeliverEntity.setOrderCode(detail.getOrderCode()); - qualityDeliverEntity.setCostCategory(detail.getProductName()); - qualityDeliverEntity.setRevenueCategory(detail.getProductName()); + qualityDeliverEntity.setCategory(detail.getProductName()); qualityDeliverEntity.setConditions(2); sendReport(bizOperation, qualityDeliverEntity,BizOperationEnums.MODIFY); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/SignforReportListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/SignforReportListener.java index 256208c9e..34c9ace3b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/SignforReportListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/SignforReportListener.java @@ -78,13 +78,13 @@ public class SignforReportListener { .build(); if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.CMP)) { qualityDeliverEntity.setConditions(1); - qualityDeliverEntity.setLoadNum(1); + qualityDeliverEntity.setSignNum(1); sendReport(bizOperation, qualityDeliverEntity); } else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) { qualityDeliverEntity.setPlanReservationCode(vo.getReservationCode()); qualityDeliverEntity.setOrderCode(detail.getOrderCode()); - qualityDeliverEntity.setCostCategory(detail.getProductName()); - qualityDeliverEntity.setRevenueCategory(detail.getProductName()); + qualityDeliverEntity.setCategory(detail.getProductName()); + qualityDeliverEntity.setSignNum(detail.getNumber()); qualityDeliverEntity.setConditions(2); sendReport(bizOperation, qualityDeliverEntity); } else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.INV)) { @@ -92,6 +92,7 @@ public class SignforReportListener { qualityDeliverEntity.setMallName(detail.getMallName()); qualityDeliverEntity.setMaterielCode(detail.getMaterialCode()); qualityDeliverEntity.setMaterielName(detail.getMaterialName()); + qualityDeliverEntity.setSignNum(1); qualityDeliverEntity.setConditions(3); sendReport(bizOperation, qualityDeliverEntity); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/StockReportListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/StockReportListener.java index 6ad40554c..1ac065ed7 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/StockReportListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/StockReportListener.java @@ -86,8 +86,7 @@ public class StockReportListener { } } else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) { qualityDeliverEntity.setOrderCode(detail.getOrderCode()); - qualityDeliverEntity.setCostCategory(detail.getProductName()); - qualityDeliverEntity.setRevenueCategory(detail.getProductName()); + qualityDeliverEntity.setCategory(detail.getProductName()); qualityDeliverEntity.setConditions(2); qualityDeliverEntity.setStockNum(detail.getNumber()); if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) { diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java index 3f363a7e2..6fc969a98 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java @@ -255,4 +255,13 @@ public interface IDistributionParcelListService extends BaseService clearTrayList); + /** + * 查询零担包件 + * @param orderCode + * @param category + * @param warehouseId + * @Return com.logpm.distribution.entity.DistributionParcelListEntity + * @Author zqb 2024/9/12 + **/ + DistributionParcelListEntity findByOrderCodeAndCategory(String orderCode, String category, Long warehouseId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java index 8f227a4c9..c1a4237d0 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java @@ -1377,6 +1377,19 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl list = this.list(Wrappers.lambdaQuery() + .eq(DistributionParcelListEntity::getOrderCode, orderCode) + .eq(DistributionParcelListEntity::getFirsts, category) + .eq(DistributionParcelListEntity::getWarehouseId, warehouseId) + ); + if(CollUtil.isNotEmpty(list)){ + return list.get(0); + } + return null; + } + private JSONObject handleLogJSONObject(BasicdataWarehouseEntity warehouse, BladeUser user, String orderPackageCode, String content, Integer node) { JSONObject trunklinePackageTrackLog = new JSONObject();