仓配入库通知批次号合并

jg-waiwang-pro
XI_TENG\xixi_ 3 months ago
parent 104e1e812f
commit e624b864d8

@ -602,6 +602,16 @@ public class WarehousingStorageServiceImpl extends ServiceImpl<WarehousingStorag
} else { } else {
entitys.setBatchNumber(generaterSwapUtil.getBillNumber("batch", false)); entitys.setBatchNumber(generaterSwapUtil.getBillNumber("batch", false));
} }
//根据商品id和批次号查询库存信息
QueryWrapper<InventoryEntity> inventoryQueryWrapper = new QueryWrapper<>();
inventoryQueryWrapper.lambda().eq(InventoryEntity::getWarehouseId, entity.getWarehouseId());
inventoryQueryWrapper.lambda().eq(InventoryEntity::getProductId, entitys.getProductId());
inventoryQueryWrapper.lambda().eq(InventoryEntity::getStorageAreaId, entitys.getWarehousingStorageId());
List<InventoryEntity> inventoryList = inventoryService.list(inventoryQueryWrapper);
if (inventoryList!=null&& inventoryList.size()>0){
entitys.setBatchNumber( inventoryList.get(0).getBatchNumber());
}
// entitys.setBatchNumber(generaterSwapUtil.getBillNumber("picihao", false)); // entitys.setBatchNumber(generaterSwapUtil.getBillNumber("picihao", false));
entitys.setOrdLn(String.valueOf(line)); entitys.setOrdLn(String.valueOf(line));
line++; line++;

@ -532,38 +532,7 @@ public class WarehousingStorageController {
flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getTaskId, flowTaskEntity.getId()); flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getTaskId, flowTaskEntity.getId());
List<FlowTaskNodeEntity> flowTaskNodeEntityList = flowTaskNodeService.list(flowTaskNodeEntityQueryWrapper); List<FlowTaskNodeEntity> flowTaskNodeEntityList = flowTaskNodeService.list(flowTaskNodeEntityQueryWrapper);
if (flowTaskNodeEntityList != null && flowTaskNodeEntityList.size() > 0 && "end".equals(flowTaskNodeEntityList.get(0).getNodeNext())) { if (flowTaskNodeEntityList != null && flowTaskNodeEntityList.size() > 0 && "end".equals(flowTaskNodeEntityList.get(0).getNodeNext())) {
// if (warehousingNotificationEntity!=null){
// BigDecimal maxNum = BigDecimal.ZERO;
// BigDecimal YNum = BigDecimal.ZERO;
// BigDecimal netWeightNum = BigDecimal.ZERO;
// for (WarehousingStorageProductModel warehousingStorageProductModel : warehousingStorageForm.getWarehousingStorageProductList()) {
// maxNum = maxNum.add( new BigDecimal(warehousingStorageProductModel.getStorageNumber())) ;//这次的入库数量
// if (warehousingStorageProductModel.getReceivedQuantity()!=null){
// maxNum = maxNum.add( new BigDecimal(warehousingStorageProductModel.getReceivedQuantity())) ;
// }else {
// maxNum = maxNum.add( new BigDecimal(0)) ;
// }
//
// }
// for (WarehousingStoragePoundlistModel warehousingStoragePoundlistModel : warehousingStorageForm.getWarehousingStoragePoundlistList()) {
// netWeightNum = netWeightNum.add( warehousingStoragePoundlistModel.getNetWeight()) ;
// }
// BigDecimal netWeightNumNot= netWeightNum; //这次的入库数量
// if (warehousingNotificationEntity.getConfirmWarehousingNum()!=null){
// YNum.add(new BigDecimal (warehousingNotificationEntity.getConfirmWarehousingNum()));
// }
// BigDecimal maxNums = maxNum; //暂存
// BigDecimal result = maxNum.subtract(YNum); //
// result = result.subtract(netWeightNum); //最后结果
//
//
//
// if (result.compareTo(BigDecimal.ZERO)==0){
// warehousingNotificationEntity.setWarehousingStatus("4");
// }else {
// warehousingNotificationEntity.setWarehousingStatus("3");
//// warehousingNotificationEntity.setNotificationStorageNumber();
// }
//上面注释是多次入库,现在先弄成一次性入库 //上面注释是多次入库,现在先弄成一次性入库
//审核通过修改入库通知 //审核通过修改入库通知
WarehousingNotificationEntity warehousingNotificationEntity = warehousingNotificationService.getInfo(warehousingStorageForm.getWarehousingId()); WarehousingNotificationEntity warehousingNotificationEntity = warehousingNotificationService.getInfo(warehousingStorageForm.getWarehousingId());

Loading…
Cancel
Save