|
|
|
@ -1157,35 +1157,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
String reservationIds = allocationDTO.getReservationIds(); |
|
|
|
|
//创建备货任务
|
|
|
|
|
DistributionStockupDTO stockup = allocationDTO.getStockup(); |
|
|
|
|
// DistributionStockupEntity stockupentity = Func.copy(stockup, DistributionStockupEntity.class);
|
|
|
|
|
List<Long> ids = Func.toLongList(reservationIds); |
|
|
|
|
// DistributionStockupEntity distributionStockupEntity = Func.copy(stockup, DistributionStockupEntity.class);
|
|
|
|
|
Integer stockListTotal = distributionReservationStocklistMapper.getStockListTotal(ids); |
|
|
|
|
//这里判断是否选择了司机
|
|
|
|
|
// if (Func.isEmpty(stockupentity.getForkliftId())) {
|
|
|
|
|
// //这里就是米有选择司机
|
|
|
|
|
// distributionStockupEntity.setAssignStatus(StockAssignStatusConstant.weizhipai.getValue());
|
|
|
|
|
// distributionStockupEntity.setStockupStatus(StockupStatusConstant.weibeihuo.getValue());
|
|
|
|
|
// } else {
|
|
|
|
|
// distributionStockupEntity.setAssignTime(new Date());
|
|
|
|
|
// distributionStockupEntity.setAssignStatus(StockAssignStatusConstant.yizhipai.getValue());
|
|
|
|
|
// distributionStockupEntity.setStockupStatus(StockupStatusConstant.daibeihuo.getValue());
|
|
|
|
|
// distributionStockupEntity.if (Func.equals(reservationEntity.getStockupStatus(), ReservationStockupStatusConstant.weibeihuo.getValue())) {
|
|
|
|
|
// //如果预约已经备货
|
|
|
|
|
// DistributionStockupInfoEntity stockupInfoEntity = new DistributionStockupInfoEntity();
|
|
|
|
|
// stockupInfoEntity.setStockUpType(StockupTypeConstant.shipei.getValue());
|
|
|
|
|
// stockupInfoEntity.setReservationId(ids.get(i));
|
|
|
|
|
// stockupInfoEntity.setStockupId(distributionStockupEntity.getId());
|
|
|
|
|
// distributionStockupInfoService.save(stockupInfoEntity);
|
|
|
|
|
// reservationEntity.setStockupStatus(ReservationStockupStatusConstant.daibeihuo.getValue());
|
|
|
|
|
// }(stockup.getForkliftId());
|
|
|
|
|
// distributionStockupEntity.setForkliftName(stockup.getForkliftName());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
DistributionDeliveryListEntity distributionDeliveryListEntity = new DistributionDeliveryListEntity(); |
|
|
|
|
//设置车次号
|
|
|
|
|
// String today = DateUtil.today();
|
|
|
|
|
// String random = Func.random(7, RandomType.ALL);
|
|
|
|
|
String numberMa = trainNumberMa(); |
|
|
|
|
distributionDeliveryListEntity.setTrainNumber(numberMa); |
|
|
|
|
distributionDeliveryListEntity.setFee(BigDecimal.ZERO); |
|
|
|
@ -1220,35 +1195,11 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
stockupEntity = new DistributionStockupEntity(); |
|
|
|
|
stockupEntity.setAssignStatus(StockAssignStatusConstant.weizhipai.getValue()); |
|
|
|
|
stockupEntity.setStockupStatus(StockupStatusConstant.weibeihuo.getValue()); |
|
|
|
|
//这里就需要构建备货任务中间表
|
|
|
|
|
// if (Func.isNotEmpty(stockup.getGoodsAreaName())) {
|
|
|
|
|
// distributionStockupEntity.setStockupArea(stockup.getGoodsAreaName());
|
|
|
|
|
// distributionStockupEntity.setGoodsAreaId(stockup.getGoodsAreaId());
|
|
|
|
|
// }
|
|
|
|
|
// if (Func.isNotEmpty(stockup.getGoodsAreaName())) {
|
|
|
|
|
// distributionStockupEntity.setStockupArea(stockup.getGoodsAreaName());
|
|
|
|
|
// distributionStockupEntity.setGoodsAreaId(stockup.getGoodsAreaId());
|
|
|
|
|
// }
|
|
|
|
|
// if (Func.isNotEmpty(stockup.getLoadAndUnload())) {
|
|
|
|
|
// distributionStockupEntity.setTeamResponsibility(stockup.getLoadAndUnload());
|
|
|
|
|
// }
|
|
|
|
|
// if (Func.isNotEmpty(stockup.getOutboundDate())) {
|
|
|
|
|
// distributionStockupEntity.setOutboundDate(stockup.getOutboundDate());
|
|
|
|
|
// }
|
|
|
|
|
// if (Func.isNotEmpty(stockup.getStockupDate())) {
|
|
|
|
|
// distributionStockupEntity.setStockupDate(stockup.getStockupDate());
|
|
|
|
|
// }
|
|
|
|
|
// if (Func.isNotEmpty(stockup.getLoadAndUnload())) {
|
|
|
|
|
// distributionStockupEntity.setTeamResponsibility(stockup.getLoadAndUnload());
|
|
|
|
|
// }
|
|
|
|
|
// distributionStockupEntity.setStockupUser(user.getUserName());
|
|
|
|
|
// distributionStockupEntity.setStockupUserId(user.getUserId());
|
|
|
|
|
stockupEntity.setTypeService(DistributionTypeConstant.shipie.getValue()); |
|
|
|
|
//编码生成规则 BH+仓库编码+年月日+序号00001
|
|
|
|
|
stockupEntity.setStockupCode(bianMa()); |
|
|
|
|
stockupEntity.setStockupStatus(StockupStatusConstant.weibeihuo.getValue()); |
|
|
|
|
stockupEntity.setStockupDate(new Date()); |
|
|
|
|
// stockupEntity.setOutboundDate(new Date());
|
|
|
|
|
stockupEntity.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
|
distributionStockupService.save(stockupEntity); |
|
|
|
|
} |
|
|
|
@ -1273,7 +1224,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
reservationEntity.setStockupStatus(ReservationStockupStatusConstant.daibeihuo.getValue()); |
|
|
|
|
} |
|
|
|
|
DistributionSignforEntity distributionSignforEntity = new DistributionSignforEntity(); |
|
|
|
|
// String trainNumberMa = trainNumberMa();
|
|
|
|
|
distributionSignforEntity.setTrainNumber(numberMa); |
|
|
|
|
distributionSignforEntity.setReservationId(reservationEntity.getId()); |
|
|
|
|
distributionSignforEntity.setDeliveryId(distributionDeliveryListEntity.getId()); |
|
|
|
@ -1282,8 +1232,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
distributionSignforService.save(distributionSignforEntity); |
|
|
|
|
//修改预约信息为待配送
|
|
|
|
|
reservationEntity.setReservationStatus(ReservationStatusConstant.daipeisong.getValue()); |
|
|
|
|
//这里需要查询出订单数量
|
|
|
|
|
// Long count = distributionReservationStocklistService.getBaseMapper().selectCount(Wrappers.<DistributionReservationStocklistEntity>query().lambda().eq(DistributionReservationStocklistEntity::getReservationId, reservationEntity.getId()));
|
|
|
|
|
Integer orderCount = baseMapper.selectStockArticleCount(reservationEntity.getId()); |
|
|
|
|
//查询出该预约下的订单数量
|
|
|
|
|
//预约订单数量
|
|
|
|
@ -1291,7 +1239,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
//统计包件数量
|
|
|
|
|
packageNum.getAndAdd(reservationEntity.getReservationNum()); |
|
|
|
|
inventoryNum.getAndAdd(reservationEntity.getReservationStockListNum()); |
|
|
|
|
//TODO 设置是否齐套
|
|
|
|
|
this.updateById(reservationEntity); |
|
|
|
|
//订单自编号拼接
|
|
|
|
|
QueryWrapper<DistributionReservationStockarticleEntity> q = Condition.getQueryWrapper(new HashMap<String, Object>(), DistributionReservationStockarticleEntity.class); |
|
|
|
@ -1317,8 +1264,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
} else { |
|
|
|
|
stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue()); |
|
|
|
|
} |
|
|
|
|
//拼接订单编号
|
|
|
|
|
// orderIds.append(stockArticleEntity.getId()).append(",");
|
|
|
|
|
//拼接订单自编号
|
|
|
|
|
hashSet.add(stockArticleEntity.getOrderCode()); |
|
|
|
|
//存在数据来源,维护订单、包件和配送的关系
|
|
|
|
@ -1333,6 +1278,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
p.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.daibeihuo.getValue()); |
|
|
|
|
distributionParcelListService.updateById(p); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (!Func.isEmpty(reservationStocklistEntityList)) { |
|
|
|
@ -1348,16 +1294,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
} |
|
|
|
|
hashSet.add(stockListEntity.getOrderCode()); |
|
|
|
|
stockListId.append(stockListEntity.getId()).append(","); |
|
|
|
|
//这里需要将库存品信息和配送进行信息绑定
|
|
|
|
|
// DistributionLoadscaninvnEntity loadscaninvnEntity = new DistributionLoadscaninvnEntity();
|
|
|
|
|
// loadscaninvnEntity.setTrainNumber(distributionDeliveryListEntity.getTrainNumber());
|
|
|
|
|
//// packageNum.getAndAdd(l.getReservationNum());
|
|
|
|
|
// //TODO 需要设置库存品的SKU码*-
|
|
|
|
|
// loadscaninvnEntity.setReservationId(reservationEntity.getId());
|
|
|
|
|
// loadscaninvnEntity.setInventoryId(l.getStocklistId());
|
|
|
|
|
// loadscaninvnEntity.setPackageNub(l.getReservationNum());
|
|
|
|
|
// loadscaninvnEntity.setDeliveryId(distributionDeliveryListEntity.getId());
|
|
|
|
|
// distributionLoadscaninvnService.save(loadscaninvnEntity);
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1380,7 +1316,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
distributionDeliveryListEntity.setVehicleName(tripartiteEntity.getVehicleNum()); |
|
|
|
|
distributionDeliveryListEntity.setDistributionCompany(tripartite.getDistributionCompany()); |
|
|
|
|
distributionDeliveryListEntity.setDistributionCompanyId(tripartite.getDistributionCompanyId()); |
|
|
|
|
//TODO 这里可以对三方配送的机构编号进行添加
|
|
|
|
|
} else { |
|
|
|
|
//这里就是自主配送
|
|
|
|
|
List<DistributionDeliverySelfDTO> allocationInfo = allocationDTO.getAllocationInfo(); |
|
|
|
@ -1430,30 +1365,17 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
distributionDeliveryListEntity.setOrderNumber(orderNum.get()); |
|
|
|
|
distributionDeliveryListEntity.setType(DistributionTypeConstant.shipie.getValue()); |
|
|
|
|
distributionDeliveryListEntity.setOrderCode(String.join(",", hashSet)); |
|
|
|
|
// distributionDeliveryListEntity.setTaskTime(allocationDTO.getTaskTime());
|
|
|
|
|
distributionDeliveryListEntity.setNoteNumber(deliveryListMa()); |
|
|
|
|
distributionDeliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.weizhuangche.getValue()); |
|
|
|
|
String taskTime = allocationDTO.getTaskTime(); |
|
|
|
|
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
// Date parse = null;
|
|
|
|
|
// try {
|
|
|
|
|
// parse = format.parse(taskTime);
|
|
|
|
|
// } catch (ParseException e) {
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// }
|
|
|
|
|
if (Func.isNotEmpty(allocationDTO.getRemarks())) { |
|
|
|
|
distributionDeliveryListEntity.setRemarks(allocationDTO.getRemarks()); |
|
|
|
|
} |
|
|
|
|
distributionDeliveryListEntity.setTaskTime(taskTime); |
|
|
|
|
// distributionDeliveryListEntity.setNoteNumber(Func.random(13, RandomType.INT));
|
|
|
|
|
// if (orderIds.length() > 1) {
|
|
|
|
|
// distributionDeliveryListEntity.setOrderId(orderIds.deleteCharAt(orderIds.length() - 1).toString());
|
|
|
|
|
// }
|
|
|
|
|
// distributionDeliveryListEntity.setReservationId(reservationIds);
|
|
|
|
|
|
|
|
|
|
distributionDeliveryListEntity.setDeliveryNumber(packageNum.get()); |
|
|
|
|
distributionDeliveryListEntity.setInventoryNub(inventoryNum.get()); |
|
|
|
|
distributionDeliveryListService.updateById(distributionDeliveryListEntity); |
|
|
|
|
distributionAsyncService.recordsReservationDeliveryLog(reservationIds,myCurrentWarehouse,user,distributionDeliveryListEntity.getTrainNumber()); |
|
|
|
|
return R.status(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1550,7 +1472,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue()); |
|
|
|
|
distributionParcelListService.updateById(parcelListEntity); |
|
|
|
|
distributionAsyncService.checkStockArticleReservationStatus(p); |
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"新增计划配送,操作方式:新增订单选中包件,预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"新增计划市配配送,操作方式:新增订单选中包件,预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
|
|
|
|
|
JSONObject trunklinePackageTrackLog= new JSONObject(); |
|
|
|
|
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId()); |
|
|
|
@ -1597,7 +1519,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
distributionParcelListService.updateById(dp); |
|
|
|
|
distributionAsyncService.checkStockArticleReservationStatus(dp); |
|
|
|
|
|
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"新增计划配送,操作方式:新增订单系统默认选中,预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"新增计划市配配送,操作方式:新增订单系统默认选中,预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
JSONObject trunklinePackageTrackLog= new JSONObject(); |
|
|
|
|
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId()); |
|
|
|
|
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime()); |
|
|
|
@ -1757,7 +1679,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(reservationPackageEntity.getParceListId()); |
|
|
|
|
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue()); |
|
|
|
|
|
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"取消计划配送,操作方式:取消选中包件,预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"取消计划市配配送,操作方式:取消选中包件,预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
JSONObject trunklinePackageTrackLog= new JSONObject(); |
|
|
|
|
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId()); |
|
|
|
|
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime()); |
|
|
|
@ -1921,7 +1843,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
packageEntityList.forEach(p -> { |
|
|
|
|
p.setPacketBarStatus(ReservationPackageStatusConstant.quxiao.getValue()); |
|
|
|
|
distributionReservationPackageService.updateById(p); |
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"取消计划配送,操作方式:取消订单,预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"取消计划市配配送,操作方式:取消订单,预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
JSONObject trunklinePackageTrackLog= new JSONObject(); |
|
|
|
|
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId()); |
|
|
|
|
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime()); |
|
|
|
@ -2206,7 +2128,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
//获取所有订单
|
|
|
|
|
List<DistributionStockArticleDTO> stockArticle = allocationDTO.getStockArticle(); |
|
|
|
|
//根据运单号进行分组
|
|
|
|
|
//TODO 这里先根据运单号进行运单信息查询,后期根据运单进行
|
|
|
|
|
Map<String, List<DistributionStockArticleDTO>> mallClient = stockArticle.stream().collect(Collectors.groupingBy(DistributionStockArticleDTO::getConsigneeUnit)); |
|
|
|
|
//配送任务仓库名称
|
|
|
|
|
HashSet<String> deliveryWarehouseName = new HashSet<>(); |
|
|
|
@ -2221,13 +2142,13 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
//查询运单信息
|
|
|
|
|
//收货单位
|
|
|
|
|
Date date = new Date(); |
|
|
|
|
List<JSONObject> aaa = new ArrayList<>(); |
|
|
|
|
mallClient.forEach((k, v) -> { |
|
|
|
|
clientTotal.getAndIncrement(); |
|
|
|
|
// AtomicInteger receivingUnit = new AtomicInteger();
|
|
|
|
|
//这里查询有问题
|
|
|
|
|
DistributionReservationDTO reservation = allocationDTO.getReservation(); |
|
|
|
|
DistributionReservationEntity reservationEntity = Func.copy(reservation, DistributionReservationEntity.class); |
|
|
|
|
reservationEntity.setWaybillNo(k); |
|
|
|
|
reservationEntity.setReservationCode(reservationMa()); |
|
|
|
|
reservationEntity.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
|
reservationEntity.setReservationStatus(ReservationStatusConstant.daipeisong.getValue()); |
|
|
|
|
//这里采用订单上的收货信息
|
|
|
|
@ -2236,10 +2157,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
//订单号
|
|
|
|
|
HashSet<String> orderNumber = new HashSet<>(); |
|
|
|
|
//运单号
|
|
|
|
|
// HashSet<String> waybillNo = new HashSet<>();
|
|
|
|
|
//运单ID -------这里运单Id后续可能变更为运单号
|
|
|
|
|
HashSet<String> waybillId = new HashSet<>(); |
|
|
|
|
|
|
|
|
|
HashSet<String> waybillNo = new HashSet<>(); |
|
|
|
|
//订单服务号
|
|
|
|
|
HashSet<String> serviceNumber = new HashSet<>(); |
|
|
|
@ -2268,14 +2186,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
v.forEach(s -> { |
|
|
|
|
List<Long> packageLockIds = new ArrayList<>(); |
|
|
|
|
DistributionStockArticleDTO stockArticleDTO = Func.copy(s, DistributionStockArticleDTO.class); |
|
|
|
|
// WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(s.getWaybillNumber());
|
|
|
|
|
// if (Func.isNotEmpty(warehouseWaybillEntity.getConsigneeMobile())){
|
|
|
|
|
// marketPhone.add(warehouseWaybillEntity.getConsigneeMobile());
|
|
|
|
|
// }
|
|
|
|
|
// if (Func.isNotEmpty(warehouseWaybillEntity.getConsigneeAddress())){
|
|
|
|
|
// consigneeAddress.add(warehouseWaybillEntity.getConsigneeMobile());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
WarehouseWaybillEntity wayBillEntity = warehouseWaybillClient.findByWaybillNo(s.getWaybillNumber()); |
|
|
|
|
if (Func.isNotEmpty(wayBillEntity)) { |
|
|
|
|
waybillId.add(wayBillEntity.getId().toString()); |
|
|
|
@ -2299,15 +2209,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
if (Func.isNotEmpty(s.getOrderCode())) { |
|
|
|
|
orderNumber.add(s.getOrderCode()); |
|
|
|
|
} |
|
|
|
|
// if (Func.isNotEmpty(s.getWaybillNumber())){
|
|
|
|
|
// waybillNo.add(s.getWaybillNumber());
|
|
|
|
|
// }
|
|
|
|
|
if (Func.isNotEmpty(s.getWarehouse())) { |
|
|
|
|
warehouseName.add(s.getWarehouse()); |
|
|
|
|
} |
|
|
|
|
// if (Func.isNotEmpty(s.getWaybillId())){
|
|
|
|
|
// waybillId.add(s.getWaybillId().toString());
|
|
|
|
|
// }
|
|
|
|
|
if (Func.isNotEmpty(s.getWaybillNumber())) { |
|
|
|
|
waybillNo.add(s.getWaybillNumber()); |
|
|
|
|
} |
|
|
|
@ -2320,9 +2224,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
if (Func.isNotEmpty(s.getConsigneeMobile())) { |
|
|
|
|
consigneeMobile.add(s.getConsigneeMobile()); |
|
|
|
|
} |
|
|
|
|
// if (Func.isNotEmpty(s.getConsigneeAddress())){
|
|
|
|
|
// consigneeAddress.add(s.getConsigneeAddress());
|
|
|
|
|
// }
|
|
|
|
|
if (Func.isNotEmpty(s.getServiceNumber())) { |
|
|
|
|
serviceNumber.add(s.getServiceNumber()); |
|
|
|
|
} |
|
|
|
@ -2346,6 +2247,25 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
packageLockIds.add(p.getId()); |
|
|
|
|
//这里根据包件进行订单状态的改变
|
|
|
|
|
// distributionAsyncService.checkStockArticleReservationStatus(p);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+ AuthUtil.getUser().getNickName()+"计划商配配送,操作方式:订单选择包件,预约任务号:"+reservation.getReservationCode()+",车次号:"+distributionDeliveryListEntity.getTrainNumber(); |
|
|
|
|
JSONObject trunklinePackageTrackLog= new JSONObject(); |
|
|
|
|
trunklinePackageTrackLog.put("tenantId",p.getTenantId()); |
|
|
|
|
trunklinePackageTrackLog.put("createTime",new Date()); |
|
|
|
|
trunklinePackageTrackLog.put("createUser",user.getUserId()); |
|
|
|
|
trunklinePackageTrackLog.put("updateUser",user.getUserId()); |
|
|
|
|
trunklinePackageTrackLog.put("updateTime",new Date()); |
|
|
|
|
trunklinePackageTrackLog.put("isDeleted",0); |
|
|
|
|
trunklinePackageTrackLog.put("status",1); |
|
|
|
|
trunklinePackageTrackLog.put("createDept",reservationPackageEntity.getCreateDept()); |
|
|
|
|
trunklinePackageTrackLog.put("orderPackageCode",reservationPackageEntity.getPacketBarCode()); |
|
|
|
|
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId()); |
|
|
|
|
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName()); |
|
|
|
|
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.PLAN_DISTRIBUTION.getCode()); |
|
|
|
|
trunklinePackageTrackLog.put("content",content); |
|
|
|
|
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName()); |
|
|
|
|
aaa.add(trunklinePackageTrackLog); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
//没有进行包件选择 默认添加可配送的所有包件
|
|
|
|
@ -2378,14 +2298,27 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
distributionParcelListService.updateById(dp); |
|
|
|
|
distributionAsyncService.checkStockArticleReservationStatus(dp); |
|
|
|
|
packageLockIds.add(dp.getId()); |
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+ AuthUtil.getUser().getNickName()+"计划商配配送,操作方式:系统默认选择可用包件,预约任务号:"+reservation.getReservationCode()+",车次号:"+distributionDeliveryListEntity.getTrainNumber(); |
|
|
|
|
JSONObject trunklinePackageTrackLog= new JSONObject(); |
|
|
|
|
trunklinePackageTrackLog.put("tenantId",dp.getTenantId()); |
|
|
|
|
trunklinePackageTrackLog.put("createTime",new Date()); |
|
|
|
|
trunklinePackageTrackLog.put("createUser",user.getUserId()); |
|
|
|
|
trunklinePackageTrackLog.put("updateUser",user.getUserId()); |
|
|
|
|
trunklinePackageTrackLog.put("updateTime",new Date()); |
|
|
|
|
trunklinePackageTrackLog.put("isDeleted",0); |
|
|
|
|
trunklinePackageTrackLog.put("status",1); |
|
|
|
|
trunklinePackageTrackLog.put("createDept",distributionReservationPackageEntity.getCreateDept()); |
|
|
|
|
trunklinePackageTrackLog.put("orderPackageCode",distributionReservationPackageEntity.getPacketBarCode()); |
|
|
|
|
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId()); |
|
|
|
|
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName()); |
|
|
|
|
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.PLAN_DISTRIBUTION.getCode()); |
|
|
|
|
trunklinePackageTrackLog.put("content",content); |
|
|
|
|
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName()); |
|
|
|
|
aaa.add(trunklinePackageTrackLog); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
|
|
|
|
|
}); |
|
|
|
|
// s.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
|
|
|
|
|
// s.setAvailableQuantity(0);
|
|
|
|
|
// distributionStockArticleService.updateById(s);
|
|
|
|
|
} |
|
|
|
|
//维护订单信息
|
|
|
|
|
distributionStockArticleService.maintenanceOrderInfo(s.getOrderCode(),myCurrentWarehouse.getId()); |
|
|
|
@ -2506,7 +2439,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
// reservationEntity.setWaybillId(String.join(",", waybillId));
|
|
|
|
|
reservationEntity.setReservationDate(date); |
|
|
|
|
// -----------------------预约信息完善----------------------------
|
|
|
|
|
reservationEntity.setReservationCode(reservationMa()); |
|
|
|
|
reservationEntity.setReplaceFee(BigDecimal.ZERO); |
|
|
|
|
reservationEntity.setFee(BigDecimal.ZERO); |
|
|
|
|
reservationEntity.setCollectFee(BigDecimal.ZERO); |
|
|
|
@ -2631,7 +2563,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
distributionDeliveryListEntity.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
|
distributionDeliveryListService.updateById(distributionDeliveryListEntity); |
|
|
|
|
//推送信息至运单追中日志
|
|
|
|
|
|
|
|
|
|
if (!aaa.isEmpty()) { |
|
|
|
|
trunklinePackageTrackLogClient.addPackageTrackLog(aaa); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 创建处理商场信息队列
|
|
|
|
|
createBusinessPreConversionQueue(distributionDeliveryListEntity.getId()); |
|
|
|
@ -3299,7 +3233,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
p.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue()); |
|
|
|
|
distributionParcelListService.updateById(p); |
|
|
|
|
orderPackageCodes.add(p.getOrderPackageCode()); |
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"计划配送,操作方式:选择包件,预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"计划市配配送,操作方式:选择包件,预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
JSONObject trunklinePackageTrackLog= new JSONObject(); |
|
|
|
|
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId()); |
|
|
|
|
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime()); |
|
|
|
|