浏览代码

修改单位考评修订问题

hlf 1 年之前
父节点
当前提交
657c054cad

+ 23 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluationRevisionController.java

@@ -165,4 +165,27 @@ public class EvaluationRevisionController {
 		return R.ok().data(list);
 	}
 
+	/**
+	 * 修改状态
+	 *
+	 * @param id    主键
+	 * @param stage 状态
+	 * @return 结果
+	 */
+	@PostMapping(value = "/targetStart")
+	public R targetStart(@RequestParam(value = "id") String id,
+						 @RequestParam(value = "stage") String stage) {
+		try {
+			EvaluationRevision evaluationRevision = evaluationRevisionService.getById(id);
+			evaluationRevision.setStage(stage);
+			boolean b = evaluationRevisionService.updateById(evaluationRevision);
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error("失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
+		}
+	}
 }