diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java index 4187b249c..f41e3c9f9 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java @@ -129,7 +129,7 @@ public interface IDistributionDeliveryListClient { void maintenanceDeliveryInfoByWarehouseId(@RequestParam("warehouseId")String params); @GetMapping(TOP+"/pushNotification") - void pushNotification(String params); + void pushNotification(@RequestParam("warehouseIds")String warehouseIds,@RequestParam("reservationCode")String reservationCode); // /** diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java index 79a3cfcc9..65788196f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java @@ -120,9 +120,9 @@ public class DistributionDeliveryListClient implements IDistributionDeliveryList * @param params */ @Override - public void pushNotification(String params) { + public void pushNotification(String warehouseIds,String reservationCode) { - distributionDeliveryListService.pushNotification(params); + distributionDeliveryListService.pushNotification(warehouseIds,reservationCode); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java index 2609de68f..b70116412 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java @@ -356,5 +356,5 @@ public interface DistributionSignforMapper extends BaseMapper pushNotification(@Param("warehouseIds") List warehouseIds); + List pushNotification(@Param("warehouseIds") List id,@Param("reservationCodes")List reservationCodes); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml index 7a6740736..182a193c3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml @@ -1401,8 +1401,14 @@ #{warehouseId} + + AND ldr.reservation_code in + + #{code} + + - GROUP BY ldr.warehouse_id + GROUP BY ldr.warehouse_id,lds.id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java index 8cf504e91..ad0d129c7 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java @@ -446,7 +446,7 @@ public interface IDistributionDeliveryListService extends BaseService warehouseIds = null; - if (Strings.isNotBlank(params)){ - warehouseIds = Arrays.stream(params.split(",")).collect(Collectors.toList()); - } - List reservationEntityList = distributionReservationService.list(Wrappers.query().lambda() - .in(DistributionReservationEntity::getWarehouseId, warehouseIds) - .ne(DistributionReservationEntity::getReservationStatus, ReservationStatusConstant.yiquexiao.getValue()) - .apply("(reservation_num + reservation_stock_list_num) > 0") - .apply("date_format(create_time,'%y%m%d%') <= date_format('2024-04-28','%y%m%d%')") - ); - List pushNotification = distributionSignforMapper.pushNotification(warehouseIds); + public void pushNotification(String warehouseIds,String reservationCode) { + List wIds = null; + if (Strings.isNotBlank(warehouseIds)){ + wIds = Arrays.stream(warehouseIds.split(",")).map(Long::valueOf).collect(Collectors.toList()); + } + List rCode = null; + if (Strings.isNotBlank(reservationCode)){ + rCode = Arrays.stream(reservationCode.split(",")).collect(Collectors.toList()); + } + List pushNotification = distributionSignforMapper.pushNotification(wIds,rCode); if (!pushNotification.isEmpty()){ for (PushNotificationDTO pushNotificationDTO : pushNotification) { distributionAsyncService.sendReviewFactory(pushNotificationDTO.getId(), pushNotificationDTO.getWarehouseName(), pushNotificationDTO.getWarehouseId()); diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java index b661f19a0..da63c3267 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java @@ -1,6 +1,7 @@ package com.logpm.patch.jobhandle; +import com.alibaba.fastjson.JSONObject; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.feign.IDistributionDeliveryListClient; import com.logpm.distribution.feign.IDistributionReservationClient; @@ -8,6 +9,7 @@ import com.logpm.patch.service.ISyncDistributionParcelListService; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.handler.annotation.XxlJob; +import io.jsonwebtoken.lang.Objects; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.tool.utils.Func; @@ -167,11 +169,19 @@ public class DistributionDatarepair { */ @XxlJob("pushNotification") public ReturnT pushNotification(String params) { + JSONObject jsonObject = JSONObject.parseObject(params); + String warehouseIds =""; + String reservationCode =""; + if (!jsonObject.isEmpty()){ + warehouseIds = jsonObject.getString("warehouseIds"); + reservationCode = jsonObject.getString("reservationCode"); + } + //维护配送的状态 - String method = "######################DistributionDatarepair.maintenanceDeliveryStatus"; - log.info(method+"维护配送订单id:{}",params); - deliveryListClient.pushNotification(params); - log.info(method+"维护配送订单结束"); + String method = "######################DistributionDatarepair.pushNotification"; + log.info(method+"推送老系统:{}",params); + deliveryListClient.pushNotification(warehouseIds,reservationCode); + log.info(method+"推送老系统"); return ReturnT.SUCCESS; }