diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineCarsLoadClient.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineCarsLoadClient.java index 0221da4a1..01c21ccdb 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineCarsLoadClient.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineCarsLoadClient.java @@ -24,4 +24,10 @@ public interface ITrunklineCarsLoadClient { @GetMapping(API_PREFIX+"/saveCostShareRecord") void saveCostShareRecord(@RequestParam Long loadId); + + @GetMapping(API_PREFIX+"/dealWaybillCancleCheck") + void dealWaybillCancleCheck(@RequestParam String waybillNo); + + @GetMapping(API_PREFIX+"/dealWaybillCheck") + void dealWaybillCheck(@RequestParam String waybillNo); } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java index e9eae61a5..e89a4137d 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java @@ -1369,5 +1369,31 @@ public class SyncOrderInfoToPlatform { } + @XxlJob("dealWaybillCheck") + public ReturnT dealWaybillCheck(String param) { + log.info("############dealWaybillCheck: 处理运单重新审核 开始"); + + List ls = warehouseMappingDataService.findAllDealWithWaybillNo(); + + ls.forEach(json -> { + Integer id = json.getInt("id"); + String waybillNo = json.getStr("waybillNo"); + + log.info("###################dealWaybillCheck: 当前处理的运单为 waybillNo={}",waybillNo); + + carsLoadClient.dealWaybillCancleCheck(waybillNo); + carsLoadClient.dealWaybillCheck(waybillNo); + + warehouseMappingDataService.updateStatusDealwithWaybillById(id); + }); + + + log.info("############dealWaybillCheck: 处理运单重新审核 完成"); + + return ReturnT.SUCCESS; + } + + + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineCarsLoadClient.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineCarsLoadClient.java index fcc562be3..dd11e1921 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineCarsLoadClient.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineCarsLoadClient.java @@ -2,6 +2,7 @@ package com.logpm.trunkline.feign; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.logpm.trunkline.entity.TrunklineCarsLoadEntity; +import com.logpm.trunkline.service.IOpenOrderService; import com.logpm.trunkline.service.ITrunklineCarsLoadService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController; public class TrunklineCarsLoadClient implements ITrunklineCarsLoadClient{ private final ITrunklineCarsLoadService carsLoadService; + private final IOpenOrderService openOrderService; @Override public TrunklineCarsLoadEntity findEntityByCarsNo(String carsNo) { @@ -35,4 +37,15 @@ public class TrunklineCarsLoadClient implements ITrunklineCarsLoadClient{ public void saveCostShareRecord(Long loadId) { carsLoadService.saveCostShareRecord(loadId); } + + @Override + public void dealWaybillCancleCheck(String waybillNo) { + + openOrderService.patchCancleCheckWaybill(waybillNo); + } + + @Override + public void dealWaybillCheck(String waybillNo) { + openOrderService.patchCheckWaybill(waybillNo); + } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/report/AdvanceDetailDealListener.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/report/AdvanceDetailDealListener.java index e8646b915..c9f7e3373 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/report/AdvanceDetailDealListener.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/report/AdvanceDetailDealListener.java @@ -327,6 +327,8 @@ public class AdvanceDetailDealListener { ReportPackageBasicEntity reportPackageBasicEntity = new ReportPackageBasicEntity(); reportPackageBasicEntity.setWaybillNo(waybill.getWaybillNo()); reportPackageBasicEntity.setOrderCode(waybill.getWaybillNo()); + reportPackageBasicEntity.setProductId(detail.getProductId()); + reportPackageBasicEntity.setProductName(detail.getProductName()); reportPackageBasicEntity.setNum(detail.getNum()); reportPackageBasicEntity.setWeight(detail.getWeight()); reportPackageBasicEntity.setVolume(detail.getVolume()); @@ -450,7 +452,7 @@ public class AdvanceDetailDealListener { reportPackageBasicEntity.setSystemType(entity.getSystemType()); reportPackageBasicEntity.setCustomerTrain(entity.getCustomerTrain()); reportPackageBasicEntity.setBrandId(entity.getBrandId()); - reportPackageBasicEntity.setBrand(entity.getBrand()); + reportPackageBasicEntity.setBrand(entity.getBrandName()); reportPackageBasicEntity.setWarehouse(warehouse); reportPackageBasicEntity.setWarehouseId(warehouseId); addList.add(reportPackageBasicEntity); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/report/CarsLoadDealListener.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/report/CarsLoadDealListener.java index bfc397c82..ebf9796e8 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/report/CarsLoadDealListener.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/report/CarsLoadDealListener.java @@ -275,6 +275,12 @@ public class CarsLoadDealListener { Map packageDataMap = packageDataListByPackageType.stream().collect(Collectors.toMap(PackageData::getPackageCode, Function.identity())); List packageBasicEntityList = reportPackageBasicService.findByOrderPackageCodes(packageCodes); + //把packageBasicEntityList转化成以orderPackageCode为key的Map + Map packageBasicEntityMap = packageBasicEntityList.stream().collect(Collectors.toMap(ReportPackageBasicEntity::getOrderPackageCode, Function.identity())); +// reportPackageTrunklineService. + + + packageBasicEntityList.forEach(entity -> { ReportPackageTrunklineEntity reportPackageTrunklineEntity = new ReportPackageTrunklineEntity(); reportPackageTrunklineEntity.setBasicId(entity.getId()); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java index bdbeb7e6b..4cb168b4c 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java @@ -109,5 +109,9 @@ public interface IOpenOrderService { */ R checkWaybillList(CheckWaybillListDTO openOrderDTO); + void patchCancleCheckWaybill(String waybillNo); + + void patchCheckWaybill(String waybillNo); + // R findWaybillInfo(String waybillNo); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java index cdcb4e54a..1ad29f079 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java @@ -869,7 +869,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { json.put("details", packageDataList); nodeFanoutMsg.setMain(json); - FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); + FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); sendFanoutService.sendFanoutMsg(fanoutMsg); } @@ -938,7 +938,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { json.put("details", packageDataList); nodeFanoutMsg.setMain(json); - FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); + FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); sendFanoutService.sendFanoutMsg(fanoutMsg); } @@ -973,7 +973,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { nodeFanoutMsg.setMain(json); - FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); + FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); sendFanoutService.sendFanoutMsg(fanoutMsg); } @@ -1011,7 +1011,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { json.put("details", packageDataList); nodeFanoutMsg.setMain(json); - FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); + FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); sendFanoutService.sendFanoutMsg(fanoutMsg); @@ -1052,7 +1052,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { nodeFanoutMsg.setMain(json); - FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); + FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); sendFanoutService.sendFanoutMsg(fanoutMsg); } @@ -1095,7 +1095,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { json.put("details", packageDataList); nodeFanoutMsg.setMain(json); - FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); + FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); sendFanoutService.sendFanoutMsg(fanoutMsg); @@ -1132,7 +1132,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { json.put("details", packageDataList); nodeFanoutMsg.setMain(json); - FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); + FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); sendFanoutService.sendFanoutMsg(fanoutMsg); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java index 5df0c6017..a575c73b1 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java @@ -197,6 +197,37 @@ public class OpenOrderServiceImpl implements IOpenOrderService { return R.success("批量审核成功"); } + @Override + public void patchCancleCheckWaybill(String waybillNo) { + + WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo); + if(!Objects.isNull(warehouseWaybillEntity)){ + OpenOrderDTO openOrderDTO = new OpenOrderDTO(); + openOrderDTO.setWaybillId(warehouseWaybillEntity.getId()); + openOrderDTO.setCheckRemark("系统皮脸处理"); + openOrderDTO.setWarehouseId(warehouseWaybillEntity.getDestinationWarehouseId()); + openOrderDTO.setWarehouseName(warehouseWaybillEntity.getDestinationWarehouseName()); + cancleCheckWaybill(openOrderDTO); + } + + } + + @Override + public void patchCheckWaybill(String waybillNo) { + + WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo); + if(!Objects.isNull(warehouseWaybillEntity)){ + OpenOrderDTO openOrderDTO = new OpenOrderDTO(); + openOrderDTO.setWaybillId(warehouseWaybillEntity.getId()); + openOrderDTO.setCheckRemark("系统皮脸处理"); + openOrderDTO.setCheckReson("系统审核"); + openOrderDTO.setWarehouseId(warehouseWaybillEntity.getDestinationWarehouseId()); + openOrderDTO.setWarehouseName(warehouseWaybillEntity.getDestinationWarehouseName()); + checkWaybill(openOrderDTO); + } + + } + @Override public List findAdvanceDetailList(Long advanceId) { return advanceDetailService.findList(advanceId); @@ -1163,7 +1194,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); nodeFanoutMsg.setNode(WorkNodeEnums.OPEN_ORDER); - nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); + nodeFanoutMsg.setBizOperation(BizOperationEnums.MODIFY); nodeFanoutMsg.setOperator(nickName); nodeFanoutMsg.setOperatorId(userId); nodeFanoutMsg.setWarehouse(warehouseName); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java index 7d3f7a941..1c99f8dd7 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java @@ -569,8 +569,8 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl