|
|
@ -48,14 +48,14 @@ public class InspectionRequestMainController { |
|
|
|
|
|
|
|
@PostMapping("/create") |
|
|
|
@Operation(summary = "创建检验申请") |
|
|
|
@PreAuthorize("@ss.hasPermission('request:inspection-request-main:create')") |
|
|
|
@PreAuthorize("@ss.hasPermission('qms:inspection-request-main:create')") |
|
|
|
public CommonResult<Long> createInspectionRequestMain(@Valid @RequestBody InspectionRequestMainCreateReqVO createReqVO) { |
|
|
|
return success(inspectionRequestMainService.createInspectionRequestMain(createReqVO)); |
|
|
|
} |
|
|
|
|
|
|
|
@PutMapping("/update") |
|
|
|
@Operation(summary = "更新检验申请") |
|
|
|
@PreAuthorize("@ss.hasPermission('request:inspection-request-main:update')") |
|
|
|
@PreAuthorize("@ss.hasPermission('qms:inspection-request-main:update')") |
|
|
|
public CommonResult<Boolean> updateInspectionRequestMain(@Valid @RequestBody InspectionRequestMainUpdateReqVO updateReqVO) { |
|
|
|
int result = inspectionRequestMainService.updateInspectionRequestMain(updateReqVO); |
|
|
|
return success(result > 0); |
|
|
@ -64,7 +64,7 @@ public class InspectionRequestMainController { |
|
|
|
@DeleteMapping("/delete") |
|
|
|
@Operation(summary = "删除检验申请") |
|
|
|
@Parameter(name = "id", description = "编号", required = true) |
|
|
|
@PreAuthorize("@ss.hasPermission('request:inspection-request-main:delete')") |
|
|
|
@PreAuthorize("@ss.hasPermission('qms:inspection-request-main:delete')") |
|
|
|
public CommonResult<Boolean> deleteInspectionRequestMain(@RequestParam("id") Long id) { |
|
|
|
int result = inspectionRequestMainService.deleteInspectionRequestMain(id); |
|
|
|
return success(result > 0); |
|
|
@ -107,7 +107,7 @@ public class InspectionRequestMainController { |
|
|
|
|
|
|
|
@GetMapping("/export-excel") |
|
|
|
@Operation(summary = "导出检验申请 Excel") |
|
|
|
@PreAuthorize("@ss.hasPermission('request:inspection-request-main:export')") |
|
|
|
@PreAuthorize("@ss.hasPermission('qms:inspection-request-main:export')") |
|
|
|
@OperateLog(type = EXPORT) |
|
|
|
public void exportInspectionRequestMainExcel(@Valid InspectionRequestMainExportReqVO exportReqVO, HttpServletResponse response) throws IOException { |
|
|
|
List<InspectionRequestMainDO> list = inspectionRequestMainService.getInspectionRequestMainList(exportReqVO); |
|
|
@ -127,7 +127,7 @@ public class InspectionRequestMainController { |
|
|
|
@PutMapping("/close") |
|
|
|
@Operation(summary = "关闭检验申请主") |
|
|
|
@Parameter(name = "id", description = "编号", required = true) |
|
|
|
@PreAuthorize("@ss.hasPermission('wms:inspection-request-main:close')") |
|
|
|
@PreAuthorize("@ss.hasPermission('qms:inspection-request-main:close')") |
|
|
|
public CommonResult<Boolean> closeInspectionRequestMain(@RequestParam("id") Long id) { |
|
|
|
Integer count = inspectionRequestMainService.closeInspectionRequestMain(id); |
|
|
|
return success(count > 0); |
|
|
@ -136,7 +136,7 @@ public class InspectionRequestMainController { |
|
|
|
@PutMapping("/submit") |
|
|
|
@Operation(summary = "提交检验申请主") |
|
|
|
@Parameter(name = "id", description = "编号", required = true) |
|
|
|
@PreAuthorize("@ss.hasPermission('wms:inspection-request-main:submit')") |
|
|
|
@PreAuthorize("@ss.hasPermission('qms:inspection-request-main:submit')") |
|
|
|
public CommonResult<Boolean> submitInspectionRequestMain(@RequestParam("id") Long id) { |
|
|
|
Integer count = inspectionRequestMainService.submitInspectionRequestMain(id); |
|
|
|
return success(count > 0); |
|
|
@ -145,7 +145,7 @@ public class InspectionRequestMainController { |
|
|
|
@PutMapping("/reAdd") |
|
|
|
@Operation(summary = "重新添加检验申请主") |
|
|
|
@Parameter(name = "id", description = "编号", required = true) |
|
|
|
@PreAuthorize("@ss.hasPermission('wms:inspection-request-main:reAdd')") |
|
|
|
@PreAuthorize("@ss.hasPermission('qms:inspection-request-main:reAdd')") |
|
|
|
public CommonResult<Boolean> openInspectionRequestMain(@RequestParam("id") Long id) { |
|
|
|
Integer count = inspectionRequestMainService.reAddInspectionRequestMain(id); |
|
|
|
return success(count > 0); |
|
|
@ -154,7 +154,7 @@ public class InspectionRequestMainController { |
|
|
|
@PutMapping("/agree") |
|
|
|
@Operation(summary = "审批通过检验申请主") |
|
|
|
@Parameter(name = "id", description = "编号", required = true) |
|
|
|
@PreAuthorize("@ss.hasPermission('wms:inspection-request-main:agree')") |
|
|
|
@PreAuthorize("@ss.hasPermission('qms:inspection-request-main:agree')") |
|
|
|
public CommonResult<Boolean> agreeInspeciontRequestMain(@RequestParam("id") Long id) { |
|
|
|
Integer count = inspectionRequestMainService.agreeInspectionRequestMain(id); |
|
|
|
return success(count > 0); |
|
|
@ -163,7 +163,7 @@ public class InspectionRequestMainController { |
|
|
|
@PutMapping("/handle") |
|
|
|
@Operation(summary = "执行检验申请主") |
|
|
|
@Parameter(name = "id", description = "编号", required = true) |
|
|
|
@PreAuthorize("@ss.hasPermission('wms:inspection-request-main:handle')") |
|
|
|
@PreAuthorize("@ss.hasPermission('qms:inspection-request-main:handle')") |
|
|
|
public CommonResult<Boolean> handleInspectionRequestMain(@RequestParam("id") Long id) { |
|
|
|
Integer count = inspectionRequestMainService.handleInspectionRequestMain(id); |
|
|
|
return success(count > 0); |
|
|
@ -172,7 +172,7 @@ public class InspectionRequestMainController { |
|
|
|
@PutMapping("/refused") |
|
|
|
@Operation(summary = "审批拒绝检验申请主") |
|
|
|
@Parameter(name = "id", description = "编号", required = true) |
|
|
|
@PreAuthorize("@ss.hasPermission('wms:inspection-request-main:abort')") |
|
|
|
@PreAuthorize("@ss.hasPermission('qms:inspection-request-main:abort')") |
|
|
|
public CommonResult<Boolean> refusedInspectionRequestMain(@RequestParam("id") Long id) { |
|
|
|
Integer count = inspectionRequestMainService.refusedInspectionRequestMain(id); |
|
|
|
return success(count > 0); |
|
|
|