|
@ -1206,18 +1206,19 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService |
|
|
//生成仓库入库单子表
|
|
|
//生成仓库入库单子表
|
|
|
buildWarehouseChild(purchaseOrder, warehouseStorageCode,filterPurchaseOrderChildList); |
|
|
buildWarehouseChild(purchaseOrder, warehouseStorageCode,filterPurchaseOrderChildList); |
|
|
|
|
|
|
|
|
//更新采购订单子表
|
|
|
|
|
|
updatePurchaseOrderChildData(purchaseOrder, filterPurchaseOrderChildList); |
|
|
|
|
|
|
|
|
|
|
|
int allNotifyArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyArriveNum).sum(); |
|
|
int allNotifyArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyArriveNum).sum(); |
|
|
int allNotifyHasArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyHasArrivedNum).sum(); |
|
|
int allNotifyHasArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyHasArrivedNum).sum(); |
|
|
|
|
|
|
|
|
if (allNotifyHasArrivedNum == 0){ |
|
|
if (purchaseOrder.getNotifyHasArrivedSum() == null || purchaseOrder.getNotifyHasArrivedSum() == 0 ){ |
|
|
purchaseOrder.setNotifyHasArrivedSum(allNotifyArrivedNum); |
|
|
purchaseOrder.setNotifyHasArrivedSum(allNotifyArrivedNum); |
|
|
}else { |
|
|
}else { |
|
|
purchaseOrder.setNotifyHasArrivedSum(allNotifyHasArrivedNum + allNotifyArrivedNum); |
|
|
purchaseOrder.setNotifyHasArrivedSum(allNotifyArrivedNum + purchaseOrder.getNotifyHasArrivedSum()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//更新采购订单子表
|
|
|
|
|
|
updatePurchaseOrderChildData(purchaseOrder, filterPurchaseOrderChildList); |
|
|
|
|
|
|
|
|
if (purchaseOrder.getNotifyHasArrivedSum().equals(purchaseOrder.getActualPurchaseSum())){ |
|
|
if (purchaseOrder.getNotifyHasArrivedSum().equals(purchaseOrder.getActualPurchaseSum())){ |
|
|
purchaseOrder.setWarehouseStorageStatus("4"); |
|
|
purchaseOrder.setWarehouseStorageStatus("4"); |
|
|
}if (purchaseOrder.getNotifyHasArrivedSum() < purchaseOrder.getActualPurchaseSum()){ |
|
|
}if (purchaseOrder.getNotifyHasArrivedSum() < purchaseOrder.getActualPurchaseSum()){ |
|
@ -1231,7 +1232,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService |
|
|
private void updatePurchaseOrderChildData(PurchaseOrder purchaseOrder, List<PurchaseOrderChild> filterPurchaseOrderChildList) { |
|
|
private void updatePurchaseOrderChildData(PurchaseOrder purchaseOrder, List<PurchaseOrderChild> filterPurchaseOrderChildList) { |
|
|
|
|
|
|
|
|
for (PurchaseOrderChild purchaseOrderChild : filterPurchaseOrderChildList) { |
|
|
for (PurchaseOrderChild purchaseOrderChild : filterPurchaseOrderChildList) { |
|
|
if (purchaseOrderChild.getNotifyHasArrivedNum() == 0 || purchaseOrderChild.getNotifyHasArrivedNum() == null){ |
|
|
if (purchaseOrderChild.getNotifyHasArrivedNum() == null || purchaseOrderChild.getNotifyHasArrivedNum() == 0){ |
|
|
purchaseOrderChild.setNotifyHasArrivedNum(purchaseOrderChild.getNotifyArriveNum()); |
|
|
purchaseOrderChild.setNotifyHasArrivedNum(purchaseOrderChild.getNotifyArriveNum()); |
|
|
}else { |
|
|
}else { |
|
|
purchaseOrderChild.setNotifyHasArrivedNum(purchaseOrderChild.getNotifyHasArrivedNum() + purchaseOrderChild.getNotifyArriveNum()); |
|
|
purchaseOrderChild.setNotifyHasArrivedNum(purchaseOrderChild.getNotifyHasArrivedNum() + purchaseOrderChild.getNotifyArriveNum()); |
|
@ -1289,6 +1290,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService |
|
|
warehouseStorageOrder.setWarehouseDeptType(purchaseOrderChild.getWarehouseDept()); |
|
|
warehouseStorageOrder.setWarehouseDeptType(purchaseOrderChild.getWarehouseDept()); |
|
|
warehouseStorageOrder.setWarehouseQualityStatus("0"); |
|
|
warehouseStorageOrder.setWarehouseQualityStatus("0"); |
|
|
warehouseStorageOrder.setWarehouseOrderType("0"); |
|
|
warehouseStorageOrder.setWarehouseOrderType("0"); |
|
|
|
|
|
warehouseStorageOrder.setArrivedTime(purchaseOrder.getArrivedTime()); |
|
|
int allNotifyArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyArriveNum).sum(); |
|
|
int allNotifyArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyArriveNum).sum(); |
|
|
int allNotifyHasArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyHasArrivedNum).sum(); |
|
|
int allNotifyHasArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyHasArrivedNum).sum(); |
|
|
if (allNotifyHasArrivedNum == 0){ |
|
|
if (allNotifyHasArrivedNum == 0){ |
|
@ -1330,6 +1332,8 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService |
|
|
warehouseStorageOrderDetail.setMaterialType(purchaseOrderChild.getMaterialType()); |
|
|
warehouseStorageOrderDetail.setMaterialType(purchaseOrderChild.getMaterialType()); |
|
|
warehouseStorageOrderDetail.setMaterialDeptType(purchaseOrderChild.getWarehouseDept()); |
|
|
warehouseStorageOrderDetail.setMaterialDeptType(purchaseOrderChild.getWarehouseDept()); |
|
|
warehouseStorageOrderDetail.setArrivedTime(purchaseOrderChild.getPlanDeliveryTime()); |
|
|
warehouseStorageOrderDetail.setArrivedTime(purchaseOrderChild.getPlanDeliveryTime()); |
|
|
|
|
|
warehouseStorageOrderDetail.setSupplierCode(purchaseOrder.getSupplierCode()); |
|
|
|
|
|
warehouseStorageOrderDetail.setSupplierName(purchaseOrder.getSupplierName()); |
|
|
warehouseStorageOrderDetail.setCreateTime(new Date()); |
|
|
warehouseStorageOrderDetail.setCreateTime(new Date()); |
|
|
warehouseStorageOrderDetail.setCreateBy(ShiroUtils.getLoginName()); |
|
|
warehouseStorageOrderDetail.setCreateBy(ShiroUtils.getLoginName()); |
|
|
Integer notifyArriveNum = purchaseOrderChild.getNotifyArriveNum(); |
|
|
Integer notifyArriveNum = purchaseOrderChild.getNotifyArriveNum(); |
|
@ -1377,6 +1381,8 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService |
|
|
purchaseStorageChild.setMaterialType(purchaseOrderChild.getMaterialType()); |
|
|
purchaseStorageChild.setMaterialType(purchaseOrderChild.getMaterialType()); |
|
|
purchaseStorageChild.setMaterialDeptType(purchaseOrderChild.getWarehouseDept()); |
|
|
purchaseStorageChild.setMaterialDeptType(purchaseOrderChild.getWarehouseDept()); |
|
|
purchaseStorageChild.setArrivedTime(purchaseOrderChild.getPlanDeliveryTime()); |
|
|
purchaseStorageChild.setArrivedTime(purchaseOrderChild.getPlanDeliveryTime()); |
|
|
|
|
|
purchaseStorageChild.setSupplierCode(purchaseOrder.getSupplierCode()); |
|
|
|
|
|
purchaseStorageChild.setSupplierName(purchaseOrder.getSupplierName()); |
|
|
purchaseStorageChild.setCreateTime(new Date()); |
|
|
purchaseStorageChild.setCreateTime(new Date()); |
|
|
purchaseStorageChild.setCreateBy(ShiroUtils.getLoginName()); |
|
|
purchaseStorageChild.setCreateBy(ShiroUtils.getLoginName()); |
|
|
Integer notifyArriveNum = purchaseOrderChild.getNotifyArriveNum(); |
|
|
Integer notifyArriveNum = purchaseOrderChild.getNotifyArriveNum(); |
|
|