From 8cd4e3664cc33705b9c68ac278f40e40cf258ecb Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期一, 19 五月 2025 18:01:55 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsPlate/ApsPlatePlanController.java |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsPlate/ApsPlatePlanController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsPlate/ApsPlatePlanController.java
index 8a6440a..54ca6dd 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsPlate/ApsPlatePlanController.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsPlate/ApsPlatePlanController.java
@@ -10,10 +10,15 @@
 import com.aps.common.security.utils.DictUtils;
 import com.aps.core.domain.ApsPlate.ApsPlatePlan;
 import com.aps.core.domain.ApsPlate.ApsPlatePlanTemp;
+import com.aps.core.domain.ApsPlate.ApsPlateRequireDate;
 import com.aps.core.domain.export.ApsPlatePlanExport;
+import com.aps.core.service.ApsPlate.ApsPlateRequireDateService;
 import com.aps.core.service.ApsPlate.IApsPlatePlanService;
 import com.aps.core.service.ApsPlate.IApsPlatePlanTempService;
 import com.aps.system.api.domain.SysDictData;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletResponse;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,6 +35,7 @@
  * @author ruoyi
  * @date 2025-04-08
  */
+@Tag(name = "閽i噾璁″垝鍒楄〃", description = "閽i噾璁″垝鍒楄〃")
 @RestController
 @RequestMapping("/apsPlatePlan")
 public class ApsPlatePlanController extends BaseController {
@@ -37,6 +43,9 @@
     private IApsPlatePlanService apsPlatePlanService;
     @Autowired
     private IApsPlatePlanTempService apsPlatePlanTempService;
+    @Resource
+    private ApsPlateRequireDateService apsPlateRequireDateService;
+
     /**
      * 鏌ヨ閽i噾璁″垝绠$悊鍒楄〃
      */
@@ -229,4 +238,29 @@
         }
     }
 
+
+    /**
+     * 瀵煎叆Excel鏁版嵁
+     * @param file
+     * @return
+     * @throws Exception
+     */
+    @Operation(summary = "瀵煎叆宸ュ崟闇�姹傛棩鏈�", description = "瀵煎叆宸ュ崟闇�姹傛棩鏈�")
+    //@RequiresPermissions("apsPlatePlan:import")
+    @Log(title = "瀵煎叆宸ュ崟闇�姹傛棩鏈�", businessType = BusinessType.IMPORT)
+    @PostMapping("/importRequireDate")
+    public AjaxResult importRequireDate(MultipartFile file) throws Exception {
+        ExcelUtil<ApsPlateRequireDate> util = new ExcelUtil<ApsPlateRequireDate>(ApsPlateRequireDate.class);
+        List<ApsPlateRequireDate> plateRequireDateList = util.importExcel(file.getInputStream());
+        if (!plateRequireDateList.isEmpty()) {
+            try {
+                apsPlateRequireDateService.batchSave(plateRequireDateList);
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        } else {
+            return AjaxResult.error("妯℃澘鍐呭涓虹┖");
+        }
+        return AjaxResult.success("瀵煎叆鎴愬姛锛�");
+    }
 }

--
Gitblit v1.9.3