|
@@ -13,11 +13,11 @@ import com.ims.eval.entity.DeptAssessmentDeclaration;
|
|
|
import com.ims.eval.entity.DeptAssessmentDeclarationComplete;
|
|
|
import com.ims.eval.entity.DeptAssessmentDeclarationContent;
|
|
|
import com.ims.eval.entity.EvaluationDept;
|
|
|
-import com.ims.eval.entity.dto.request.EmployeeDTO;
|
|
|
-import com.ims.eval.entity.dto.request.SummaryInformationDTO;
|
|
|
-import com.ims.eval.entity.dto.request.UserDTO;
|
|
|
+import com.ims.eval.entity.dto.request.*;
|
|
|
import com.ims.eval.entity.dto.result.R;
|
|
|
import com.ims.eval.service.*;
|
|
|
+import com.ims.eval.service.custom.PostService;
|
|
|
+import com.ims.eval.service.custom.PostUserService;
|
|
|
import com.ims.eval.util.ExcelUtil;
|
|
|
import com.ims.eval.util.ExcelUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -60,6 +60,12 @@ public class DeptAssessmentDeclarationController {
|
|
|
private IUserService userService;
|
|
|
|
|
|
@Autowired
|
|
|
+ private PostService postService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private PostUserService postUserService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private HttpServletRequest request;
|
|
|
|
|
|
/**
|
|
@@ -632,8 +638,8 @@ public class DeptAssessmentDeclarationController {
|
|
|
/**
|
|
|
* 添加审批领导
|
|
|
*
|
|
|
- * @param id 主键
|
|
|
- * @param id 用户编号
|
|
|
+ * @param id 主键
|
|
|
+ * @param employeeNo 用户编号
|
|
|
* @return 结果
|
|
|
*/
|
|
|
@PostMapping(value = "/addApprovalLeader")
|
|
@@ -642,4 +648,35 @@ public class DeptAssessmentDeclarationController {
|
|
|
List<UserDTO> list = new ArrayList<>();
|
|
|
return R.ok().data(list);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取审批领导
|
|
|
+ *
|
|
|
+ * @param id 部门主键
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/obtainApprovalLeader/{id}")
|
|
|
+ public R obtainApprovalLeader(@PathVariable String id) {
|
|
|
+ List<PostUserDTO> list = new ArrayList<>();
|
|
|
+ Object postList = postService.getPostList(1, 500, id, request);
|
|
|
+ if (null != postList) {
|
|
|
+ JSONObject postJsonArr = (JSONObject) postList;
|
|
|
+ JSONArray postArray = JSONUtil.parseArray(postJsonArr.get("records"));
|
|
|
+ List<PostDTO> postArrList = JSONUtil.toList(postArray, PostDTO.class);
|
|
|
+ for (PostDTO post : postArrList) {
|
|
|
+ if (post.getName().contains("主任")) {
|
|
|
+ Object postPersonnelList = postUserService.getPostUserList(1, 500, post.getId(), request);
|
|
|
+ if (null != postPersonnelList) {
|
|
|
+ JSONObject postPersonnelJsonArr = (JSONObject) postPersonnelList;
|
|
|
+ JSONArray postPersonnelArray = JSONUtil.parseArray(postPersonnelJsonArr.get("records"));
|
|
|
+ List<PostUserDTO> userArrList = JSONUtil.toList(postPersonnelArray, PostUserDTO.class);
|
|
|
+ if (userArrList.size() > 0) {
|
|
|
+ list.addAll(userArrList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return R.ok().data(list);
|
|
|
+ }
|
|
|
}
|