diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java index cbca2c791..273be22ee 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java @@ -376,11 +376,11 @@ public class DistributionReservationController extends BladeController { } /** - * 预约列表 详情 + * 客户列表零担详情 */ @GetMapping("/getReservationZeroOrderDetail") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入distrbutionReservation") + @ApiOperation(value = "客户列表零担详情", notes = "传入distrbutionReservation") public R> getReservationZeroOrderDetail(@ApiIgnore @RequestParam Long id,@ApiIgnore @RequestParam Long reservationId) { List parcelNumberVOS = reservationService.getReservationZeroOrderDetail(id,reservationId); return R.data(parcelNumberVOS); @@ -388,20 +388,19 @@ public class DistributionReservationController extends BladeController { /** - * 预约列表 详情 + * 客户订单列表详情 */ @GetMapping("/getReservationPackageListByOrderId") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入distrbutionReservation") + @ApiOperation(value = "客户订单列表详情", notes = "传入distrbutionReservation") public R getReservationPackageListByorderId(@ApiIgnore @RequestParam Map packageDTO, Query query) { - R parcelListVOIPage = reservationService.getReservationPackageListByOrderId(packageDTO,Condition.getPage(query)); return R.data(parcelListVOIPage); } /** - * 预约列表 详情 + * 取消预约包件 */ @PostMapping("/cancelReservationPackage") @ApiOperationSupport(order = 1) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java index 7fd4ffea5..55d6d3be4 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java @@ -340,5 +340,5 @@ public interface IDistributionAsyncService { * 推送预约下包件转配送日志 * @param reservationIds */ - void recordsReservationDeliveryLog(String reservationIds,BasicdataWarehouseEntity warehouse,BladeUser user,String trainNumber); + void recordsReservationDeliveryLog(String reservationIds,BasicdataWarehouseEntity warehouse,BladeUser user,String trainNumber,Integer node,String content); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java index 11a19bfbe..8b05bbdf0 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java @@ -2977,7 +2977,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { @Override @LogpmAsync("asyncExecutor") - public void recordsReservationDeliveryLog(String reservationIds,BasicdataWarehouseEntity warehouse,BladeUser user,String trainNumber) { + public void recordsReservationDeliveryLog(String reservationIds,BasicdataWarehouseEntity warehouse,BladeUser user,String trainNumber,Integer node,String content) { List list = Func.toLongList(reservationIds); if (!list.isEmpty()) { List distributionReservationPackageEntities = distributionReservationPackageMapper.selectList(Wrappers.query().lambda() @@ -2987,7 +2987,6 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { List aaa = new ArrayList<>(); if (!distributionReservationPackageEntities.isEmpty()) { distributionReservationPackageEntities.forEach(rp->{ - String content = "包件在"+warehouse.getName()+"由"+ AuthUtil.getUser().getNickName()+"转车次任务,操作方式:批量预约任务转配送,车次号:"+trainNumber; JSONObject trunklinePackageTrackLog= new JSONObject(); trunklinePackageTrackLog.put("tenantId",AuthUtil.getTenantId()); trunklinePackageTrackLog.put("createTime",new Date()); @@ -3000,7 +2999,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { trunklinePackageTrackLog.put("orderPackageCode",rp.getPacketBarCode()); trunklinePackageTrackLog.put("warehouseId",warehouse.getId()); trunklinePackageTrackLog.put("warehouseName",warehouse.getName()); - trunklinePackageTrackLog.put("workNode",WorkNodeEnums.PLAN_DISTRIBUTION.getCode()); + trunklinePackageTrackLog.put("workNode",node); trunklinePackageTrackLog.put("content",content); trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName()); aaa.add(trunklinePackageTrackLog); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 4ab229496..57af1bf4e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -7344,7 +7344,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl ids = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + "orderCode:" + parcelListEntity.getOrderCode()); @@ -1716,7 +1665,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImplquery().lambda() .eq(DistributionParcelNumberEntity::getParcelListId, rzp.getParcelListId())); if (Func.isNotEmpty(parcelNumberEntity)) { -// parcelNumberEntity.setHandQuantity(parcelNumberEntity.getHandQuantity() + rzp.getQuantity()); parcelNumberEntity.setDeliveryQuantity(parcelNumberEntity.getDeliveryQuantity() - rzp.getQuantity()); distributionParcelNumberService.updateById(parcelNumberEntity); -// distributionAsyncService.checkZeroStockArticleReservationStatus(parcelNumberEntity); } distributionParcelListService.maintenanceZerpPackageInfo(rzp.getParcelListId()); @@ -2738,106 +2652,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl stockupInfoEntityList = distributionStockupInfoService.list(Wrappers.query().lambda() -// .eq(DistributionStockupInfoEntity::getStockupId, stockupEntity.getId())); -// boolean flag = stockupInfoEntityList.stream().allMatch(info -> Func.equals(info.getReservationId(), reservationEntity.getId())); -// if (flag){ -// //删除中间表和备货表 -// DistributionStockupInfoEntity stockupInfoEntity = stockupInfoEntityList.get(0); -// distributionStockupInfoMapper.deleteByReservationId(stockupInfoEntity.getReservationId()); -// distributionStockupMapper.deleteStockUpById(stockupInfoEntity.getStockupId()); -// }else { -// //只删除中间表 -// distributionStockupInfoMapper.deleteByReservationId(reservationEntity.getId()); -// } -// } -// //这里取消还需要对订单、包件、库存品的数据进行维护 -//// -------------------------------------------维护订单—————————————————————————————————————————————————————————————————————————— -// List reservationStockarticleEntityList = distributionReservationMapper.selectStockArticleByReservationId(reservationEntity.getId()); -// if (Func.isNotEmpty(reservationStockarticleEntityList)&&reservationStockarticleEntityList.size()>0){ -// List stockArticleList = distributionReservationMapper.getStockArticleList(reservationEntity.getId()); -// stockArticleList.forEach(s->{ -// if (s.getIsZero().equals(IsOrNoConstant.no.getValue())){ -// s.setReservationStatus(OrderReservationStatusConstant.daiyuyue.getValue()); -// distributionStockArticleService.updateById(s); -// }else { -// List reservationZeroPackageEntities = distributionReservationZeroPackageService.list(Wrappers.query().lambda() -// .eq(DistributionReservationZeroPackageEntity::getReservationId, reservationEntity.getId()) -// .eq(DistributionReservationZeroPackageEntity::getStockArticleId, s.getId()) -// .ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationOrderStatusConstant.quxiao.getValue())); -// } -// -// }); -// reservationStockarticleEntityList.forEach(rs->{ -// rs.setStockArticleStatus(ReservationOrderStatusConstant.quxiao.getValue()); -// distributionReservationStockarticleService.updateById(rs); -// }); -// } -//// ----------------------------------------维护包件———————————————————————————————————————————————————————————————————————————————————— -// List reservationPackageEntityList = distributionReservationMapper.selectReservationPackageByReservationId(reservationEntity.getId()); -// if (Func.isNotEmpty(reservationPackageEntityList) && reservationPackageEntityList.size() > 0){ -// List parcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationEntity.getId()); -// parcelListEntities.forEach(p->{ -// p.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue()); -// distributionParcelListService.updateById(p); -// }); -// reservationPackageEntityList.forEach(rp->{ -// rp.setPacketBarStatus(ReservationPackageStatusConstant.quxiao.getValue()); -// distributionReservationPackageService.updateById(rp); -// }); -// -// } -// -//// ——————————————————————————————————————————————————维护库存品——————————————————————————————————————————————————————————————————————————— -// -// -// }else { -// //仅仅标注该客户的预约计划取消 -//// -------------------------------------------维护订单—————————————————————————————————————————————————————————————————————————— -// List reservationStockarticleEntityList = distributionReservationMapper.selectStockArticleByReservationId(reservationEntity.getId()); -// if (Func.isNotEmpty(reservationStockarticleEntityList)&&reservationStockarticleEntityList.size()>0){ -// reservationStockarticleEntityList.forEach(rs->{ -// rs.setStockArticleStatus(ReservationOrderStatusConstant.quxiao.getValue()); -// distributionReservationStockarticleService.updateById(rs); -// }); -// } -//// ----------------------------------------维护包件———————————————————————————————————————————————————————————————————————————————————— -// List reservationPackageEntityList = distributionReservationMapper.selectReservationPackageByReservationId(reservationEntity.getId()); -// if (Func.isNotEmpty(reservationPackageEntityList) && reservationPackageEntityList.size() > 0){ -// reservationPackageEntityList.forEach(rp->{ -// rp.setPacketBarStatus(ReservationPackageStatusConstant.quxiao.getValue()); -// distributionReservationPackageService.updateById(rp); -// }); -// } -// -//// ——————————————————————————————————————————————————维护库存品——————————————————————————————————————————————————————————————————————————— -// List distributionReservationStocklistEntities = distributionReservationMapper.selectStockListByReservationId(reservationEntity.getId()); -// if (Func.isNotEmpty(distributionReservationStocklistEntities) && distributionReservationStocklistEntities.size() > 0){ -// //进行库存品库存数量的维护 -// distributionReservationStocklistEntities.forEach(i->{ -// DistributionStockListEntity stockListEntity = distributionStockListService.getById(i.getStocklistId()); -// stockListEntity.setQuantityOccupied(stockListEntity.getQuantityOccupied() - i.getReservationNum()); -// distributionStockListService.updateById(stockListEntity); -// i.setStockListStatus(ReservationInventoryStatusConstant.quxiao.getValue()); -// distributionReservationStocklistService.updateById(i); -// }); -// } -// } -// -// reservationEntity.setCancelReason(reservationDTO.getCancelReason()); -// reservationEntity.setReservationStatus(ReservationStatusConstant.yiquexiao.getValue()); -// this.updateById(reservationEntity); -// return true; -// } @Override public R getReservationPackage(String reservationId, String id) { @@ -3179,22 +2997,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl a = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() +"orderCode:"+ s.getOrderCode()); @@ -3382,8 +3161,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl { //如果库存品存在占用数量,这里就直接进行累加 //对库存品的数量进行维护,将预约单的库存品数量进行冻结 -// int count = i.getOutboundQuantity() + i.getReservationNum(); -// i.setQuantityOccupied(count); DistributionStockListEntity stockListEntity = distributionStockListService.getById(i.getId()); int keyongshuliang = stockListEntity.getQuantityStock() - stockListEntity.getQuantityOccupied(); if (i.getReservationNum() > keyongshuliang) { @@ -3449,7 +3226,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl selectListByDeliveryId(Long id) { return baseMapper.selectListByDeliveryId(id); } + + + + private JSONObject handleLogJSONObject(BasicdataWarehouseEntity warehouse,BladeUser user,String orderPackageCode,String content,Integer node) { + JSONObject trunklinePackageTrackLog = new JSONObject(); + trunklinePackageTrackLog.put("tenantId",user.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",warehouse.getDepartment()); + trunklinePackageTrackLog.put("orderPackageCode",orderPackageCode); + trunklinePackageTrackLog.put("warehouseId",warehouse.getId()); + trunklinePackageTrackLog.put("warehouseName",warehouse.getName()); + trunklinePackageTrackLog.put("workNode",node); + trunklinePackageTrackLog.put("content",content); + trunklinePackageTrackLog.put("operator",user.getNickName()); + return trunklinePackageTrackLog; + } }