|
|
@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO; |
|
|
|
import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO; |
|
|
|
import com.logpm.basic.entity.BasicPrintTemplateEntity; |
|
|
|
import com.logpm.basic.entity.BasicPrintTemplateEntity; |
|
|
|
import com.logpm.basic.feign.IBasicPrintTemplateClient; |
|
|
|
import com.logpm.basic.feign.IBasicPrintTemplateClient; |
|
|
@ -2382,19 +2383,19 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
reservationStockarticleEntityList.forEach(rs -> { |
|
|
|
reservationStockarticleEntityList.forEach(rs -> { |
|
|
|
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(rs.getStockArticleId()); |
|
|
|
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(rs.getStockArticleId()); |
|
|
|
DistributionStockArticleVO distributionStockArticleVO = DistributionStockArticleWrapper.build().entityVO(stockArticleEntity); |
|
|
|
DistributionStockArticleVO distributionStockArticleVO = DistributionStockArticleWrapper.build().entityVO(stockArticleEntity); |
|
|
|
if (rs.getIsZero().equals(IsOrNoConstant.no.getValue())) { |
|
|
|
// if (rs.getIsZero().equals(IsOrNoConstant.no.getValue())) {
|
|
|
|
List<DistributionReservationPackageEntity> reservationPackageEntityList = distributionReservationPackageService.list(Wrappers.<DistributionReservationPackageEntity>query().lambda().eq(DistributionReservationPackageEntity::getReservationId, rs.getReservationId()).eq(DistributionReservationPackageEntity::getStockArticleId, stockArticleEntity.getId()).ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue())); |
|
|
|
//// List<DistributionReservationPackageEntity> reservationPackageEntityList = distributionReservationPackageService.list(Wrappers.<DistributionReservationPackageEntity>query().lambda().eq(DistributionReservationPackageEntity::getReservationId, rs.getReservationId()).eq(DistributionReservationPackageEntity::getStockArticleId, stockArticleEntity.getId()).ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue()));
|
|
|
|
if (Func.isNotEmpty(reservationPackageEntityList)) { |
|
|
|
//// if (Func.isNotEmpty(reservationPackageEntityList)) {
|
|
|
|
ArrayList<DistributionParcelListVO> distributionParcelListVOS = new ArrayList<>(); |
|
|
|
//// ArrayList<DistributionParcelListVO> distributionParcelListVOS = new ArrayList<>();
|
|
|
|
reservationPackageEntityList.forEach(rp -> { |
|
|
|
//// reservationPackageEntityList.forEach(rp -> {
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(rp.getParceListId()); |
|
|
|
//// DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(rp.getParceListId());
|
|
|
|
DistributionParcelListVO distributionParcelListVO = DistributionParcelListWrapper.build().entityVO(parcelListEntity); |
|
|
|
//// DistributionParcelListVO distributionParcelListVO = DistributionParcelListWrapper.build().entityVO(parcelListEntity);
|
|
|
|
distributionParcelListVOS.add(distributionParcelListVO); |
|
|
|
//// distributionParcelListVOS.add(distributionParcelListVO);
|
|
|
|
}); |
|
|
|
//// });
|
|
|
|
distributionStockArticleVO.setPackageList(distributionParcelListVOS); |
|
|
|
//// distributionStockArticleVO.setPackageList(distributionParcelListVOS);
|
|
|
|
distributionStockArticleVO.setParcelListVOS(DistributionParcelListWrapper.build().listVO(distributionParcelListService.getBaseMapper().selectList(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, rs.getStockArticleId())))); |
|
|
|
//// distributionStockArticleVO.setParcelListVOS(DistributionParcelListWrapper.build().listVO(distributionParcelListService.getBaseMapper().selectList(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, rs.getStockArticleId()))));
|
|
|
|
} |
|
|
|
//// }
|
|
|
|
} |
|
|
|
// }
|
|
|
|
distributionStockArticleVOS.add(distributionStockArticleVO); |
|
|
|
distributionStockArticleVOS.add(distributionStockArticleVO); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -4106,7 +4107,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public List<DistributionParcelListVO> getPackageListByDeliverylistId(IPage<DistributionParcelListEntity> page, Map<String, Object> distributionDeliveryInfoDTO) throws ParseException { |
|
|
|
public IPage<DistributionParcelListVO> getPackageListByDeliverylistId(IPage<DistributionParcelListEntity> page, Map<String, Object> distributionDeliveryInfoDTO) throws ParseException { |
|
|
|
if (Func.isEmpty(distributionDeliveryInfoDTO.get("deliveryId"))) { |
|
|
|
if (Func.isEmpty(distributionDeliveryInfoDTO.get("deliveryId"))) { |
|
|
|
log.info("参数缺失deliveryId"); |
|
|
|
log.info("参数缺失deliveryId"); |
|
|
|
return null; |
|
|
|
return null; |
|
|
@ -4124,7 +4125,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
log.error("配送任务订单查询异常:{}", reservationStockarticleEntityList); |
|
|
|
log.error("配送任务订单查询异常:{}", reservationStockarticleEntityList); |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
IPage<DistributionParcelListVO> parcelListVOIPage = new Page<>(); |
|
|
|
List<DistributionLoadscanEntity> loadscanEntities = distributionLoadscanMapper.selectList(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getDeliveryId, deliveryId).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); |
|
|
|
List<DistributionLoadscanEntity> loadscanEntities = distributionLoadscanMapper.selectList(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getDeliveryId, deliveryId).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); |
|
|
|
Map<Long, DistributionLoadscanEntity> loadingDataMap = null; |
|
|
|
Map<Long, DistributionLoadscanEntity> loadingDataMap = null; |
|
|
|
if (Func.isNotEmpty(loadscanEntities)) { |
|
|
|
if (Func.isNotEmpty(loadscanEntities)) { |
|
|
@ -4136,10 +4137,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
List<Long> orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); |
|
|
|
List<Long> orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); |
|
|
|
if (Func.isNotEmpty(orderIds)) { |
|
|
|
if (Func.isNotEmpty(orderIds)) { |
|
|
|
//查询该客户的非零但订单包间
|
|
|
|
//查询该客户的非零但订单包间
|
|
|
|
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackage(page,orderIds, distributionDeliveryInfoDTO); |
|
|
|
IPage<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackage(page,orderIds, distributionDeliveryInfoDTO); |
|
|
|
|
|
|
|
parcelListVOIPage.setTotal(parcelListEntityList.getTotal()); |
|
|
|
// List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackageNew(distributionDeliveryInfoDTO);
|
|
|
|
// List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackageNew(distributionDeliveryInfoDTO);
|
|
|
|
log.info(">>>>>> parcelListEntityList {}",parcelListEntityList); |
|
|
|
log.info(">>>>>> parcelListEntityList {}",parcelListEntityList); |
|
|
|
List<DistributionParcelListVO> parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList); |
|
|
|
List<DistributionParcelListVO> parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList.getRecords()); |
|
|
|
for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) { |
|
|
|
for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) { |
|
|
|
log.info(">>>>>> distributionParcelListVO {}",distributionParcelListVO); |
|
|
|
log.info(">>>>>> distributionParcelListVO {}",distributionParcelListVO); |
|
|
|
if (Func.isNotEmpty(loadingDataMap)) { |
|
|
|
if (Func.isNotEmpty(loadingDataMap)) { |
|
|
@ -4352,8 +4354,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
parcelListVOIPage.setRecords(distributionParcelListVOS); |
|
|
|
return distributionParcelListVOS; |
|
|
|
return parcelListVOIPage; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|