From 6c29f8db4dc4e21e3a81998ebd2582f47c20bbd5 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 21 Jun 2024 09:25:53 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E9=87=87=E8=B4=AD=E7=AE=A1=E7=90=86:=20?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93=E9=80=9A=E7=9F=A5=E5=8D=95?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=8D=95=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=8D=95=E8=AF=A6=E6=83=85=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E9=80=9A=E7=9F=A5=E5=8D=95=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E5=8F=B7=E6=9F=A5=E8=AF=A2=E7=89=A9?= =?UTF-8?q?=E6=96=99=E4=BF=A1=E6=81=AF=E5=92=8C=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PurchaseStorageController.java | 54 +++- .../purchase/purchaseStorage/detail.html | 290 ++++++++++++++++++ .../purchaseStorage/purchaseStorage.html | 13 +- 3 files changed, 348 insertions(+), 9 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/detail.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java index 7f566d33..9277800b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java @@ -1,17 +1,18 @@ package com.ruoyi.purchase.controller; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; import com.ruoyi.warehouse.domain.WarehouseStorageOrder; +import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail; +import com.ruoyi.warehouse.service.IWarehouseStorageOrderDetailService; +import com.ruoyi.warehouse.service.IWarehouseStorageOrderService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.purchase.domain.PurchaseStorage; @@ -36,6 +37,12 @@ public class PurchaseStorageController extends BaseController @Autowired private IPurchaseStorageService purchaseStorageService; + @Autowired + private IWarehouseStorageOrderService warehouseStorageOrderService; + + @Autowired + private IWarehouseStorageOrderDetailService storageOrderDetailService; + @RequiresPermissions("purchase:purchaseStorage:view") @GetMapping() public String purchaseStorage() @@ -70,6 +77,43 @@ public class PurchaseStorageController extends BaseController return util.exportExcel(list, "采购入库通知单数据"); } + + /** + * 采购入库单详情 + */ + @GetMapping("/detail/{warehouseStorageId}") + public String detail(@PathVariable("warehouseStorageId") Long warehouseStorageId, ModelMap mmap) + { + WarehouseStorageOrder warehouseStorageOrder = warehouseStorageOrderService.selectWarehouseStorageOrderById(warehouseStorageId); + mmap.put("warehouseStorageOrder", warehouseStorageOrder); + return prefix + "/detail"; + } + + /** + * 修改保存采购入库单详情 + */ + @RequiresPermissions("purchase:purchaseStorage:detail") + @Log(title = "仓库入库单", businessType = BusinessType.UPDATE) + @PostMapping("/detail") + @ResponseBody + public AjaxResult detailSave(@RequestBody WarehouseStorageOrder warehouseStorageOrder) + { + return toAjax(warehouseStorageOrderService.updateWarehouseStorageOrder(warehouseStorageOrder)); + } + + + /** + * 采购入库单详情 供应商物料详情列表 + */ + @ResponseBody + @RequestMapping("/storagePurchaseDetailList") + public Map> storagePurchaseDetail(String warehouseStorageCode){ + List allDetails = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode); + Map> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); + return groupedDetails; + } + + /** * 新增采购入库通知单 */ diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/detail.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/detail.html new file mode 100644 index 00000000..85306ef0 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/detail.html @@ -0,0 +1,290 @@ + + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html index a15931e0..eb435a5d 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html @@ -71,9 +71,7 @@ \ No newline at end of file