|
|
|
@ -69,6 +69,7 @@ import org.springblade.common.constant.WorkNodeEnums;
|
|
|
|
|
import org.springblade.common.constant.billLading.BillLadingStatusConstant; |
|
|
|
|
import org.springblade.common.constant.common.IsOrNoConstant; |
|
|
|
|
import org.springblade.common.constant.delivery.DeliveryLoadingStatusConstant; |
|
|
|
|
import org.springblade.common.constant.delivery.DeliveryStartStatusConstant; |
|
|
|
|
import org.springblade.common.constant.delivery.DeliveryStatusConstant; |
|
|
|
|
import org.springblade.common.constant.loading.*; |
|
|
|
|
import org.springblade.common.constant.orderpackage.*; |
|
|
|
@ -775,7 +776,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
packageData.setPackageCode(distributionLoadscaninvnEntity.getOrderPackageCode()); |
|
|
|
|
packageData.setBrand(byIds.getBrandName()); |
|
|
|
|
// packageData.setProductName(byId.getDescriptionGoods());
|
|
|
|
|
packageData.setMallName(StringUtil.isBlank(byIds.getMallName())? byIds.getMarketName():byIds.getMallName()); |
|
|
|
|
packageData.setMallName(StringUtil.isBlank(byIds.getMallName()) ? byIds.getMarketName() : byIds.getMallName()); |
|
|
|
|
|
|
|
|
|
packageData.setMaterialCode(byIds.getCargoNumber()); |
|
|
|
|
packageData.setMaterialName(byIds.getDescriptionGoods()); |
|
|
|
@ -2659,8 +2660,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
} |
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(); |
|
|
|
|
List<JSONObject> aaa = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DistributionLoadscanEntity> pushList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.selectPackageListByReservationId(distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
@ -2696,8 +2695,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
if (loadscanEntity.getSignforState().equals(2)) { |
|
|
|
|
return Resp.scanFail("重复扫描", "包件已签收"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//存在装车记录,进行修改即可
|
|
|
|
|
//进行签收记录数据的维护
|
|
|
|
|
loadscanEntity.setSigningTime(singleTime); |
|
|
|
@ -2707,7 +2704,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
loadscanEntity.setIsInsert(2); |
|
|
|
|
loadscanEntity.setReceivedQuantity(loadscanEntity.getLoadedNub()); |
|
|
|
|
packageLockIds.add(loadscanEntity.getPackageId()); |
|
|
|
|
|
|
|
|
|
loadscanEntity.setSigningUser(nickName); |
|
|
|
|
loadscanEntity.setSigningUserId(userId); |
|
|
|
|
loadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getValue()); |
|
|
|
@ -2852,9 +2848,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
log.warn("#####################distributionParcelListEntities窜货 {}", distributionParcelListEntities); |
|
|
|
|
return Resp.scanFail("窜货", "窜货"); |
|
|
|
|
} else { |
|
|
|
|
//判断该货物是否属于该客户
|
|
|
|
|
// 异常签收
|
|
|
|
|
// return Resp.scanFail("异常签收包件","异常签收包件");
|
|
|
|
|
//判断客户
|
|
|
|
|
boolean flag = judgmentClient(distributionReservationEntity, parcelListEntity.getStockArticleId()); |
|
|
|
|
if (flag) { |
|
|
|
@ -2912,7 +2905,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
// 节点作业推送
|
|
|
|
|
sendNodeWorkDataBroadcast(parcelListEntity, distributionReservationEntity, singleTime, myCurrentWarehouse); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 构建新作业节点回传
|
|
|
|
|
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity,distributionReservationEntity, pushList); |
|
|
|
|
|
|
|
|
@ -2959,7 +2951,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
packageData.setPackageCode(distributionParcelListEntity.getOrderPackageCode()); |
|
|
|
|
packageData.setBrand(byIds.getBrandName()); |
|
|
|
|
|
|
|
|
|
packageData.setMallName(StringUtil.isBlank(byIds.getMallName())? byIds.getMarketName():byIds.getMallName()); |
|
|
|
|
packageData.setMallName(StringUtil.isBlank(byIds.getMallName()) ? byIds.getMarketName() : byIds.getMallName()); |
|
|
|
|
// packageData.setProductName(byId.getDescriptionGoods());
|
|
|
|
|
packageData.setMaterialCode(byIds.getCargoNumber()); |
|
|
|
|
packageData.setMaterialName(byIds.getDescriptionGoods()); |
|
|
|
@ -7334,6 +7326,510 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
return resultMap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R newSignfor(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) { |
|
|
|
|
String method = "#################################DistributionSignforServiceImpl.newSignfor"; |
|
|
|
|
//参数校验
|
|
|
|
|
if (Func.isEmpty(distrilbutionloadingscanDTO.getDeliveryId())) { |
|
|
|
|
log.error(method + "DeliveryId参数缺失"); |
|
|
|
|
return Resp.scanFail("参数缺失,请联系管理员", "参数缺失,请联系管理员"); |
|
|
|
|
} |
|
|
|
|
if (Func.isEmpty(distrilbutionloadingscanDTO.getReservationId())) { |
|
|
|
|
log.error(method + "ReservationId参数缺失"); |
|
|
|
|
return Resp.scanFail("参数缺失,请联系管理员", "参数缺失,请联系管理员"); |
|
|
|
|
} |
|
|
|
|
if (Func.isEmpty(distrilbutionloadingscanDTO.getType())) { |
|
|
|
|
log.error(method + "Type参数缺失"); |
|
|
|
|
return Resp.scanFail("参数缺失,请联系管理员", "参数缺失,请联系管理员"); |
|
|
|
|
} |
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if (Objects.isNull(myCurrentWarehouse)) { |
|
|
|
|
return R.fail(403, "仓库信息不能为空"); |
|
|
|
|
} |
|
|
|
|
Long deliveryId = distrilbutionloadingscanDTO.getDeliveryId(); |
|
|
|
|
Long reservationId = distrilbutionloadingscanDTO.getReservationId(); |
|
|
|
|
Integer type = distrilbutionloadingscanDTO.getType(); |
|
|
|
|
String barcode = ""; |
|
|
|
|
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.getById(deliveryId); |
|
|
|
|
if (Objects.isNull(deliveryListEntity)) { |
|
|
|
|
log.error(method + "查询配送信息错误,deliveryId:{}",deliveryId); |
|
|
|
|
return Resp.scanFail("查询配送信息错误,请联系管理员", "查询配送信息错误,请联系管理员"); |
|
|
|
|
} |
|
|
|
|
if (DeliveryStatusConstant.yiwancheng.getValue().equals(deliveryListEntity.getDeliveryStatus())){ |
|
|
|
|
log.error(method + "当前配送已完成,deliveryId:{}",deliveryId); |
|
|
|
|
return Resp.scanFail("当前配送已完成", "当前配送已完成"); |
|
|
|
|
} |
|
|
|
|
DistributionReservationEntity reservationEntity = distributionReservationService.getById(reservationId); |
|
|
|
|
if (Objects.isNull(reservationEntity)) { |
|
|
|
|
log.error(method + "查询预约计划错误,reservationId:{}",reservationId); |
|
|
|
|
return Resp.scanFail("查询配送信息错误,请联系管理员", "查询配送信息错误,请联系管理员"); |
|
|
|
|
} |
|
|
|
|
//查询是否完成复核
|
|
|
|
|
DistributionSignforEntity signforEntity = this.getOne(Wrappers.<DistributionSignforEntity>query().lambda() |
|
|
|
|
.eq(DistributionSignforEntity::getReservationId, reservationId) |
|
|
|
|
); |
|
|
|
|
if (Objects.isNull(signforEntity)) { |
|
|
|
|
//查询签收信息错误
|
|
|
|
|
log.error("签收扫描查询签收表信息错误reservationId:{}", distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
|
return R.fail(403, "配送任务错误"); |
|
|
|
|
} |
|
|
|
|
if (SignforStatusConstant.yiqianshou.getValue().equals(signforEntity.getSigningStatus())) { |
|
|
|
|
return Resp.scanFail("此任务已完成复核", "此任务已完成复核"); |
|
|
|
|
} |
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
List<Long> packageLockIds = new ArrayList<>(); |
|
|
|
|
List<String> orderCodes = new ArrayList<>(); |
|
|
|
|
List<DistributionLoadscanEntity> pushList = new ArrayList<>(); |
|
|
|
|
//配置项
|
|
|
|
|
boolean isConfig = false; |
|
|
|
|
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfDTO(); |
|
|
|
|
if (deliveryListEntity.getKind().equals(ServiceConstant.DELIVERLIST_KIND_SELF)) { |
|
|
|
|
distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectOne(new QueryWrapper<DistributionDeliverySelfEntity>().lambda() |
|
|
|
|
.eq(DistributionDeliverySelfEntity::getIsMaster, ServiceConstant.IS_MASTER_YES) |
|
|
|
|
.eq(DistributionDeliverySelfEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
DistributionDeliveryTripartiteEntity distributionDeliveryTripartiteEntity = distributionDeliveryTripartiteMapper.selectOne(new QueryWrapper<DistributionDeliveryTripartiteEntity>().lambda() |
|
|
|
|
.eq(DistributionDeliveryTripartiteEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())); |
|
|
|
|
BeanUtils.copyProperties(distributionDeliveryTripartiteEntity, distributionDeliverySelfEntity); |
|
|
|
|
} |
|
|
|
|
switch (type) { |
|
|
|
|
case 1: |
|
|
|
|
if (Func.isEmpty(distrilbutionloadingscanDTO.getBarcode())) { |
|
|
|
|
log.error(method + "Barcode参数缺失"); |
|
|
|
|
return Resp.scanFail("参数缺失,请联系管理员", "参数缺失,请联系管理员"); |
|
|
|
|
} |
|
|
|
|
barcode = distrilbutionloadingscanDTO.getBarcode(); |
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListService.selectByOrderPackageCode(distrilbutionloadingscanDTO.getBarcode(), myCurrentWarehouse.getId()); |
|
|
|
|
if (Objects.isNull(parcelListEntity)) { |
|
|
|
|
List<DisStockListDetailEntity> list = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda() |
|
|
|
|
.eq(DisStockListDetailEntity::getStockPackageCode, distrilbutionloadingscanDTO.getBarcode()) |
|
|
|
|
.ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) |
|
|
|
|
); |
|
|
|
|
if (!list.isEmpty()){ |
|
|
|
|
return Resp.scanFail("请在库存品扫描此码", "请在库存品扫描此码"); |
|
|
|
|
} |
|
|
|
|
return Resp.scanFail("系统无编码", "系统无编码"); |
|
|
|
|
} |
|
|
|
|
if (parcelListEntity.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) { |
|
|
|
|
return Resp.scanFail("包件已签收", "包件已签收"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<JSONObject> aaa = new ArrayList<>(); |
|
|
|
|
DistributionReservationPackageEntity planPackage = distributionReservationPackageService.getPlanPackageByReservationAndCode(reservationId,barcode); |
|
|
|
|
if (Objects.isNull(planPackage)){ |
|
|
|
|
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, barcode) |
|
|
|
|
.eq(DistributionLoadscanAbnormalEntity::getGoodsType, 1) |
|
|
|
|
.eq(DistributionLoadscanAbnormalEntity::getAbnormalType, 3) |
|
|
|
|
.eq(DistributionLoadscanAbnormalEntity::getAuditingStatus, LoadingAbnormalAuditingStatusConstant.daishenhe.getValue()) |
|
|
|
|
//修改 状态
|
|
|
|
|
); |
|
|
|
|
if (!abnormalEntities.isEmpty()) { |
|
|
|
|
//判断是否是本车次的异常操作
|
|
|
|
|
boolean isFlag = abnormalEntities.stream().allMatch(a -> reservationId.equals(a.getReservationId())); |
|
|
|
|
if (!isFlag){ |
|
|
|
|
return Resp.scanFail("存在异常未处理","存在异常未处理"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//查询此包件是否有进行装车
|
|
|
|
|
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, deliveryId) |
|
|
|
|
.eq(DistributionLoadscanEntity::getReservationId, reservationId) |
|
|
|
|
.eq(DistributionLoadscanEntity::getOrderPackageCode, barcode) |
|
|
|
|
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) |
|
|
|
|
); |
|
|
|
|
DistributionLoadscanEntity distributionLoadscanEntity = new DistributionLoadscanEntity(); |
|
|
|
|
if (!Objects.isNull(loadscanEntity)) { |
|
|
|
|
distributionLoadscanEntity = updateSignDistributionLoadscanEntity(loadscanEntity,user,parcelListEntity); |
|
|
|
|
distributionLoadscanService.updateById(distributionLoadscanEntity); |
|
|
|
|
//缺少一个异步维护包件签收的方法
|
|
|
|
|
distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
//更新签收人
|
|
|
|
|
distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), user); |
|
|
|
|
//维护订单状态
|
|
|
|
|
String content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getSigningUser() + "扫描签收,装车方式:扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode(); |
|
|
|
|
JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd()); |
|
|
|
|
aaa.add(trunklinePackageTrackLog); |
|
|
|
|
} else { |
|
|
|
|
//存在配置要求必须装车才能进行签收
|
|
|
|
|
if (isConfig){ |
|
|
|
|
return Resp.scanFail("当前包件未装车","当前包件未装车"); |
|
|
|
|
} |
|
|
|
|
distributionLoadscanEntity = createdSignDistributionLoadscanEntity(parcelListEntity,deliveryListEntity,reservationEntity,user,myCurrentWarehouse,distributionDeliverySelfEntity); |
|
|
|
|
//不存在装车需要进行补录
|
|
|
|
|
distributionLoadscanService.save(distributionLoadscanEntity); |
|
|
|
|
//进行签收数量的修改
|
|
|
|
|
distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
//更新装车包件数和签收包件数
|
|
|
|
|
distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
//更新签收人
|
|
|
|
|
distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser()); |
|
|
|
|
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()); |
|
|
|
|
aaa.add(trunklinePackageTrackLog); |
|
|
|
|
} |
|
|
|
|
//下架解托
|
|
|
|
|
if (StringUtils.isNotBlank(distributionLoadscanEntity.getOrderPackageCode())) { |
|
|
|
|
warehouseUpdownTypeClient.downPackageOrDelTray(distributionLoadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托"); |
|
|
|
|
} |
|
|
|
|
pushList.add(distributionLoadscanEntity); |
|
|
|
|
packageLockIds.add(distributionLoadscanEntity.getPackageId()); |
|
|
|
|
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue()); |
|
|
|
|
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue()); |
|
|
|
|
distributionParcelListService.updateById(parcelListEntity); |
|
|
|
|
//维护签收包件状态
|
|
|
|
|
orderCodes.add(parcelListEntity.getOrderCode()); |
|
|
|
|
} else { |
|
|
|
|
//判断当前包件是否已进行签收
|
|
|
|
|
//判断客户
|
|
|
|
|
boolean flag = judgmentClient(reservationEntity, parcelListEntity.getStockArticleId()); |
|
|
|
|
if (flag) { |
|
|
|
|
return R.fail(3006, null); |
|
|
|
|
} else { |
|
|
|
|
return Resp.scanFail("不属于当前签收客户", "不属于当前签收客户"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//维护客户
|
|
|
|
|
distributionReservationService.maintenanceReservationInfo(distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
|
//维护配送任务
|
|
|
|
|
distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
trunklinePackageTrackLogClient.addPackageTrackLog(aaa); |
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); |
|
|
|
|
String singleTime = simpleDateFormat.format(new Date()); |
|
|
|
|
// 节点作业推送
|
|
|
|
|
sendNodeWorkDataBroadcast(parcelListEntity, reservationEntity, singleTime, myCurrentWarehouse); |
|
|
|
|
// 构建新作业节点回传
|
|
|
|
|
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity,reservationEntity, pushList); |
|
|
|
|
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
//零担
|
|
|
|
|
if (Func.isEmpty(distrilbutionloadingscanDTO.getParcelListDTOS())) { |
|
|
|
|
log.error(method + "ParcelListDTOS参数缺失"); |
|
|
|
|
return Resp.scanFail("参数缺失,请联系管理员", "参数缺失,请联系管理员"); |
|
|
|
|
} |
|
|
|
|
List<DistributionParcelNumberDTO> parcelNumberDTOS = distrilbutionloadingscanDTO.getParcelListDTOS(); |
|
|
|
|
Integer loadedNumber = signforEntity.getLoadedNumber(); |
|
|
|
|
Integer receivedQuantity = signforEntity.getReceivedQuantity(); |
|
|
|
|
if (!parcelNumberDTOS.isEmpty()) { |
|
|
|
|
List<Long> packageIds = parcelNumberDTOS.stream().map(DistributionParcelNumberDTO::getParcelListId).collect(Collectors.toList()); |
|
|
|
|
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getOrderId, distrilbutionloadingscanDTO.getOrderId()) |
|
|
|
|
.in(DistributionLoadscanEntity::getPackageId, packageIds) |
|
|
|
|
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); |
|
|
|
|
Map<Long, List<DistributionLoadscanEntity>> loadingMap = null; |
|
|
|
|
Map<Long, List<DistributionReservationZeroPackageEntity>> reservationMap = null; |
|
|
|
|
if (!loadscanEntityList.isEmpty()) { |
|
|
|
|
int sum1 = loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum(); |
|
|
|
|
int sum2 = loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getReceivedQuantity).sum(); |
|
|
|
|
loadedNumber = loadedNumber - sum1; |
|
|
|
|
receivedQuantity = receivedQuantity - sum2; |
|
|
|
|
loadingMap = loadscanEntityList.stream().collect(Collectors.groupingBy(DistributionLoadscanEntity::getPackageId)); |
|
|
|
|
} |
|
|
|
|
//查询对应的计划品类
|
|
|
|
|
List<DistributionReservationZeroPackageEntity> reservationZeroPackageEntity = distributionReservationZeroPackageService.list(Wrappers.<DistributionReservationZeroPackageEntity>query().lambda() |
|
|
|
|
.eq(DistributionReservationZeroPackageEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()) |
|
|
|
|
.in(DistributionReservationZeroPackageEntity::getParcelListId, packageIds) |
|
|
|
|
.ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())); |
|
|
|
|
if (!reservationZeroPackageEntity.isEmpty()) { |
|
|
|
|
reservationMap = reservationZeroPackageEntity.stream().collect(Collectors.groupingBy(DistributionReservationZeroPackageEntity::getParcelListId)); |
|
|
|
|
} |
|
|
|
|
List<JSONObject> jsonObjects = new ArrayList<>(); |
|
|
|
|
for (DistributionParcelNumberDTO parcelNumberDTO : parcelNumberDTOS) { |
|
|
|
|
List<DistributionReservationZeroPackageEntity> zeroPackageEntities = reservationMap.get(parcelNumberDTO.getParcelListId()); |
|
|
|
|
DistributionParcelNumberEntity distributionParcelNumberEntity = distributionParcelNumberService.getOne(Wrappers.<DistributionParcelNumberEntity>query().lambda() |
|
|
|
|
.eq(DistributionParcelNumberEntity::getParcelListId, parcelNumberDTO.getParcelListId()) |
|
|
|
|
); |
|
|
|
|
DistributionParcelListEntity zeroParcelListEntity = distributionParcelListService.getById(parcelNumberDTO.getParcelListId()); |
|
|
|
|
orderCodes.add(zeroParcelListEntity.getOrderCode()); |
|
|
|
|
packageLockIds.add(zeroParcelListEntity.getId()); |
|
|
|
|
if (zeroPackageEntities.size() == 1) { |
|
|
|
|
DistributionReservationZeroPackageEntity distributionReservationZeroPackageEntity = zeroPackageEntities.get(0); |
|
|
|
|
//查询是否存在装车
|
|
|
|
|
Integer deliveryNumber = 0; |
|
|
|
|
Integer handQuantity = 0; |
|
|
|
|
Integer outboundQuantity = 0; |
|
|
|
|
Integer signinQuantity = 0; |
|
|
|
|
|
|
|
|
|
if (Func.isNotEmpty(loadingMap)) { |
|
|
|
|
//存在装车数据,进行是否签收判断
|
|
|
|
|
List<DistributionLoadscanEntity> entityList = loadingMap.get(parcelNumberDTO.getParcelListId()); |
|
|
|
|
if (entityList.size() == 1) { |
|
|
|
|
DistributionLoadscanEntity distributionLoadscanEntity = entityList.get(0); |
|
|
|
|
if (parcelNumberDTO.getSigningNum() > distributionReservationZeroPackageEntity.getQuantity()) { |
|
|
|
|
log.info("#############零担签收超过计划数量ParcelListId:{},计划:{}录入,:{}", parcelNumberDTO.getParcelListId(), distributionReservationZeroPackageEntity.getQuantity(), parcelNumberDTO.getSigningNum()); |
|
|
|
|
} |
|
|
|
|
int a = 0; |
|
|
|
|
if (distributionLoadscanEntity.getLoadedNub() < parcelNumberDTO.getSigningNum()) { |
|
|
|
|
//将装车和签收进行统一数量
|
|
|
|
|
distributionLoadscanEntity.setLoadedNub(parcelNumberDTO.getSigningNum()); |
|
|
|
|
distributionLoadscanEntity.setPackageNub(parcelNumberDTO.getSigningNum()); |
|
|
|
|
a = parcelNumberDTO.getSigningNum() - distributionLoadscanEntity.getLoadedNub(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
deliveryNumber = distributionParcelNumberEntity.getDeliveryQuantity() + distributionLoadscanEntity.getReceivedQuantity() - parcelNumberDTO.getSigningNum(); |
|
|
|
|
handQuantity = distributionParcelNumberEntity.getHandQuantity() + distributionLoadscanEntity.getReceivedQuantity() - parcelNumberDTO.getSigningNum(); |
|
|
|
|
outboundQuantity = distributionParcelNumberEntity.getOutboundQuantity() - distributionLoadscanEntity.getReceivedQuantity() + parcelNumberDTO.getSigningNum(); |
|
|
|
|
signinQuantity = distributionParcelNumberEntity.getSigninQuantity() - distributionLoadscanEntity.getReceivedQuantity() + parcelNumberDTO.getSigningNum(); |
|
|
|
|
distributionLoadscanEntity.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
|
distributionLoadscanEntity.setWarehouseName(myCurrentWarehouse.getName()); |
|
|
|
|
distributionLoadscanEntity.setReceivedQuantity(parcelNumberDTO.getSigningNum()); |
|
|
|
|
distributionLoadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue()); |
|
|
|
|
distributionLoadscanEntity.setScanTime(simpleDateFormat.format(new Date())); |
|
|
|
|
distributionLoadscanEntity.setSigningUser(user.getNickName()); |
|
|
|
|
distributionLoadscanEntity.setSigningUserId(user.getUserId()); |
|
|
|
|
distributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getValue()); |
|
|
|
|
distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date())); |
|
|
|
|
distributionLoadscanEntity.setSigningUser(user.getNickName()); |
|
|
|
|
loadedNumber += parcelNumberDTO.getSigningNum(); |
|
|
|
|
receivedQuantity += parcelNumberDTO.getSigningNum(); |
|
|
|
|
//进行签收数量的统计
|
|
|
|
|
distributionLoadscanService.updateById(distributionLoadscanEntity); |
|
|
|
|
pushList.add(distributionLoadscanEntity); |
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
jsonObject.put("code", zeroParcelListEntity.getOrderCode()); |
|
|
|
|
jsonObject.put("warehouseId", myCurrentWarehouse.getId()); |
|
|
|
|
jsonObject.put("taskId", distributionLoadscanEntity.getReservationId()); |
|
|
|
|
jsonObject.put("type", 3); |
|
|
|
|
jsonObject.put("num", a); |
|
|
|
|
jsonObject.put("remark", "签收下架"); |
|
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
|
} else { |
|
|
|
|
log.info("#############零担签收存在多个装车记录ParcelListId:{}", parcelNumberDTO.getParcelListId()); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
//签收装车数据一起进行补录
|
|
|
|
|
DistributionLoadscanEntity loadscanEntity = new DistributionLoadscanEntity(); |
|
|
|
|
loadscanEntity.setPackageId(distributionParcelNumberEntity.getParcelListId()); |
|
|
|
|
loadscanEntity.setOrderId(distributionParcelNumberEntity.getStockArticleId()); |
|
|
|
|
loadscanEntity.setDeliveryId(signforEntity.getDeliveryId()); |
|
|
|
|
loadscanEntity.setReservationId(signforEntity.getReservationId()); |
|
|
|
|
loadscanEntity.setScanUser(user.getNickName()); |
|
|
|
|
loadscanEntity.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
|
loadscanEntity.setWarehouseName(myCurrentWarehouse.getName()); |
|
|
|
|
loadscanEntity.setScanTime(simpleDateFormat.format(new Date())); |
|
|
|
|
loadscanEntity.setSigningUser(user.getNickName()); |
|
|
|
|
loadscanEntity.setPackageNub(parcelNumberDTO.getSigningNum()); |
|
|
|
|
loadscanEntity.setLoadedNub(parcelNumberDTO.getSigningNum()); |
|
|
|
|
loadscanEntity.setSigningUserId(user.getUserId()); |
|
|
|
|
assert distributionDeliverySelfEntity != null; |
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverId())) { |
|
|
|
|
loadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId()); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverName())) { |
|
|
|
|
loadscanEntity.setDriverName(distributionDeliverySelfEntity.getDriverName()); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getVehicleId())) { |
|
|
|
|
loadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId()); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getVehicleNub())) { |
|
|
|
|
loadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub()); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverPhone())) { |
|
|
|
|
loadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); |
|
|
|
|
} |
|
|
|
|
loadscanEntity.setLoadingId(distributionDeliverySelfEntity.getId().toString()); |
|
|
|
|
loadscanEntity.setScanStatus(LoadingStatusConstant.buluzhuangche.getValue()); |
|
|
|
|
loadscanEntity.setIsInsert(LoadingIsInsertConstant.bulu.getValue()); |
|
|
|
|
loadscanEntity.setScanType("1"); |
|
|
|
|
loadscanEntity.setType(2); |
|
|
|
|
loadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue()); |
|
|
|
|
loadscanEntity.setIsSignfor(1); |
|
|
|
|
loadscanEntity.setReceivedQuantity(parcelNumberDTO.getSigningNum()); |
|
|
|
|
loadscanEntity.setOneClick(2); |
|
|
|
|
loadscanEntity.setOneQclick(2); |
|
|
|
|
loadscanEntity.setSigningTime(simpleDateFormat.format(new Date())); |
|
|
|
|
distributionLoadscanService.save(loadscanEntity); |
|
|
|
|
pushList.add(loadscanEntity); |
|
|
|
|
loadedNumber += loadscanEntity.getLoadedNub(); |
|
|
|
|
receivedQuantity += loadscanEntity.getReceivedQuantity(); |
|
|
|
|
//维护零担品类信息
|
|
|
|
|
deliveryNumber = distributionParcelNumberEntity.getDeliveryQuantity() - parcelNumberDTO.getSigningNum(); |
|
|
|
|
handQuantity = distributionParcelNumberEntity.getHandQuantity() - parcelNumberDTO.getSigningNum(); |
|
|
|
|
outboundQuantity = distributionParcelNumberEntity.getOutboundQuantity() + parcelNumberDTO.getSigningNum(); |
|
|
|
|
signinQuantity = distributionParcelNumberEntity.getSigninQuantity() + parcelNumberDTO.getSigningNum(); |
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
jsonObject.put("code", parcelListEntity.getOrderCode()); |
|
|
|
|
jsonObject.put("warehouseId", myCurrentWarehouse.getId()); |
|
|
|
|
jsonObject.put("taskId", loadscanEntity.getReservationId()); |
|
|
|
|
jsonObject.put("type", 3); |
|
|
|
|
jsonObject.put("num", loadscanEntity.getLoadedNub()); |
|
|
|
|
jsonObject.put("remark", "签收下架"); |
|
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
|
warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects); |
|
|
|
|
} |
|
|
|
|
//维护订单
|
|
|
|
|
if (outboundQuantity.equals(distributionParcelNumberEntity.getQuantity())) { |
|
|
|
|
zeroParcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue()); |
|
|
|
|
} |
|
|
|
|
if (handQuantity == 0) { |
|
|
|
|
zeroParcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue()); |
|
|
|
|
} |
|
|
|
|
if (receivedQuantity.equals(distributionParcelNumberEntity.getQuantity())) { |
|
|
|
|
zeroParcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue()); |
|
|
|
|
} |
|
|
|
|
distributionParcelListService.updateById(zeroParcelListEntity); |
|
|
|
|
|
|
|
|
|
DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity(); |
|
|
|
|
parcelNumberEntity.setId(distributionParcelNumberEntity.getId()); |
|
|
|
|
parcelNumberEntity.setDeliveryQuantity(deliveryNumber); |
|
|
|
|
parcelNumberEntity.setOutboundQuantity(outboundQuantity); |
|
|
|
|
parcelNumberEntity.setSigninQuantity(signinQuantity); |
|
|
|
|
parcelNumberEntity.setHandQuantity(handQuantity); |
|
|
|
|
distributionParcelNumberService.updateById(parcelNumberEntity); |
|
|
|
|
} else { |
|
|
|
|
log.info("#############零担签收查询计划错误ParcelListId:{}", parcelNumberDTO.getParcelListId()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case 3: |
|
|
|
|
if (Func.isEmpty(distrilbutionloadingscanDTO.getBarcode())) { |
|
|
|
|
log.error(method + "Barcode参数缺失"); |
|
|
|
|
return Resp.scanFail("参数缺失,请联系管理员", "参数缺失,请联系管理员"); |
|
|
|
|
} |
|
|
|
|
//库存品
|
|
|
|
|
List<DisStockListDetailEntity> detailEntities = distributionReservationMapper.selectInventoryListByReservation(distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
|
if (detailEntities.isEmpty()) { |
|
|
|
|
DistributionParcelListEntity isFlag = distributionParcelListService.selectByOrderPackageCode(distrilbutionloadingscanDTO.getBarcode(), myCurrentWarehouse.getId()); |
|
|
|
|
if (!Objects.isNull(isFlag)) { |
|
|
|
|
return Resp.scanFail("请在订制品扫描此码","请在订制品扫描此码"); |
|
|
|
|
} |
|
|
|
|
return Resp.scanFail("系统无编码","系统无编码"); |
|
|
|
|
} |
|
|
|
|
boolean isHaveCode = detailEntities.stream().allMatch(inven -> Func.isEmpty(inven.getStockPackageCode())); |
|
|
|
|
if (isHaveCode) { |
|
|
|
|
return Resp.scanFail("库存品未备货","库存品未备货"); |
|
|
|
|
} |
|
|
|
|
List<DisStockListDetailEntity> inventoryPakcgaeList = detailEntities.stream().filter(f -> barcode.equals(f.getStockPackageCode())).collect(Collectors.toList()); |
|
|
|
|
if (!inventoryPakcgaeList.isEmpty()) { |
|
|
|
|
if (inventoryPakcgaeList.size() == 1) { |
|
|
|
|
DisStockListDetailEntity disStockListDetailEntity = inventoryPakcgaeList.get(0); |
|
|
|
|
DistributionLoadscaninvnEntity loadscaninvnEntity = distributionLoadscaninvnService.getOne(Wrappers.<DistributionLoadscaninvnEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()) |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()) |
|
|
|
|
.ne(DistributionLoadscaninvnEntity::getScanStatus, 1)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
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)); |
|
|
|
|
if (flag) { |
|
|
|
|
//正在操作,请稍后重试
|
|
|
|
|
throw new CustomerException("该包件正在被操作,请稍后再试!!!"); |
|
|
|
|
} else { |
|
|
|
|
packageLockIds.addAll(a); |
|
|
|
|
bladeRedis.setEx("warehouseId:" + myCurrentWarehouse.getId() + "trainNumber:" + deliveryListEntity.getTrainNumber() + "orderPackageCode:" + packageLockIds, packageLockIds, 60L); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
bladeRedis.setEx("warehouseId:" + myCurrentWarehouse.getId() + "trainNumber:" + deliveryListEntity.getTrainNumber() + "orderPackageCode:" + packageLockIds, packageLockIds, 60L); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (!orderCodes.isEmpty()) { |
|
|
|
|
String collect = orderCodes.stream().distinct().collect(Collectors.joining(",")); |
|
|
|
|
distributionStockArticleService.maintenanceOrderInfo(collect, myCurrentWarehouse.getId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String str = checkSignNum(distrilbutionloadingscanDTO); |
|
|
|
|
return Resp.scanSuccess("签收成功", str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 修改装车为签收数据 |
|
|
|
|
* @param loadscanEntity |
|
|
|
|
* @param user |
|
|
|
|
* @param parcelListEntity |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
private DistributionLoadscanEntity updateSignDistributionLoadscanEntity(DistributionLoadscanEntity loadscanEntity, BladeUser user, DistributionParcelListEntity parcelListEntity) { |
|
|
|
|
String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()); |
|
|
|
|
loadscanEntity.setSigningTime(now); |
|
|
|
|
loadscanEntity.setSignforState(2); |
|
|
|
|
loadscanEntity.setOneClick(1); |
|
|
|
|
loadscanEntity.setOneQclick(1); |
|
|
|
|
loadscanEntity.setIsInsert(2); |
|
|
|
|
loadscanEntity.setReceivedQuantity(parcelListEntity.getQuantity()); |
|
|
|
|
loadscanEntity.setSigningUser(user.getNickName()); |
|
|
|
|
loadscanEntity.setSigningUserId(user.getUserId()); |
|
|
|
|
loadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getValue()); |
|
|
|
|
return loadscanEntity; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 进行签收补录装车数据 |
|
|
|
|
* @param parcelListEntity |
|
|
|
|
* @param deliveryListEntity |
|
|
|
|
* @param reservationEntity |
|
|
|
|
* @param user |
|
|
|
|
* @param myCurrentWarehouse |
|
|
|
|
* @param distributionDeliverySelfEntity |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
private DistributionLoadscanEntity createdSignDistributionLoadscanEntity(DistributionParcelListEntity parcelListEntity, DistributionDeliveryListEntity deliveryListEntity, DistributionReservationEntity reservationEntity, BladeUser user, BasicdataWarehouseEntity myCurrentWarehouse, DistributionDeliverySelfEntity distributionDeliverySelfEntity) { |
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); |
|
|
|
|
DistributionLoadscanEntity distributionLoadscanEntity = new DistributionLoadscanEntity(); |
|
|
|
|
if (StringUtils.isNotBlank(distributionDeliverySelfEntity.getDriverPhone())) { |
|
|
|
|
distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotBlank(distributionDeliverySelfEntity.getVehicleNub())) { |
|
|
|
|
distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub()); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotBlank(distributionDeliverySelfEntity.getDriverId())) { |
|
|
|
|
distributionLoadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId()); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getId())) { |
|
|
|
|
distributionLoadscanEntity.setLoadingId(distributionDeliverySelfEntity.getId().toString()); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverName())) { |
|
|
|
|
distributionLoadscanEntity.setDriverName(distributionDeliverySelfEntity.getDriverName()); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotBlank(distributionDeliverySelfEntity.getVehicleId())) { |
|
|
|
|
distributionLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId()); |
|
|
|
|
} |
|
|
|
|
Date loadScanTime = new Date(); |
|
|
|
|
distributionLoadscanEntity.setScanTime(simpleDateFormat.format(loadScanTime)); |
|
|
|
|
distributionLoadscanEntity.setPackageId(parcelListEntity.getId()); |
|
|
|
|
distributionLoadscanEntity.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
|
distributionLoadscanEntity.setWarehouseName(myCurrentWarehouse.getName()); |
|
|
|
|
distributionLoadscanEntity.setOrderPackageCode(parcelListEntity.getOrderPackageCode()); |
|
|
|
|
Date signingTime = new Date(System.currentTimeMillis() + (1000 * 60)); |
|
|
|
|
distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(signingTime)); |
|
|
|
|
distributionLoadscanEntity.setReceivedQuantity(parcelListEntity.getQuantity()); |
|
|
|
|
distributionLoadscanEntity.setReservationId(reservationEntity.getId()); |
|
|
|
|
distributionLoadscanEntity.setIsSignfor(2); |
|
|
|
|
distributionLoadscanEntity.setIsInsert(2); |
|
|
|
|
distributionLoadscanEntity.setSignforState(2); |
|
|
|
|
distributionLoadscanEntity.setOneClick(1); |
|
|
|
|
distributionLoadscanEntity.setOneQclick(1); |
|
|
|
|
distributionLoadscanEntity.setIsInsert(2); |
|
|
|
|
distributionLoadscanEntity.setTrainNumber(deliveryListEntity.getTrainNumber()); |
|
|
|
|
distributionLoadscanEntity.setPackageNub(parcelListEntity.getQuantity()); |
|
|
|
|
distributionLoadscanEntity.setOrderId(parcelListEntity.getStockArticleId()); |
|
|
|
|
distributionLoadscanEntity.setLoadedNub(parcelListEntity.getQuantity()); |
|
|
|
|
distributionLoadscanEntity.setDeliveryId(deliveryListEntity.getId()); |
|
|
|
|
distributionLoadscanEntity.setScanUser(AuthUtil.getUser().getNickName()); |
|
|
|
|
distributionLoadscanEntity.setSigningUser(AuthUtil.getUser().getNickName()); |
|
|
|
|
distributionLoadscanEntity.setSigningUserId(AuthUtil.getUser().getUserId()); |
|
|
|
|
distributionLoadscanEntity.setScanStatus(LoadingStatusConstant.buluzhuangche.getValue()); |
|
|
|
|
distributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getValue()); |
|
|
|
|
return distributionLoadscanEntity; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void buildNameAndPhone(List<SignPushDataUnitDTO> pushOldPackageSigning) { |
|
|
|
|
for (SignPushDataUnitDTO signPushDataUnitDTO : pushOldPackageSigning) { |
|
|
|
|
User user = bladeRedis.get(RedisKeyConstant.USER_NAME_PHONE_KEY + signPushDataUnitDTO.getAdministratorsId()); |
|
|
|
|