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 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 49 insertions(+), 10 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 abc3b2a..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
@@ -5,7 +5,9 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.dto.*;
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;
@@ -19,8 +21,11 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;
@@ -43,7 +48,7 @@
@ApiOperation(value = "鏇村叿闆朵欢鍙疯幏鍙栨爣鍑嗘爲")
@GetMapping("/selectStandardTreeListByPartNo")
public Result selectStandardTreeListByPartNo(String partNo) {
- return Result.success(rawMaterialOrderService.selectStandardTreeListByPartNo(partNo));
+ return rawMaterialOrderService.selectStandardTreeListByPartNo(partNo);
}
@ApiOperation(value = "鍘熸潗鏂欐楠屾煡璇唬涓嬪崟")
@@ -54,12 +59,16 @@
@ApiOperation(value = "鍘熸潗鏂欐楠屾煡璇㈡楠屼腑")
@GetMapping("/getIfsByStateOne")
+ @PreAuthorize("@ss.hasPermi('business:order')")
+ @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantityDto.class, paramName = "createUser")
public Result getIfsByStateOne(Page page, IfsInventoryQuantityDto ifsInventoryQuantityDto){
return Result.success(rawMaterialOrderService.getIfsByStateOne(page, ifsInventoryQuantityDto));
}
@ApiOperation(value = "鍘熸潗鏂欐楠屾煡璇㈠凡妫�楠�")
@GetMapping("/getIfsByOver")
+ @PreAuthorize("@ss.hasPermi('business:order')")
+ @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantitySupplierDto.class, paramName = "createUser")
public Result getIfsByOver(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){
return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto));
}
@@ -78,7 +87,7 @@
@ApiOperation(value = "閫氳繃鍘熸潗鏂欐楠屽崟妯℃澘id鑾峰彇妫�楠屽崟妯℃澘鍐呭")
@GetMapping("/selectRawMaterOrderTemplateById")
public Result<?> selectRawMaterOrderTemplateById(Integer id) {
- return Result.success("鎴愬姛", rawMaterialOrderTemplateService.selectRawMaterOrderTemplateById(id));
+ return Result.success(rawMaterialOrderTemplateService.selectRawMaterOrderTemplateById(id));
}
@ApiOperation(value = "鍒犻櫎鍘熸潗鏂欐楠屽崟妯℃澘")
@@ -96,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));
}
@@ -108,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));
}
@@ -144,7 +153,7 @@
@ApiOperation(value = "鑾峰彇閾滀骇涓氶摼妫�娴嬫暟鎹�")
@GetMapping("/getIndustryChain")
public Result<?> getIndustryChain(Integer id) {
- return Result.success("鎴愬姛", rawMaterialOrderService.getIndustryChain(id));
+ return Result.success(rawMaterialOrderService.getIndustryChain(id));
}
/**
@@ -155,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));
}
@@ -192,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));
}
@@ -204,12 +213,13 @@
*/
@ApiOperation(value = "鍘熸潗鏂欎笅鍗曢�氱煡鍏嶆鎴栬�呭娆℃楠�")
@GetMapping("/notificationRawOrder")
- public Result<?> notificationRawOrder(Integer ifsInventoryId){
+ public Result<?> notificationRawOrder(Long ifsInventoryId){
return Result.success(rawMaterialOrderService.notificationRawOrder(ifsInventoryId));
}
@ApiOperation(value = "鍘熸潗鏂欐姤妫�鏌ヨ鍏ㄩ儴")
+ @PreAuthorize("@ss.hasPermi('get:Ifs:ByAll')")
@GetMapping("/getIfsByAll")
public Result getIfsByAll(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){
return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto));
@@ -259,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));
}
@@ -295,6 +305,8 @@
@ApiOperation(value = "鍘熸潗鏂欐楠屾煡璇㈠搴︽楠�")
@GetMapping("/getIfsByQuarter")
+ @PreAuthorize("@ss.hasPermi('business:order')")
+ @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantitySupplierDto.class, paramName = "createUser")
public Result getIfsByQuarter(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){
return Result.success(rawMaterialOrderService.getIfsByQuarter(page, ifsInventoryQuantityDto));
}
@@ -307,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