|
|
@ -180,7 +180,7 @@ public class InspectionRouteController extends DafController { |
|
|
|
@ApiOperationSupport(order = 8) |
|
|
|
@ApiOperationSupport(order = 8) |
|
|
|
@ApiOperation(value = "生效", notes = "传入ids") |
|
|
|
@ApiOperation(value = "生效", notes = "传入ids") |
|
|
|
public R takeEffect(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
public R takeEffect(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
return this.updateInspectionRoute(1,ids); |
|
|
|
return this.updateInspectionRoute(1, "", ids); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -189,18 +189,19 @@ public class InspectionRouteController extends DafController { |
|
|
|
@PostMapping("/lapse") |
|
|
|
@PostMapping("/lapse") |
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
@ApiOperation(value = "失效", notes = "传入ids") |
|
|
|
@ApiOperation(value = "失效", notes = "传入ids") |
|
|
|
public R lapse(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
public R lapse(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @ApiParam(value = "取消原因", required = true) @RequestParam String reason) { |
|
|
|
return this.updateInspectionRoute(0,ids); |
|
|
|
return this.updateInspectionRoute(0, reason, ids); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 生效OR失效 |
|
|
|
* 生效OR失效 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public R updateInspectionRoute(Integer status, String ids) { |
|
|
|
public R updateInspectionRoute(Integer status, String reason, String ids) { |
|
|
|
List<InspectionRoute> list = new ArrayList<>(); |
|
|
|
List<InspectionRoute> list = new ArrayList<>(); |
|
|
|
for (String id : ids.split(",")) { |
|
|
|
for (String id : ids.split(",")) { |
|
|
|
InspectionRoute inspectionRoute = new InspectionRoute(); |
|
|
|
InspectionRoute inspectionRoute = new InspectionRoute(); |
|
|
|
inspectionRoute.setId(Long.parseLong(id)); |
|
|
|
inspectionRoute.setId(Long.parseLong(id)); |
|
|
|
|
|
|
|
inspectionRoute.setCancelReason(reason); |
|
|
|
inspectionRoute.setIstatus(status); |
|
|
|
inspectionRoute.setIstatus(status); |
|
|
|
list.add(inspectionRoute); |
|
|
|
list.add(inspectionRoute); |
|
|
|
} |
|
|
|
} |
|
|
|