Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dist.1.3.0
pref_mail@163.com 11 months ago
parent
commit
65ef4755a8
  1. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java
  2. 5
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/dto/SignPushDataDTO.java
  3. 41
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/PushNotificationDTO.java
  4. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java
  5. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  7. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  8. 22
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  9. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  10. 33
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  11. 17
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java

@ -128,6 +128,9 @@ public interface IDistributionDeliveryListClient {
@GetMapping(TOP+"/maintenanceDeliveryInfoByWarehouseId")
void maintenanceDeliveryInfoByWarehouseId(@RequestParam("warehouseId")String params);
@GetMapping(TOP+"/pushNotification")
void pushNotification(String params);
// /**
// * 根据配送任务ID查询配送司机信息

5
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/dto/SignPushDataDTO.java

@ -125,6 +125,11 @@ public class SignPushDataDTO {
*/
private String kind;
/**
* 复核时间
*/
private Date reviewTime;
/**
* 签收客户集合
*/

41
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/PushNotificationDTO.java

@ -0,0 +1,41 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 签收管理 数据传输对象实体类
*
* @author lmy
* @since 2023-06-13
*/
@Data
public class PushNotificationDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Long id ;
private Long warehouseId;
private String warehouseName;
}

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.feign;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO;
@ -25,6 +26,7 @@ import com.logpm.distribution.vo.DistributionDeliveryListVO;
import com.logpm.distribution.vo.DistributionDeliverySelfVO;
import com.logpm.distribution.vo.DistributionRetentionScanVo;
import lombok.AllArgsConstructor;
import org.apache.logging.log4j.util.Strings;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -114,5 +116,14 @@ public class DistributionDeliveryListClient implements IDistributionDeliveryList
}
/**
* @param params
*/
@Override
public void pushNotification(String params) {
distributionDeliveryListService.pushNotification(params);
}
}

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -1905,6 +1905,7 @@
lddl.kind AS kind,
lddl.warehouse_id AS warehouseId,
lddl.warehouse_name AS warehouseName,
lds.signing_time AS reviewTime,
CASE lddl.type
WHEN 1 THEN 2
WHEN 2 THEN 1

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

@ -1364,7 +1364,7 @@
ldr.delivery_phone AS phone,
(ldr.reservation_num + ldr.reservation_stock_list_num) AS plan,
(lds.loaded_number + lds.loadedin_number) AS actualPlan,
lddl.delivery_number AS delivery,
ldr.reservation_num AS delivery,
(lds.received_quantity + lds.receivedin_quantity) AS sign,
lds.signing_status AS state,
lds.create_time AS createTime,

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

@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.dto.PushNotificationDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionReservationEntity;
@ -350,4 +351,10 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
List<Map<String, Object>> getByReservationIds(@Param("reservationIds") List<Long> longList);
/**
* 查询需要推送老系统的签收信息
* @param warehouseIds
* @return
*/
List<PushNotificationDTO> pushNotification(@Param("warehouseIds") List<String> warehouseIds);
}

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

@ -1381,4 +1381,26 @@
</foreach>
</select>
<select id="pushNotification" resultType="com.logpm.distribution.dto.PushNotificationDTO">
SELECT
lds.id AS id, ldr.warehouse_id AS warehouseId,ldr.warehouse_name AS warehouseName
FROM
logpm_distribution_reservation AS ldr
LEFT JOIN logpm_distribution_signfor AS lds ON ldr.id = lds.reservation_id
WHERE
ldr.is_deleted = 0
AND lds.is_deleted = 0
AND ( ldr.reservation_num + ldr.reservation_stock_list_num ) > 0
AND date_format( lds.signing_time, '%y%m%d%' ) <= date_format(
'2024-04-28',
'%y%m%d%')
AND lds.signing_status = 2
<if test="warehouseIds != null and warehouseIds.size > 0">
AND ldr.warehouse_id in
<foreach collection="warehouseIds" item="warehouseId" index="index" open="(" close=")" separator=",">
#{warehouseId}
</foreach>
</if>
GROUP BY ldr.warehouse_id
</select>
</mapper>

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

