| | |
| | | } |
| | | |
| | | /** |
| | | * 查询三保工单基本信息 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "查询三保工单基本信息", notes = "查询三保工单基本信息") |
| | | @GetMapping(value = "/selectVoById") |
| | | public Result<?> selectVoById(@RequestParam(name = "id") String id) { |
| | | return eamThirdMaintenanceOrderService.selectVoById(id); |
| | | } |
| | | |
| | | /** |
| | | * 添加 |
| | | * |
| | | * @param request |
| | |
| | | @ApiOperation(value = "设备三级保养-添加", notes = "设备三级保养-添加") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamThirdMaintenanceRequest request) { |
| | | if (request == null) { |
| | | return Result.error("添加的对象不能为空!"); |
| | | } |
| | | if (CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | return Result.error("保养项不能为空!"); |
| | | } |
| | | String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.THIRD_MAINTENANCE_CODE_RULE); |
| | | request.setOrderNum(codeSeq); |
| | | request.setCreationMethod(OrderCreationMethodEnum.MANUAL.name()); |
| | | boolean b = eamThirdMaintenanceOrderService.addMaintenance(request); |
| | | if (!b) { |
| | | return Result.error("添加失败!"); |
| | | } |
| | | return Result.OK("添加成功!"); |
| | | return eamThirdMaintenanceOrderService.addMaintenance(request); |
| | | } |
| | | |
| | | /** |