Browse Source

Merge pull request 'dev' (#18) from dev into pre-production

Reviewed-on: #18
master
zhaoqiaobo 10 months ago
parent
commit
4132a092cd
  1. 54
      blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java
  2. 1
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionBillOrderPackVO.java
  3. 7
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java
  4. 44
      blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/enums/NodeEnums.java
  5. 40
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleOweDTO.java
  6. 40
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  7. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
  8. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  9. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  10. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  11. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  12. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

54
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;
}
}

1
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; //提货状态

7
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;
/**
* 创建时间
*/

44
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;

40
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<Long> warehouseIdList;
}

40
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
<where>
ldsa.order_status in ('70','80')
<if test="param.waybillNumber != null and param.waybillNumber != ''">
@ -1246,19 +1249,19 @@
</if>
<if test="param.warehouseIdList != null and param.warehouseId != ''">
AND ldsa.warehouse_id IN
<foreach collection="param.warehouseIdList" item="item" index="index" open="AND ldsa.warehouse_id in (" close=")" separator=",">
<foreach collection="param.warehouseIdList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="param.orderCodeNumList != null and param.orderCodeNumList != ''">
AND ldsa.order_code in
<foreach collection="param.orderCodeNumList" item="item" index="index" open="AND ldsa.warehouse_id in (" close=")" separator=",">
<foreach collection="param.orderCodeNumList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="param.waybillNumList != null and param.waybillNumList != ''">
AND ldsa.waybill_number in
<foreach collection="param.waybillNumList" item="item" index="index" open="AND ldsa.warehouse_id in (" close=")" separator=",">
<foreach collection="param.waybillNumList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
@ -1277,10 +1280,27 @@
<if test=" param.earliestWarehouseEntryTime != null ">and DATE(k.earliestWarehouseEntryTime) =
#{param.earliestWarehouseEntryTime}
</if>
<!-- <if test=" param.warehouseEntryTimeEnd != null ">and DATE(ldsa.warehouse_entry_time) =-->
<!-- #{param.warehouseEntryTimeEnd}-->
<!-- </if>-->
<if test=" param.scanSigningTime != null ">and DATE(j.scanSigningTime) =
#{param.scanSigningTime}
</if>
<if test=" param.warehouseEntryTimeStart != null ">and DATE(k.earliestWarehouseEntryTime) &gt;
#{param.warehouseEntryTimeStart}
</if>
<if test=" param.warehouseEntryTimeEnd != null ">and DATE(k.earliestWarehouseEntryTime) &lt;
#{param.warehouseEntryTimeEnd}
</if>
<if test=" param.signingTimeStart != null ">and DATE(m.signing_time) &gt;
#{param.signingTimeStart}
</if>
<if test=" param.signingTimeEnd != null ">and DATE(m.signing_time) &lt;
#{param.signingTimeEnd}
</if>
<if test=" param.scanSigningTimeStart != null ">and DATE(j.scanSigningTime) &gt;
#{param.scanSigningTimeStart}
</if>
<if test=" param.scanSigningTimeEnd != null ">and DATE(j.scanSigningTime) &lt;
#{param.scanSigningTimeEnd}
</if>
</where>
GROUP BY
ldsa.id

7
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,

2
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));

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java

@ -115,7 +115,10 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
List<DistributionParcelListVO> parcelListVOS = DistributionParcelListWrapper.build().listVO(parcelListEntityList);
parcelListVOS.forEach(p -> {
//查询扫描表,
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getPackageId, p.getId()).eq(DistributionLoadscanEntity::getOrderPackageCode, p.getOrderPackageCode()));
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getPackageId, p.getId())
.eq(DistributionLoadscanEntity::getOrderPackageCode, p.getOrderPackageCode())
);
if (Func.isNotEmpty(loadscanEntity)) {
try {
p.setLoadingTime(loadscanEntity.getScanTime());

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -1532,6 +1532,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>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())) {

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -2073,6 +2073,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (Func.isEmpty(parcelListEntity)) {
return Resp.scanFail("系统无编码", "系统无编码");
}
if (parcelListEntity.equals(OrderPackageStatusConstant.yiqianshou.getValue())){
return Resp.scanFail("包件已签收", "包件已签收");
}
DistributionReservationEntity distributionReservationEntity = distributionReservationMapper.selectById(distrilbutionloadingscanDTO.getReservationId());
if (Func.isEmpty(distributionReservationEntity)) {
log.error("########无效的预约单,reservationId:{}", distrilbutionloadingscanDTO.getReservationId());
@ -2303,7 +2306,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.eq(DistributionParcelListEntity::getWarehouseId, myCurrentWarehouse.getId())
);
if (Func.isNotEmpty(parcelListEntities)) {
boolean flag = parcelListEntities.stream().anyMatch(p -> 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("存在已签收包件!!");

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -1989,7 +1989,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
// if(Func.isNotEmpty(stockArticleEntity.getReservation())){
// stockArticleEntity.setReservationStatus("10");
// }
List<BasicdataWarehouseEntity> myWarehouseList = warehouseClient.getMyWatchWarehouse();
List<BasicdataWarehouseEntity> myWarehouseList = warehouseClient.getMyWarehouseList();
List<Long> collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
if (collect.size() > 1) {

Loading…
Cancel
Save