diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java index 5db56e28..bbd08024 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java @@ -271,6 +271,8 @@ public class SysMakeOrderServiceImpl implements ISysMakeOrderService orderBom.setMakeNo(makeNo); orderBom.setSalesOrderCode(saleNo); orderBom.setSalesOrderMaterialNo(materialCode); + //如果sys_makeorder_bom数据表里面没有入库部门.这里给他加入 + //orderBom.setWarehouseDept(subBom.getWarehouseDept()); sortNo++; orderBom.setSortNo(sortNo); makeorderBomService.insertSysMakeorderBom(orderBom); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java index 08c893af..31ac1158 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java @@ -172,7 +172,8 @@ public class WarehouseStorageOrderController extends BaseController @RequestMapping("/temporaryPurchaseWarehouseDetailList") public Map> temporaryPurchaseWarehouseDetail(String warehouseStorageCode){ List allDetails = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode); - Map> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); + List filterAllDetails = allDetails.stream().filter(wso -> "0".equals(wso.getMaterialDeptType())).collect(Collectors.toList()); + Map> groupedDetails = filterAllDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); return groupedDetails; } @@ -232,7 +233,8 @@ public class WarehouseStorageOrderController extends BaseController @RequestMapping("/temporaryPurchaseDetailList") public Map> temporaryPurchaseDetail(String warehouseStorageCode){ List allDetails = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode); - Map> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); + List filterAllDetails = allDetails.stream().filter(wso -> "1".equals(wso.getMaterialDeptType())).collect(Collectors.toList()); + Map> groupedDetails = filterAllDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); return groupedDetails; } @@ -354,7 +356,8 @@ public class WarehouseStorageOrderController extends BaseController @RequestMapping("/storagePurchaseDetailList") public Map> storagePurchaseDetail(String warehouseStorageCode){ List allDetails = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode); - Map> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); + List filterAllDetails = allDetails.stream().filter(wso -> "1".equals(wso.getMaterialDeptType())).collect(Collectors.toList()); + Map> groupedDetails = filterAllDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); return groupedDetails; } @@ -415,7 +418,8 @@ public class WarehouseStorageOrderController extends BaseController @RequestMapping("/storagePurchaseWarehouseDetailList") public Map> storagePurchaseWarehouseDetail(String warehouseStorageCode){ List allDetails = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode); - Map> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); + List filterAllDetails = allDetails.stream().filter(wso -> "0".equals(wso.getMaterialDeptType())).collect(Collectors.toList()); + Map> groupedDetails = filterAllDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); return groupedDetails; } diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html index 58d680c6..a00c61d6 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html @@ -243,12 +243,12 @@ var actions = []; /*暂收-采购单(仓库入库)*/ - if (row.warehouseDeptType == 1 && row.warehouseOrderType == 0 && row.warehouseStorageStatus == 0 ){ + if (row.warehouseDeptType == 0 && row.warehouseOrderType == 0 && row.warehouseStorageStatus == 0 ){ actions.push('暂收 '); actions.push('详情 '); } /*暂收-采购单(采购入库)*/ - if (row.warehouseDeptType == 0 && row.warehouseOrderType == 0 && row.warehouseStorageStatus == 0 ){ + if (row.warehouseDeptType == 1 && row.warehouseOrderType == 0 && row.warehouseStorageStatus == 0 ){ actions.push('暂收 '); actions.push('详情 '); @@ -260,13 +260,13 @@ } /*入库-采购单(采购入库)*/ - if ( row.warehouseDeptType == 0 && row.warehouseOrderType == 0 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3) ){ + if ( row.warehouseDeptType == 1 && row.warehouseOrderType == 0 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3) ){ actions.push('入库 '); actions.push('详情 '); } /*入库-采购单(仓库入库)*/ - if ( row.warehouseDeptType == 1 && row.warehouseOrderType == 0 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3) ){ + if ( row.warehouseDeptType == 0 && row.warehouseOrderType == 0 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3) ){ actions.push('入库 '); actions.push('详情 '); diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchase.html b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchase.html index 16dd047e..7476885f 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchase.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchase.html @@ -91,6 +91,10 @@ var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]] var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]] + + var warehouseDeptTypeDatas = [[${@dict.getType('warehouse_dept_type')}]]; + + var prefix = ctx + "warehouse/storageOrder"; $("#form-temporaryPurchaseWarehouse-edit").validate({ focusCleanup: true @@ -239,6 +243,13 @@ field: 'materialProcessMethod', }, + { + title: '入库部门', + field: 'materialDeptType', + formatter: function(value, row, index) { + return $.table.selectDictLabel(warehouseDeptTypeDatas, value); + } + }, { title: '通知已到货数', field: 'notifyHasArrivedNum', diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseDetail.html b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseDetail.html index a89e8feb..c60bdd85 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseDetail.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseDetail.html @@ -91,6 +91,9 @@ var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]] var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]] + + var warehouseDeptTypeDatas = [[${@dict.getType('warehouse_dept_type')}]]; + var prefix = ctx + "warehouse/storageOrder"; $("#form-temporaryPurchaseWarehouse-edit").validate({ focusCleanup: true @@ -234,7 +237,13 @@ title: '物料加工方式', field: 'materialProcessMethod', }, - + { + title: '入库部门', + field: 'materialDeptType', + formatter: function(value, row, index) { + return $.table.selectDictLabel(warehouseDeptTypeDatas, value); + } + }, { title: '通知已到货数', field: 'notifyHasArrivedNum', diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseWarehouse.html b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseWarehouse.html index 8b435b20..1d946a19 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseWarehouse.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseWarehouse.html @@ -91,6 +91,9 @@ var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]] var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]] + + var warehouseDeptTypeDatas = [[${@dict.getType('warehouse_dept_type')}]]; + var prefix = ctx + "warehouse/storageOrder"; $("#form-temporaryPurchaseWarehouse-edit").validate({ focusCleanup: true @@ -235,7 +238,13 @@ title: '物料加工方式', field: 'materialProcessMethod', }, - + { + title: '入库部门', + field: 'materialDeptType', + formatter: function(value, row, index) { + return $.table.selectDictLabel(warehouseDeptTypeDatas, value); + } + }, { title: '通知已到货数', field: 'notifyHasArrivedNum', diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseWarehouseDetail.html b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseWarehouseDetail.html index c6b172ae..b8a5da0f 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseWarehouseDetail.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseWarehouseDetail.html @@ -91,6 +91,9 @@ var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]] var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]] + + var warehouseDeptTypeDatas = [[${@dict.getType('warehouse_dept_type')}]]; + var prefix = ctx + "warehouse/storageOrder"; $("#form-temporaryPurchaseWarehouse-edit").validate({ focusCleanup: true @@ -235,7 +238,13 @@ title: '物料加工方式', field: 'materialProcessMethod', }, - + { + title: '入库部门', + field: 'materialDeptType', + formatter: function(value, row, index) { + return $.table.selectDictLabel(warehouseDeptTypeDatas, value); + } + }, { title: '通知已到货数', field: 'notifyHasArrivedNum',