| | |
| | | } |
| | | |
| | | /** |
| | | * 升版 |
| | | * |
| | | * @param standardRequest |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "保养标准-升版") |
| | | @ApiOperation(value = "保养标准-升版", notes = "保养标准-升版") |
| | | @RequestMapping(value = "/upgrade", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public Result<?> upgrade(@RequestBody EamMaintenanceStandardRequest standardRequest) { |
| | | if (standardRequest == null) { |
| | | return Result.error("添加的对象不能为空!"); |
| | | } |
| | | if (CollectionUtil.isEmpty(standardRequest.getTableDetailList())) { |
| | | return Result.error("保养项不能为空!"); |
| | | } |
| | | String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.MAINTENANCE_STANDARD_CODE_RULE); |
| | | standardRequest.setStandardCode(codeSeq); |
| | | boolean b = eamMaintenanceStandardService.upgradeMaintenanceStandard(standardRequest); |
| | | if (!b) { |
| | | return Result.error("升版失败!"); |
| | | } |
| | | return Result.OK("升版成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除 |
| | | * |
| | | * @param id |