|
@@ -14,7 +14,6 @@ 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.PostDTO;
|
|
|
import com.ims.eval.entity.dto.request.PostUserDTO;
|
|
|
import com.ims.eval.entity.dto.request.SummaryInformationDTO;
|
|
|
import com.ims.eval.entity.dto.result.R;
|
|
@@ -91,7 +90,7 @@ public class DeptAssessmentDeclarationController {
|
|
|
@RequestParam(value = "deptName", required = false) String deptName,
|
|
|
@RequestParam(value = "annual", required = false) Integer annual,
|
|
|
@RequestParam(value = "declarationMonth", required = false) Integer declarationMonth) {
|
|
|
- IPage<DeptAssessmentDeclaration> list = deptAssessmentDeclarationService.listPage(pageNum, pageSize, deptId, orderNumber, deptName, annual, declarationMonth,request);
|
|
|
+ IPage<DeptAssessmentDeclaration> list = deptAssessmentDeclarationService.listPage(pageNum, pageSize, deptId, orderNumber, deptName, annual, declarationMonth, request);
|
|
|
return R.ok().data(list);
|
|
|
}
|
|
|
|
|
@@ -338,7 +337,7 @@ public class DeptAssessmentDeclarationController {
|
|
|
deptAssessmentDeclarationContent.setAssessmentDeclarationId(id);
|
|
|
deptAssessmentDeclarationContent.setEmployeeNo(str[0]);
|
|
|
JSONObject jsonArr = userService.getLoginNameByUserInfo(str[0], request);
|
|
|
- if ("操作成功".equals(String.valueOf(jsonArr.get("msg")))){
|
|
|
+ if ("操作成功".equals(String.valueOf(jsonArr.get("msg")))) {
|
|
|
JSONObject data = (JSONObject) jsonArr.get("data");
|
|
|
deptAssessmentDeclarationContent.setEmployeeId(String.valueOf(data.get("id")));
|
|
|
deptAssessmentDeclarationContent.setEmployeeName(String.valueOf(data.get("name")));
|
|
@@ -640,7 +639,7 @@ public class DeptAssessmentDeclarationController {
|
|
|
boolean b = false;
|
|
|
JSONObject jsonArr = userService.getLoginNameByUserInfo(employeeNo, request);
|
|
|
JSONObject data = (JSONObject) jsonArr.get("data");
|
|
|
- if (data.toJSONString().length()>0){
|
|
|
+ if (data.toJSONString().length() > 0) {
|
|
|
DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
|
|
|
if (null != deptAssessmentDeclaration) {
|
|
|
deptAssessmentDeclaration.setDeptLeaderId(String.valueOf(data.get("id")));
|
|
@@ -669,7 +668,7 @@ public class DeptAssessmentDeclarationController {
|
|
|
boolean b = false;
|
|
|
JSONObject jsonArr = userService.getLoginNameByUserInfo(employeeNo, request);
|
|
|
JSONObject data = (JSONObject) jsonArr.get("data");
|
|
|
- if ("操作成功".equals(String.valueOf(data.get("msg")))){
|
|
|
+ if ("操作成功".equals(String.valueOf(data.get("msg")))) {
|
|
|
DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
|
|
|
if (null != deptAssessmentDeclaration) {
|
|
|
deptAssessmentDeclaration.setSeconderId(String.valueOf(data.get("id")));
|
|
@@ -694,21 +693,15 @@ public class DeptAssessmentDeclarationController {
|
|
|
@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);
|
|
|
- }
|
|
|
+ String jsonStr = postUserService.getBbUserPostList(0, 1000, id, request);
|
|
|
+ if (null != jsonStr) {
|
|
|
+ JSONObject jsonObj = JSONObject.parseObject(jsonStr);
|
|
|
+ JSONArray postPersonnelArray = JSONUtil.parseArray(jsonObj.get("data"));
|
|
|
+ List<PostUserDTO> postPersonnelArrList = JSONUtil.toList(postPersonnelArray, PostUserDTO.class);
|
|
|
+ for (PostUserDTO user : postPersonnelArrList) {
|
|
|
+ if (user.getMainPosName() != null && !"".equals(user.getMainPosName())) {
|
|
|
+ if (user.getMainPosName().contains("主任")) {
|
|
|
+ list.add(user);
|
|
|
}
|
|
|
}
|
|
|
}
|