Browse Source

[feat]添加采购订单添加通知入库单时,计算没入库部门类型中各位物料的通知到货数的总和数,放入主表的通知已到货数中

dev
zhangsiqi 4 months ago
parent
commit
cd076543b6
  1. 9
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java

9
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java

@ -387,6 +387,10 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
//WarehouseStorageType 仓库入库类型(0采购入库、1供应商补货、2委内入库、3公司退货、4委外入库、5生产入库),
//setWarehouseOrderType仓库订单类型(0采购订单、1生产订单、2退换货订单、3委外订单),
//WarehouseDeptType 仓库入库部门类型(0仓库,1采购 ),
//通知到货数1
Integer notifyArrivedNum = 0;
Integer notifyArrivedNum1 = 0;
//通知到货数2
if(list1.size() > 0) {
//仓库入库单,物料入库列表信息读取,放入生成的入库订单号
String warehouseStorageCode = redisCache.generateBillNo("RK");
@ -395,6 +399,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
warehouseStorageOrderDetail.setWarehouseStorageType("0");
warehouseStorageOrderDetail.setMaterialDeptType("0");
warehouseStorageOrderDetail.setWarehouseDeptType("0");
notifyArrivedNum = notifyArrivedNum + warehouseStorageOrderDetail.getNotifyArriveNum();
storageOrderDetailMapper.insertWarehouseStorageOrderDetail(warehouseStorageOrderDetail);
}
warehouseStorageOrder.setWarehouseStorageCode(warehouseStorageCode);
@ -404,8 +409,10 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
warehouseStorageOrder.setWarehouseStorageType("0");
warehouseStorageOrder.setWarehouseOrderType("0");
warehouseStorageOrder.setWarehouseDeptType("0");
warehouseStorageOrder.setNotifyArrivedNum(notifyArrivedNum);
warehouseStorageOrder.setCreateTime(DateUtils.getNowDate());
warehouseStorageOrder.setCreateBy(ShiroUtils.getLoginName());
notifyArrivedNum = notifyArrivedNum + warehouseStorageOrder.getNotifyArrivedNum();
result = warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder);
}
if(list2.size() > 0) {
@ -416,6 +423,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
warehouseStorageOrderDetail.setWarehouseStorageType("0");
warehouseStorageOrderDetail.setMaterialDeptType("1");
warehouseStorageOrderDetail.setWarehouseDeptType("1");
notifyArrivedNum1 = notifyArrivedNum + warehouseStorageOrderDetail.getNotifyArriveNum();
storageOrderDetailMapper.insertWarehouseStorageOrderDetail(warehouseStorageOrderDetail);
}
//入库代表为仓库部分的入库单
@ -430,6 +438,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
warehouseStorageOrder.setWarehouseStorageType("0");
warehouseStorageOrder.setWarehouseOrderType("0");
warehouseStorageOrder.setWarehouseDeptType("1");
warehouseStorageOrder.setNotifyArrivedNum(notifyArrivedNum1);
warehouseStorageOrder.setCreateTime(DateUtils.getNowDate());
warehouseStorageOrder.setCreateBy(ShiroUtils.getLoginName());
warehouseStorageOrder.setWarehouseStorageOrderDetailList(list2);

Loading…
Cancel
Save