@ -442,6 +442,12 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
*/
DistributionDeliveryExcelDTO exportDistributionDeliveryListDetail(Long deliveryId);
/**
* 推送老系统
* @param params
*/
void pushNotification(String params);
/**
* 查询签收预约客户包件信息

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

@ -53,6 +53,7 @@ import com.logpm.warehouse.feign.*;
import com.logpm.warehouse.vo.TrayTypeDataVO;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.util.Strings;
import org.jetbrains.annotations.NotNull;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.Inventory.InventoryLoadingStatusConstant;
@ -4131,9 +4132,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<Long> newReservationIds = reservationInfos.stream().map(DistributionReservationDTO::getId).collect(Collectors.toList());
List<DistributionReservationEntity> distributionReservationEntities = distributionReservationMapper.selectList(Wrappers.<DistributionReservationEntity>query().lambda().in(DistributionReservationEntity::getId, newReservationIds));
List<DistributionReservationEntity> needStockUpReservationList = distributionReservationEntities.stream().filter(r -> r.getStockupStatus().equals(ReservationStockupStatusConstant.weibeihuo.getValue())).collect(Collectors.toList());
DistributionStockupEntity stockupEntity = null;
BladeUser user = AuthUtil.getUser();
if (Func.isNotEmpty(needStockUpReservationList)) {
log.info("修改市配配送任务需要进行备货的预约计划>>>reservationCodes:{}",needStockUpReservationList.stream().map(DistributionReservationEntity::getReservationCode).collect(Collectors.joining(",")));
//需要进行备货的预约列表
stockupEntity = new DistributionStockupEntity();
stockupEntity.setAssignStatus(StockAssignStatusConstant.weizhipai.getValue());
@ -4159,6 +4162,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionStockupInfoEntity.setStockupId(stockupEntity.getId());
distributionStockupInfoEntity.setStockUpType(distributionReservationEntity.getDeliveryType());
distributionStockupInfoService.save(distributionStockupInfoEntity);
distributionReservationService.update(Wrappers.<DistributionReservationEntity>update().lambda()
.eq(DistributionReservationEntity::getId,distributionReservationEntity.getId())
.set(DistributionReservationEntity::getStockupStatus,ReservationStockupStatusConstant.daibeihuo.getValue())
);
log.info("编辑配送车次维护预约备货状态 reservationId>>>>>>>>>>>>>>>>>:{}",distributionReservationEntity.getId());
}
}
//这里暂时不考虑出现新增的情况
@ -4194,8 +4202,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionSignforEntity.setSigningStatus(SignforStatusConstant.daiqianshou.getValue());
distributionSignforEntity.setDriverSigning(SignforStatusConstant.daiqianshou.getValue());
distributionSignforService.save(distributionSignforEntity);
distributionReservationEntity.setReservationStatus(ReservationStatusConstant.daipeisong.getValue());
distributionReservationMapper.updateById(distributionReservationEntity);
}
});
@ -7327,6 +7333,29 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return distributionDeliveryExcelDTO;
}
/**
* @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);
if (!pushNotification.isEmpty()){
for (PushNotificationDTO pushNotificationDTO : pushNotification) {
distributionAsyncService.sendReviewFactory(pushNotificationDTO.getId(), pushNotificationDTO.getWarehouseName(), pushNotificationDTO.getWarehouseId());
}
}
}
@Override
@Transactional
public void maintenanceDeliveryInfo(Long deliveryId) {

17
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java

@ -161,6 +161,23 @@ public class DistributionDatarepair {
/**
* 推送老系统系统
* @return
*/
@XxlJob("pushNotification")
public ReturnT<String> pushNotification(String params) {
//维护配送的状态
String method = "######################DistributionDatarepair.maintenanceDeliveryStatus";
log.info(method+"维护配送订单id:{}",params);
deliveryListClient.pushNotification(params);
log.info(method+"维护配送订单结束");
return ReturnT.SUCCESS;
}

Loading…
Cancel
Save