Browse Source

Merge pull request 'dev' (#2) from dev into pre-production

Reviewed-on: #2
master
zhaoqiaobo 10 months ago
parent
commit
be931413ac
  1. 8
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionReservationClient.java
  2. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionReservationClient.java
  3. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
  4. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  5. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  6. 15
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java

8
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionReservationClient.java

@ -70,4 +70,12 @@ public interface IDistributionReservationClient {
*/ */
@GetMapping(TOP+"/maintenanceReservationInfo") @GetMapping(TOP+"/maintenanceReservationInfo")
R maintenanceReservationInfo(@RequestParam("warehouseId") String warehouseId); R maintenanceReservationInfo(@RequestParam("warehouseId") String warehouseId);
/**
* 维护取消预约信息
* @param params
*/
@GetMapping(TOP+"/maintenanceCancelReservation")
void maintenanceCancelReservation(String params);
} }

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionReservationClient.java

@ -69,5 +69,13 @@ public class DistributionReservationClient implements IDistributionReservationCl
return reservationService.maintenanceReservationInfoByWarehouseId(warehouseId); return reservationService.maintenanceReservationInfoByWarehouseId(warehouseId);
} }
/**
* @param params
*/
@Override
public void maintenanceCancelReservation(String params) {
reservationService.maintenanceCancelReservation(params);
}
} }

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

@ -290,4 +290,10 @@ public interface IDistributionReservationService extends BaseService<Distributio
*/ */
List<DistributionStockupOrderListVO> selectStockupZeroOrderList(Long reservationId); List<DistributionStockupOrderListVO> selectStockupZeroOrderList(Long reservationId);
/**
* 维护取消预约信息
* @param params
*/
void maintenanceCancelReservation(String params);
} }

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

@ -811,7 +811,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
return distributionStockArticleEntity; return distributionStockArticleEntity;
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
public DistributionStockArticleEntity addStockListByPackage(DistributionStockArticleEntity distributionStockArticleEntity, List<Long> packageIds, Integer qu) { public DistributionStockArticleEntity addStockListByPackage(DistributionStockArticleEntity distributionStockArticleEntity, List<Long> packageIds, Integer qu) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)) { if (Func.isEmpty(myCurrentWarehouse)) {

21
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -2602,7 +2602,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isNotEmpty(reservationStockarticleEntityList) && reservationStockarticleEntityList.size() > 0) { if (Func.isNotEmpty(reservationStockarticleEntityList) && reservationStockarticleEntityList.size() > 0) {
reservationStockarticleEntityList.forEach(rs -> { reservationStockarticleEntityList.forEach(rs -> {
rs.setStockArticleStatus(ReservationOrderStatusConstant.quxiao.getValue()); rs.setStockArticleStatus(ReservationOrderStatusConstant.quxiao.getValue());
distributionReservationStockarticleService.updateById(rs); // distributionReservationStockarticleService.updateById(rs);
if (rs.getIsZero().equals(IsOrNoConstant.no.getValue())) { if (rs.getIsZero().equals(IsOrNoConstant.no.getValue())) {
//订制品 //订制品
//需要进行包件的预约状态维护 //需要进行包件的预约状态维护
@ -2647,6 +2647,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
} else { } else {
log.error("######################预约订单isZero字段维护错误,reservation_stockarticle的ID为:{}", rs.getId()); log.error("######################预约订单isZero字段维护错误,reservation_stockarticle的ID为:{}", rs.getId());
} }
//取消配送订单
distributionReservationStockarticleService.updateById(rs);
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(rs.getStockArticleId()); DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(rs.getStockArticleId());
distributionStockArticleService.maintenanceOrderInfo(stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId()); distributionStockArticleService.maintenanceOrderInfo(stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
@ -3747,4 +3749,21 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
public List<DistributionStockupOrderListVO> selectStockupZeroOrderList(Long reservationId) { public List<DistributionStockupOrderListVO> selectStockupZeroOrderList(Long reservationId) {
return baseMapper.selectStockupZeroOrderList(reservationId); return baseMapper.selectStockupZeroOrderList(reservationId);
} }
/**
* @param params
*/
@Override
public void maintenanceCancelReservation(String params) {
LambdaQueryWrapper<DistributionReservationEntity> lambda = Wrappers.<DistributionReservationEntity>query().lambda();
if (Func.isNotBlank(params)){
List<Long> list = Func.toLongList(params);
lambda.eq(DistributionReservationEntity::getWarehouseId,list);
}
List<DistributionReservationEntity> reservationEntityList = this.list(lambda);
for (DistributionReservationEntity reservationEntity : reservationEntityList) {
this.maintenanceReservationInfo(reservationEntity.getId());
}
}
} }

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

@ -124,6 +124,21 @@ public class DistributionDatarepair {
} }
/**
* 维护指定取消预约信息
* @return
*/
@XxlJob("maintenanceCancelReservation")
public ReturnT<String> maintenanceCancelReservation(String params) {
//维护配送的状态
String method = "######################DistributionDatarepair.maintenanceDeliveryStatus";
log.info(method+"维护配送订单id:{}",params);
distributionReservationClient.maintenanceCancelReservation(params);
log.info(method+"维护配送订单结束");
return ReturnT.SUCCESS;
}

Loading…
Cancel
Save