From 07d08f8dc420ba47f66587fdc5038a59fc340c96 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 29 八月 2024 10:33:59 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java |   50 +++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 37 insertions(+), 13 deletions(-)

diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
index 17c0a89..7b03381 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
@@ -5,8 +5,10 @@
 import com.example.erp.common.Result;
 import com.example.erp.entity.pp.FlowCard;
 import com.example.erp.entity.pp.ReportingWork;
+import com.example.erp.entity.userInfo.Log;
 import com.example.erp.exception.ServiceException;
 import com.example.erp.service.pp.ReportingWorkService;
+import com.example.erp.service.userInfo.LogService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -20,18 +22,22 @@
 public class ReportingWorkController {
     final
     ReportingWorkService reportingWorkService;
+    LogService logService;
 
-    public ReportingWorkController(ReportingWorkService reportingWorkService) {
+    public ReportingWorkController(ReportingWorkService reportingWorkService,LogService logService) {
         this.reportingWorkService = reportingWorkService;
+        this.logService =  logService;
     }
 
     @ApiOperation("鎶ュ伐鏂板鏌ヨ")
-    @PostMapping  ("/addSelectLastWork/{processIdStr}/{technologyStr}/{process}")
+    @SaCheckPermission("AddReportingWork.search")
+    @PostMapping  ("/addSelectLastWork/{processIdStr}/{technologyStr}/{process}/{reportType}")
     public Result AddSelectLastWork(
             @PathVariable String processIdStr,
             @PathVariable String technologyStr,
-            @PathVariable String process)  {
-        return  Result.seccess(reportingWorkService.AddSelectLastWorkSv(processIdStr,technologyStr,process));
+            @PathVariable String process,
+            @PathVariable String reportType)  {
+        return  Result.seccess(reportingWorkService.AddSelectLastWorkSv(processIdStr,technologyStr,process,reportType));
     }
     @ApiOperation("鏌ヨ宸ュ簭")
     @PostMapping  ("/selectProcess")
@@ -81,15 +87,12 @@
 
     @ApiOperation("鍒犻櫎鎶ュ伐鎺ュ彛")
     @SaCheckPermission("SelectReportingWorks.delete")
-    @PostMapping("/deleteWork/{reportingWorkId}/{processId}/{thisProcess}")
-    public Result deleteWork(@PathVariable String reportingWorkId,@PathVariable String processId,@PathVariable String thisProcess){
-//        if(reportingWorkService.deleteWorkSv(reportingWorkId,processId,thisProcess)){
-//            return Result.seccess();
-//        }else {
-//            throw new ServiceException(Constants.Code_500,"鍒犻櫎澶辫触,璇锋鏌ユ槸鍚︾鍚堝垹闄ゆ潯浠�");
-//
-//        }
-        return Result.seccess(reportingWorkService.deleteWorkSv(reportingWorkId,processId,thisProcess));
+    @PostMapping("/deleteWork/{reportingWorkId}/{processId}/{thisProcess}/{userId}/{userName}")
+    public Result deleteWork(@PathVariable String reportingWorkId,@PathVariable String processId,
+                             @PathVariable String thisProcess,@PathVariable String userId
+    ,@PathVariable String userName){
+
+        return Result.seccess(reportingWorkService.deleteWorkSv(reportingWorkId,processId,thisProcess,userId,userName));
 
     }
 
@@ -130,4 +133,25 @@
         return Result.seccess(reportingWorkService.detailsQualitySv(reportingWorkId,processId,thisProcess,reportingWork));
 
     }
+
+    @ApiOperation("琛ョ墖鐘舵�佹煡璇�")
+    @PostMapping  ("/getPatchCondition/{reportingWorkId}")
+    public Result getPatchCondition(
+            @PathVariable String reportingWorkId)  {
+        return  Result.seccess(reportingWorkService.getPatchConditionSv(reportingWorkId));
+    }
+
+    @ApiOperation("mes鎶ュ伐鎺ュ彛")
+    @PostMapping  ("/mesReportingWork")
+    public Result mesReportingWork(@RequestBody Map<String,Object> reportingWork){
+        Boolean aBoolean = reportingWorkService.mesReportingWorkSv(reportingWork);
+        if(aBoolean){
+            return Result.seccess(reportingWorkService.mesReportingWorkSv(reportingWork));
+        }else{
+            throw new ServiceException(Constants.Code_600, "涓婂伐搴忓凡瀹屽伐鏁伴噺灏忎簬鏈伐搴忔姤宸ユ暟閲忥紝璇锋鏌�");
+        }
+
+
+    }
+
 }

--
Gitblit v1.8.0