From 8c29a327707574f1e04cd25218e05ba9b4c8e4a8 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期四, 26 九月 2024 09:59:20 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java | 65 ++++++++++++++++++++++++--------
1 files changed, 48 insertions(+), 17 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java
index 5ec9220..3886408 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java
@@ -1,20 +1,27 @@
package com.example.erp.controller.pp;
+import cn.dev33.satoken.annotation.SaCheckPermission;
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
+import com.example.erp.dto.pp.PatchLogAddDTO;
+import com.example.erp.dto.pp.PatchLogDTO;
+import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.pp.PatchLog;
import com.example.erp.entity.pp.Rework;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.pp.ReplenishService;
import com.example.erp.service.pp.ReworkService;
+import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
+import java.sql.Date;
import java.util.List;
import java.util.Map;
@RestController
+@Api(value="琛ョ墖controller",tags={"琛ョ墖鎿嶄綔鎺ュ彛"})
@RequestMapping("/Replenish")
public class ReplenishController {
@@ -25,41 +32,65 @@
/*鍙戣揣璁㈠崟鏌ヨ*/
@ApiOperation("琛ョ墖鏂板鏌ヨ鎺ュ彛")
+ @SaCheckPermission("AddReplenish.search")
@PostMapping("/getSelectReplenish/{pageNum}/{pageSize}")
- public Result getSelectReplenish(@PathVariable Integer pageNum, @PathVariable Integer pageSize){
- return Result.seccess(replenishService.getSelectReplenish(pageNum,pageSize));
+ public Result getSelectReplenish(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@RequestBody PatchLogAddDTO patchLogAddDTO){
+ return Result.seccess(replenishService.getSelectReplenish(pageNum,pageSize,patchLogAddDTO));
}
@ApiOperation("琛ョ墖鏌ヨ鎺ュ彛")
+ @SaCheckPermission("SelectReplenish.search")
@PostMapping("/SelectReplenish/{pageNum}/{pageSize}/{selectDate}")
- public Result SelectReplenish(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate,@RequestBody PatchLog patchLog){
- return Result.seccess(replenishService.SelectReplenish(pageNum,pageSize,selectDate,patchLog));
+ public Result SelectReplenish(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate,@RequestBody PatchLogDTO patchLogDTO){
+ return Result.seccess(replenishService.SelectReplenish(pageNum,pageSize,selectDate,patchLogDTO));
}
@ApiOperation("琛ョ墖鏂板鎺ュ彛")
+ @SaCheckPermission("AddReplenish.add")
@PostMapping("/saveReplenish")
public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object> object){
- if(replenishService.saveReplenish(object)){
-
- return Result.seccess();
-
- }else {
- throw new ServiceException(Constants.Code_500,"杩斿伐澶辫触");
-
- }
+ return Result.seccess(replenishService.saveReplenish(object));
}
@ApiOperation("琛ョ墖瀹℃牳鎺ュ彛")
+ @SaCheckPermission("SelectReplenish.review")
@PostMapping("/updateReplenish")
public Result updateReplenish( @RequestBody Map<String,Object> object){
- if(replenishService.updateReplenish(object)){
+ return Result.seccess(replenishService.updateReplenish(object));
+ }
- return Result.seccess();
+ @ApiOperation("琛ョ墖娴佺▼鍗℃槑缁嗘煡璇㈡帴鍙�")
+ @SaCheckPermission("PrintFlowCard.search")
+ @PostMapping("/selectPrint/{selectTime1}/{selectTime2}")
+ public Result selectPrint(
+ @PathVariable Date selectTime1,
+ @PathVariable Date selectTime2,
+ @RequestBody FlowCard flowCard) {
+ return Result.seccess(replenishService.selectPrintSv(selectTime1,selectTime2, flowCard));
- }else {
- throw new ServiceException(Constants.Code_500,"瀹℃牳澶辫触");
+ }
- }
+ @ApiOperation("琛ョ墖鎵撳嵃鑷畾涔夋爣绛炬暟鎹煡璇㈡帴鍙�")
+ @PostMapping("/getSelectPrintCustomLabel/{type}/{lableType}")
+ public Result getSelectPrintCustomLabel( @PathVariable String type,
+ @PathVariable Integer lableType,
+ @RequestBody Map<String, Object> object) {
+ return Result.seccess(replenishService.getSelectPrintCustomLabelSv(type,lableType,object));
+
+ }
+
+ @ApiOperation("琛ョ墖鍒犻櫎鎺ュ彛")
+ @SaCheckPermission("SelectReplenish.delete")
+ @PostMapping("/deleteReplenish")
+ public Result deleteReplenish( @RequestBody Map<String,Object> object){
+ return Result.seccess(replenishService.deleteReplenishSv(object));
+ }
+
+ @ApiOperation("琛ョ墖鍙嶅鎺ュ彛")
+ @SaCheckPermission("SelectReplenish.countertrial")
+ @PostMapping("/updateCancelReview")
+ public Result updateCancelReview( @RequestBody Map<String,Object> object){
+ return Result.seccess(replenishService.updateCancelReviewSv(object));
}
}
--
Gitblit v1.8.0