Browse Source

优化签收代码 和配送车次状态变更

fix-sign
pref_mail@163.com 3 months ago
parent
commit
3158426c46
  1. 15
      blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  3. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  4. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  5. 22
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  6. 88
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

15
blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java

@ -173,13 +173,13 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
if (signListByWaybillNumber != null && !signListByWaybillNumber.isEmpty()) { if (signListByWaybillNumber != null && !signListByWaybillNumber.isEmpty()) {
//统计装车数量load_num //统计装车数量load_num
int loadNum = signListByWaybillNumber.stream().mapToInt(QualityDeliverEntity::getLoadNum).sum(); int loadNum = signListByWaybillNumber.stream().filter(e -> e.getLoadNum() !=null).mapToInt(QualityDeliverEntity::getLoadNum).sum();
// 计划配送数 plan_num // 计划配送数 plan_num
int planNum = signListByWaybillNumber.stream().mapToInt(QualityDeliverEntity::getPlanNum).sum(); int planNum = signListByWaybillNumber.stream().filter(e-> e.getPlanNum()!=null).mapToInt(QualityDeliverEntity::getPlanNum).sum();
// 计算签收数量sign_num // 计算签收数量sign_num
int signNum = signListByWaybillNumber.stream().mapToInt(QualityDeliverEntity::getSignNum).sum(); int signNum = signListByWaybillNumber.stream().filter(e-> e.getSignNum()!=null).mapToInt(QualityDeliverEntity::getSignNum).sum();
// 配送装车 // 配送装车
QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.get(0); QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.get(0);
@ -214,6 +214,8 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
} }
//对nodeInfoVOList集合中的作业时间 按照 时间倒序排序
nodeInfoVOList.sort(Comparator.comparing(NodeInfoVO::getOperateTime).reversed());
result.setNodeInfoVOList(nodeInfoVOList); result.setNodeInfoVOList(nodeInfoVOList);
// 配送签收 // 配送签收
@ -372,6 +374,13 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
} }
//对nodeInfoVOList集合中的作业时间 按照 时间倒序排序
nodeInfoVOList.sort(Comparator.comparing(NodeInfoVO::getOperateTime).reversed());
result.setNodeInfoVOList(nodeInfoVOList); result.setNodeInfoVOList(nodeInfoVOList);
// 配送签收 // 配送签收

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java

