Browse Source

配送信息维护

pull/2/head
汤建军 1 year ago
parent
commit
b5814ba3c4
  1. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java
  2. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java
  3. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  4. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  5. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  6. 8
      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

@ -118,7 +118,7 @@ public interface IDistributionDeliveryListClient {
* @return
*/
@GetMapping(TOP+"/maintenanceDeliveryInfo")
void maintenanceDeliveryInfo(@RequestParam("deliveryId")Long deliveryId);
void maintenanceDeliveryInfo(@RequestParam("deliveryId")String deliveryId);

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

@ -90,12 +90,12 @@ public class DistributionDeliveryListClient implements IDistributionDeliveryList
}
/**
* @param deliveryId
* @param deliveryIds
* @return
*/
@Override
public void maintenanceDeliveryInfo(Long deliveryId) {
distributionDeliveryListService.maintenanceDeliveryInfoAndDeliveryStatus(deliveryId);
public void maintenanceDeliveryInfo(String deliveryIds) {
distributionDeliveryListService.maintenanceDeliveryInfoAndDeliveryStatus(deliveryIds);
}

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

@ -211,7 +211,7 @@
left JOIN logpm_distribution_signfor lds on lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation ldr on ldr.id = lds.reservation_id
<where>
lddl.is_deleted = 0 AND (IF(lddl.delivery_number is null ,0,lddl.delivery_number) + IF(lddl.inventory_nub is null ,0,lddl.inventory_nub)) > 0 AND lddl.customers_number > 0
lddl.is_deleted = 0 AND (IF(lddl.delivery_number is null ,0,lddl.delivery_number) + IF(lddl.inventory_nub is null ,0,lddl.inventory_nub)) > 0 AND (lddl.customers_number > 0 AND ldr.reservation_num + ldr.reservation_stock_list_num) >0
<if test="param.trainNumber != null and param.trainNumber!=''">
and lddl.train_number like concat('%',#{param.trainNumber},'%')
</if>
@ -2019,7 +2019,7 @@
FROM
logpm_distribution_signfor
WHERE
delivery_id = #{deliveryId}})
delivery_id = #{deliveryId})
AND reservation_num > 0
AND stock_article_status IN ('1','3')
</select>

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

@ -428,9 +428,9 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
/**
* 维护配送信息和状态
* @param deliveryId
* @param deliveryIds
*/
void maintenanceDeliveryInfoAndDeliveryStatus(Long deliveryId);
void maintenanceDeliveryInfoAndDeliveryStatus(String deliveryIds);
/**

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

@ -6749,6 +6749,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
int inventoryNum = distributionReservationEntities.stream().mapToInt(DistributionReservationEntity::getReservationStockListNum).sum();
deliveryListEntity.setDeliveryNumber(packageNum);
deliveryListEntity.setInventoryNub(inventoryNum);
//维护预约任务客户
// String collect = distributionReservationEntities.stream().map(DistributionReservationEntity::getConsignee).collect(Collectors.joining(","));
// deliveryListEntity.setClineName(collect);
}
List<DistributionReservationEntity> collect = distributionReservationEntities.stream().filter(f -> (f.getReservationNum() + f.getReservationStockListNum()) > 0).collect(Collectors.toList());
log.info(deliveryListEntity.getTrainNumber()+"#################维护配送任务客户数>>>>>>>,:{}",collect.size());
@ -6824,13 +6827,18 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
/**
* @param deliveryId
* @param deliveryIds
*/
@Override
@Transactional
public void maintenanceDeliveryInfoAndDeliveryStatus(Long deliveryId) {
this.maintenanceDeliveryNum(deliveryId);
this.maintenanceDeliveryInfo(deliveryId);
public void maintenanceDeliveryInfoAndDeliveryStatus(String deliveryIds) {
if (Func.isNotEmpty(deliveryIds)) {
for (Long l : Func.toLongList(deliveryIds)) {
this.maintenanceDeliveryNum(l);
this.maintenanceDeliveryInfo(l);
}
}
}

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

@ -2,6 +2,7 @@ package com.logpm.patch.jobhandle;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.feign.IDistributionDeliveryListClient;
import com.logpm.patch.service.ISyncDistributionParcelListService;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.xxl.job.core.biz.model.ReturnT;
@ -28,6 +29,8 @@ public class DistributionDatarepair {
private final IWarehouseUpdownTypeClient warehouseUpdownTypeClient;
private final IDistributionDeliveryListClient deliveryListClient;
/**
* 预约状态修复
@ -96,7 +99,10 @@ public class DistributionDatarepair {
@XxlJob("maintenanceDeliveryStatus")
public ReturnT<String> maintenanceDeliveryStatus(String params) {
//维护配送的状态
Integer row = iSyncDistributionParcelListService.updateCompleteDeliveryStatus();
String method = "######################DistributionDatarepair.maintenanceDeliveryStatus";
log.info(method+"维护配送订单id:{}",params);
deliveryListClient.maintenanceDeliveryInfo(params);
log.info(method+"维护配送订单结束");
return ReturnT.SUCCESS;
}

Loading…
Cancel
Save