|
|
|
@ -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) { |
|
|
|
|