From bc9d5f232f55ca5a98e140252288f56ae23e6793 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 27 五月 2026 14:16:12 +0800
Subject: [PATCH] 编辑采购台账报错异常

---
 src/main/java/com/ruoyi/basic/controller/SupplierManageController.java |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/ruoyi/basic/controller/SupplierManageController.java b/src/main/java/com/ruoyi/basic/controller/SupplierManageController.java
index b50f88f..05d262c 100644
--- a/src/main/java/com/ruoyi/basic/controller/SupplierManageController.java
+++ b/src/main/java/com/ruoyi/basic/controller/SupplierManageController.java
@@ -4,22 +4,23 @@
 import com.ruoyi.basic.dto.SupplierManageDto;
 import com.ruoyi.basic.pojo.SupplierManage;
 import com.ruoyi.basic.service.ISupplierService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
 import com.ruoyi.framework.web.domain.AjaxResult;
-import org.springframework.beans.factory.annotation.Autowired;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.AllArgsConstructor;
 import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
-import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
 @RestController
 @RequestMapping("/system/supplier")
+@AllArgsConstructor
 public class SupplierManageController {
 
-    @Autowired
     private ISupplierService supplierService;
 
     /**
@@ -27,6 +28,7 @@
      * @param supplierManage
      * @return
      */
+    @Log(title = "渚涘簲鍟嗙鐞�", businessType = BusinessType.INSERT)
     @PostMapping("/add")
     public AjaxResult add(@RequestBody SupplierManage supplierManage) {
         supplierService.saveSupplier(supplierManage);
@@ -38,6 +40,7 @@
      * @param ids
      * @return
      */
+    @Log(title = "渚涘簲鍟嗙鐞�", businessType = BusinessType.DELETE)
     @DeleteMapping("/del")
     public AjaxResult delSupplier(@RequestBody List<Integer> ids) {
         if(CollectionUtils.isEmpty(ids)){
@@ -62,6 +65,7 @@
      * @param supplierManage
      * @return
      */
+    @Log(title = "渚涘簲鍟嗙鐞�", businessType = BusinessType.UPDATE)
     @PostMapping("/update")
     public AjaxResult update(@RequestBody SupplierManage supplierManage) {
         supplierService.supplierUpdate(supplierManage);
@@ -84,11 +88,19 @@
      * @param response
      * @param supplierManageDto
      */
+    @Log(title = "渚涘簲鍟嗙鐞�", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void supplierExport(HttpServletResponse response,SupplierManageDto supplierManageDto) {
         supplierService.supplierExport(response, supplierManageDto);
     }
 
+    @PostMapping("/downloadTemplate")
+    @Log(title = "渚涘簲鍟�-涓嬭浇妯℃澘", businessType = BusinessType.EXPORT)
+    public void downloadTemplate(HttpServletResponse response) {
+        ExcelUtil<SupplierManage> util = new ExcelUtil<SupplierManage>(SupplierManage.class);
+        util.importTemplateExcel(response, "渚涘簲鍟嗘。妗堟ā鏉�");
+    }
+
     /**
      * 渚涘簲鍟嗗鍏�
      */

--
Gitblit v1.9.3