|
|
|
|
@ -3,6 +3,7 @@ |
|
|
|
|
*/ |
|
|
|
|
package org.springblade.desk.quality.controller; |
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
|
|
@ -33,6 +34,7 @@ import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* [分派控制调整] 控制器 |
|
|
|
|
@ -102,7 +104,7 @@ public class PlanAssignSteerModifyController extends BladeController { |
|
|
|
|
/** |
|
|
|
|
* [分派控制调整] 逻辑删除 |
|
|
|
|
*/ |
|
|
|
|
@PostMapping("/remove") |
|
|
|
|
@GetMapping("/remove") |
|
|
|
|
@ApiOperationSupport(order = 61) |
|
|
|
|
@ApiLog("分派控制调整删除") |
|
|
|
|
@Operation(summary = "逻辑删除", description = "传入ids") |
|
|
|
|
@ -144,10 +146,23 @@ public class PlanAssignSteerModifyController extends BladeController { |
|
|
|
|
@ApiOperationSupport(order = 91) |
|
|
|
|
@ApiLog("审批") |
|
|
|
|
@Operation(summary = "审批", description = "传入id, result, remark") |
|
|
|
|
public R audit( |
|
|
|
|
@Parameter(description = "主键ID", required = true) @RequestParam Long id, |
|
|
|
|
@Parameter(description = "审批结果: 1-通过, 2-驳回", required = true) @RequestParam Integer result, |
|
|
|
|
@Parameter(description = "审批意见") @RequestParam(required = false) String remark) { |
|
|
|
|
public R audit(@RequestBody PlanAssignSteerModifyVO vo) { |
|
|
|
|
|
|
|
|
|
Long id = vo.getId(); |
|
|
|
|
if (Objects.isNull(id)) { |
|
|
|
|
return R.fail("请选择要审批的记录"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Integer result = vo.getResult(); |
|
|
|
|
if (Objects.isNull(result) || result < 1 || result > 2) { |
|
|
|
|
return R.fail("审批结果: 1-通过, 2-驳回"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String remark = vo.getRemark(); |
|
|
|
|
if (2 == result && StrUtil.isEmpty(remark)) { |
|
|
|
|
return R.fail("请填写审批意见"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return service.audit(id, result, remark); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|