|
|
|
@ -2948,38 +2948,38 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
//存在则查询该包件是否进行装车
|
|
|
|
|
DistributionParcelListEntity parcelListEntity = collect.get(0); |
|
|
|
|
JSONObject trunklinePackageTrackLog = new JSONObject(); |
|
|
|
|
DistributionLoadscanEntity loadscanEntity = distributionLoadscanMapper.selectOne(Wrappers.<DistributionLoadscanEntity>query().lambda() |
|
|
|
|
DistributionLoadscanEntity distributionLoadscanEntity = distributionLoadscanMapper.selectOne(Wrappers.<DistributionLoadscanEntity>query().lambda() |
|
|
|
|
.ne(DistributionLoadscanEntity::getScanStatus, 1) |
|
|
|
|
.eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getOrderPackageCode, parcelListEntity.getOrderPackageCode())); |
|
|
|
|
if (Func.isNotEmpty(loadscanEntity)) { |
|
|
|
|
if (loadscanEntity.getSignforState().equals(2)) { |
|
|
|
|
if (Func.isNotEmpty(distributionLoadscanEntity)) { |
|
|
|
|
if (distributionLoadscanEntity.getSignforState().equals(2)) { |
|
|
|
|
return Resp.scanFail("重复扫描", "重复扫描"); |
|
|
|
|
} |
|
|
|
|
//存在装车记录,进行修改即可
|
|
|
|
|
//进行签收记录数据的维护
|
|
|
|
|
loadscanEntity.setSigningTime(simpleDateFormat.format(new Date())); |
|
|
|
|
loadscanEntity.setSignforState(2); |
|
|
|
|
loadscanEntity.setReceivedQuantity(loadscanEntity.getLoadedNub()); |
|
|
|
|
distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date())); |
|
|
|
|
distributionLoadscanEntity.setSignforState(2); |
|
|
|
|
distributionLoadscanEntity.setReceivedQuantity(distributionLoadscanEntity.getLoadedNub()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadscanEntity.setSigningUser(nickName); |
|
|
|
|
loadscanEntity.setSigningUserId(userId); |
|
|
|
|
loadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.wenyuanpiliangqianshou.getValue()); |
|
|
|
|
distributionLoadscanEntity.setSigningUser(nickName); |
|
|
|
|
distributionLoadscanEntity.setSigningUserId(userId); |
|
|
|
|
distributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.wenyuanpiliangqianshou.getValue()); |
|
|
|
|
|
|
|
|
|
distributionLoadscanService.updateById(loadscanEntity); |
|
|
|
|
packageLockIds.add(loadscanEntity.getPackageId()); |
|
|
|
|
distributionLoadscanService.updateById(distributionLoadscanEntity); |
|
|
|
|
packageLockIds.add(distributionLoadscanEntity.getPackageId()); |
|
|
|
|
//缺少一个异步维护包件签收的方法
|
|
|
|
|
// distributionAsyncService.changeOrderSignforStatus(collect.get(0));
|
|
|
|
|
Integer j = distributionSignforMapper.updateSignforNum(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub()); |
|
|
|
|
Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
//更新签收人
|
|
|
|
|
Integer m = distributionSignforMapper.updateSignUser(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), AuthUtil.getUser()); |
|
|
|
|
Integer m = distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser()); |
|
|
|
|
//下架解托
|
|
|
|
|
warehouseUpdownTypeClient.downPackageOrDelTray(loadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托"); |
|
|
|
|
warehouseUpdownTypeClient.downPackageOrDelTray(distributionLoadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托"); |
|
|
|
|
content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "后台签收,装车方式:扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + distributionReservationEntity.getReservationCode(); |
|
|
|
|
try { |
|
|
|
|
trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), loadscanEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getTrainNumber(), parcelListEntity.getWarehouseEntryTimeEnd()); |
|
|
|
|
trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), distributionLoadscanEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getTrainNumber(), parcelListEntity.getWarehouseEntryTimeEnd()); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("装车日志数据错误", e); |
|
|
|
|
} |
|
|
|
@ -3003,7 +3003,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
return Resp.scanFail("服务器正忙...", "服务器正忙"); |
|
|
|
|
} |
|
|
|
|
//查询配送计划的计划司机
|
|
|
|
|
DistributionLoadscanEntity distributionLoadscanEntity = new DistributionLoadscanEntity(); |
|
|
|
|
distributionLoadscanEntity = new DistributionLoadscanEntity(); |
|
|
|
|
if (StringUtils.isNotBlank(distributionDeliverySelfEntity.getDriverPhone())) { |
|
|
|
|
distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); |
|
|
|
|
} |
|
|
|
@ -3079,7 +3079,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), myCurrentWarehouse.getId()); |
|
|
|
|
//推送信息至工厂
|
|
|
|
|
// distributionAsyncService.sendFactory(parcelListEntity, simpleDateFormat.format(new Date()), distributionReservationEntity.getId(), distributionReservationEntity.getReservationCode(), myCurrentWarehouse.getName(), nickName);
|
|
|
|
|
sendNodeWorkDataBroadcast(parcelListEntity, distributionReservationEntity, loadscanEntity.getSigningTime(), myCurrentWarehouse); |
|
|
|
|
sendNodeWorkDataBroadcast(parcelListEntity, distributionReservationEntity, distributionLoadscanEntity.getSigningTime(), myCurrentWarehouse); |
|
|
|
|
|
|
|
|
|
//收集包件
|
|
|
|
|
orderpackages.add(updatePackage.getOrderPackageCode()); |
|
|
|
@ -3087,14 +3087,14 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
// 推送商家端
|
|
|
|
|
|
|
|
|
|
// 推送
|
|
|
|
|
try { |
|
|
|
|
sendMessage(orderPackageCode, distributionReservationEntity.getReservationCode(), |
|
|
|
|
deliveryListEntity.getTrainNumber(), deliveryListEntity.getVehicleName(), deliveryListEntity.getDriverName(), |
|
|
|
|
AuthUtil.getUserName(), myCurrentWarehouse.getId(), AuthUtil.getTenantId()); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
// throw new RuntimeException(e);
|
|
|
|
|
log.error(">>>> 签收推送报错", e); |
|
|
|
|
} |
|
|
|
|
// try {
|
|
|
|
|
// sendMessage(orderPackageCode, distributionReservationEntity.getReservationCode(),
|
|
|
|
|
// deliveryListEntity.getTrainNumber(), deliveryListEntity.getVehicleName(), deliveryListEntity.getDriverName(),
|
|
|
|
|
// AuthUtil.getUserName(), myCurrentWarehouse.getId(), AuthUtil.getTenantId());
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
//// throw new RuntimeException(e);
|
|
|
|
|
// log.error(">>>> 签收推送报错", e);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
//一个客户下出现重复包条码
|
|
|
|
@ -3369,6 +3369,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionLoadscanEntity.setIsAbnormalLoading(2); |
|
|
|
|
distributionLoadscanEntity.setIsAbnormalSigning(2); |
|
|
|
|
distributionLoadscanEntity.setAbnormalNote("异常签收"); |
|
|
|
|
loadscanEntity =distributionLoadscanEntity; |
|
|
|
|
log.info("异常签收>>>>>>>>>>>>>>>reservationId:{},deliveryId:{},orderPackageCode:{}", distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getOrderPackageCode()); |
|
|
|
|
//进行签收数量的修改
|
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
@ -3525,6 +3526,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
//还需要维护包件状态
|
|
|
|
|
distributionAsyncService.maintenanceOrderStatus(parcelListEntity.getOrderCode(), parcelListEntity.getWarehouseId()); |
|
|
|
|
trunklinePackageTrackLogClient.addPackageTrackLog(aaa); |
|
|
|
|
//推送信息至工厂
|
|
|
|
|
// distributionAsyncService.sendFactory(parcelListEntity, simpleDateFormat.format(new Date()), distributionReservationEntity.getId(), distributionReservationEntity.getReservationCode(), myCurrentWarehouse.getName(), nickName);
|
|
|
|
|
sendNodeWorkDataBroadcast(parcelListEntity, reservationEntity, simpleDateFormat.format(new Date()), myCurrentWarehouse); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
log.error("############出现相同的包件码:{}", distrilbutionloadingscanDTO.getBarcode()); |
|
|
|
|
return Resp.scanFail("操作失败", "包件信息有误"); |
|
|
|
@ -5316,7 +5321,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
jsonObject.put("num", 1); |
|
|
|
|
jsonObject.put("remark", "批量签收下架"); |
|
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
|
content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getSigningUser() + "司机司机批量签收,装车方式:扫描装车,配送车次号:" + distributionDeliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode(); |
|
|
|
|
content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getSigningUser() + "司机批量签收,装车方式:扫描装车,配送车次号:" + distributionDeliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode(); |
|
|
|
|
trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode(), distributionDeliveryListEntity.getTrainNumber(), parcelListEntity.getWarehouseEntryTimeEnd()); |
|
|
|
|
//distributionAsyncService.sendFactory(parcelListEntity, loadscanEntity.getSigningTime(), reservationEntity.getId(), reservationEntity.getReservationCode(), myCurrentWarehouse.getName(), user.getNickName());
|
|
|
|
|
sendNodeWorkDataBroadcast(parcelListEntity, reservationEntity, loadscanEntity.getSigningTime(), myCurrentWarehouse); |
|
|
|
|