Browse Source

代码提交

dist.1.3.0
汤建军 5 months ago
parent
commit
e02c20922e
  1. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  2. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationPackageServiceImpl.java
  3. 29
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -77,7 +77,7 @@
SET ldrzp.quantity = ( ldrzp.quantity - #{retentionQuantity})
WHERE
ldrzp.zero_package_status != 2
AND #{retentionQuantity} !=0
AND #{retentionQuantity} != 0
AND ldrzp.reservation_id = #{reservationId}
AND parcel_list_id = #{orderPackageId}
</update>
@ -86,9 +86,9 @@
id=#{orderPackageId} and is_deleted = 0
</update>
<update id="updatePackageDeliveryStatus">
UPDATE logpm_distribution_reservation_package SET packet_bar_status = 2 ,cancel_status = 1
UPDATE logpm_distribution_reservation_package SET packet_bar_status = 2 ,cancel_status = 1,cancel_remark = '差异数据'
WHERE
reservation_id = #{reservationId} and parce_list_id in
reservation_id = #{reservationId} AND is_deleted = 0 AND parce_list_id in
<foreach collection="packageIds" item="id" open="(" close=")" separator=",">
#{id}
</foreach>

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

@ -182,7 +182,6 @@ public class DistributionReservationPackageServiceImpl extends BaseServiceImpl<D
//执行计划的包件取消
List<JSONObject> aaa = new ArrayList<>();
DistributionReservationPackageEntity distributionReservationPackageEntity = packageEntityList.get(0);
distributionReservationPackageEntity.setCancelStatus(1);
distributionReservationPackageEntity.setCancelRemark(AuthUtil.getNickName()+"进行配车计划取消订制品");
distributionReservationPackageEntity.setPacketBarStatus(ReservationPackageStatusConstant.quxiao.getValue());
this.updateById(distributionReservationPackageEntity);

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

@ -6078,17 +6078,16 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error("##########配送计划异常:{}", deliveryListEntity);
return Resp.scanFail("服务器正忙...", "服务器正忙");
}
Integer loadingNumber = 0;
Integer signingNumber = 0;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
// DistributionDeliverySelfEntity finalDistributionDeliverySelfEntity = distributionDeliverySelfEntity;
List<String> orderCodes = new ArrayList<>();
BladeUser user = AuthUtil.getUser();
DistributionSignforEntity signforEntity = distributionSignforMapper.selectOne(Wrappers.<DistributionSignforEntity>query().lambda()
.eq(DistributionSignforEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())
.eq(DistributionSignforEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()));
//查询零担装车
Integer loadedNumber = signforEntity.getLoadedNumber();
Integer receivedQuantity = signforEntity.getReceivedQuantity();
if (!parcelNumberDTOS.isEmpty()) {
List<Long> packageIds = parcelNumberDTOS.stream().map(DistributionParcelNumberDTO::getParcelListId).collect(Collectors.toList());
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
@ -6099,9 +6098,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
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();
int sum1 = loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum();
int sum2 = loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getReceivedQuantity).sum();
loadedNumber = loadedNumber - sum1;
receivedQuantity = receivedQuantity - sum2;
loadingMap = loadscanEntityList.stream().collect(Collectors.groupingBy(DistributionLoadscanEntity::getPackageId));
}
//查询对应的计划品类
@ -6112,7 +6114,6 @@ 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();
List<JSONObject> jsonObjects = new ArrayList<>();
for (DistributionParcelNumberDTO parcelNumberDTO : parcelNumberDTOS) {
List<DistributionReservationZeroPackageEntity> zeroPackageEntities = reservationMap.get(parcelNumberDTO.getParcelListId());
@ -6160,8 +6161,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getValue());
distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscanEntity.setSigningUser(user.getNickName());
loadingNumber += distributionLoadscanEntity.getLoadedNub() + signforEntity.getLoadedNumber();
signingNumber += distributionLoadscanEntity.getReceivedQuantity() + signforEntity.getReceivedQuantity();
loadedNumber += parcelNumberDTO.getSigningNum() ;
receivedQuantity += parcelNumberDTO.getSigningNum() ;
//进行签收数量的统计
distributionLoadscanService.updateById(distributionLoadscanEntity);
JSONObject jsonObject = new JSONObject();
@ -6218,8 +6219,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setOneQclick(2);
loadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscanService.save(loadscanEntity);
loadingNumber += loadscanEntity.getLoadedNub();
signingNumber += loadscanEntity.getReceivedQuantity();
loadedNumber += loadscanEntity.getLoadedNub();
receivedQuantity += loadscanEntity.getReceivedQuantity();
//维护零担品类信息
deliveryNumber = distributionParcelNumberEntity.getDeliveryQuantity() - parcelNumberDTO.getSigningNum();
handQuantity = distributionParcelNumberEntity.getHandQuantity() - parcelNumberDTO.getSigningNum();
@ -6242,7 +6243,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (handQuantity == 0) {
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
}
if (signingNumber.equals(distributionParcelNumberEntity.getQuantity())) {
if (receivedQuantity.equals(distributionParcelNumberEntity.getQuantity())) {
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
}
distributionParcelListService.updateById(parcelListEntity);
@ -6259,8 +6260,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
}
}
signforEntity.setLoadedNumber(loadingNumber);
signforEntity.setReceivedQuantity(signingNumber);
signforEntity.setLoadedNumber(loadedNumber);
signforEntity.setReceivedQuantity(receivedQuantity);
distributionSignforMapper.updateById(signforEntity);
if (!packageLockIds.isEmpty()) {
List<Long> a = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + "trainNumber:" + deliveryListEntity.getTrainNumber() + "orderPackageCode:");

Loading…
Cancel
Save