@ -495,4 +495,6 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return * @return
*/ */
Integer loadingNum(@Param("reservationId")Long reservationId); Integer loadingNum(@Param("reservationId")Long reservationId);
void updateSignfor(@Param("deliveryId") Long deliveryId, @Param("reservationId") Long reservationId, @Param("nub") Integer packageNub, @Param("user") BladeUser user);
} }

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -133,6 +133,17 @@
) )
WHERE WHERE
lds.reservation_id = #{reservationId} lds.reservation_id = #{reservationId}
</update>
<update id="updateSignfor">
UPDATE logpm_distribution_signfor SET
signee_name = #{user.nickName},
signee_id = #{user.userId},
received_quantity = ( received_quantity + #{nub} )
WHERE
is_deleted =0 and delivery_id = #{deliveryId} and reservation_id = #{reservationId}
</update> </update>
<delete id="deleteByReservationAndDeliveryId"> <delete id="deleteByReservationAndDeliveryId">
DELETE FROM logpm_distribution_signfor DELETE FROM logpm_distribution_signfor

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -10641,7 +10641,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
* 保存对配送清单实体所做的所有更新确保数据的一致性和准确性 * 保存对配送清单实体所做的所有更新确保数据的一致性和准确性
* @param deliveryListEntity 配送清单实体包含所有需要更新的信息 * @param deliveryListEntity 配送清单实体包含所有需要更新的信息
*/ */
updateDeliveryListEntity(deliveryListEntity, old); // updateDeliveryListEntity(deliveryListEntity, old);
} }
private int getDeliveryQuantity(DistributionDeliveryListEntity deliveryListEntity) { private int getDeliveryQuantity(DistributionDeliveryListEntity deliveryListEntity) {
@ -10677,6 +10677,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (deliveryListEntity.getDeliveryStatus().equals(DeliveryStatusConstant.yiwancheng.getValue())) { if (deliveryListEntity.getDeliveryStatus().equals(DeliveryStatusConstant.yiwancheng.getValue())) {
handleDeliveryLog(deliveryListEntity, AuthUtil.getUser()); handleDeliveryLog(deliveryListEntity, AuthUtil.getUser());
} }
DistributionDeliveryListEntity update = new DistributionDeliveryListEntity();
update.setId(deliveryListEntity.getId());
update.setDeliveryListLoadingStatus(deliveryListEntity.getDeliveryListLoadingStatus());
update.setDeliveryStatus(deliveryListEntity.getDeliveryStatus());
this.updateById(update);
} }
@ -10751,8 +10758,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
updateById(deliveryListEntity); updateById(deliveryListEntity);
log.info("配送信息状态已更新,deliveryId: {}", deliveryListEntity.getId()); log.info("配送信息状态已更新,deliveryId: {}", deliveryListEntity.getId());
Boolean b1=DeliveryStatusConstant.yiwancheng.getValue().equals(deliveryListEntity.getDeliveryStatus()); // Boolean b1=DeliveryStatusConstant.yiwancheng.getValue().equals(deliveryListEntity.getDeliveryStatus());
Boolean b2 =deliveryListEntity.getScannedNumber().equals(0); // Boolean b2 =deliveryListEntity.getScannedNumber().equals(0);
// 推送给配送被取消的的作业节点 // 推送给配送被取消的的作业节点
// if (b1&& b2) { // if (b1&& b2) {
// // 发送配送取消的消息完成消息 // // 发送配送取消的消息完成消息

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

@ -3876,6 +3876,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
throw new RuntimeException("服务器正忙!!!"); throw new RuntimeException("服务器正忙!!!");
} }
DistributionReservationEntity reservationEntity = this.getById(reservationId); DistributionReservationEntity reservationEntity = this.getById(reservationId);
DistributionReservationEntity updateEntity = new DistributionReservationEntity();
updateEntity.setId(reservationEntity.getId());
//已签收预约单不需要进行预约状态维护 预约单状态达到最终 //已签收预约单不需要进行预约状态维护 预约单状态达到最终
if (!ReservationSigningStatusConstant.yiqianshou.getValue().equals(reservationEntity.getSigningStatus())) { if (!ReservationSigningStatusConstant.yiqianshou.getValue().equals(reservationEntity.getSigningStatus())) {
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationId); List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationId);
@ -3894,16 +3896,16 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
} }
if (loadStatus) { if (loadStatus) {
reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue()); updateEntity.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue());
} else { } else {
//判断是否都为完成装车 //判断是否都为完成装车
Integer loadingNum = distributionLoadscanMapper.selectLoadingNumByReservationId(reservationId); Integer loadingNum = distributionLoadscanMapper.selectLoadingNumByReservationId(reservationId);
if (Func.isEmpty(loadingNum)) { if (Func.isEmpty(loadingNum)) {
if (loadingNum > 0) { if (loadingNum > 0) {
reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.bufenzhuangche.getValue()); updateEntity.setLoadingStatus(ReservationLoadingStatusConstant.bufenzhuangche.getValue());
} }
if (loadingNum == 0) { if (loadingNum == 0) {
reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getValue()); updateEntity.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getValue());
} }
} }
} }
@ -3912,28 +3914,28 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
Integer signingNum = distributionLoadscanMapper.selectSigningNumByReservationId(reservationId); Integer signingNum = distributionLoadscanMapper.selectSigningNumByReservationId(reservationId);
//判断当前客户是否签收完成了 //判断当前客户是否签收完成了
if (signingNum > 0) { if (signingNum > 0) {
reservationEntity.setSigningStatus(ReservationSigningStatusConstant.bufenqianshou.getValue()); updateEntity.setSigningStatus(ReservationSigningStatusConstant.bufenqianshou.getValue());
} }
if (signingNum == 0) { if (signingNum == 0) {
reservationEntity.setSigningStatus(ReservationSigningStatusConstant.daiqianshou.getValue()); updateEntity.setSigningStatus(ReservationSigningStatusConstant.daiqianshou.getValue());
} }
if (stockUpStatus) { if (stockUpStatus) {
reservationEntity.setStockStatus(ReservationStockupStatusConstant.yibeihuo.getValue()); updateEntity.setStockStatus(ReservationStockupStatusConstant.yibeihuo.getValue());
} else { } else {
//判断是否都为完成签收 //判断是否都为完成签收
Integer stockNum = distributionStockMapper.selectStockNumByReservationId(reservationId); Integer stockNum = distributionStockMapper.selectStockNumByReservationId(reservationId);
//判断当前客户是否签收完成了 //判断当前客户是否签收完成了
if (stockNum > 0) { if (stockNum > 0) {
reservationEntity.setStockStatus(ReservationStockupStatusConstant.daibeihuo.getValue()); updateEntity.setStockStatus(ReservationStockupStatusConstant.daibeihuo.getValue());
} else { } else {
reservationEntity.setStockStatus(ReservationStockupStatusConstant.weibeihuo.getValue()); updateEntity.setStockStatus(ReservationStockupStatusConstant.weibeihuo.getValue());
} }
} }
if ((reservationEntity.getReservationNum() + reservationEntity.getReservationStockListNum()) == 0) { if ((reservationEntity.getReservationNum() + reservationEntity.getReservationStockListNum()) == 0) {
reservationEntity.setReservationStatus(ReservationStatusConstant.yiquexiao.getValue()); updateEntity.setReservationStatus(ReservationStatusConstant.yiquexiao.getValue());
} }
this.updateById(reservationEntity); this.updateById(updateEntity);
} }
} }

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

