| | |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.modules.eam.constant.BusinessCodeConst; |
| | | import org.jeecg.modules.eam.constant.OrderCreationMethodEnum; |
| | | import org.jeecg.modules.eam.constant.WeekMaintenanceStatusEnum; |
| | | import org.jeecg.modules.eam.entity.EamWeekMaintenanceOrder; |
| | | import org.jeecg.modules.eam.request.EamWeekMaintenanceQuery; |
| | |
| | | } |
| | | String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.WEEK_MAINTENANCE_CODE_RULE); |
| | | request.setOrderNum(codeSeq); |
| | | request.setCreationMethod(OrderCreationMethodEnum.MANUAL.name()); |
| | | boolean b = eamWeekMaintenanceOrderService.addWeekMaintenance(request); |
| | | if (!b) { |
| | | return Result.error("添加失败!"); |
| | |
| | | if (StrUtil.isBlank(request.getTaskId()) || StrUtil.isBlank(request.getDataId()) || StrUtil.isBlank(request.getInstanceId())) { |
| | | return Result.error("审批任务错误或不存在!"); |
| | | } |
| | | boolean b = eamWeekMaintenanceOrderService.approval(request); |
| | | if(!b) { |
| | | EamWeekMaintenanceOrder b = eamWeekMaintenanceOrderService.approval(request); |
| | | if(b == null) { |
| | | return Result.error("操作失败!"); |
| | | } |
| | | return Result.ok("操作成功!"); |