Browse Source

自提修改计划备货任务未改变BUG修复。自提推送老系统、异常签收拦截

dist.1.3.0
汤建军 8 months ago
parent
commit
9ab238ade9
  1. 61
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  2. 23
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

61
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -527,11 +527,12 @@
) trays ,
(select COUNT(DISTINCT id)
from logpm_distrilbution_bill_stock
where bill_lading_id = ldsi.reservation_id and order_status in (1,2) ) orderNum,
where bill_lading_id = ldsi.reservation_id and order_status in (1,3) ) orderNum,
(
select COUNT(DISTINCT ldbs.id)
from logpm_distrilbution_bill_package ldbs
where ldbs.bill_lading_id = ldsi.reservation_id
AND ldbs.packet_bar_status IN (1,3)
) planNum,
(
select SUM(lddd.quantity)
@ -724,35 +725,39 @@
<select id="selectStockupClientInfoSelf" resultType="com.logpm.distribution.vo.DistributionStockupListVO">
select DISTINCT ldbs.bill_lading_id reservationId, GROUP_CONCAT(DISTINCT ldsa.mall_name SEPARATOR ',') customer,
(
select count(id)
from logpm_distrilbution_bill_stock
where bill_lading_id = ldsi.reservation_id
) orderNum,
SELECT DISTINCT
ldbs.bill_lading_id reservationId,
GROUP_CONCAT( DISTINCT ldsa.mall_name SEPARATOR ',' ) customer,
( SELECT count( id ) FROM logpm_distrilbution_bill_stock WHERE bill_lading_id = ldsi.reservation_id AND order_status IN ( 1, 3 ) ) orderNum,
(
select count(ldpl.id)
from logpm_distrilbution_bill_stock ldbs
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.stock_article_id =ldbs.stock_article_id
where ldbs.bill_lading_id = ldsi.reservation_id
SELECT
IFNULL( sum( ldbl.packet_number ), 0 )
FROM
logpm_distrilbution_bill_package ldbl
WHERE
ldbl.bill_lading_id = ldsi.reservation_id
AND ldbl.packet_bar_status IN ( 1, 3 )
) + (
SELECT
IFNULL( sum( ldrzp.quantity ), 0 )
FROM
logpm_distribution_reservation_zero_package AS ldrzp
WHERE
ldrzp.reservation_id = ldsi.reservation_id
AND ldrzp.type = 3
AND ldrzp.zero_package_status IN ( 1, 3 )
) planNum,
(
select COUNT(id)
from logpm_distribution_stock
where bill_lading_id = ldbs.bill_lading_id
) stockupNum,lds.stockup_status stockupStatus ,lds.type_service typeService,
(
SELECT sum(lddd.quantity)
from logpm_distribution_delivery_details lddd
where lddd.bill_lading_id = ldsi.reservation_id
) inventoryNub,
GROUP_CONCAT(DISTINCT ldsa.mall_name) mallName
from logpm_distribution_stockup lds
LEFT JOIN logpm_distribution_stockup_info ldsi on lds.id = ldsi.stockup_id
LEFT JOIN logpm_distrilbution_bill_stock ldbs on ldsi.reservation_id = ldbs.bill_lading_id
LEFT JOIN logpm_distribution_stock_article ldsa on ldsa.id = ldbs.stock_article_id
LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id
( SELECT COUNT( id ) FROM logpm_distribution_stock WHERE bill_lading_id = ldbs.bill_lading_id ) stockupNum,
lds.stockup_status stockupStatus,
lds.type_service typeService,
( SELECT IFNULL( sum( lddd.quantity ), 0 ) FROM logpm_distribution_delivery_details lddd WHERE lddd.bill_lading_id = ldsi.reservation_id ) inventoryNub,
GROUP_CONCAT( DISTINCT ldsa.mall_name ) mallName
FROM
logpm_distribution_stockup lds
LEFT JOIN logpm_distribution_stockup_info ldsi ON lds.id = ldsi.stockup_id
LEFT JOIN logpm_distrilbution_bill_stock ldbs ON ldsi.reservation_id = ldbs.bill_lading_id
LEFT JOIN logpm_distribution_stock_article ldsa ON ldsa.id = ldbs.stock_article_id
LEFT JOIN logpm_distribution_parcel_list ldpl ON ldsa.id = ldpl.stock_article_id
<where>
lds.id = #{param.stockupId}
</where>

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

@ -2423,20 +2423,35 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.eq(DisStockListDetailEntity::getStockPackageCode, distrilbutionloadingscanDTO.getBarcode())
.ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
//查询当前客户的所有异常情况
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode())
.eq(DistributionLoadscanAbnormalEntity::getAuditingStatus, 1)
// .eq(DistributionLoadscanAbnormalEntity::getAuditingStatus, 1)
//修改 状态
);
if (!abnormalEntities.isEmpty()) {
boolean flag = abnormalEntities.stream().allMatch(a -> deliveryListEntity.getId().equals(a.getDeliveryListId()) );
//判断此包件的异常是否是当前扫描车次和客户
//首先判断存在异常是否不属于当前车次和客户
boolean flag = abnormalEntities.stream().allMatch(a -> !deliveryListEntity.getId().equals(a.getDeliveryListId()) && !distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId()));
if (flag){
return Resp.scanFail("包件已存在异常", "包件已存在异常");
}
//该异常属于其他车次
String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(","));
log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),collect);
return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常");
}
//判断具体的装车信息
// boolean flag = abnormalEntities.stream().filter(f->f.getAuditingStatus() == 1).allMatch(a -> deliveryListEntity.getId().equals(a.getDeliveryListId()) && distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId()));
// if (flag){
// //存在异常 进行异常签收还是异常装车区分
// return Resp.scanFail("包件已存在异常", "包件已存在异常");
// }
// String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(","));
// log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),collect);
// return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常");
}
if (Func.isNotEmpty(list)) {
//满足条件此码必定为库存品
//判断该库存品是否属于当前客户

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

@ -1412,9 +1412,11 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
signPushDataUnitDTO.setSignUserName(user.getName());
if (ObjectUtils.isNotEmpty(user.getPhone())){
signPushDataUnitDTO.setSignUserPhone(user.getPhone());
signPushDataUnitDTO.setPhone(user.getPhone());
}else {
if (ObjectUtils.isNotEmpty(user.getAccount())){
signPushDataUnitDTO.setSignUserPhone(user.getAccount());
signPushDataUnitDTO.setPhone(user.getPhone());
}else {
log.info("用户无电话号码且账号信息为空>>用户名称:{}",user.getName());
}

Loading…
Cancel
Save