@ -4377,10 +4377,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
packageLockIds.add(loadscaninvnEntity.getInventoryPackageId()); packageLockIds.add(loadscaninvnEntity.getInventoryPackageId());
distributionLoadscaninvnService.updateById(loadscaninvnEntity); distributionLoadscaninvnService.updateById(loadscaninvnEntity);
pushList.add(loadscaninvnEntity); pushList.add(loadscaninvnEntity);
//维护签收数量 // //维护签收数量
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub()); // Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
//更新签收人 // //更新签收人
Integer i = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), user); // Integer i = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), user);
updataSignforeExtracted(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub(), user);
} else { } else {
//库存品未进行装车 //库存品未进行装车
//这里装车的数据需要进行补录 //这里装车的数据需要进行补录
@ -5200,9 +5202,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscaninvnService.updateById(loadscaninvnEntity); distributionLoadscaninvnService.updateById(loadscaninvnEntity);
distributionLoadscaninvnEntityLists.add(loadscaninvnEntity); distributionLoadscaninvnEntityLists.add(loadscaninvnEntity);
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId()); Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub()); // Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
//更新签收人 // //更新签收人
Integer m = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), AuthUtil.getUser()); // Integer m = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), AuthUtil.getUser());
//
updataSignforeExtracted(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub(), user);
distributionAsyncService.checkSignStatus(null, loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getDeliveryId()); distributionAsyncService.checkSignStatus(null, loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getDeliveryId());
} }
} else { } else {
@ -5732,9 +5737,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum()); loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date())); loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscaninvnService.updateById(loadscaninvnEntity); distributionLoadscaninvnService.updateById(loadscaninvnEntity);
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub()); // Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
//更新签收人 // //更新签收人
Integer m = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), AuthUtil.getUser()); // Integer m = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), AuthUtil.getUser());
updataSignforeExtracted(loadscaninvnEntity.getDeliveryId(),loadscaninvnEntity.getReservationId(),loadscaninvnEntity.getPackageNub(),user);
packageLockIds.add(loadscaninvnEntity.getInventoryPackageId()); packageLockIds.add(loadscaninvnEntity.getInventoryPackageId());
distributionLoadscaninvnEntityLists.add(loadscaninvnEntity); distributionLoadscaninvnEntityLists.add(loadscaninvnEntity);
} }
@ -8043,10 +8049,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
Integer type = distrilbutionloadingscanDTO.getType(); Integer type = distrilbutionloadingscanDTO.getType();
String barcode = ""; String barcode = "";
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.getById(deliveryId); DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.getById(deliveryId);
if (Objects.isNull(deliveryListEntity)) { if (Objects.isNull(deliveryListEntity)) {
log.error(method + "查询配送信息错误,deliveryId:{}", deliveryId); log.error(method + "查询配送信息错误,deliveryId:{}", deliveryId);
return Resp.scanFail("查询配送信息错误,请联系管理员", "查询配送信息错误,请联系管理员"); return Resp.scanFail("查询配送信息错误,请联系管理员", "查询配送信息错误,请联系管理员");
} }
DistributionDeliveryListEntity updateDeliveryListEntity =new DistributionDeliveryListEntity();
updateDeliveryListEntity.setId(deliveryListEntity.getId());
if (DeliveryStatusConstant.yiwancheng.getValue().equals(deliveryListEntity.getDeliveryStatus())) { if (DeliveryStatusConstant.yiwancheng.getValue().equals(deliveryListEntity.getDeliveryStatus())) {
log.error(method + "当前配送已完成,deliveryId:{}", deliveryId); log.error(method + "当前配送已完成,deliveryId:{}", deliveryId);
return Resp.scanFail("当前配送已完成", "当前配送已完成"); return Resp.scanFail("当前配送已完成", "当前配送已完成");
@ -8143,10 +8152,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity = updateSignDistributionLoadscanEntity(loadscanEntity, user, parcelListEntity); distributionLoadscanEntity = updateSignDistributionLoadscanEntity(loadscanEntity, user, parcelListEntity);
distributionLoadscanService.updateById(distributionLoadscanEntity); distributionLoadscanService.updateById(distributionLoadscanEntity);
//缺少一个异步维护包件签收的方法 updataSignforeExtracted(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub(), user);
distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
//更新签收人
distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), user);
//维护订单状态 //维护订单状态
String content = "包件在" + myCurrentWarehouse.getName() + "由" + distributionLoadscanEntity.getSigningUser() + "扫描签收,装车方式:扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode(); String content = "包件在" + myCurrentWarehouse.getName() + "由" + distributionLoadscanEntity.getSigningUser() + "扫描签收,装车方式:扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd()); JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd());
@ -8164,10 +8172,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanService.save(distributionLoadscanEntity); distributionLoadscanService.save(distributionLoadscanEntity);
//进行签收数量的修改 //进行签收数量的修改
distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新装车包件数和签收包件数 // //更新装车包件数和签收包件数
distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); // distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
//更新签收人 // //更新签收人
distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser()); // distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser());
updataSignforeExtracted(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub(), user);
String content = "包件在" + myCurrentWarehouse.getName() + "由" + distributionLoadscanEntity.getSigningUser() + "扫描签收,装车方式:补录装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode(); String content = "包件在" + myCurrentWarehouse.getName() + "由" + distributionLoadscanEntity.getSigningUser() + "扫描签收,装车方式:补录装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd()); JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd());
aaa.add(trunklinePackageTrackLog); aaa.add(trunklinePackageTrackLog);
@ -8182,9 +8193,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes, warehouseId, remark); warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes, warehouseId, remark);
pushList.add(distributionLoadscanEntity); pushList.add(distributionLoadscanEntity);
packageLockIds.add(parcelListEntity.getId()); packageLockIds.add(parcelListEntity.getId());
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue()); DistributionParcelListEntity updateE= new DistributionParcelListEntity();
distributionParcelListService.updateById(parcelListEntity); updateE.setId(parcelListEntity.getId());
updateE.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
updateE.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
distributionParcelListService.updateById(updateE);
//维护签收包件状态 //维护签收包件状态
orderCodes.add(parcelListEntity.getOrderCode()); orderCodes.add(parcelListEntity.getOrderCode());
} else { } else {
@ -8347,8 +8361,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setPackageNub(parcelNumberDTO.getSigningNum()); loadscanEntity.setPackageNub(parcelNumberDTO.getSigningNum());
loadscanEntity.setLoadedNub(parcelNumberDTO.getSigningNum()); loadscanEntity.setLoadedNub(parcelNumberDTO.getSigningNum());
loadscanEntity.setSigningUserId(user.getUserId()); loadscanEntity.setSigningUserId(user.getUserId());
assert distributionDeliverySelfEntity != null; if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverId())) {
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverId())) {
loadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId()); loadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
} }
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverName())) { if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverName())) {
@ -8459,10 +8472,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
packageLockIds.add(loadscaninvnEntity.getInventoryPackageId()); packageLockIds.add(loadscaninvnEntity.getInventoryPackageId());
distributionLoadscaninvnService.updateById(loadscaninvnEntity); distributionLoadscaninvnService.updateById(loadscaninvnEntity);
pushInventoryList.add(loadscaninvnEntity); pushInventoryList.add(loadscaninvnEntity);
//维护签收数量 // distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub()); // distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), user);
//更新签收人
distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), user); updataSignforeExtracted(loadscaninvnEntity.getDeliveryId(),loadscaninvnEntity.getReservationId(),loadscaninvnEntity.getPackageNub(),user);
} else { } else {
//存在配置要求必须装车才能进行签收 //存在配置要求必须装车才能进行签收
if (Integer.parseInt(IsOrNoConstant.yes.getValue()) == isStrictLoading) { if (Integer.parseInt(IsOrNoConstant.yes.getValue()) == isStrictLoading) {
@ -8577,6 +8591,23 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return Resp.scanSuccess(integer + "件", integer + "件"); return Resp.scanSuccess(integer + "件", integer + "件");
} }
/**
* 签收维护签收单数量 签收数量 签收人
* @param deliveryId 配送ID
* @param reservationId 预约单ID
* @param number 数量
* @param user 用户
*/
private void updataSignforeExtracted(Long deliveryId,Long reservationId,Integer number, BladeUser user) {
//缺少一个异步维护包件签收的方法
// distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
// //更新签收人
// distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), user);
distributionSignforMapper.updateSignfor(deliveryId,reservationId,number,user);
}
@Override @Override
public R selectDistributionNewAppDeliveryListPage(DistributionAppDeliveryListDTO distributionDeliveryList) { public R selectDistributionNewAppDeliveryListPage(DistributionAppDeliveryListDTO distributionDeliveryList) {
String method = "######################################DistributionSignforServiceImpl.selectDistributionNewAppDeliveryListPage"; String method = "######################################DistributionSignforServiceImpl.selectDistributionNewAppDeliveryListPage";
@ -9384,6 +9415,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setVehicleName(loadscanEntity.getVehicleName()); distributionLoadscanEntity.setVehicleName(loadscanEntity.getVehicleName());
distributionLoadscanEntity.setSigningUserId(user.getUserId()); distributionLoadscanEntity.setSigningUserId(user.getUserId());
distributionLoadscanEntity.setDriverId(loadscanEntity.getDriverId()); distributionLoadscanEntity.setDriverId(loadscanEntity.getDriverId());
distributionLoadscanEntity.setReservationId(loadscanEntity.getReservationId());
distributionLoadscanEntity.setDeliveryId(loadscanEntity.getDeliveryId());
distributionLoadscanEntity.setPackageNub(loadscanEntity.getPackageNub());
distributionLoadscanEntity.setDriverName(loadscanEntity.getDriverName()); distributionLoadscanEntity.setDriverName(loadscanEntity.getDriverName());
distributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getValue()); distributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getValue());
distributionLoadscanEntity.setSignforState(LoadScanSigningStatusConstant.weiqianshou.getValue()); distributionLoadscanEntity.setSignforState(LoadScanSigningStatusConstant.weiqianshou.getValue());

Loading…
Cancel
Save