|
|
|
@ -1182,6 +1182,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
DistributionSignforEntity signforEntity = this.getOne(Wrappers.<DistributionSignforEntity>query().lambda() |
|
|
|
|
.eq(DistributionSignforEntity::getReservationId, reservationId) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
DistributionSignforEntity update = new DistributionSignforEntity(); |
|
|
|
|
update.setId(signforEntity.getId()); |
|
|
|
|
|
|
|
|
|
if (Func.isEmpty(signforEntity)) { |
|
|
|
|
log.error("维护签收异常是否存在异常包件失败"); |
|
|
|
|
return; |
|
|
|
@ -1193,9 +1197,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
//查看当前客户是否都已经完成审核
|
|
|
|
|
boolean flag = loadscanAbnormalEntityList.stream().allMatch(p -> p.getAuditingStatus().equals(LoadingAbnormalAuditingStatusConstant.yishenhe.getValue())); |
|
|
|
|
if (flag) { |
|
|
|
|
signforEntity.setIsHaveAbnormalPackage(1); |
|
|
|
|
update.setIsHaveAbnormalPackage(1); |
|
|
|
|
} else { |
|
|
|
|
signforEntity.setIsHaveAbnormalPackage(2); |
|
|
|
|
update.setIsHaveAbnormalPackage(2); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//统计客户装车数
|
|
|
|
@ -1208,8 +1212,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getReservationId, signforEntity.getReservationId()) |
|
|
|
|
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())) |
|
|
|
|
.intValue(); |
|
|
|
|
signforEntity.setLoadedNumber(lad); |
|
|
|
|
signforEntity.setLoadedinNumber(nad); |
|
|
|
|
update.setLoadedNumber(lad); |
|
|
|
|
update.setLoadedinNumber(nad); |
|
|
|
|
//统计客户签收数
|
|
|
|
|
Integer lsad = distributionLoadscanMapper.selectCount(new QueryWrapper<DistributionLoadscanEntity>().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getReservationId, signforEntity.getReservationId()) |
|
|
|
@ -1219,9 +1223,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getReservationId, signforEntity.getReservationId()) |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getSignforState, LoadScanSigningStatusConstant.yiqianshou.getValue()) |
|
|
|
|
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())).intValue(); |
|
|
|
|
signforEntity.setReceivedQuantity(lsad); |
|
|
|
|
signforEntity.setReceivedinQuantity(nsad); |
|
|
|
|
this.updateById(signforEntity); |
|
|
|
|
update.setReceivedQuantity(lsad); |
|
|
|
|
update.setReceivedinQuantity(nsad); |
|
|
|
|
this.updateById(update); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -3005,9 +3009,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
//更新签收人
|
|
|
|
|
Integer m = distributionSignforMapper.updateSignUser(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), AuthUtil.getUser()); |
|
|
|
|
//下架解托
|
|
|
|
|
if (StringUtils.isNotBlank(loadscanEntity.getOrderPackageCode())) { |
|
|
|
|
warehouseUpdownTypeClient.downPackageOrDelTray(loadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托"); |
|
|
|
|
} |
|
|
|
|
// if (StringUtils.isNotBlank(loadscanEntity.getOrderPackageCode())) {
|
|
|
|
|
// warehouseUpdownTypeClient.downPackageOrDelTray(loadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托");
|
|
|
|
|
// }
|
|
|
|
|
//维护订单状态
|
|
|
|
|
String content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "扫描签收,装车方式:扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + distributionReservationEntity.getReservationCode(); |
|
|
|
|
JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd()); |
|
|
|
@ -3535,7 +3539,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
packageLockIds.add(distributionLoadscanEntity.getPackageId()); |
|
|
|
|
pushDatas.add(distributionLoadscanEntity); |
|
|
|
|
//更新签收人
|
|
|
|
|
Integer m = distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser()); |
|
|
|
|
// Integer m = distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser());
|
|
|
|
|
if (StringUtils.isNotBlank(distributionLoadscanEntity.getOrderPackageCode())) { |
|
|
|
|
//下架解托
|
|
|
|
|
warehouseUpdownTypeClient.downPackageOrDelTray(distributionLoadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托"); |
|
|
|
@ -3614,7 +3618,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
jsonObject.put("num", 1); |
|
|
|
|
jsonObject.put("remark", "文员签收下架"); |
|
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
|
Integer m = distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser()); |
|
|
|
|
// Integer m = distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser());
|
|
|
|
|
//包件解托下架
|
|
|
|
|
content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "后台签收,装车方式:补录装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + distributionReservationEntity.getReservationCode(); |
|
|
|
|
try { |
|
|
|
@ -3634,7 +3638,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
sendNodeWorkDataBroadcast(parcelListEntity, distributionReservationEntity, distributionLoadscanEntity.getSigningTime(), myCurrentWarehouse); |
|
|
|
|
//收集包件
|
|
|
|
|
orderpackages.add(updatePackage.getOrderPackageCode()); |
|
|
|
|
distributionSignforMapper.autoDpdateSignfor(distributionReservationEntity.getId()); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
//一个客户下出现重复包条码
|
|
|
|
|
log.error("############出现重复包条码:{}", collect); |
|
|
|
@ -3664,9 +3668,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionReservationService.maintenanceReservationInfo(distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
|
//维护配送任务
|
|
|
|
|
distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
//维护签收异常状态
|
|
|
|
|
this.maintenanceSignfor(distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
|
|
|
|
|
|
// //维护签收异常状态
|
|
|
|
|
// this.maintenanceSignfor(distrilbutionloadingscanDTO.getReservationId());
|
|
|
|
|
distributionSignforMapper.autoDpdateSignfor(distributionReservationEntity.getId(),AuthUtil.getUser()); |
|
|
|
|
// 推送作业节点
|
|
|
|
|
|
|
|
|
|
// 作业节点数据推送
|
|
|
|
@ -3676,7 +3680,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
|
|
|
|
|
return R.data(orderpackages, "签收成功"); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
LogError logError = new LogError(); |
|
|
|
|
logError.setMessage(e.getMessage()); |
|
|
|
|
logClient.saveErrorLog(logError); |
|
|
|
@ -4110,7 +4113,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
distributionSignforMapper.autoDpdateSignfor(signforEntity.getReservationId()); |
|
|
|
|
distributionSignforMapper.autoDpdateSignfor(signforEntity.getReservationId(),user); |
|
|
|
|
// 作业节点数据推送
|
|
|
|
|
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(distributionDeliveryListEntity, reservationEntity, pushList, OperatModeConstant.SCAN, signforTime); |
|
|
|
|
|
|
|
|
@ -6123,10 +6126,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
//更新装车时间
|
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId()); |
|
|
|
|
//更新装车人
|
|
|
|
|
Integer m = distributionSignforMapper.updateSignUser(distributionDeliveryListEntity.getId(), distributionSignfor.getReservationId(), AuthUtil.getUser()); |
|
|
|
|
// Integer m = distributionSignforMapper.updateSignUser(distributionDeliveryListEntity.getId(), distributionSignfor.getReservationId(), AuthUtil.getUser());
|
|
|
|
|
//维护配送任务状态
|
|
|
|
|
distributionDeliveryListService.maintenanceDeliveryInfo(distributionDeliveryListEntity.getId()); |
|
|
|
|
distributionSignforMapper.autoDpdateSignfor(distributionSignforEntity.getReservationId()); |
|
|
|
|
distributionSignforMapper.autoDpdateSignfor(distributionSignforEntity.getReservationId(),user); |
|
|
|
|
//批量维护订单信息
|
|
|
|
|
if (Func.isNotEmpty(orderCodes)) { |
|
|
|
|
String orderCode = orderCodes.stream().distinct().collect(Collectors.joining(",")); |
|
|
|
@ -8080,6 +8083,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
List<Long> packageLockIds = new ArrayList<>(); |
|
|
|
|
List<String> orderCodes = new ArrayList<>(); |
|
|
|
|
// 签收下架的包条码
|
|
|
|
|
List<String> orderPackageCodesByUnTray = new ArrayList<>(); |
|
|
|
|
List<DistributionLoadscanEntity> pushList = new ArrayList<>(); |
|
|
|
|
List<DistributionLoadscaninvnEntity> pushInventoryList = new ArrayList<>(); |
|
|
|
|
//配置项
|
|
|
|
@ -8087,10 +8092,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
if (Objects.isNull(distributionDeliverySelfEntity)){ |
|
|
|
|
return Resp.scanFail("查询司机信息错误!!!", "查询司机信息错误!!!"); |
|
|
|
|
} |
|
|
|
|
if (Objects.isNull(distributionDeliverySelfEntity)) { |
|
|
|
|
return Resp.scanFail("当前操作人无此包件签收权限!!!", "当前操作人无此包件签收权限!!!"); |
|
|
|
|
} |
|
|
|
|
switch (type) { |
|
|
|
|
switch (type) { |
|
|
|
|
case 1: |
|
|
|
|
if (Func.isEmpty(distrilbutionloadingscanDTO.getBarcode())) { |
|
|
|
|
log.error(method + "Barcode参数缺失"); |
|
|
|
@ -8152,7 +8154,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionLoadscanEntity = updateSignDistributionLoadscanEntity(loadscanEntity, user, parcelListEntity); |
|
|
|
|
|
|
|
|
|
distributionLoadscanService.updateById(distributionLoadscanEntity); |
|
|
|
|
updataSignforeExtracted(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub(), user); |
|
|
|
|
// updataSignforeExtracted(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub(), user);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//维护订单状态
|
|
|
|
@ -8177,7 +8179,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
// //更新签收人
|
|
|
|
|
// distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser());
|
|
|
|
|
|
|
|
|
|
updataSignforeExtracted(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub(), user); |
|
|
|
|
// updataSignforeExtracted(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub(), user);
|
|
|
|
|
|
|
|
|
|
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()); |
|
|
|
@ -8190,10 +8192,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
log.info("------------------orderPackageCodes={}",orderPackageCodes); |
|
|
|
|
log.info("------------------warehouseId={}",warehouseId); |
|
|
|
|
log.info("------------------remark={}",remark); |
|
|
|
|
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes, warehouseId, remark); |
|
|
|
|
orderPackageCodesByUnTray.add(orderPackageCodes); |
|
|
|
|
// 该方法已移动到外部进行执行
|
|
|
|
|
// warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes, warehouseId, remark);
|
|
|
|
|
pushList.add(distributionLoadscanEntity); |
|
|
|
|
packageLockIds.add(parcelListEntity.getId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DistributionParcelListEntity updateE= new DistributionParcelListEntity(); |
|
|
|
|
updateE.setId(parcelListEntity.getId()); |
|
|
|
|
updateE.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue()); |
|
|
|
@ -8397,7 +8402,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
deliveryQuantity = deliveryQuantity - loadscanEntity.getLoadedNub(); |
|
|
|
|
distributionLoadscanService.save(loadscanEntity); |
|
|
|
|
//维护签收数量
|
|
|
|
|
distributionSignforMapper.updateSignforNum(deliveryId, reservationId, loadscanEntity.getReceivedQuantity()); |
|
|
|
|
// distributionSignforMapper.updateSignforNum(deliveryId, reservationId, loadscanEntity.getReceivedQuantity());
|
|
|
|
|
pushList.add(loadscanEntity); |
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
jsonObject.put("code", zeroParcelListEntity.getOrderCode()); |
|
|
|
@ -8475,7 +8480,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
// distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
|
|
|
|
|
// distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), user);
|
|
|
|
|
|
|
|
|
|
updataSignforeExtracted(loadscaninvnEntity.getDeliveryId(),loadscaninvnEntity.getReservationId(),loadscaninvnEntity.getPackageNub(),user); |
|
|
|
|
// updataSignforeExtracted(loadscaninvnEntity.getDeliveryId(),loadscaninvnEntity.getReservationId(),loadscaninvnEntity.getPackageNub(),user);
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
//存在配置要求必须装车才能进行签收
|
|
|
|
@ -8528,9 +8533,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionLoadscaninvnService.save(distributionLoadscaninvnEntity); |
|
|
|
|
pushInventoryList.add(distributionLoadscaninvnEntity); |
|
|
|
|
//更新装车数量
|
|
|
|
|
Integer j = distributionSignforMapper.updateLoadAndsignforByinvn(distributionLoadscaninvnEntity.getDeliveryId(), distributionLoadscaninvnEntity.getReservationId(), distributionLoadscaninvnEntity.getPackageNub()); |
|
|
|
|
// Integer j = distributionSignforMapper.updateLoadAndsignforByinvn(distributionLoadscaninvnEntity.getDeliveryId(), distributionLoadscaninvnEntity.getReservationId(), distributionLoadscaninvnEntity.getPackageNub());
|
|
|
|
|
//更新签收人
|
|
|
|
|
Integer i = distributionSignforMapper.updateSignUser(distributionLoadscaninvnEntity.getDeliveryId(), distributionLoadscaninvnEntity.getReservationId(), AuthUtil.getUser()); |
|
|
|
|
// Integer i = distributionSignforMapper.updateSignUser(distributionLoadscaninvnEntity.getDeliveryId(), distributionLoadscaninvnEntity.getReservationId(), AuthUtil.getUser());
|
|
|
|
|
//扣减库存
|
|
|
|
|
distributionStockListMapper.deductionQuantityStock(distributionLoadscaninvnEntity.getInventoryId(), distributionLoadscaninvnEntity.getLoadedNub()); |
|
|
|
|
packageLockIds.add(distributionLoadscaninvnEntity.getInventoryPackageId()); |
|
|
|
@ -8557,7 +8562,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
if (!packageLockIds.isEmpty()) { |
|
|
|
|
List<Long> a = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + ":trainNumber:" + deliveryListEntity.getTrainNumber() + ":orderPackageCode:" + packageLockIds); |
|
|
|
|
if (Func.isNotEmpty(a)) { |
|
|
|
|
boolean flag = a.stream().anyMatch(any -> packageLockIds.contains(any)); |
|
|
|
|
boolean flag = a.stream().anyMatch(packageLockIds::contains); |
|
|
|
|
if (flag) { |
|
|
|
|
//正在操作,请稍后重试
|
|
|
|
|
throw new CustomerException("该包件正在被操作,请稍后再试!!!"); |
|
|
|
@ -8584,11 +8589,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
String collect = orderCodes.stream().distinct().collect(Collectors.joining(",")); |
|
|
|
|
distributionStockArticleService.maintenanceOrderInfo(collect, myCurrentWarehouse.getId()); |
|
|
|
|
} |
|
|
|
|
distributionSignforMapper.autoDpdateSignfor(distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
|
distributionSignforMapper.autoDpdateSignfor(distrilbutionloadingscanDTO.getReservationId(),user); |
|
|
|
|
|
|
|
|
|
// String str = checkSignNum(distrilbutionloadingscanDTO);
|
|
|
|
|
Integer integer = distributionSignforMapper.signforNum(distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
|
return Resp.scanSuccess(integer + "件", integer + "件"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Resp.scanSuccessWithData(integer + "件", integer + "件",orderPackageCodesByUnTray); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|