|
@ -366,14 +366,14 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService |
|
|
int result = 0; |
|
|
int result = 0; |
|
|
if(!CollectionUtils.isEmpty(list)) { |
|
|
if(!CollectionUtils.isEmpty(list)) { |
|
|
//根据物料入库部门划分入库单,入库单类型:0 仓库,1 采购,生成入库单号
|
|
|
//根据物料入库部门划分入库单,入库单类型:0 仓库,1 采购,生成入库单号
|
|
|
List<WarehouseStorageOrderDetail> list1 = list.stream().filter(e -> e.getMaterialDeptType().equals("0")).collect(Collectors.toList()); |
|
|
List<WarehouseStorageOrderDetail> list1 = list.stream().filter(e -> ("1").equals(e.getMaterialDeptType())).collect(Collectors.toList()); |
|
|
List<WarehouseStorageOrderDetail> list2 = list.stream().filter(e -> e.getMaterialDeptType().equals("1")).collect(Collectors.toList()); |
|
|
List<WarehouseStorageOrderDetail> list2 = list.stream().filter(e -> ("0").equals(e.getMaterialDeptType())).collect(Collectors.toList()); |
|
|
//WarehouseStorageStatus 仓库入库状态(0待暂收、1已暂收、2待入库、3部分入库、4全部入库),
|
|
|
//WarehouseStorageStatus 仓库入库状态(0待暂收、1已暂收、2待入库、3部分入库、4全部入库),
|
|
|
//WarehouseStorageType 仓库入库类型(0采购入库、1供应商补货、2委内入库、3公司退货、4委外入库、5生产入库),
|
|
|
//WarehouseStorageType 仓库入库类型(0采购入库、1供应商补货、2委内入库、3公司退货、4委外入库、5生产入库),
|
|
|
//setWarehouseOrderType仓库订单类型(0采购订单、1生产订单、2退换货订单、3委外订单),
|
|
|
//setWarehouseOrderType仓库订单类型(0采购订单、1生产订单、2退换货订单、3委外订单),
|
|
|
//WarehouseDeptType 仓库入库部门类型(0仓库,1采购 ),
|
|
|
//WarehouseDeptType 仓库入库部门类型(0仓库,1采购 ),
|
|
|
if(list1.size() > 0) { |
|
|
if(list1.size() > 0) { |
|
|
//采购入库单,物料入库列表信息读取,放入生成的入库订单号
|
|
|
//仓库入库单,物料入库列表信息读取,放入生成的入库订单号
|
|
|
String warehouseStorageCode = redisCache.generateBillNo("RK"); |
|
|
String warehouseStorageCode = redisCache.generateBillNo("RK"); |
|
|
for (WarehouseStorageOrderDetail warehouseStorageOrderDetail: list1) { |
|
|
for (WarehouseStorageOrderDetail warehouseStorageOrderDetail: list1) { |
|
|
warehouseStorageOrderDetail.setWarehouseStorageCode(warehouseStorageCode); |
|
|
warehouseStorageOrderDetail.setWarehouseStorageCode(warehouseStorageCode); |
|
@ -384,36 +384,42 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService |
|
|
} |
|
|
} |
|
|
//入库代表为采购部分的入库单
|
|
|
//入库代表为采购部分的入库单
|
|
|
warehouseStorageOrder.setWarehouseStorageCode(warehouseStorageCode); |
|
|
warehouseStorageOrder.setWarehouseStorageCode(warehouseStorageCode); |
|
|
warehouseStorageOrder.setWarehouseStorageType("0"); |
|
|
warehouseStorageOrder.setRelatedOrderCode(warehouseStorageOrder.getRelatedOrderCode()); |
|
|
warehouseStorageOrder.setWarehouseDeptType("0"); |
|
|
|
|
|
warehouseStorageOrder.setWarehouseOrderType("1"); |
|
|
|
|
|
warehouseStorageOrder.setWarehouseStorageStatus("0"); |
|
|
warehouseStorageOrder.setWarehouseStorageStatus("0"); |
|
|
|
|
|
warehouseStorageOrder.setWarehouseQualityStatus("0"); |
|
|
|
|
|
warehouseStorageOrder.setWarehouseStorageType("0"); |
|
|
|
|
|
warehouseStorageOrder.setWarehouseOrderType("0"); |
|
|
|
|
|
warehouseStorageOrder.setWarehouseDeptType("1"); |
|
|
warehouseStorageOrder.setCreateTime(DateUtils.getNowDate()); |
|
|
warehouseStorageOrder.setCreateTime(DateUtils.getNowDate()); |
|
|
warehouseStorageOrder.setCreateBy(ShiroUtils.getLoginName()); |
|
|
warehouseStorageOrder.setCreateBy(ShiroUtils.getLoginName()); |
|
|
result = warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder); |
|
|
result = warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder); |
|
|
} |
|
|
} |
|
|
if(list.size()>0) { |
|
|
if(list2.size()>0) { |
|
|
String warehouseStorageCode1 = redisCache.generateBillNo("RK"); |
|
|
String warehouseStorageCode1 = redisCache.generateBillNo("RK"); |
|
|
//仓库入库单
|
|
|
//入库部门类型:采购入库单
|
|
|
for (WarehouseStorageOrderDetail warehouseStorageOrderDetail: list2) { |
|
|
for (WarehouseStorageOrderDetail warehouseStorageOrderDetail: list2) { |
|
|
warehouseStorageOrderDetail.setWarehouseStorageCode(warehouseStorageCode1); |
|
|
warehouseStorageOrderDetail.setWarehouseStorageCode(warehouseStorageCode1); |
|
|
warehouseStorageOrderDetail.setWarehouseStorageType("1"); |
|
|
warehouseStorageOrderDetail.setWarehouseStorageType("0"); |
|
|
warehouseStorageOrderDetail.setMaterialDeptType("0"); |
|
|
warehouseStorageOrderDetail.setMaterialDeptType("1"); |
|
|
warehouseStorageOrderDetail.setWarehouseDeptType("0"); |
|
|
warehouseStorageOrderDetail.setWarehouseDeptType("0"); |
|
|
storageOrderDetailMapper.insertWarehouseStorageOrderDetail(warehouseStorageOrderDetail); |
|
|
storageOrderDetailMapper.insertWarehouseStorageOrderDetail(warehouseStorageOrderDetail); |
|
|
} |
|
|
} |
|
|
//入库代表为仓库部分的入库单
|
|
|
//入库代表为仓库部分的入库单
|
|
|
|
|
|
//WarehouseStorageStatus 仓库入库状态(0待暂收、1已暂收、2待入库、3部分入库、4全部入库),
|
|
|
|
|
|
//WarehouseStorageType 仓库入库类型(0采购入库、1供应商补货、2委内入库、3公司退货、4委外入库、5生产入库),
|
|
|
|
|
|
//setWarehouseOrderType仓库订单类型(0采购订单、1生产订单、2退换货订单、3委外订单),
|
|
|
|
|
|
//WarehouseDeptType 仓库入库部门类型(0仓库,1采购 ),
|
|
|
warehouseStorageOrder.setWarehouseStorageCode(warehouseStorageCode1); |
|
|
warehouseStorageOrder.setWarehouseStorageCode(warehouseStorageCode1); |
|
|
|
|
|
warehouseStorageOrder.setRelatedOrderCode(warehouseStorageOrder.getRelatedOrderCode()); |
|
|
warehouseStorageOrder.setWarehouseStorageStatus("0"); |
|
|
warehouseStorageOrder.setWarehouseStorageStatus("0"); |
|
|
warehouseStorageOrder.setWarehouseQualityStatus("0"); |
|
|
warehouseStorageOrder.setWarehouseQualityStatus("0"); |
|
|
warehouseStorageOrder.setWarehouseStorageType("1"); |
|
|
warehouseStorageOrder.setWarehouseStorageType("0"); |
|
|
warehouseStorageOrder.setWarehouseOrderType("0"); |
|
|
warehouseStorageOrder.setWarehouseOrderType("0"); |
|
|
warehouseStorageOrder.setWarehouseDeptType("1"); |
|
|
warehouseStorageOrder.setWarehouseDeptType("0"); |
|
|
warehouseStorageOrder.setCreateTime(DateUtils.getNowDate()); |
|
|
warehouseStorageOrder.setCreateTime(DateUtils.getNowDate()); |
|
|
warehouseStorageOrder.setCreateBy(ShiroUtils.getLoginName()); |
|
|
warehouseStorageOrder.setCreateBy(ShiroUtils.getLoginName()); |
|
|
warehouseStorageOrder.setWarehouseStorageOrderDetailList(list2); |
|
|
warehouseStorageOrder.setWarehouseStorageOrderDetailList(list2); |
|
|
result = warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder); |
|
|
result = warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|