Browse Source

推送老系统已签收预约

dist.1.3.0
汤建军 9 months ago
parent
commit
1ec0782bc4
  1. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java
  2. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  4. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  5. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  6. 22
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  7. 18
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java

2
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);
// /**

4
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);
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java

@ -356,5 +356,5 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @param warehouseIds
* @return
*/
List<PushNotificationDTO> pushNotification(@Param("warehouseIds") List<String> warehouseIds);
List<PushNotificationDTO> pushNotification(@Param("warehouseIds") List<Long> id,@Param("reservationCodes")List<String> reservationCodes);
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -1401,8 +1401,14 @@
#{warehouseId}
</foreach>
</if>
<if test="reservationCodes != null and reservationCodes.size > 0" >
AND ldr.reservation_code in
<foreach collection="reservationCodes" item="code" index="index" open="(" close=")" separator=",">
#{code}
</foreach>
</if>
</where>
GROUP BY ldr.warehouse_id
GROUP BY ldr.warehouse_id,lds.id
</select>
</mapper>

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java

@ -446,7 +446,7 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
* 推送老系统
* @param params
*/
void pushNotification(String params);
void pushNotification(String warehouseIds , String reservationCode);
/**

22
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -7337,18 +7337,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
* @param params
*/
@Override
public void pushNotification(String params) {
List<String> warehouseIds = null;
if (Strings.isNotBlank(params)){
warehouseIds = Arrays.stream(params.split(",")).collect(Collectors.toList());
}
List<DistributionReservationEntity> reservationEntityList = distributionReservationService.list(Wrappers.<DistributionReservationEntity>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<PushNotificationDTO> pushNotification = distributionSignforMapper.pushNotification(warehouseIds);
public void pushNotification(String warehouseIds,String reservationCode) {
List<Long> wIds = null;
if (Strings.isNotBlank(warehouseIds)){
wIds = Arrays.stream(warehouseIds.split(",")).map(Long::valueOf).collect(Collectors.toList());
}
List<String> rCode = null;
if (Strings.isNotBlank(reservationCode)){
rCode = Arrays.stream(reservationCode.split(",")).collect(Collectors.toList());
}
List<PushNotificationDTO> pushNotification = distributionSignforMapper.pushNotification(wIds,rCode);
if (!pushNotification.isEmpty()){
for (PushNotificationDTO pushNotificationDTO : pushNotification) {
distributionAsyncService.sendReviewFactory(pushNotificationDTO.getId(), pushNotificationDTO.getWarehouseName(), pushNotificationDTO.getWarehouseId());

18
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<String> 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;
}

Loading…
Cancel
Save