| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import io.swagger.annotations.Api; |
| | |
| | | }); |
| | | return Result.OK("批量领取成功 " + i.get() + " 条工单!"); |
| | | } |
| | | |
| | | /** |
| | | * 我的待办,审批动作 |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "三保工单-执行操作", notes = "三保工单-执行操作") |
| | | @PutMapping(value = "/approval") |
| | | public Result<?> approval(@RequestBody EamThirdMaintenanceRequest request) { |
| | | if (request == null) { |
| | | return Result.error("审批的对象不能为空!"); |
| | | } |
| | | // 检查请求参数 |
| | | if (StrUtil.isBlank(request.getTaskId()) || StrUtil.isBlank(request.getDataId()) || StrUtil.isBlank(request.getInstanceId())) { |
| | | return Result.error("审批任务错误或不存在!"); |
| | | } |
| | | EamThirdMaintenanceOrder entity = eamThirdMaintenanceOrderService.approval(request); |
| | | if (entity == null) { |
| | | return Result.error("操作失败!"); |
| | | } |
| | | return Result.ok("操作成功!"); |
| | | } |
| | | } |