Browse Source

已签收订单增加区间时间段搜索、预约新增订单拦截转库存品包件的添加、签收扫描接口拦截已签收订单进行签收

pull/18/head
汤建军 1 year ago
parent
commit
377241c7f4
  1. 1
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionBillOrderPackVO.java
  2. 7
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java
  3. 40
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleOweDTO.java
  4. 40
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  5. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
  6. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  7. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  8. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  9. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

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

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,

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