|
@@ -52,7 +52,7 @@ public class CheckJobController {
|
|
|
*/
|
|
|
@SysLog("新增点检任务")
|
|
|
@PostMapping
|
|
|
- @PreAuthorize("@pms.hasPermission('check-spot-jobs-add') or @pms.hasPermission('check-polling-jobs-add')")
|
|
|
+ @PreAuthorize("@pms.hasPermission('check-polling-jobs-add')")
|
|
|
public R save(@Validated({AddGroup.class}) @RequestBody CheckJobDTO checkJobDTO) {
|
|
|
return new R<>(checkJobService.saveModelByDTO(checkJobDTO));
|
|
|
}
|
|
@@ -79,7 +79,7 @@ public class CheckJobController {
|
|
|
*/
|
|
|
@SysLog("删除点检任务")
|
|
|
@DeleteMapping("/{id}")
|
|
|
- @PreAuthorize("@pms.hasPermission('check-spot-jobs-del') or @pms.hasPermission('check-polling-jobs-del')")
|
|
|
+ @PreAuthorize("@pms.hasPermission('check-polling-jobs-del')")
|
|
|
public R removeById(@PathVariable String id){
|
|
|
checkJobService.deleteByPrimaryKey(id);
|
|
|
return new R<>();
|
|
@@ -93,7 +93,7 @@ public class CheckJobController {
|
|
|
*/
|
|
|
@SysLog("批量删除点检任务")
|
|
|
@DeleteMapping("")
|
|
|
- @PreAuthorize("@pms.hasPermission('check-spot-jobs-del') or @pms.hasPermission('check-polling-jobs-del')")
|
|
|
+ @PreAuthorize("@pms.hasPermission('check-polling-jobs-del')")
|
|
|
public R removeIds(@RequestBody List<String> ids){
|
|
|
checkJobService.batchDelete(ids);
|
|
|
return new R<>();
|
|
@@ -153,7 +153,7 @@ public class CheckJobController {
|
|
|
*/
|
|
|
@GetMapping("/export")
|
|
|
@SysLog("任务导出")
|
|
|
- @PreAuthorize("@pms.hasPermission('check-spot-jobs-export') or @pms.hasPermission('check-polling-jobs-export')")
|
|
|
+ @PreAuthorize("@pms.hasPermission('check-polling-jobs-export')")
|
|
|
public void export(HttpServletResponse response, CheckJobDTO checkJobDTO) {
|
|
|
List<CheckJobVO> list = checkJobService.getVOListByDTO(checkJobDTO);
|
|
|
ExcelUtil.exportResponseDict(response, ExportCheckJobVO.class, BeanConverterUtil.copyListProperties(list, ExportCheckJobVO.class), "保养任务");
|
|
@@ -196,7 +196,7 @@ public class CheckJobController {
|
|
|
*/
|
|
|
@SysLog("批量接收保养任务")
|
|
|
@PutMapping("/batch/execute")
|
|
|
- //@PreAuthorize("@pms.hasPermission('sb-infos-edit')")
|
|
|
+ @PreAuthorize("@pms.hasPermission('check-polling-jobs-edit')")
|
|
|
public R batchExecute(@Validated({UpdateGroup.class}) @RequestBody List<String> ids) {
|
|
|
checkJobService.executeJobBatch(ids);
|
|
|
return new R<>("已接收");
|
|
@@ -210,7 +210,7 @@ public class CheckJobController {
|
|
|
*/
|
|
|
@SysLog("批量完成保养任务")
|
|
|
@PutMapping("/batch/finish")
|
|
|
- //@PreAuthorize("@pms.hasPermission('sb-infos-edit')")
|
|
|
+ @PreAuthorize("@pms.hasPermission('check-polling-jobs-edit')")
|
|
|
public R batchFinish(@Validated({UpdateGroup.class}) @RequestBody List<String> ids) {
|
|
|
checkJobService.finishJobBatch(ids);
|
|
|
return new R<>("已完成");
|