|
|
|
@ -190,7 +190,7 @@ public class InspectionTasksController extends DafController { |
|
|
|
|
@ApiOperationSupport(order = 8) |
|
|
|
|
@ApiOperation(value = "更新", notes = "传入ids") |
|
|
|
|
public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
|
return this.approve("1",ids); |
|
|
|
|
return this.approve("1",ids, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -199,19 +199,20 @@ public class InspectionTasksController extends DafController { |
|
|
|
|
@PostMapping("/stop") |
|
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
|
@ApiOperation(value = "更新", notes = "传入ids") |
|
|
|
|
public R reject(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
|
return this.approve("2",ids); |
|
|
|
|
public R stop(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @RequestParam String reason) { |
|
|
|
|
return this.approve("2",ids, reason); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 启动OR停止 巡检任务 |
|
|
|
|
*/ |
|
|
|
|
public R approve(String status, String ids) { |
|
|
|
|
public R approve(String status, String ids, String reason) { |
|
|
|
|
List<InspectionTasks> list = new ArrayList<>(); |
|
|
|
|
for (String id : ids.split(",")) { |
|
|
|
|
InspectionTasks inspectionTasks = new InspectionTasks(); |
|
|
|
|
inspectionTasks.setId(Long.parseLong(id)); |
|
|
|
|
inspectionTasks.setTaskStatus(Long.parseLong(status)); |
|
|
|
|
inspectionTasks.setCancelReason(reason); |
|
|
|
|
list.add(inspectionTasks); |
|
|
|
|
} |
|
|
|
|
return R.status(inspectionTasksService.updateBatchById(list)); |
|
|
|
|