From 40d76001fc009ab87c827477e225ef5fa012fdd1 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期三, 22 五月 2024 10:25:29 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java |   98 +++++++++++++++++++++----------------------------
 1 files changed, 42 insertions(+), 56 deletions(-)

diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java b/north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java
index 38b1854..8230737 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java
@@ -2,6 +2,7 @@
 
 
 
+import cn.dev33.satoken.annotation.SaCheckPermission;
 import com.example.erp.common.Constants;
 import com.example.erp.common.Result;
 import com.example.erp.entity.mm.FinishedOperateLog;
@@ -28,6 +29,7 @@
 
     /*鎴愬搧搴撳瓨鏌ヨ*/
     @ApiOperation("鎴愬搧搴撳瓨鏌ヨ鎺ュ彛")
+    @SaCheckPermission("ProductStockList.search")
     @PostMapping("/getSelect/{pageNum}/{pageSize}")
     public Result defaultDateFinishedGoodsInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedGoodsInventory finishedGoodsInventory){
         return Result.seccess(finishedGoodsInventoryService.defaultDateFinishedGoodsInventory(pageNum,pageSize,finishedGoodsInventory));
@@ -35,6 +37,7 @@
 
     /*鏌ヨ鍙叆搴撶殑鎴愬搧鏁版嵁*/
     @ApiOperation("鍙叆搴撶殑鎴愬搧鏌ヨ鎺ュ彛")
+    @SaCheckPermission("CreateProductStock.search")
     @PostMapping("/getSelectWarehousing/{pageNum}/{pageSize}")
     public Result getSelectWarehousing(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FlowCard flowCard){
         return Result.seccess(finishedGoodsInventoryService.getSelectWarehousing(pageNum,pageSize,flowCard));
@@ -42,18 +45,16 @@
 
     /*鎴愬搧鍏ュ簱*/
     @ApiOperation("鎴愬搧鍏ュ簱鎺ュ彛")
+    @SaCheckPermission("CreateProductStock.add")
     @PostMapping("/addSelectWarehousing")
     public Result addSelectWarehousing( @RequestBody Map<String,Object>  object){
-        if(finishedGoodsInventoryService.addSelectWarehousing(object)){
-            return Result.seccess();
-        }else {
-           throw new ServiceException(Constants.Code_500,"鍏ュ簱澶辫触");
+        return Result.seccess(finishedGoodsInventoryService.addSelectWarehousing(object));
 
-        }
     }
 
     /*鏌ヨ鍙彂璐х殑鎴愬搧鏁版嵁*/
     @ApiOperation("鍙彂璐х殑鎴愬搧鏌ヨ鎺ュ彛")
+    @SaCheckPermission("FinishedProductOut.search")
     @PostMapping("/getSelectDeliveryDetail/{pageNum}/{pageSize}")
     public Result getSelectDeliveryDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){
         return Result.seccess(finishedGoodsInventoryService.getSelectDeliveryDetail(pageNum,pageSize,orderDetail));
@@ -61,18 +62,15 @@
 
     /*鎴愬搧鍙戣揣*/
     @ApiOperation("鎴愬搧鍙戣揣鎺ュ彛")
+    @SaCheckPermission("FinishedProductOut.add")
     @PostMapping("/addDeliveryDetail")
     public Result addDeliveryDetail( @RequestBody Map<String,Object>  object){
-        if(finishedGoodsInventoryService.addDeliveryDetail(object)){
-            return Result.seccess();
-        }else {
-            throw new ServiceException(Constants.Code_500,"鍑哄簱澶辫触");
-
-        }
+        return Result.seccess(finishedGoodsInventoryService.addDeliveryDetail(object));
     }
 
     /* 璋冩嫧鏌ヨ*/
     @ApiOperation("鍙皟鎷ㄦ暟鎹煡璇㈡帴鍙�")
+    @SaCheckPermission("OrderAllocation.search")
     @PostMapping("/getSelectAllocate/{pageNum}/{pageSize}")
     public Result getSelectAllocate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){
         return Result.seccess(finishedGoodsInventoryService.getSelectAllocate(pageNum,pageSize,orderDetail));
@@ -80,20 +78,15 @@
 
     /*璁㈠崟璋冩嫧*/
     @ApiOperation("璁㈠崟璋冩嫧鎺ュ彛")
+    @SaCheckPermission("OrderAllocation.add")
     @PostMapping("/updateFinishedGoodsInventoryAllocate")
     public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object>  object){
-        if(finishedGoodsInventoryService.updateFinishedGoodsInventoryAllocate(object)){
-
-            return Result.seccess();
-
-        }else {
-            throw new ServiceException(Constants.Code_500,"璋冩嫧澶辫触,璇锋鏌ヨ鍗曡緭鍏ユ槸鍚︽纭�");
-
-        }
+        return Result.seccess(finishedGoodsInventoryService.updateFinishedGoodsInventoryAllocate(object));
     }
 
     /*璋冩嫧璁板綍鏌ヨ*/
     @ApiOperation("璋冩嫧璁板綍鏌ヨ鎺ュ彛")
+    @SaCheckPermission("TransferRecord.search")
     @PostMapping("/getSelectAllocateFinishedOperateLog/{pageNum}/{pageSize}/{selectDate}")
     public Result getSelectAllocateFinishedOperateLog(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody FinishedOperateLog finishedOperateLog){
         return Result.seccess(finishedGoodsInventoryService.getSelectAllocateFinishedOperateLog(pageNum,pageSize,selectDate,finishedOperateLog));
@@ -101,20 +94,15 @@
 
     /*璁㈠崟棰嗗嚭*/
     @ApiOperation("璁㈠崟棰嗗嚭鎺ュ彛")
+    @SaCheckPermission("FinishedGoodsIssue.add")
     @PostMapping("/updateFinishedGoodsInventoryTakeOut")
     public Result updateFinishedGoodsInventoryTakeOut( @RequestBody Map<String,Object>  object){
-
-        if(finishedGoodsInventoryService.updateFinishedGoodsInventoryTakeOut(object)){
-            return Result.seccess();
-
-        }else {
-            throw new ServiceException(Constants.Code_500,"棰嗗嚭澶辫触");
-
-        }
+        return Result.seccess(finishedGoodsInventoryService.updateFinishedGoodsInventoryTakeOut(object));
     }
 
     /*棰嗗嚭璁板綍鏌ヨ*/
     @ApiOperation("棰嗗嚭璁板綍鏌ヨ鎺ュ彛")
+    @SaCheckPermission("TakeOutRecord.search")
     @PostMapping("/getSelectOperateRecord/{pageNum}/{pageSize}/{selectDate}")
     public Result getSelectOperateRecord(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody FinishedOperateLog finishedOperateLog){
         return Result.seccess(finishedGoodsInventoryService.getSelectOperateRecord(pageNum,pageSize,selectDate,finishedOperateLog));
@@ -124,56 +112,54 @@
     @ApiOperation("璁㈠崟杩斿伐鏌ヨ鎺ュ彛")
     @PostMapping("/updateFinishedGoodsInventoryRework")
     public Result updateFinishedGoodsInventoryRework( @RequestBody Map<String,Object>  object){
-
-        if(finishedGoodsInventoryService.updateFinishedGoodsInventoryRework(object)){
-            return Result.seccess();
-
-        }else {
-            throw new ServiceException(Constants.Code_500,"杩斿伐澶辫触");
-
-        }
+        return Result.seccess(finishedGoodsInventoryService.updateFinishedGoodsInventoryRework(object));
     }
 
 
 
     /*璁㈠崟瀹℃牳*/
     @ApiOperation("璁㈠崟瀹℃牳鎺ュ彛")
+    @SaCheckPermission("TakeOutRecord.review")
     @PostMapping("/updateFinishedGoodsInventoryToExamine")
     public Result updateFinishedGoodsInventoryToExamine( @RequestBody Map<String,Object>  object){
-
-        if(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"瀹℃牳")){
-            return Result.seccess();
-
-        }else {
-            throw new ServiceException(Constants.Code_500,"棰嗗嚭澶辫触");
-
-        }
+        return Result.seccess(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"瀹℃牳"));
     }
     /*璁㈠崟鍙嶅*/
     @ApiOperation("璁㈠崟鍙嶅鎺ュ彛")
+    @SaCheckPermission("TakeOutRecord.review")
     @PostMapping("/updateFinishedGoodsInventoryCounterExamination")
     public Result updateFinishedGoodsInventoryCounterExamination( @RequestBody Map<String,Object>  object){
-
-        if(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"鍙嶅")){
-            return Result.seccess();
-
-        }else {
-            throw new ServiceException(Constants.Code_500,"棰嗗嚭澶辫触");
-
-        }
+        return Result.seccess(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"鍙嶅"));
     }
 
     /*璁㈠崟浣滃簾*/
     @ApiOperation("璁㈠崟浣滃簾鎺ュ彛")
