|
|
@ -64,6 +64,8 @@ import org.springblade.common.constant.stocklist.StockSignfoStatusConstant; |
|
|
|
import org.springblade.common.constant.stocklist.StockStatusConstant; |
|
|
|
import org.springblade.common.constant.stocklist.StockStatusConstant; |
|
|
|
import org.springblade.common.constant.stockup.StockAssignStatusConstant; |
|
|
|
import org.springblade.common.constant.stockup.StockAssignStatusConstant; |
|
|
|
import org.springblade.common.constant.stockup.StockupStatusConstant; |
|
|
|
import org.springblade.common.constant.stockup.StockupStatusConstant; |
|
|
|
|
|
|
|
import org.springblade.common.constant.stockup.StockupTypeConstant; |
|
|
|
|
|
|
|
import org.springblade.common.constant.stockup.StockupTypeStatusConstant; |
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
@ -316,7 +318,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
// throw new ServiceException("没有选择仓库!!!");
|
|
|
|
// throw new ServiceException("没有选择仓库!!!");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
IPage<DistributionStockupListVO> distributionStockupEntityIPage = baseMapper.selectHomeStockupPage(page, stockupDTO); |
|
|
|
IPage<DistributionStockupListVO> distributionStockupEntityIPage = baseMapper.selectHomeStockupPage(page, stockupDTO); |
|
|
|
// IPage<DistributionStockupListVO> distributionStockupEntityIPage = baseMapper.selectStockupPage(page, stockupDTO);
|
|
|
|
|
|
|
|
List<DistributionStockupListVO> records = distributionStockupEntityIPage.getRecords(); |
|
|
|
List<DistributionStockupListVO> records = distributionStockupEntityIPage.getRecords(); |
|
|
|
for (DistributionStockupListVO vo : records) { |
|
|
|
for (DistributionStockupListVO vo : records) { |
|
|
|
AtomicReference<Boolean> b = new AtomicReference<>(false); |
|
|
|
AtomicReference<Boolean> b = new AtomicReference<>(false); |
|
|
@ -333,9 +335,6 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
int sum = list.stream().mapToInt(DistributionReservationZeroPackageEntity::getQuantity).sum(); |
|
|
|
int sum = list.stream().mapToInt(DistributionReservationZeroPackageEntity::getQuantity).sum(); |
|
|
|
nu.set((int) (nu.get() + sum)); |
|
|
|
nu.set((int) (nu.get() + sum)); |
|
|
|
b.set(true); |
|
|
|
b.set(true); |
|
|
|
//自提
|
|
|
|
|
|
|
|
// List<DistributionStockPackageVO> list2self = distrilbutionBillStockService.listPackageSelf(z.getReservationId());
|
|
|
|
|
|
|
|
// nu.set(nu.get()+list2self.size());
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (z.getStockUpType().equals("3")) { |
|
|
|
if (z.getStockUpType().equals("3")) { |
|
|
@ -367,63 +366,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
if (ObjectUtils.isNull(vo.getInventoryNub())) { |
|
|
|
if (ObjectUtils.isNull(vo.getInventoryNub())) { |
|
|
|
vo.setInventoryNub(0); |
|
|
|
vo.setInventoryNub(0); |
|
|
|
} |
|
|
|
} |
|
|
|
//查询库位信息
|
|
|
|
|
|
|
|
// //1.通过预约单号查询所有包件的库位信息
|
|
|
|
|
|
|
|
// Long reservationId = vo.getReservationId();
|
|
|
|
|
|
|
|
// List<String> packageAllocation = distributionParcelListService.selectWarehouseAreaByReservationId(reservationId);
|
|
|
|
|
|
|
|
// //2.通过预约单查询所有库存品的库位信息
|
|
|
|
|
|
|
|
// List<String> stockListAllocation = distributionStockListService.selectWarehouseAreaByReservationId(reservationId);
|
|
|
|
|
|
|
|
// String allocation = dealwithAllocation(packageAllocation, stockListAllocation);
|
|
|
|
|
|
|
|
// //查询托盘信息
|
|
|
|
|
|
|
|
// //1.查询包件托盘信息`
|
|
|
|
|
|
|
|
// List<String> packagePallet = distributionParcelListService.selectPalletByReservationId(reservationId);
|
|
|
|
|
|
|
|
// //2.查询库存品托盘信息
|
|
|
|
|
|
|
|
// List<String> stockListPallet = distributionStockListService.selectPalletByReservationId(reservationId);
|
|
|
|
|
|
|
|
// String pallet = deakwithPallet(packagePallet, stockListPallet);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// //查询对应预约单的订单总数
|
|
|
|
|
|
|
|
// Integer orderNum = distributionReservationService.selectOrderNumByReservationId(reservationId);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// //查询计划件数
|
|
|
|
|
|
|
|
// Integer planNum = distributionReservationService.selectPlanNum(reservationId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询已备货件数
|
|
|
|
|
|
|
|
// Integer realNum = distributionStockupScanService.selectRealNum(reservationId);
|
|
|
|
|
|
|
|
// Integer realNum = distributionStockService.selectRealNum(reservationId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//备货任务是否完成通过扫描表中的记录数量和计划数量对比
|
|
|
|
|
|
|
|
// if (realNum.equals(planNum)) {
|
|
|
|
|
|
|
|
// vo.setStockupStatusStr("是");
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// vo.setStockupStatusStr("否");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// vo.setWarehouseArea(allocation);
|
|
|
|
|
|
|
|
// vo.setTrays(pallet);
|
|
|
|
|
|
|
|
// vo.setOrderNum(orderNum);
|
|
|
|
|
|
|
|
// vo.setPlanNum(planNum);
|
|
|
|
|
|
|
|
// vo.setRealNum(realNum);
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
distributionStockupEntityIPage.setRecords(records); |
|
|
|
distributionStockupEntityIPage.setRecords(records); |
|
|
|
return distributionStockupEntityIPage; |
|
|
|
return distributionStockupEntityIPage; |
|
|
|
|
|
|
|
|
|
|
|
// //查询该备货单上对应的客户
|
|
|
|
|
|
|
|
// //1.通过备货任务id查询得到所有的预约单
|
|
|
|
|
|
|
|
// List<Long> reservationIds = distributionStockupInfoService.selectReservationIdListByStockupId(stockupId);
|
|
|
|
|
|
|
|
// //2.通过预约id查到所有的预约单
|
|
|
|
|
|
|
|
// List<DistributionReservationEntity> reservationEntities = distributionReservationService.selectListByIds(reservationIds);
|
|
|
|
|
|
|
|
// //3.拼接客户名称
|
|
|
|
|
|
|
|
// vo.setCustomer(getCustomer(reservationEntities));
|
|
|
|
|
|
|
|
// //4.拿到所有包件的托盘信息
|
|
|
|
|
|
|
|
// vo.setTrays(getTrays(reservationEntities));
|
|
|
|
|
|
|
|
// //5.查询订单总数 计划数量 备货件数
|
|
|
|
|
|
|
|
// Map<String, Integer> nums = getNums(reservationEntities);
|
|
|
|
|
|
|
|
// vo.setOrderNum(nums.get("orderNum"));
|
|
|
|
|
|
|
|
// vo.setPlanNum(nums.get("stockNum"));
|
|
|
|
|
|
|
|
// //6.查询已扫描备货的数据 TODO 还需要查询逻辑
|
|
|
|
|
|
|
|
// vo.setRealNum(0);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -471,7 +417,6 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
i.setStockupNum(0); |
|
|
|
i.setStockupNum(0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
map.put("orderList", list); |
|
|
|
map.put("orderList", list); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -1201,6 +1146,21 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
if (i.getPlanNum().equals(i.getRealNum())) { |
|
|
|
if (i.getPlanNum().equals(i.getRealNum())) { |
|
|
|
i.setCompleteStact(true); |
|
|
|
i.setCompleteStact(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (Func.isNotEmpty(i.getAllocations())){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String[] ids = i.getAllocations().split(","); |
|
|
|
|
|
|
|
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(ids); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (WarehouseGoodsAllocationEntity allocationInforById : allocationInforByIds) { |
|
|
|
|
|
|
|
if (i.getAllocationList() == null) { |
|
|
|
|
|
|
|
i.setAllocationList(new ArrayList<>()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
map.put("id", allocationInforById.getId()); |
|
|
|
|
|
|
|
map.put("name", allocationInforById.getQrCode()); |
|
|
|
|
|
|
|
i.getAllocationList().add(map); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
return list; |
|
|
|
return list; |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -2881,10 +2841,31 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Long selectStockListInfoByCargoNumber(Long reservationId, String cargoNumber, Long allocationId) { |
|
|
|
public Long selectStockListInfoByCargoNumber(Long reservationId, String cargoNumber, Long allocationId, String typeService) { |
|
|
|
|
|
|
|
Long mallId = null; |
|
|
|
|
|
|
|
String mallName = null; |
|
|
|
|
|
|
|
if(typeService.equals(StockupTypeConstant.ziti.getValue())){ |
|
|
|
|
|
|
|
//自提
|
|
|
|
|
|
|
|
// 查询预约单的上的信息
|
|
|
|
|
|
|
|
List<DistrilbutionBillStockEntity> list = distrilbutionBillStockService.list(Wrappers.<DistrilbutionBillStockEntity>query().lambda(). |
|
|
|
|
|
|
|
eq(DistrilbutionBillStockEntity::getBillLadingId, reservationId) |
|
|
|
|
|
|
|
.apply("order_status in (1,2)") |
|
|
|
|
|
|
|
);//预约信息
|
|
|
|
|
|
|
|
if(!list.isEmpty()){ |
|
|
|
|
|
|
|
DistributionStockArticleEntity byId = distributionStockArticleService.getById(list.get(0).getStockArticleId()); |
|
|
|
|
|
|
|
mallId = byId.getMallId(); |
|
|
|
|
|
|
|
mallName = byId.getMallName(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
// 查询预约单上的商城
|
|
|
|
|
|
|
|
DistributionReservationEntity distributionReservationEntity = distributionReservationMapper.selectById(reservationId); |
|
|
|
|
|
|
|
mallId = distributionReservationEntity.getMallId(); |
|
|
|
|
|
|
|
mallName = distributionReservationEntity.getMallName(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 查询预约单上的商城
|
|
|
|
|
|
|
|
DistributionReservationEntity distributionReservationEntity = distributionReservationMapper.selectById(reservationId); |
|
|
|
|
|
|
|
//查询货位上物料信息
|
|
|
|
//查询货位上物料信息
|
|
|
|
// todo
|
|
|
|
// todo
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
@ -2905,7 +2886,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = JSONObject.parseObject(jsonObject.toJSONString(), WarehouseUpdownGoodsEntity.class); |
|
|
|
WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = JSONObject.parseObject(jsonObject.toJSONString(), WarehouseUpdownGoodsEntity.class); |
|
|
|
if (warehouseUpdownGoodsEntity.getAssociationType().equals("4")) { |
|
|
|
if (warehouseUpdownGoodsEntity.getAssociationType().equals("4")) { |
|
|
|
// 无数据库存品
|
|
|
|
// 无数据库存品
|
|
|
|
if (cargoNumber.equals(warehouseUpdownGoodsEntity.getAssociationValue()) && warehouseUpdownGoodsEntity.getMarketId().equals(distributionReservationEntity.getMallId())) { |
|
|
|
if (cargoNumber.equals(warehouseUpdownGoodsEntity.getAssociationValue()) && warehouseUpdownGoodsEntity.getMarketId().equals(mallId)) { |
|
|
|
incomingBatches.add(warehouseUpdownGoodsEntity.getIncomingBatch()); |
|
|
|
incomingBatches.add(warehouseUpdownGoodsEntity.getIncomingBatch()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -2920,7 +2901,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
LambdaQueryWrapper<DistributionStockListEntity> lambdaQueryWrapper = new LambdaQueryWrapper(); |
|
|
|
LambdaQueryWrapper<DistributionStockListEntity> lambdaQueryWrapper = new LambdaQueryWrapper(); |
|
|
|
lambdaQueryWrapper.in(DistributionStockListEntity::getIncomingBatch, incomingBatches); |
|
|
|
lambdaQueryWrapper.in(DistributionStockListEntity::getIncomingBatch, incomingBatches); |
|
|
|
lambdaQueryWrapper.eq(DistributionStockListEntity::getCargoNumber, cargoNumber); |
|
|
|
lambdaQueryWrapper.eq(DistributionStockListEntity::getCargoNumber, cargoNumber); |
|
|
|
lambdaQueryWrapper.eq(DistributionStockListEntity::getMarketName, distributionReservationEntity.getMallName()); |
|
|
|
lambdaQueryWrapper.eq(DistributionStockListEntity::getMarketName, mallName); |
|
|
|
// 入库 时间先进的先出
|
|
|
|
// 入库 时间先进的先出
|
|
|
|
lambdaQueryWrapper.orderByAsc(DistributionStockListEntity::getCreateTime); |
|
|
|
lambdaQueryWrapper.orderByAsc(DistributionStockListEntity::getCreateTime); |
|
|
|
List<DistributionStockListEntity> distributionStockListEntities = distributionStockListMapper.selectList(lambdaQueryWrapper); |
|
|
|
List<DistributionStockListEntity> distributionStockListEntities = distributionStockListMapper.selectList(lambdaQueryWrapper); |
|
|
@ -2933,6 +2914,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public StockConfigInfoVO stockConfigList(StockupDTO stockupDTO) { |
|
|
|
public StockConfigInfoVO stockConfigList(StockupDTO stockupDTO) { |
|
|
|
|
|
|
|
String typeService = stockupDTO.getTypeService(); |
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
if (Func.isEmpty(myCurrentWarehouse)){ |
|
|
|
if (Func.isEmpty(myCurrentWarehouse)){ |
|
|
|
return null; |
|
|
|
return null; |
|
|
@ -2990,31 +2972,74 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
log.info("###################库存品source_type字段缺失:{}",distributionStockListEntity.getIncomingBatch()); |
|
|
|
log.info("###################库存品source_type字段缺失:{}",distributionStockListEntity.getIncomingBatch()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询预约单的上的信息
|
|
|
|
|
|
|
|
StockConfigInfoVO stockConfigInfoVO = new StockConfigInfoVO(); |
|
|
|
StockConfigInfoVO stockConfigInfoVO = new StockConfigInfoVO(); |
|
|
|
DistributionReservationEntity reservationEntity = distributionReservationService.getById(stockupDTO.getReservationId()); //预约信息
|
|
|
|
|
|
|
|
stockConfigInfoVO.setCustomer(reservationEntity.getConsignee()); //客户0
|
|
|
|
|
|
|
|
stockConfigInfoVO.setAddress(reservationEntity.getDeliveryAddress()); //地址
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<StockConfigOrderPackageListVO> ls = new ArrayList<>(); |
|
|
|
|
|
|
|
//过滤出同物料库存品的ID信息
|
|
|
|
//过滤出同物料库存品的ID信息
|
|
|
|
List<Long> stockListIds = distributionStockListEntities.stream().map(DistributionStockListEntity::getId).collect(Collectors.toList()); |
|
|
|
List<Long> stockListIds = distributionStockListEntities.stream().map(DistributionStockListEntity::getId).collect(Collectors.toList()); |
|
|
|
//查询该物料的库存品信息
|
|
|
|
List<StockConfigOrderPackageListVO> ls = new ArrayList<>(); |
|
|
|
List<DistributionReservationStocklistEntity> reservationStocklistEntityList = distributionReservationStocklistService.list(Wrappers.<DistributionReservationStocklistEntity>query().lambda() |
|
|
|
if(typeService.equals(StockupTypeConstant.ziti.getValue())){ |
|
|
|
.eq(DistributionReservationStocklistEntity::getReservationId, stockupDTO.getReservationId()) |
|
|
|
//自提
|
|
|
|
.in(DistributionReservationStocklistEntity::getStocklistId, stockListIds) |
|
|
|
// 查询预约单的上的信息
|
|
|
|
.notIn(DistributionReservationStocklistEntity::getStockListStatus, 2) |
|
|
|
List<DistrilbutionBillStockEntity> list = distrilbutionBillStockService.list(Wrappers.<DistrilbutionBillStockEntity>query().lambda(). |
|
|
|
); |
|
|
|
eq(DistrilbutionBillStockEntity::getBillLadingId, stockupDTO.getReservationId()) |
|
|
|
stockConfigInfoVO.setRealityNum(0); |
|
|
|
.apply("order_status in (1,2)") |
|
|
|
if (Func.isNotEmpty(reservationStocklistEntityList)){ |
|
|
|
);//预约信息
|
|
|
|
int realityNum = reservationStocklistEntityList.stream().mapToInt(DistributionReservationStocklistEntity::getRealityNum).sum(); |
|
|
|
if(!list.isEmpty()){ |
|
|
|
stockConfigInfoVO.setRealityNum(realityNum); //地址
|
|
|
|
DistributionStockArticleEntity byId = distributionStockArticleService.getById(list.get(0).getStockArticleId()); |
|
|
|
|
|
|
|
if(ObjectUtils.isNotNull(byId)){ |
|
|
|
|
|
|
|
stockConfigInfoVO.setCustomer(byId.getCustomerName()); //客户0
|
|
|
|
|
|
|
|
stockConfigInfoVO.setAddress(byId.getCustomerAddress()); //地址
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//查询该物料的库存品信息
|
|
|
|
|
|
|
|
List<DistributionDeliveryDetailsEntity> detailsEntityList = distributionDeliveryDetailsService.list(Wrappers.<DistributionDeliveryDetailsEntity>query().lambda() |
|
|
|
|
|
|
|
.eq(DistributionDeliveryDetailsEntity::getBillLadingId, stockupDTO.getReservationId()) |
|
|
|
|
|
|
|
.in(DistributionDeliveryDetailsEntity::getStockListId, stockListIds) |
|
|
|
|
|
|
|
.apply("inventory_status in (1,2)") |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stockConfigInfoVO.setRealityNum(0); |
|
|
|
|
|
|
|
if (Func.isNotEmpty(detailsEntityList)){ |
|
|
|
|
|
|
|
int realityNum = detailsEntityList.stream().mapToInt(DistributionDeliveryDetailsEntity::getRealityQuantity).sum(); |
|
|
|
|
|
|
|
stockConfigInfoVO.setRealityNum(realityNum); //已备数量
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
// 查询预约单的上的信息
|
|
|
|
|
|
|
|
DistributionReservationEntity reservationEntity = distributionReservationService.getById(stockupDTO.getReservationId()); //预约信息
|
|
|
|
|
|
|
|
stockConfigInfoVO.setCustomer(reservationEntity.getConsignee()); //客户0
|
|
|
|
|
|
|
|
stockConfigInfoVO.setAddress(reservationEntity.getDeliveryAddress()); //地址
|
|
|
|
|
|
|
|
// List<StockConfigOrderPackageListVO> ls = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询该物料的库存品信息
|
|
|
|
|
|
|
|
List<DistributionReservationStocklistEntity> reservationStocklistEntityList = distributionReservationStocklistService.list(Wrappers.<DistributionReservationStocklistEntity>query().lambda() |
|
|
|
|
|
|
|
.eq(DistributionReservationStocklistEntity::getReservationId, stockupDTO.getReservationId()) |
|
|
|
|
|
|
|
.in(DistributionReservationStocklistEntity::getStocklistId, stockListIds) |
|
|
|
|
|
|
|
.notIn(DistributionReservationStocklistEntity::getStockListStatus, 2) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
stockConfigInfoVO.setRealityNum(0); |
|
|
|
|
|
|
|
if (Func.isNotEmpty(reservationStocklistEntityList)){ |
|
|
|
|
|
|
|
int realityNum = reservationStocklistEntityList.stream().mapToInt(DistributionReservationStocklistEntity::getRealityNum).sum(); |
|
|
|
|
|
|
|
stockConfigInfoVO.setRealityNum(realityNum); //地址
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/* LambdaQueryWrapper<DistributionStockEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
|
|
lambdaQueryWrapper.eq(DistributionStockEntity::getReservationId, stockupDTO.getReservationId()); |
|
|
|
|
|
|
|
lambdaQueryWrapper.eq(DistributionStockEntity::getAllocationId, stockupDTO.getAllocationId()); |
|
|
|
|
|
|
|
lambdaQueryWrapper.eq(DistributionStockEntity::getType, 2); |
|
|
|
|
|
|
|
lambdaQueryWrapper.eq(DistributionStockEntity::getStockupId, stockupDTO.getStockupId()); |
|
|
|
|
|
|
|
lambdaQueryWrapper.in(DistributionStockEntity::getStockListId, stockListIds); |
|
|
|
|
|
|
|
List<DistributionStockEntity> distributionStockEntities = distributionStockMapper.selectList(lambdaQueryWrapper); |
|
|
|
|
|
|
|
for (DistributionStockEntity distributionStockEntity : distributionStockEntities) { |
|
|
|
|
|
|
|
StockConfigOrderPackageListVO stockConfigOrderPackageListVO = new StockConfigOrderPackageListVO(); |
|
|
|
|
|
|
|
stockConfigOrderPackageListVO.setCode(distributionStockEntity.getCoding()); |
|
|
|
|
|
|
|
stockConfigOrderPackageListVO.setNum(1); |
|
|
|
|
|
|
|
stockConfigOrderPackageListVO.setCreateTime(distributionStockEntity.getCreateTime()); |
|
|
|
|
|
|
|
// 查询批次
|
|
|
|
|
|
|
|
DistributionStockListEntity distributionStockListEntity = distributionStockListMapper.selectById(distributionStockEntity.getStockListId()); |
|
|
|
|
|
|
|
stockConfigOrderPackageListVO.setIncomingBatch(distributionStockListEntity.getIncomingBatch()); |
|
|
|
|
|
|
|
ls.add(stockConfigOrderPackageListVO); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
stockConfigInfoVO.setStockConfigOrderPackageListVOS(ls);*/ |
|
|
|
} |
|
|
|
} |
|
|
|
LambdaQueryWrapper<DistributionStockEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
LambdaQueryWrapper<DistributionStockEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
lambdaQueryWrapper.eq(DistributionStockEntity::getReservationId, stockupDTO.getReservationId()); |
|
|
|
lambdaQueryWrapper.eq(DistributionStockEntity::getReservationId, stockupDTO.getReservationId()); |
|
|
@ -3033,7 +3058,6 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
stockConfigOrderPackageListVO.setIncomingBatch(distributionStockListEntity.getIncomingBatch()); |
|
|
|
stockConfigOrderPackageListVO.setIncomingBatch(distributionStockListEntity.getIncomingBatch()); |
|
|
|
ls.add(stockConfigOrderPackageListVO); |
|
|
|
ls.add(stockConfigOrderPackageListVO); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
stockConfigInfoVO.setStockConfigOrderPackageListVOS(ls); |
|
|
|
stockConfigInfoVO.setStockConfigOrderPackageListVOS(ls); |
|
|
|
return stockConfigInfoVO; |
|
|
|
return stockConfigInfoVO; |
|
|
|
|
|
|
|
|
|
|
|