diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java b/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java new file mode 100644 index 000000000..22fc1b5b1 --- /dev/null +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java @@ -0,0 +1,54 @@ +package org.springblade.common.constant; + +import lombok.Getter; + +import java.io.Serializable; + +/** + * 作业节点枚举 + * + * @author zhaoqiaobo + * @create 2024-03-20 15:19 + */ +@Getter +public enum WorkNodeEnums implements Serializable { + + INITIAL_DATA_ENTRY(10, "数据入库"), + INITIAL_WAREHOUSE_ENTRY(20, "始发仓入库"), + BILLING(30, "开单"), + INITIAL_WAREHOUSE_LOADING(40, "始发仓装车"), + CANCEL_INITIAL_WAREHOUSE_LOADING(50, "始发仓取消装车"), + INITIAL_WAREHOUSE_DEPART(60, "始发仓发车"), + CANCEL_INITIAL_WAREHOUSE_DEPART(70, "始发仓取消发车"), + NET_ARRIVE_CAR(80,"网点到车"), + CANCEL_NET_ARRIVE_CAR(90,"网点取消到车"), + UNLOAD_INCOMING_WAREHOUSE(100,"卸车入库"), + TRANSFER_WAREHOUSE_UNLOADING(110, "网点卸车确认"), + TRANSFER_WAREHOUSE_DEPART(120, "网点发车"), + CANEL_TRANSFER_WAREHOUSE_DEPART(130, "网点取消发车"), + FINAL_NET_ARRIVE_CAR(140,"终点到车"), + CANCEL_FINAL_NET_ARRIVE_CAR(150,"终点取消到车"), + SIGN_DIRECT_SHIPPER(160,"直发商家签收"), + END_WAREHOUSE_UNLOADING(170, "末端仓卸车确认"), + TRIPARTITE_TRANSFER_DEPART(180, "三方中转发车"), + CANCEL_TRIPARTITE_TRANSFER_DEPART(190, "三方中转取消发车"), + ARRICE_TRIPARTITE_TRANSFER_DEPART(200, "三方中转到达"), + sign_TRIPARTITE_TRANSFER_DEPART(210, "三方中转签收"), + SORTING_TRAYS(220, "分拣打托"), + UN_SORTING_TRAYS(230, "包件解托"), + PUTAWAY(240, "上架"), + DELIST(250, "下架"), + STOCKING_OPERATION(260, "备货作业"), + DISTRIBUTION_LOADING(270, "配送装车"), + DISTRIBUTION_SIGN_FOR(280, "配送签收"), + CLERK_REVIEW(290, "文员复核"); + + private Integer code; + private String value; + + WorkNodeEnums(Integer code, String value) { + this.code = code; + this.value = value; + } + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionBillOrderPackVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionBillOrderPackVO.java index 3019e240e..722eaba65 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionBillOrderPackVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionBillOrderPackVO.java @@ -29,6 +29,7 @@ public class DistributionBillOrderPackVO { private String sendWarehouseName; //客户车次号 private String orderCode; //始发仓 private String stockupStatusName; //备货状态名称 + private String orderStatusName; //包件状态 private String stockupConsignee; //提货人员 private String stockupPickUpPlate; //提货车牌 private String stockupConditions; //提货状态 diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java index 5436f071d..80cc63016 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java @@ -206,6 +206,13 @@ public class DistributionSignforStockArticleVO implements Serializable { @ApiModelProperty(value = "创建时间") private Date createTime; + /** + * 签收扫描时间 + */ + @ApiModelProperty(value = "签收扫描时间") + private Date scanSigningTime; + + /** * 创建时间 */ diff --git a/blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/enums/NodeEnums.java b/blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/enums/NodeEnums.java index c3dcb8805..7966ac629 100644 --- a/blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/enums/NodeEnums.java +++ b/blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/enums/NodeEnums.java @@ -13,21 +13,35 @@ import java.io.Serializable; @Getter public enum NodeEnums implements Serializable { - INITIAL_WAREHOUSE_ENTRY(10, "始发仓入库"), - BILLING(20, "开单"), - INITIAL_WAREHOUSE_LOADING(30, "始发仓装车"), - INITIAL_WAREHOUSE_DEPART(40, "始发仓发车"), - TRANSFER_WAREHOUSE_UNLOADING(50, "中转仓卸车确认"), - TRANSFER_WAREHOUSE_DEPART(60, "中转仓发车"), - END_WAREHOUSE_UNLOADING(70, "末端仓卸车确认"), - TRIPARTITE_TRANSFER_DEPART(75, "三方中转发车"), - SORTING_TRAYS(80, "分拣打托"), - PUTAWAY(90, "上架"), - STOCKING_OPERATION(100, "备货作业"), - DELIST(110, "下架"), - DISTRIBUTION_LOADING(120, "配送装车"), - DISTRIBUTION_SIGN_FOR(130, "配送签收"), - CLERK_REVIEW(140, "文员复核"); + INITIAL_DATA_ENTRY(10, "数据入库"), + INITIAL_WAREHOUSE_ENTRY(20, "始发仓入库"), + BILLING(30, "开单"), + INITIAL_WAREHOUSE_LOADING(40, "始发仓装车"), + CANCEL_INITIAL_WAREHOUSE_LOADING(50, "始发仓取消装车"), + INITIAL_WAREHOUSE_DEPART(60, "始发仓发车"), + CANCEL_INITIAL_WAREHOUSE_DEPART(70, "始发仓取消发车"), + NET_ARRIVE_CAR(80,"网点到车"), + CANCEL_NET_ARRIVE_CAR(90,"网点取消到车"), + UNLOAD_INCOMING_WAREHOUSE(100,"卸车入库"), + TRANSFER_WAREHOUSE_UNLOADING(110, "网点卸车确认"), + TRANSFER_WAREHOUSE_DEPART(120, "网点发车"), + CANEL_TRANSFER_WAREHOUSE_DEPART(130, "网点取消发车"), + FINAL_NET_ARRIVE_CAR(140,"终点到车"), + CANCEL_FINAL_NET_ARRIVE_CAR(150,"终点取消到车"), + SIGN_DIRECT_SHIPPER(160,"直发商家签收"), + END_WAREHOUSE_UNLOADING(170, "末端仓卸车确认"), + TRIPARTITE_TRANSFER_DEPART(180, "三方中转发车"), + CANCEL_TRIPARTITE_TRANSFER_DEPART(190, "三方中转取消发车"), + ARRICE_TRIPARTITE_TRANSFER_DEPART(200, "三方中转到达"), + sign_TRIPARTITE_TRANSFER_DEPART(210, "三方中转签收"), + SORTING_TRAYS(220, "分拣打托"), + UN_SORTING_TRAYS(230, "包件解托"), + PUTAWAY(240, "上架"), + DELIST(250, "下架"), + STOCKING_OPERATION(260, "备货作业"), + DISTRIBUTION_LOADING(270, "配送装车"), + DISTRIBUTION_SIGN_FOR(280, "配送签收"), + CLERK_REVIEW(290, "文员复核"); private Integer code; private String value; diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleOweDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleOweDTO.java index 344e2c74b..04d40efaf 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleOweDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleOweDTO.java @@ -1,9 +1,11 @@ package com.logpm.distribution.dto; import com.logpm.distribution.entity.DistributionStockArticleEntity; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; import java.util.List; /** @@ -35,5 +37,43 @@ public class DistributionStockArticleOweDTO extends DistributionStockArticleEnti private String startDate; private String entDate; private String signinTime; + /** + * 入库时间起始 + */ + @ApiModelProperty(value = "复核时间起始") + private Date signingTimeStart; + + /** + * 入库时间结束 + */ + @ApiModelProperty(value = "复核时间结束") + private Date signingTimeEnd; + /** + * 入库时间起始 + */ + @ApiModelProperty(value = "签收扫描时间区间起始") + private Date scanSigningTimeStart; + /** + * 扫描时间 + */ + @ApiModelProperty(value = "扫描时间") + private Date scanSigningTime; + + /** + * 入库时间结束 + */ + @ApiModelProperty(value = "签收扫描时间区间结束") + private Date scanSigningTimeEnd; + /** + * 入库时间起始 + */ + @ApiModelProperty(value = "入库时间起始") + private Date warehouseEntryTimeStart; + + /** + * 入库时间结束 + */ + @ApiModelProperty(value = "入库时间结束") + private Date warehouseEntryTimeEnd; private List warehouseIdList; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index 292475ccd..6a7c6b6b1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -1161,7 +1161,8 @@ GROUP_CONCAT(DISTINCT IFNULL( m.driverName,'')) AS driverName, GROUP_CONCAT(DISTINCT IFNULL( m.vehicleName,'')) AS vehicleName, GROUP_CONCAT(DISTINCT IFNULL( m.examine_user_name,'')) AS examineUserNames, - k.earliestWarehouseEntryTime AS earliestWarehouseEntryTime + k.earliestWarehouseEntryTime AS earliestWarehouseEntryTime, + j.scanSigningTime AS scanSigningTime FROM logpm_distribution_stock_article AS ldsa LEFT JOIN ( @@ -1191,7 +1192,7 @@ CONCAT( lds.examine_user_name ) AS examine_user_name, CONCAT( lddl.driver_name ) AS driverName, CONCAT( lddl.vehicle_name ) AS vehicleName, - lds.signing_time + MAX(lds.signing_time) AS signing_time FROM logpm_distribution_reservation_stockarticle AS ldrs LEFT JOIN logpm_distribution_reservation ldr ON ldrs.reservation_id = ldr.id @@ -1200,8 +1201,10 @@ LEFT JOIN logpm_distribution_signfor As lds ON lds.reservation_id = ldr.id LEFT JOIN logpm_distribution_delivery_list AS lddl ON lds.delivery_id = lddl.id + GROUP BY ldr.id ) AS m ON ldsa.id = m.stock_article_id AND t.reservation_id = m.reservation_id - LEFT JOIN ( SELECT stock_article_id, min( create_time ) AS earliestWarehouseEntryTime FROM logpm_distribution_parcel_list) AS k ON k.stock_article_id = ldsa.id + LEFT JOIN ( SELECT stock_article_id, min( create_time ) AS earliestWarehouseEntryTime FROM logpm_distribution_parcel_list GROUP BY stock_article_id) AS k ON k.stock_article_id = ldsa.id + LEFT JOIN ( SELECT order_id, max( signing_time ) AS scanSigningTime FROM logpm_distribution_loadscan WHERE scan_status != 1 AND signfor_state = 2 GROUP BY order_id ) AS j ON j.order_id = ldsa.id ldsa.order_status in ('70','80') @@ -1246,19 +1249,19 @@ AND ldsa.warehouse_id IN - + #{item} AND ldsa.order_code in - + #{item} AND ldsa.waybill_number in - + #{item} @@ -1277,10 +1280,27 @@ and DATE(k.earliestWarehouseEntryTime) = #{param.earliestWarehouseEntryTime} - - - - + and DATE(j.scanSigningTime) = + #{param.scanSigningTime} + + and DATE(k.earliestWarehouseEntryTime) > + #{param.warehouseEntryTimeStart} + + and DATE(k.earliestWarehouseEntryTime) < + #{param.warehouseEntryTimeEnd} + + and DATE(m.signing_time) > + #{param.signingTimeStart} + + and DATE(m.signing_time) < + #{param.signingTimeEnd} + + and DATE(j.scanSigningTime) > + #{param.scanSigningTimeStart} + + and DATE(j.scanSigningTime) < + #{param.scanSigningTimeEnd} + GROUP BY ldsa.id 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 9e51b1592..b5dbcefa0 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 @@ -174,6 +174,13 @@ when lds.id is null then '未备货' else '已备货' end as stockupStatusName, + CASE ldpl.order_package_status + WHEN '70' THEN '已签收' + WHEN '20' THEN '已入库' + WHEN '60' THEN '已出库' + ELSE + '未签收' + END orderStatusName, lds.create_time stockupCreateTime, ldbl.consignee stockupConsignee, ldbl.pick_up_plate stockupPickUpPlate, diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java index 279418bdd..2d97c9579 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java @@ -1657,7 +1657,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { NodePushMsg msg = new NodePushMsg(); msg.setNode(NodeEnums.CLERK_REVIEW); msg.setBrand(BrandEnums.ZB); - msg.setOperator(AuthUtil.getUser().getNickName()); + msg.setOperator(distributionSignforEntity.getDeliveryDriverName()); msg.setOperatorTime(new Date()); msg.setContent(contents); log.info("推送工厂数据:{}", JSONUtil.toJsonStr(msg)); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java index ddf8adf9c..0d3bbf87d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java @@ -115,7 +115,10 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl parcelListVOS = DistributionParcelListWrapper.build().listVO(parcelListEntityList); parcelListVOS.forEach(p -> { //查询扫描表, - DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.query().lambda().eq(DistributionLoadscanEntity::getPackageId, p.getId()).eq(DistributionLoadscanEntity::getOrderPackageCode, p.getOrderPackageCode())); + DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.query().lambda() + .eq(DistributionLoadscanEntity::getPackageId, p.getId()) + .eq(DistributionLoadscanEntity::getOrderPackageCode, p.getOrderPackageCode()) + ); if (Func.isNotEmpty(loadscanEntity)) { try { p.setLoadingTime(loadscanEntity.getScanTime()); 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 734e97833..15ffbd2cf 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 @@ -1532,6 +1532,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl distributionParcelListEntities = distributionParcelListService.list(Wrappers.query().lambda().eq(DistributionParcelListEntity::getStockArticleId, distributionStockArticleDTO.getId()) .ne(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.yizhuangche.getValue()) .ne(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.yiyueyue.getValue()) + .eq(DistributionParcelListEntity::getConditions, 1) .notIn(DistributionParcelListEntity::getOrderPackageStatus, new String[]{OrderPackageStatusConstant.yichuku.getValue(), OrderPackageStatusConstant.yiqianshou.getValue()})); distributionParcelListEntities.forEach(dp -> { if (!dp.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) { 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 415ed3bd2..a924d9976 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 @@ -2073,6 +2073,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())); + boolean flag = parcelListEntities.stream().anyMatch(p -> OrderPackageStatusConstant.yiqianshou.getValue().equals(p.getOrderPackageStatus())); if (flag) { log.error("########缺失参数,barcodes:{}", distrilbutionloadingscanDTO.getBarcodes()); return R.fail("存在已签收包件!!"); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index 39df06f51..b54c510cd 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -1989,7 +1989,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl myWarehouseList = warehouseClient.getMyWatchWarehouse(); + List myWarehouseList = warehouseClient.getMyWarehouseList(); List collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); if (collect.size() > 1) {