瀏覽代碼

修改考评部门配置问题,增加流程事件

hlf 1 年之前
父節點
當前提交
61d04c3cb6

+ 24 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/component/NextApproverImpl.java

@@ -0,0 +1,24 @@
+package com.ims.eval.component;
+
+import com.ims.eval.entity.DeptAssessmentDeclaration;
+import com.ims.eval.service.IDeptAssessmentDeclarationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author hlf
+ * @date 2023/8/9 9:28
+ * 文件说明:流程脚本事件
+ */
+@Component
+public class NextApproverImpl {
+
+	@Autowired
+	private IDeptAssessmentDeclarationService deptAssessmentDeclarationService;
+
+	public boolean submitTask1(String id) {
+		DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
+		boolean flag = deptAssessmentDeclaration.getDeclarationLevel().equals(deptAssessmentDeclaration.getRatingGrade());
+		return flag;
+	}
+}

+ 11 - 5
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DepartmentAllocationController.java

@@ -9,10 +9,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ims.common.utils.StringUtils;
 import com.ims.eval.config.CustomException;
 import com.ims.eval.entity.EvaluationDept;
-import com.ims.eval.entity.dto.request.PostDTO;
-import com.ims.eval.entity.dto.request.PostUserDTO;
+import com.ims.eval.entity.dto.request.UserDTO;
 import com.ims.eval.entity.dto.result.R;
 import com.ims.eval.service.IEvaluationDeptService;
+import com.ims.eval.service.IUserService;
 import com.ims.eval.service.custom.PostService;
 import com.ims.eval.service.custom.PostUserService;
 import lombok.extern.slf4j.Slf4j;
@@ -20,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
@@ -48,6 +47,9 @@ public class DepartmentAllocationController {
 	@Autowired
 	private HttpServletRequest request;
 
+	@Autowired
+	private IUserService userService;
+
 	/**
 	 * 考评部门配置列表信息(分页)
 	 *
@@ -126,7 +128,7 @@ public class DepartmentAllocationController {
 	 */
 	@GetMapping(value = "/getDepartmentLeader/{id}")
 	public R getDepartmentLeader(@PathVariable String id) {
-		List<PostUserDTO> list = new ArrayList<>();
+		/*List<PostUserDTO> list = new ArrayList<>();
 		Object postList = postService.getPostList(1, 500, id, request);
 		if (null != postList) {
 			JSONObject postJsonArr = (JSONObject) postList;
@@ -145,7 +147,11 @@ public class DepartmentAllocationController {
 					}
 				}
 			}
-		}
+		}*/
+		JSONObject jsonArr = userService.pageList(1, 1000, id, "", "", "", "", "", request);
+		JSONObject jsonArr1 = (JSONObject) jsonArr.get("data");
+		JSONArray array = JSONUtil.parseArray(jsonArr1.get("records"));
+		List<UserDTO> list = JSONUtil.toList(array, UserDTO.class);
 		return R.ok().data(list);
 	}
 

+ 4 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/request/PostUserDTO.java

@@ -10,12 +10,16 @@ import lombok.Data;
 @Data
 public class PostUserDTO {
 
+	//主键
 	private String id;
 
+	//人员编号
 	private String no;
 
+	//人员名称
 	private String userName;
 
+	//人员岗位
 	private String posName;
 
 }