From c17a0d27b6a2e9e0ebda4ee584b6b2fdf4e323ca Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 05 十一月 2025 12:46:14 +0800
Subject: [PATCH] 数采调整

---
 inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 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 b1f7a65..0bbd552 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,8 @@
 import com.ruoyi.basic.dto.*;
 import com.ruoyi.basic.pojo.IfsInventoryQuantity;
 import com.ruoyi.common.annotation.PersonalScope;
+import com.ruoyi.common.enums.OrderType;
+import com.ruoyi.framework.exception.ErrorException;
 import com.ruoyi.inspect.dto.InsPlaceOrderDto;
 import com.ruoyi.inspect.dto.OrderSplitDTO;
 import com.ruoyi.inspect.dto.SampleProductDto;
@@ -31,6 +33,7 @@
 import java.io.File;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 /**
  * @Author zhuo
@@ -106,7 +109,11 @@
     @PostMapping("/inspectionReport")
     public Result<?> inspectionReport(@RequestBody Map<String, Object> param) {
         List<Long> ids = (List<Long>) param.get("ids");
-        return Result.success(rawMaterialOrderService.inspectionReport(ids));
+        String orderType = Objects.nonNull(param.get("orderType"))?param.get("orderType").toString():"";
+        if(!OrderType.validateValue(orderType)){
+            throw new ErrorException("鎵归噺鎶ユ澶辫触,闈炴硶鐨勯攢鍞鍗曞垎绫绘灇涓�");
+        }
+        return Result.success(rawMaterialOrderService.inspectionReport(ids,orderType));
     }
 
     /**
@@ -221,6 +228,7 @@
     @PreAuthorize("@ss.hasPermi('get:Ifs:ByAll')")
     @GetMapping("/getIfsByAll")
     public Result getIfsByAll(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){
+        ifsInventoryQuantityDto.setOrderType(OrderType.RAW.getValue());
         return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto));
     }
 
@@ -236,6 +244,7 @@
     @GetMapping("/getIfsByFinish")
     public Result getIfsByFinish(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) throws Exception {
         ifsInventoryQuantityDto.setIsFinish(1);
+        ifsInventoryQuantityDto.setOrderType(OrderType.RAW.getValue());
         return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto));
     }
 
@@ -349,4 +358,13 @@
         return Result.success(rawMaterialOrderService.confirmSplitOrder(orderSplitDTO));
     }
 
+    /**
+     * 鏍规嵁ifsId鏌ヨ涓嬪崟鏁伴噺
+     */
+    @ApiOperation(value = "鏍规嵁ifsId鏌ヨ涓嬪崟鏁伴噺")
+    @GetMapping("/getOrderCountByIfsId/{ifsId}")
+    public Result getOrderCountByIfsId(@PathVariable("ifsId") Long ifsId){
+        return Result.success(rawMaterialOrderService.getOrderCountByIfsId(ifsId));
+    }
+
 }

--
Gitblit v1.9.3