From e1284aa3b1b400ecebb59126d7110a3bb4a6b000 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 31 十月 2025 15:46:09 +0800
Subject: [PATCH] 原材料报检拆分功能V1
---
 inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java |   44 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java b/inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java
index 189dd0b..bbddb17 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java
@@ -7,6 +7,7 @@
 import com.ruoyi.basic.pojo.IfsInventoryQuantity;
 import com.ruoyi.common.annotation.PersonalScope;
 import com.ruoyi.inspect.dto.InsPlaceOrderDto;
+import com.ruoyi.inspect.dto.OrderSplitDTO;
 import com.ruoyi.inspect.dto.SampleProductDto;
 import com.ruoyi.inspect.pojo.InsOrder;
 import com.ruoyi.inspect.pojo.RawMaterialOrderTemplate;
@@ -22,7 +23,9 @@
 import lombok.AllArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
+import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.File;
 import java.util.List;
@@ -102,7 +105,7 @@
     @ApiOperation(value = "鎶ユ鎵归噺")
     @PostMapping("/inspectionReport")
     public Result<?> inspectionReport(@RequestBody Map<String, Object> param) {
-        List<Integer> ids = (List<Integer>) param.get("ids");
+        List<Long> ids = (List<Long>) param.get("ids");
         return Result.success(rawMaterialOrderService.inspectionReport(ids));
     }
 
@@ -114,7 +117,7 @@
     @ApiOperation(value = "鎾ら攢鎶ユ")
     @PostMapping("/revokeInspectionReport")
     public Result<?> revokeInspectionReport(@RequestBody Map<String, Object> param) {
-        Integer id = (Integer) param.get("id");
+        Long id = (Long) param.get("id");
         return Result.success(rawMaterialOrderService.revokeInspectionReport(id));
     }
 
@@ -161,7 +164,7 @@
     @ApiOperation(value = "鍘熸潗鏂欐挙閿�涓嬪崟")
     @GetMapping("/repealRawOrder")
     public Result<?> repealRawOrder(@RequestBody Map<String, Object> param){
-        Integer ifsInventoryId = (Integer) param.get("ifsInventoryId");
+        Long ifsInventoryId = (Long) param.get("ifsInventoryId");
         return Result.success(rawMaterialOrderService.repealRawOrder(ifsInventoryId));
     }
 
@@ -198,7 +201,7 @@
     @ApiOperation(value = "鍘熸潗鏂欎笅鍗曟斁琛屽厤妫�")
     @PostMapping("/rawOrderRelease")
     public Result<?> rawOrderRelease(@RequestBody Map<String, Object> param){
-        Integer ifsInventoryId = (Integer) param.get("ifsInventoryId");
+        Long ifsInventoryId = (Long) param.get("ifsInventoryId");
         String partDetail = (String) param.get("partDetail");
         return Result.success(rawMaterialOrderService.rawOrderRelease(ifsInventoryId, partDetail));
     }
@@ -210,7 +213,7 @@
      */
     @ApiOperation(value = "鍘熸潗鏂欎笅鍗曢�氱煡鍏嶆鎴栬�呭娆℃楠�")
     @GetMapping("/notificationRawOrder")
-    public Result<?> notificationRawOrder(Integer ifsInventoryId){
+    public Result<?> notificationRawOrder(Long ifsInventoryId){
         return Result.success(rawMaterialOrderService.notificationRawOrder(ifsInventoryId));
     }
 
@@ -266,7 +269,7 @@
     @ApiOperation(value = "璁╂鏀捐")
     @PostMapping("/concessionRelease")
     public Result<?> concessionRelease(@RequestBody Map<String, Object> param){
-        Integer ifsInventoryId = (Integer) param.get("ifsInventoryId");
+        Long ifsInventoryId = (Long) param.get("ifsInventoryId");
         return Result.success(rawMaterialOrderService.concessionRelease(ifsInventoryId));
     }
 
@@ -316,8 +319,35 @@
     @ApiOperation(value = "鎻愬墠鍏ュ簱")
     @PostMapping("/advancedGodown")
     public Result<?> advancedGodown(@RequestBody Map<String, Object> param){
-        Integer ifsInventoryId = (Integer) param.get("ifsInventoryId");
+        Long ifsInventoryId = (Long) param.get("ifsInventoryId");
         return Result.success(rawMaterialOrderService.advancedGodown(ifsInventoryId));
     }
 
+    /**
+     * 涓嬭浇璁㈠崟鎷嗗垎瀵煎叆妯℃澘
+     */
+    @ApiOperation(value = "涓嬭浇璁㈠崟鎷嗗垎瀵煎叆妯℃澘")
+    @GetMapping("/downloadTemplate")
+    public void downloadTemplate(HttpServletResponse response){
+        rawMaterialOrderService.downloadTemplate(response);
+    }
+
+    /**
+     * 涓嬭浇璁㈠崟鎷嗗垎瀵煎叆妯℃澘
+     */
+    @ApiOperation(value = "瀵煎叆璁㈠崟鎷嗗垎鏁版嵁")
+    @PostMapping("/importSplitOrderData")
+    public Result importSplitOrderData(@RequestParam(value = "file") MultipartFile file, @RequestParam("ifsId") Long ifsId, HttpServletRequest request){
+        return rawMaterialOrderService.importSplitOrderData(file,ifsId,request);
+    }
+
+    /**
+     * 纭鎷嗗垎璁㈠崟
+     */
+    @ApiOperation(value = "纭鎷嗗垎璁㈠崟")
+    @PostMapping("/confirmSplitOrder")
+    public Result confirmSplitOrder(@RequestBody OrderSplitDTO orderSplitDTO){
+        return Result.success(rawMaterialOrderService.confirmSplitOrder(orderSplitDTO));
+    }
+
 }
--
Gitblit v1.9.3