| | |
| | | /** |
| | | * 编辑 |
| | | * |
| | | * @param eamWeekMaintenanceOrder |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "周保工单-编辑") |
| | | @ApiOperation(value = "周保工单-编辑", notes = "周保工单-编辑") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamWeekMaintenanceOrder eamWeekMaintenanceOrder) { |
| | | eamWeekMaintenanceOrderService.updateById(eamWeekMaintenanceOrder); |
| | | public Result<?> edit(@RequestBody EamWeekMaintenanceRequest request) { |
| | | if (request == null) { |
| | | return Result.error("添加的对象不能为空!"); |
| | | } |
| | | if (CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | return Result.error("保养项不能为空!"); |
| | | } |
| | | boolean b = eamWeekMaintenanceOrderService.editWeekMaintenance(request); |
| | | if (!b) { |
| | | return Result.error("编辑失败!"); |
| | | } |
| | | return Result.OK("编辑成功!"); |
| | | } |
| | | |