|
|
@ -163,4 +163,37 @@ public class CountJobMainController { |
|
|
|
return resultList; |
|
|
|
} |
|
|
|
|
|
|
|
@Operation(summary = "承接任务") |
|
|
|
@PreAuthorize("@ss.hasPermission('wms:count-job-main:accept')") |
|
|
|
@PutMapping(value = "/accept") |
|
|
|
public CommonResult<Boolean> acceptCountJobMain(@RequestParam("id") Long id) { |
|
|
|
int result = countJobMainService.acceptCountJobMain(id); |
|
|
|
return success(result > 0); |
|
|
|
} |
|
|
|
|
|
|
|
@Operation(summary = "放弃任务") |
|
|
|
@PreAuthorize("@ss.hasPermission('wms:count-job-main:abandon')") |
|
|
|
@PutMapping(value = "/abandon") |
|
|
|
public CommonResult<Boolean> abandonInspectJobMain(@RequestParam("id") Long id) { |
|
|
|
int result = countJobMainService.abandonCountJobMain(id); |
|
|
|
return success(result > 0); |
|
|
|
} |
|
|
|
|
|
|
|
@PutMapping(value = "/close") |
|
|
|
@Operation(summary = "关闭任务") |
|
|
|
@PreAuthorize("@ss.hasPermission('wms:count-job-main:close')") |
|
|
|
public CommonResult<Boolean> closeInspectJobMain(@RequestParam("id") Long id) { |
|
|
|
int result = countJobMainService.closeCountJobMain(id); |
|
|
|
return success(result > 0); |
|
|
|
} |
|
|
|
|
|
|
|
@PutMapping("/execute") |
|
|
|
@Operation(summary = "执行任务") |
|
|
|
@Parameter(name = "id", description = "编号", required = true) |
|
|
|
@PreAuthorize("@ss.hasPermission('wms:count-job-main:execute')") |
|
|
|
public CommonResult<String> executeInspectJobMain(@Valid @RequestBody CountJobMainUpdateReqVO updateReqVO) { |
|
|
|
String number = countJobMainService.executeCountJobMain(updateReqVO); |
|
|
|
return success(number); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|