|
|
|
@ -610,6 +610,33 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
return R.status(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@Transactional |
|
|
|
|
public void maintenanceSignfor(Long reservationId) { |
|
|
|
|
//签收
|
|
|
|
|
DistributionSignforEntity signforEntity = this.getOne(Wrappers.<DistributionSignforEntity>query().lambda() |
|
|
|
|
.eq(DistributionSignforEntity::getReservationId, reservationId) |
|
|
|
|
); |
|
|
|
|
if (Func.isEmpty(signforEntity)){ |
|
|
|
|
log.error("维护签收异常是否存在异常包件失败"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
List<DistributionLoadscanAbnormalEntity> loadscanAbnormalEntityList = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscanAbnormalEntity::getReservationId, reservationId) |
|
|
|
|
); |
|
|
|
|
if (Func.isNotEmpty(loadscanAbnormalEntityList)){ |
|
|
|
|
//查看当前客户是否都已经完成审核
|
|
|
|
|
boolean flag = loadscanAbnormalEntityList.stream().allMatch(p -> p.getAuditingStatus().equals(LoadingAbnormalAuditingStatusConstant.yishenhe.getValue())); |
|
|
|
|
if (flag){ |
|
|
|
|
signforEntity.setIsHaveAbnormalPackage(1); |
|
|
|
|
}else { |
|
|
|
|
signforEntity.setIsHaveAbnormalPackage(2); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
this.updateById(signforEntity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean judgmentSignIsHavePackage(Long reservationId) { |
|
|
|
|
boolean flag = false; |
|
|
|
|
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationId); |
|
|
|
@ -3310,6 +3337,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@Transactional |
|
|
|
|
public R loadingAbnormalPackageListAuditing(String ids) { |
|
|
|
|
// ------------------------------------2023-09-27 异常装车包件审核----------------------------------------------
|
|
|
|
|
// 思路:
|
|
|
|
@ -3320,6 +3348,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
log.error("#############异常包件信息异常:{}", distributionLoadscanAbnormalEntities); |
|
|
|
|
return R.fail(3000, "审核失败"); |
|
|
|
|
} |
|
|
|
|
List<Long> reservationId = distributionLoadscanAbnormalEntities.stream().distinct().map(DistributionLoadscanAbnormalEntity::getReservationId).collect(Collectors.toList()); |
|
|
|
|
if (distributionLoadscanAbnormalEntities.size() == 1) { |
|
|
|
|
DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = distributionLoadscanAbnormalEntities.get(0); |
|
|
|
|
//需要将该包件追加至该客户之下
|
|
|
|
@ -3370,6 +3399,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, distributionLoadscanAbnormalEntity.getDeliveryListId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getPackageId, distributionLoadscanAbnormalEntity.getPackageId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getOrderPackageCode, distributionLoadscanAbnormalEntity.getPackageCode()) |
|
|
|
|
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) |
|
|
|
|
); |
|
|
|
|
loadscanEntity.setIsAbnormalLoading(1); |
|
|
|
|
if (loadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())){ |
|
|
|
@ -3431,6 +3461,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
} |
|
|
|
|
//批量审核
|
|
|
|
|
} |
|
|
|
|
//维护签收的异常签收状态
|
|
|
|
|
this.maintenanceSignfor(reservationId.get(0)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return R.success("操作成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|