|
|
|
@ -1165,6 +1165,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@Transactional |
|
|
|
|
public R signforcontinue(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) { |
|
|
|
|
// ——————————————————————————————————————2023-09-21 异常签收调整————————————————————————————————————————————————————————————————————————
|
|
|
|
|
// 思路:查看该该包件是否处于可被签收的状态
|
|
|
|
@ -1190,7 +1191,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
//查询这个包件是否满足该客户的要求
|
|
|
|
|
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
|
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId()); |
|
|
|
|
DistributionSignforEntity signforEntity = distributionSignforMapper.getByReservationId(reservationEntity.getId()); |
|
|
|
|
|
|
|
|
|
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfEntity(); |
|
|
|
@ -1265,18 +1265,21 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionLoadscanEntity.setSigningUser(AuthUtil.getUser().getNickName()); |
|
|
|
|
distributionLoadscanEntity.setSigningUserId(AuthUtil.getUser().getUserId()); |
|
|
|
|
distributionLoadscanEntity.setAbnormalNote("异常签收"); |
|
|
|
|
//进行签收数量的修改
|
|
|
|
|
//更新装车时间
|
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
//修改签收数量
|
|
|
|
|
// Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
|
|
|
|
|
if (Func.isEmpty(loadscanEntity)) { |
|
|
|
|
//更新装车包件数和签收包件数
|
|
|
|
|
distributionLoadscanService.save(distributionLoadscanEntity); |
|
|
|
|
//更新装车和签收数
|
|
|
|
|
Integer j = distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
} else { |
|
|
|
|
distributionLoadscanService.updateById(distributionLoadscanEntity); |
|
|
|
|
distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
} |
|
|
|
|
// else {
|
|
|
|
|
// distributionLoadscanService.updateById(distributionLoadscanEntity);
|
|
|
|
|
// //更新签收数
|
|
|
|
|
// distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
|
|
|
|
|
// }
|
|
|
|
|
} else { |
|
|
|
|
return Resp.scanFail("操作失败", "不属于该客户"); |
|
|
|
|
} |
|
|
|
@ -1335,27 +1338,25 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionLoadscanEntity.setSigningUserId(AuthUtil.getUser().getUserId()); |
|
|
|
|
if (Func.isEmpty(loadscanEntity)){ |
|
|
|
|
distributionLoadscanService.save(distributionLoadscanEntity); |
|
|
|
|
Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
Integer j = distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
}else { |
|
|
|
|
distributionLoadscanService.updateById(distributionLoadscanEntity); |
|
|
|
|
Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
} |
|
|
|
|
//进行签收数量的修改
|
|
|
|
|
//更新装车时间
|
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
//修改包件装车、签收状态
|
|
|
|
|
} else { |
|
|
|
|
return Resp.scanFail("操作失败", "不属于该客户"); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
//修改包件信息
|
|
|
|
|
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue()); |
|
|
|
|
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue()); |
|
|
|
|
distributionParcelListService.updateById(parcelListEntity); |
|
|
|
|
//维护订单信息
|
|
|
|
|
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(),parcelListEntity.getWarehouseId()); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//修改包件信息
|
|
|
|
|
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue()); |
|
|
|
|
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue()); |
|
|
|
|
distributionParcelListService.updateById(parcelListEntity); |
|
|
|
|
//维护订单信息
|
|
|
|
|
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(),parcelListEntity.getWarehouseId()); |
|
|
|
|
//查询一次是否进行了异常装车,如果没有进行异常装车数据进行审核
|
|
|
|
|
List<DistributionLoadscanAbnormalEntity> list = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscanAbnormalEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()) |
|
|
|
@ -1383,6 +1384,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionLoadscanAbnormalService.save(distributionLoadscanAbnormalEntity); |
|
|
|
|
} |
|
|
|
|
//修改对应的签收为可审核
|
|
|
|
|
DistributionSignforEntity signforEntity = distributionSignforMapper.getByReservationId(reservationEntity.getId()); |
|
|
|
|
signforEntity.setIsHaveAbnormalPackage(2); |
|
|
|
|
this.updateById(signforEntity); |
|
|
|
|
//修改包件的签收数量
|
|
|
|
|