chenlu
2024-05-21 cd017fae7b975035e5712a4568ec4bdda4190b05
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
@@ -1,5 +1,6 @@
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.FlowCard;
@@ -39,12 +40,14 @@
    }
    @ApiOperation("报工新增")
    @SaCheckPermission("AddReportingWork.add")
    @PostMapping  ("/saveReportingWork")
    public Result SaveReportingWork(@RequestBody Map<String,Object> reportingWork)  {
        return  Result.seccess(reportingWorkService.SaveReportingWorkSv(reportingWork));
    }
    @ApiOperation("报工审核")
    @SaCheckPermission("AddReportingWork.review")
    @PostMapping  ("/reviewReportingWork")
    public Result ReviewReportingWork(@RequestBody Map<String,String> reportingWork)  {
        return  Result.seccess(reportingWorkService.ReviewReportingWorkSv(reportingWork));
@@ -56,12 +59,14 @@
        return  Result.seccess(reportingWorkService.selectUpdateReportingWorkSv(reportingWorkId));
    }
    @ApiOperation("报工修改")
    @SaCheckPermission("AddReportingWork.update")
    @PostMapping  ("/updateReportingWork/{reviewState}")
    public Result updateReportingWork(@PathVariable String reviewState,@RequestBody Map<String,Object> reportingWork)  {
        return  Result.seccess(reportingWorkService.updateReportingWork(reportingWork,reviewState));
    }
    @ApiOperation("报工查询接口")
    @SaCheckPermission("SelectReportingWorks.search")
    @PostMapping  ("/selectReportingWork/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}/{orderId}")
    public Result selectReportingWork(
            @PathVariable Integer pageNum,
@@ -75,17 +80,21 @@
    }
    @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,"删除失败,请检查是否符合删除条件");
//        if(reportingWorkService.deleteWorkSv(reportingWorkId,processId,thisProcess)){
//            return Result.seccess();
//        }else {
//            throw new ServiceException(Constants.Code_500,"删除失败,请检查是否符合删除条件");
//
//        }
        return Result.seccess(reportingWorkService.deleteWorkSv(reportingWorkId,processId,thisProcess));
        }
    }
    @ApiOperation("质检审核查询接口")
    @SaCheckPermission("QualityInspectionReview.search")
    @PostMapping  ("/selectQualityTesting/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}/{state}/{processId}")
    public Result selectQualityTesting(
            @PathVariable Integer pageNum,
@@ -100,6 +109,7 @@
    }
    @ApiOperation("质检审核审核")
    @SaCheckPermission("QualityInspectionReview.review")
    @PostMapping  ("/updateQualityStatus/{reportingWorkId}/{username}")
    public Result updateQualityStatus(@PathVariable String reportingWorkId,@PathVariable String username)  {
        if(reportingWorkService.updateQualityStatusSv(reportingWorkId,username)){