Browse Source

Merge remote-tracking branch 'origin/dev' into dev

pull/30/head
pref_mail@163.com 12 months ago
parent
commit
fe16b82e5e
  1. 17
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  2. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml

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

@ -5320,6 +5320,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
Map<Long, List<DistributionLoadscanEntity>> loadingMap = null;
Map<Long, List<DistributionReservationZeroPackageEntity>> reservationMap = null;
if (!loadscanEntityList.isEmpty()){
loadingNumber = signforEntity.getLoadedNumber() - loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum();
signingNumber = signforEntity.getReceivedQuantity() - loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getReceivedQuantity).sum();
loadingMap = loadscanEntityList.stream().collect(Collectors.groupingBy(DistributionLoadscanEntity::getPackageId));
}
//查询对应的计划品类
@ -5330,6 +5332,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (!reservationZeroPackageEntity.isEmpty()){
reservationMap = reservationZeroPackageEntity.stream().collect(Collectors.groupingBy(DistributionReservationZeroPackageEntity::getParcelListId));
}
int sum = parcelNumberDTOS.stream().mapToInt(DistributionParcelNumberDTO::getSigningNum).sum();
for (DistributionParcelNumberDTO parcelNumberDTO : parcelNumberDTOS) {
List<DistributionReservationZeroPackageEntity> zeroPackageEntities = reservationMap.get(parcelNumberDTO.getParcelListId());
DistributionParcelNumberEntity distributionParcelNumberEntity = distributionParcelNumberService.getOne(Wrappers.<DistributionParcelNumberEntity>query().lambda()
@ -5354,15 +5358,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (parcelNumberDTO.getSigningNum() > distributionReservationZeroPackageEntity.getQuantity()){
log.info("#############零担签收超过计划数量ParcelListId:{},计划:{}录入,:{}",parcelNumberDTO.getParcelListId(),distributionReservationZeroPackageEntity.getQuantity(),parcelNumberDTO.getSigningNum());
}
int i1 =parcelNumberDTO.getSigningNum() - distributionLoadscanEntity.getReceivedQuantity() ;
signingNumber += i1;
int i2 = parcelNumberDTO.getSigningNum() -distributionLoadscanEntity.getLoadedNub() ;
loadingNumber += i2;
if (distributionLoadscanEntity.getLoadedNub() < parcelNumberDTO.getSigningNum()){
//将装车和签收进行统一数量
distributionLoadscanEntity.setLoadedNub(parcelNumberDTO.getSigningNum());
distributionLoadscanEntity.setPackageNub(parcelNumberDTO.getSigningNum());
}
deliveryNumber = distributionParcelNumberEntity.getDeliveryQuantity() + distributionLoadscanEntity.getReceivedQuantity() - parcelNumberDTO.getSigningNum();
handQuantity = distributionParcelNumberEntity.getHandQuantity() + distributionLoadscanEntity.getReceivedQuantity() - parcelNumberDTO.getSigningNum();
outboundQuantity = distributionParcelNumberEntity.getOutboundQuantity() - distributionLoadscanEntity.getReceivedQuantity() + parcelNumberDTO.getSigningNum();
@ -5373,8 +5374,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
distributionLoadscanEntity.setScanTime(simpleDateFormat.format(new Date()));
distributionLoadscanEntity.setSigningUser(user.getNickName());
loadingNumber += distributionLoadscanEntity.getLoadedNub();
signingNumber += distributionLoadscanEntity.getReceivedQuantity();
//进行签收数量的统计
int i = signforEntity.getReceivedQuantity() - distributionLoadscanEntity.getReceivedQuantity() + parcelNumberDTO.getSigningNum();
distributionLoadscanService.updateById(distributionLoadscanEntity);
}else {
log.info("#############零担签收存在多个装车记录ParcelListId:{}",parcelNumberDTO.getParcelListId());
@ -5429,7 +5431,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
handQuantity = distributionParcelNumberEntity.getHandQuantity() - parcelNumberDTO.getSigningNum();
outboundQuantity = distributionParcelNumberEntity.getOutboundQuantity() + parcelNumberDTO.getSigningNum();
signinQuantity = distributionParcelNumberEntity.getSigninQuantity() + parcelNumberDTO.getSigningNum();
}
//维护订单
if (outboundQuantity == distributionParcelNumberEntity.getQuantity()){
@ -5456,8 +5457,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
}
}
signforEntity.setLoadedNumber(signforEntity.getLoadedNumber() + loadingNumber);
signforEntity.setReceivedQuantity(signforEntity.getReceivedQuantity() + signingNumber);
signforEntity.setLoadedNumber( loadingNumber);
signforEntity.setReceivedQuantity( signingNumber);
distributionSignforMapper.updateById(signforEntity);
if (!packageLockIds.isEmpty()) {
List<Long> a = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + "trainNumber:" + deliveryListEntity.getTrainNumber() + "orderPackageCode:");

2
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml

@ -89,6 +89,7 @@
sum(if(t.is_abnormal_loading = 1, 0, 1)) exLoadedNum,
sum(if(t.is_abnormal_signing = 1, 0, 1)) exReNum
from logpm_distribution_loadscan t
where t.scan_status != 1
group by t.delivery_id) loadScan on loadScan.delivery_id = d.id
left join (select t.delivery_id,
@ -215,6 +216,7 @@
sum(if(t.is_abnormal_loading = 1, 0, 1)) exLoadedNum,
sum(if(t.is_abnormal_signing = 1, 0, 1)) exReNum
from logpm_distribution_loadscan t
where t.scan_status != 1
group by t.delivery_id) loadScan on loadScan.delivery_id = lddl.id
left join (select t.delivery_id,

Loading…
Cancel
Save