From 7c4fb2ba6509a609855a6572125a680ceb27b339 Mon Sep 17 00:00:00 2001 From: chenlu <1320612696@qq.com> Date: 星期四, 18 七月 2024 16:47:55 +0800 Subject: [PATCH] 报工返工补片添加日志 --- north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java | 26 +++++++++++--------------- 1 files changed, 11 insertions(+), 15 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 c12c0a3..e4ac1e7 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,9 +22,11 @@ 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("鎶ュ伐鏂板鏌ヨ") @@ -82,15 +86,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)); } @@ -139,9 +140,4 @@ return Result.seccess(reportingWorkService.getPatchConditionSv(reportingWorkId)); } - @ApiOperation("鎶ュ伐鏂板鏃ュ織") - @PostMapping ("/saveReportingWorkLog") - public Result saveReportingWorkLog(@RequestBody Map<String,Object> reportingWork) { - return Result.seccess(reportingWorkService.SaveReportingWorkSv(reportingWork)); - } } -- Gitblit v1.8.0