|
|
|
@ -16,12 +16,17 @@
|
|
|
|
|
*/ |
|
|
|
|
package com.logpm.distribution.service.impl; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO; |
|
|
|
|
import com.logpm.distribution.dto.DistributionReservationPackageDTO; |
|
|
|
|
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; |
|
|
|
|
import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; |
|
|
|
|
import com.logpm.distribution.entity.DistributionLoadscanEntity; |
|
|
|
|
import com.logpm.distribution.entity.DistributionLoadscanordEntity; |
|
|
|
|
import com.logpm.distribution.entity.DistributionParcelListEntity; |
|
|
|
|
import com.logpm.distribution.mapper.DistributionReservationPackageMapper; |
|
|
|
|
import com.logpm.distribution.service.IDistributionLoadscanService; |
|
|
|
|
import com.logpm.distribution.service.IDistributionLoadscanordService; |
|
|
|
|
import com.logpm.distribution.vo.DistributionDeliveryInfoVO; |
|
|
|
|
import com.logpm.distribution.excel.DistributionDeliveryInfoExcel; |
|
|
|
|
import com.logpm.distribution.mapper.DistributionDeliveryInfoMapper; |
|
|
|
@ -31,6 +36,7 @@ import com.logpm.distribution.vo.DistributionStockListVO;
|
|
|
|
|
import com.logpm.distribution.vo.app.*; |
|
|
|
|
import com.logpm.distribution.wrapper.DistributionParcelListAppWrapper; |
|
|
|
|
import com.logpm.distribution.wrapper.DistributionParcelListWrapper; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import org.checkerframework.checker.units.qual.A; |
|
|
|
|
import org.springblade.core.tool.utils.BeanUtil; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
@ -51,11 +57,13 @@ import java.util.List;
|
|
|
|
|
* @since 2023-06-16 |
|
|
|
|
*/ |
|
|
|
|
@Service |
|
|
|
|
@AllArgsConstructor |
|
|
|
|
public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<DistributionDeliveryInfoMapper, DistributionDeliveryInfoEntity> implements IDistributionDeliveryInfoService { |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private DistributionReservationPackageMapper distributionReservationPackageMapper; |
|
|
|
|
|
|
|
|
|
private IDistributionLoadscanService distributionLoadscanService; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<DistributionDeliveryInfoVO> selectDistributionDeliveryInfoPage(IPage<DistributionDeliveryInfoVO> page, DistributionDeliveryInfoVO distributionDeliveryInfo) { |
|
|
|
|
List<DistributionDeliveryInfoVO> distributionDeliveryInfoVOS = baseMapper.selectDistributionDeliveryInfoPage(page, distributionDeliveryInfo); |
|
|
|
@ -114,6 +122,17 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
distributionAppStockArticleVOS.forEach(e -> { |
|
|
|
|
// 需要根据当前的客户的ID查询对应的包件信息
|
|
|
|
|
List<DistributionAppParcelListVO> ks =distributionReservationPackageMapper.getOrderPackageListByOrderCode(e.getStockArticleId()); |
|
|
|
|
ks.forEach( k ->{ |
|
|
|
|
List<DistributionLoadscanEntity> list = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getOrderPackageCode, k.getOrderPackageCode()) |
|
|
|
|
.apply("scan_status != 1") |
|
|
|
|
); |
|
|
|
|
if(list.size() > 0){ |
|
|
|
|
k.setScanStatus(2); |
|
|
|
|
}else{ |
|
|
|
|
k.setScanStatus(1); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
e.setDistributionAppParcelListVOS(ks); |
|
|
|
|
|
|
|
|
|
if (e.getLoadingNub() == 0) { |
|
|
|
|