+    @SaCheckPermission("TakeOutRecord.update")
     @PostMapping("/cancelFinishedGoodsInventoryToExamine")
     public Result cancelFinishedGoodsInventoryToExamine( @RequestBody Map<String,Object>  object){
+        return Result.seccess(finishedGoodsInventoryService.cancelFinishedGoodsInventoryToExamine(object));
+    }
 
-        if(finishedGoodsInventoryService.cancelFinishedGoodsInventoryToExamine(object)){
-            return Result.seccess();
+    /*鍑哄叆搴撹褰曟煡璇�*/
+    @ApiOperation("鍑哄叆搴撹褰曟煡璇㈡帴鍙�")
+    @SaCheckPermission("storageRecord.search")
+    @PostMapping("/getSelectStorageRecord/{pageNum}/{pageSize}/{selectDate}/{type}")
+    public Result getSelectStorageRecord(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate,@PathVariable String type, @RequestBody FinishedOperateLog finishedOperateLog){
+        return Result.seccess(finishedGoodsInventoryService.getSelectStorageRecord(pageNum,pageSize,selectDate,type,finishedOperateLog));
+    }
 
-        }else {
-            throw new ServiceException(Constants.Code_500,"棰嗗嚭澶辫触");
+    /*鍑哄叆搴撹繑鍥�*/
+    @ApiOperation("鍑哄叆搴撹繑鍥炴帴鍙�")
+    @SaCheckPermission("storageRecord.update")
+    @PostMapping("/cancelFini shedGoodsInventoryStorage")
+    public Result cancelFinishedGoodsInventoryStorage( @RequestBody Map<String,Object>  object){
+        return Result.seccess(finishedGoodsInventoryService.cancelFinishedGoodsInventoryStorage(object));
+    }
 
-        }
+    @ApiOperation("鎴愬搧搴撳瓨璁板綍鏌ヨ鎺ュ彛")
+    @SaCheckPermission("WarehouseReport.search")
+    @PostMapping("/getSelectFinishedOperateLogReport/{pageNum}/{pageSize}/{selectDate}")
+    public Result getSelectFinishedOperateLogReport(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody FinishedOperateLog finishedOperateLog){
+        return Result.seccess(finishedGoodsInventoryService.getSelectFinishedOperateLogReport(pageNum,pageSize,selectDate,finishedOperateLog));
     }
 }

--
Gitblit v1.8.0