From ca014b7e7ed13cf155c8a62296ea1a9fb64942da Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 17 六月 2024 09:17:42 +0800
Subject: [PATCH] 自定义标签打印功能部分代码
---
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java | 69 +++++++++++++++++++++++++---------
1 files changed, 50 insertions(+), 19 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java
index 15aee42..66a89fa 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java
@@ -1,10 +1,13 @@
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.entity.pp.ProductionScheduling;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.pp.ProductionSchedulingService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -12,51 +15,52 @@
import java.util.Map;
@RestController
+@Api(value="鎺掍骇controller",tags={"鎺掍骇鐩稿叧鎿嶄綔鎺ュ彛"})
@RequestMapping("/productionScheduling")
public class ProductionSchedulingController {
@Autowired
ProductionSchedulingService productionSchedulingService;
//鏌ヨ绗竴娆℃帓鐗堟暟鎹�
- @PostMapping ("/selectLastScheduling/{selectTime1}/{selectTime2}")
+ @ApiOperation("鍔犺浇鏃舵煡璇㈡帓鐗堟暟鎹帴鍙�")
+ @SaCheckPermission("ProductionScheduling.search")
+ @PostMapping ("/selectLastScheduling/{selectTime1}/{selectTime2}/{processes}/{orderId}")
public Result selectLastScheduling(
@PathVariable String selectTime1,
@PathVariable String selectTime2,
+ @PathVariable String processes,
+ @PathVariable String orderId,
@RequestBody ProductionScheduling productionScheduling){
- return Result.seccess(productionSchedulingService.selectLastScheduling(selectTime1,selectTime2,productionScheduling));
+ return Result.seccess(productionSchedulingService.selectLastScheduling(selectTime1,selectTime2,processes,orderId,productionScheduling));
}
//鐐瑰嚮鏌ヨ鎺掔増鏁版嵁
- @PostMapping ("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}")
- public Result SelectScheduling(
+ @ApiOperation("鐐瑰嚮鏌ヨ鎺掔増鏁版嵁鎺ュ彛")
+ @SaCheckPermission("ProductionScheduling.search")
+ @PostMapping ("/selectScheduling/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}/{orderIds}/{processes}/{state}")
+ public Result selectScheduling(
+ @PathVariable Integer pageNum,
+ @PathVariable Integer pageSize,
@PathVariable String selectTime1,
@PathVariable String selectTime2,
- @PathVariable String orderId,
+ @PathVariable String orderIds,
@PathVariable String processes,
@PathVariable Integer state,
@RequestBody ProductionScheduling productionScheduling){
- return Result.seccess(productionSchedulingService.SelectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling));
+
+ return Result.seccess(productionSchedulingService.selectSchedulingSv(pageNum, pageSize,selectTime1,selectTime2,orderIds,processes,state,productionScheduling));
}
- //鐐瑰嚮鏌ヨ鎺掔増鏁版嵁
- @PostMapping ("/selectSchedulingNot/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}")
- public Result SelectSchedulingNot(
- @PathVariable String selectTime1,
- @PathVariable String selectTime2,
- @PathVariable String orderId,
- @PathVariable String processes,
- @PathVariable Integer state,
- @RequestBody ProductionScheduling productionScheduling){
- return Result.seccess(productionSchedulingService.SelectSchedulingNotSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling));
- }
//娣诲姞鎺掍骇鏁版嵁
+ @ApiOperation("娣诲姞鎺掍骇鏁版嵁鎺ュ彛")
+ @SaCheckPermission("ProductionScheduling.add")
@PostMapping("/addScheduling")
- public Result AddScheduling( @RequestBody Map<String,Object> object){
+ public Result addScheduling( @RequestBody Map<String,Object> object){
- if(productionSchedulingService.AddSchedulingSv(object)){
+ if(productionSchedulingService.addSchedulingSv(object)){
return Result.seccess();
}else {
throw new ServiceException(Constants.Code_500,"淇濆瓨澶辫触");
@@ -64,4 +68,31 @@
}
}
+ //鍒犻櫎鎺掍骇鏁版嵁
+ @ApiOperation("鍒犻櫎鎺掍骇鏁版嵁鎺ュ彛")
+ @SaCheckPermission("ProductionScheduling.delete")
+ @PostMapping("/deleteScheduling")
+ public Result deleteScheduling( @RequestBody Map<String,Object> object) throws Exception{
+
+ if(productionSchedulingService.deleteSchedulingSv(object)){
+ return Result.seccess();
+ }else {
+ throw new ServiceException(Constants.Code_500,"鍒犻櫎澶辫触");
+
+ }
+ }
+
+ @ApiOperation("鎺掔増瀹℃牳鎺ュ彛")
+ @SaCheckPermission("ProductionScheduling.review")
+ @PostMapping("/examineScheduling")
+ public Result examineScheduling( @RequestBody Map<String,Object> object){
+
+ if(productionSchedulingService.examineSchedulingSv(object)){
+ return Result.seccess();
+ }else {
+ throw new ServiceException(Constants.Code_500,"瀹℃牳澶辫触");
+
+ }
+ }
+
}
--
Gitblit v1.8.0