|
|
|
@ -775,7 +775,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
for (DistributionLoadscanEntity distributionLoadscanEntity : list) { |
|
|
|
|
|
|
|
|
|
PackageData packageData = new PackageData(); |
|
|
|
|
packageData.setSignTime(org.springblade.core.tool.utils.DateUtil.parse(distributionLoadscanEntity.getSigningTime(),"yyyy-MM-dd hh:mm:ss")); |
|
|
|
|
packageData.setSignTime(org.springblade.core.tool.utils.DateUtil.parse(distributionLoadscanEntity.getSigningTime(),"yyyy-MM-dd HH:mm:ss")); |
|
|
|
|
packageData.setSignUser(distributionLoadscanEntity.getSigningUser()); |
|
|
|
|
// 增加装车扫描人
|
|
|
|
|
packageData.setLoadingUserName(distributionLoadscanEntity.getScanUser()); |
|
|
|
@ -915,6 +915,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
List<DisStockListDetailEntity> detailEntities = distributionReservationMapper.selectInventoryListByReservation(distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
|
List<JSONObject> jsonObjects = new ArrayList<>(); |
|
|
|
|
if (Func.isNotEmpty(split)) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DistributionLoadscaninvnEntity> pushList = new ArrayList<>(); |
|
|
|
|
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
for (String s : split) { |
|
|
|
|
List<DisStockListDetailEntity> inventoryPackage = detailEntities.stream().filter(f -> Func.isNotEmpty(f.getStockPackageCode()) && f.getStockPackageCode().equals(s)).collect(Collectors.toList()); |
|
|
|
|
if (Func.isNotEmpty(inventoryPackage) && inventoryPackage.size() == 1) { |
|
|
|
@ -938,6 +942,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
loadscaninvnEntity.setSignforType(LoadScanSigningTypeStatusConstant.wenyuanpiliangqianshou.getValue()); |
|
|
|
|
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date())); |
|
|
|
|
loadscaninvnEntity.setOneQclick(1); |
|
|
|
|
pushList.add(loadscaninvnEntity); |
|
|
|
|
distributionLoadscaninvnService.updateById(loadscaninvnEntity); |
|
|
|
|
// //维护签收数量
|
|
|
|
|
// Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
|
|
|
|
@ -950,7 +955,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
//不存在装车数据,需要进行装车数据的补录
|
|
|
|
|
//库存品未进行装车
|
|
|
|
|
//这里装车的数据需要进行补录
|
|
|
|
|
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
|
|
|
|
|
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfDTO(); |
|
|
|
|
if (deliveryListEntity.getKind().equals(ServiceConstant.DELIVERLIST_KIND_SELF)) { |
|
|
|
|
distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectOne(new QueryWrapper<DistributionDeliverySelfEntity>().lambda() |
|
|
|
@ -1006,6 +1011,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionLoadscaninvnEntity.setSigningUserId(user.getUserId()); |
|
|
|
|
distributionLoadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date(System.currentTimeMillis() + (6 * 1000)))); |
|
|
|
|
distributionLoadscaninvnService.save(distributionLoadscaninvnEntity); |
|
|
|
|
pushList.add(distributionLoadscaninvnEntity); |
|
|
|
|
// //更新装车数量
|
|
|
|
|
// Integer j = distributionSignforMapper.updateLoadAndsignforByinvn(distributionLoadscaninvnEntity.getDeliveryId(), distributionLoadscaninvnEntity.getReservationId(), distributionLoadscaninvnEntity.getPackageNub());
|
|
|
|
|
//更新签收人
|
|
|
|
@ -1020,6 +1026,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
jsonObject.put("num", 1); |
|
|
|
|
jsonObject.put("remark", "文员签收"); |
|
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//修改对应库存品包件的签收数量
|
|
|
|
|
DisStockListDetailEntity disStockListDetailEntity = inventoryPackage.get(0); |
|
|
|
@ -1033,10 +1042,17 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects); |
|
|
|
|
// 增加PC库存品签收
|
|
|
|
|
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByStock(deliveryListEntity, pushList, OperatModeConstant.CLERK); |
|
|
|
|
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//维护签收数量
|
|
|
|
|
this.maintenanceSignfor(distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
|
|
|
|
|
|
return R.status(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1261,6 +1277,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
// DistributionDeliveryTripartiteVO deliveryTripartiteInfo = distributionDeliveryTripartiteMapper.getDeliveryTripartiteInfo(deliveryListEntity.getId());
|
|
|
|
|
// BeanUtils.copyProperties(deliveryTripartiteInfo, deliverySelfInfo);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DistributionLoadscanEntity> pushList = new ArrayList<>(); |
|
|
|
|
//查询该车次负责司机
|
|
|
|
|
for (DistributionReservationZeroPackageEntity reservationZeroPackageEntity : reservationZeroPackageEntities) { |
|
|
|
|
//查询订单
|
|
|
|
@ -1351,6 +1370,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
unLoadscanEntity.setOneQclick(1); |
|
|
|
|
unLoadscanEntity.setMsg("文员进行零担订单装车和签收补录"); |
|
|
|
|
distributionLoadscanService.save(unLoadscanEntity); |
|
|
|
|
pushList.add(unLoadscanEntity); |
|
|
|
|
//更新装车和签收数量
|
|
|
|
|
Integer i = distributionSignforMapper.updateSignforByReservationId(unLoadscanEntity.getDeliveryId(), unLoadscanEntity.getReservationId(), unLoadscanEntity.getReceivedQuantity()); |
|
|
|
|
//更新装车时间
|
|
|
|
@ -1380,6 +1400,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
loadscanEntity.setPackageNub(reservationZeroPackageEntity.getQuantity()); |
|
|
|
|
loadscanEntity.setMsg("文员进行签收补录"); |
|
|
|
|
distributionLoadscanService.updateById(loadscanEntity); |
|
|
|
|
pushList.add(loadscanEntity); |
|
|
|
|
|
|
|
|
|
distributionParcelNumberEntity.setHandQuantity(a); |
|
|
|
|
distributionParcelNumberEntity.setSigninQuantity(b); |
|
|
|
|
distributionParcelNumberEntity.setOutboundQuantity(c); |
|
|
|
@ -1400,6 +1422,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionDeliveryListService.updateById(deliveryListEntity); |
|
|
|
|
//维护客户状态
|
|
|
|
|
distributionReservationService.maintenanceReservationInfo(reservationId); |
|
|
|
|
|
|
|
|
|
// 发送作业节点
|
|
|
|
|
// 作业节点推送
|
|
|
|
|
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByZero(deliveryListEntity, pushList,OperatModeConstant.BATCH); |
|
|
|
|
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询计划和是否进行装车
|
|
|
|
|
return R.success("操作成功"); |
|
|
|
|
} |
|
|
|
@ -3139,14 +3168,30 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
|
|
|
|
|
for (DistributionLoadscanEntity distributionParcelListEntity : pushList) { |
|
|
|
|
PackageData packageData = new PackageData(); |
|
|
|
|
packageData.setPackageCode(distributionParcelListEntity.getOrderPackageCode()); |
|
|
|
|
packageData.setPackageType(PackageTypeEnums.CMP); |
|
|
|
|
packageData.setNumber(1); |
|
|
|
|
DistributionParcelListEntity distributionParcelListEntity1 = distributionParcelListService.selectByOrderPackageCode(distributionParcelListEntity.getOrderPackageCode(), distributionParcelListEntity.getWarehouseId()); |
|
|
|
|
if (Func.isNotEmpty(distributionParcelListEntity1)) { |
|
|
|
|
packageData.setBrand(distributionParcelListEntity1.getBrandName()); |
|
|
|
|
DistributionParcelListEntity distributionParcelListEntity1 = distributionParcelListService.getById(distributionParcelListEntity.getPackageId()); |
|
|
|
|
if(distributionParcelListEntity.getIsZero().equals(0)){ |
|
|
|
|
// 包件
|
|
|
|
|
packageData.setPackageType(PackageTypeEnums.CMP); |
|
|
|
|
packageData.setNumber(1); |
|
|
|
|
if (Func.isNotEmpty(distributionParcelListEntity1)) { |
|
|
|
|
packageData.setBrand(distributionParcelListEntity1.getBrandName()); |
|
|
|
|
packageData.setPackageCode(distributionParcelListEntity1.getOrderPackageCode()); |
|
|
|
|
packageData.setOrderCode(distributionParcelListEntity1.getOrderCode()); |
|
|
|
|
data.add(packageData); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}else if(distributionParcelListEntity.getIsZero().equals(1)){ |
|
|
|
|
// 零担
|
|
|
|
|
packageData.setPackageType(PackageTypeEnums.LTL); |
|
|
|
|
packageData.setNumber(distributionLoadscanEntity.getReceivedQuantity()); |
|
|
|
|
if (Func.isNotEmpty(distributionParcelListEntity1)) { |
|
|
|
|
packageData.setOrderCode(distributionParcelListEntity1.getOrderCode()); |
|
|
|
|
packageData.setBrand(distributionParcelListEntity1.getBrandName()); |
|
|
|
|
packageData.setWaybillNumber(distributionParcelListEntity1.getWaybillNumber()); |
|
|
|
|
packageData.setProductName(distributionParcelListEntity1.getFirsts()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
data.add(packageData); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3471,7 +3516,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
// 推送作业节点
|
|
|
|
|
|
|
|
|
|
// 作业节点数据推送
|
|
|
|
|
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity, distributionReservationEntity, pushDatas, OperatModeConstant.BATCH); |
|
|
|
|
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity, distributionReservationEntity, pushDatas, OperatModeConstant.CLERK); |
|
|
|
|
|
|
|
|
|
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); |
|
|
|
|
|
|
|
|
@ -6768,7 +6813,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
return Resp.scanFail("服务器正忙...", "服务器正忙"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); |
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
List<String> orderCodes = new ArrayList<>(); |
|
|
|
|
List<DistributionLoadscanEntity> pushList = new ArrayList<>(); |
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
@ -6978,7 +7023,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 作业节点推送
|
|
|
|
|
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByZero(deliveryListEntity, pushList); |
|
|
|
|
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByZero(deliveryListEntity, pushList, OperatModeConstant.SCAN); |
|
|
|
|
|
|
|
|
|
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); |
|
|
|
|
|
|
|
|
@ -6986,7 +7031,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
return Resp.scanSuccess("签收成功", str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildDistributionSignforVOByZero(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushList) { |
|
|
|
|
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildDistributionSignforVOByZero(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushList,String operatMode) { |
|
|
|
|
|
|
|
|
|
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = new NodeFanoutMsg(); |
|
|
|
|
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); |
|
|
|
@ -6996,7 +7041,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
nodeFanoutMsg.setOperator(AuthUtil.getNickName()); |
|
|
|
|
nodeFanoutMsg.setOperatorTime(distributionDeliveryListEntity.getUpdateTime()); |
|
|
|
|
|
|
|
|
|
// DistributionTaskVO taskVO = buildDistributionTaskVO(distributionDeliveryListEntity, AuthUtil.getUserId());
|
|
|
|
|
org.springblade.common.model.DistributionSignforVO distributionLoadVO = new org.springblade.common.model.DistributionSignforVO(); |
|
|
|
|
|
|
|
|
|
DistributionLoadscanEntity distributionLoadscanEntity = pushList.get(0); |
|
|
|
@ -7005,6 +7049,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionLoadVO.setDriverId(distributionLoadscanEntity.getDriverId()); |
|
|
|
|
distributionLoadVO.setVehicleName(distributionLoadscanEntity.getVehicleName()); |
|
|
|
|
distributionLoadVO.setVehicleId(distributionLoadscanEntity.getVehicleId()); |
|
|
|
|
distributionLoadVO.setOperatMode(operatMode); |
|
|
|
|
DistributionReservationEntity byId = distributionReservationService.getById(distributionLoadscanEntity.getReservationId()); |
|
|
|
|
if (!Func.isEmpty(byId)) { |
|
|
|
|
distributionLoadVO.setReservationCode(byId.getReservationCode()); |
|
|
|
|