|
@@ -234,7 +234,7 @@ public class DeptAssessmentDeclarationController {
|
|
if (b) {
|
|
if (b) {
|
|
return R.ok().data(b);
|
|
return R.ok().data(b);
|
|
} else {
|
|
} else {
|
|
- return R.error("新增/修改失败,人员重复!");
|
|
|
|
|
|
+ return R.error("保存失败,人员重复或人员信息不完善!");
|
|
}
|
|
}
|
|
} catch (CustomException e) {
|
|
} catch (CustomException e) {
|
|
return R.customError(e.getMessage()).data("失败!");
|
|
return R.customError(e.getMessage()).data("失败!");
|
|
@@ -334,13 +334,11 @@ public class DeptAssessmentDeclarationController {
|
|
DeptAssessmentDeclarationContent deptAssessmentDeclarationContent = new DeptAssessmentDeclarationContent();
|
|
DeptAssessmentDeclarationContent deptAssessmentDeclarationContent = new DeptAssessmentDeclarationContent();
|
|
deptAssessmentDeclarationContent.setAssessmentDeclarationId(id);
|
|
deptAssessmentDeclarationContent.setAssessmentDeclarationId(id);
|
|
deptAssessmentDeclarationContent.setEmployeeNo(str[0]);
|
|
deptAssessmentDeclarationContent.setEmployeeNo(str[0]);
|
|
- JSONObject jsonArr = userService.pageList(1, 500, "", "", "", str[0], "", "", request);
|
|
|
|
- JSONObject jsonArr1 = (JSONObject) jsonArr.get("data");
|
|
|
|
- JSONArray array = JSONUtil.parseArray(jsonArr1.get("records"));
|
|
|
|
- List<UserDTO> userList = JSONUtil.toList(array, UserDTO.class);
|
|
|
|
- if (userList.size() > 0) {
|
|
|
|
- deptAssessmentDeclarationContent.setEmployeeId(userList.get(0).getId());
|
|
|
|
- deptAssessmentDeclarationContent.setEmployeeName(userList.get(0).getName());
|
|
|
|
|
|
+ JSONObject jsonArr = userService.getLoginNameByUserInfo(str[0], request);
|
|
|
|
+ JSONObject data = (JSONObject) jsonArr.get("data");
|
|
|
|
+ if ("操作成功".equals(String.valueOf(data.get("msg")))){
|
|
|
|
+ deptAssessmentDeclarationContent.setEmployeeId(String.valueOf(data.get("id")));
|
|
|
|
+ deptAssessmentDeclarationContent.setEmployeeName(String.valueOf(data.get("name")));
|
|
}
|
|
}
|
|
deptAssessmentDeclarationContent.setSuggestedValue(str[2]);
|
|
deptAssessmentDeclarationContent.setSuggestedValue(str[2]);
|
|
deptAssessmentDeclarationContent.setSerialNumber(Convert.toInt(str[3]));
|
|
deptAssessmentDeclarationContent.setSerialNumber(Convert.toInt(str[3]));
|
|
@@ -646,16 +644,14 @@ public class DeptAssessmentDeclarationController {
|
|
public R addApprovalLeader(@RequestParam(value = "id") String id,
|
|
public R addApprovalLeader(@RequestParam(value = "id") String id,
|
|
@RequestParam(value = "employeeNo") String employeeNo) {
|
|
@RequestParam(value = "employeeNo") String employeeNo) {
|
|
boolean b = false;
|
|
boolean b = false;
|
|
- JSONObject jsonArr = userService.pageList(1, 500, "", "", "", employeeNo, "", "", request);
|
|
|
|
- JSONObject jsonArr1 = (JSONObject) jsonArr.get("data");
|
|
|
|
- JSONArray array = JSONUtil.parseArray(jsonArr1.get("records"));
|
|
|
|
- List<UserDTO> userList = JSONUtil.toList(array, UserDTO.class);
|
|
|
|
- if (userList.size() > 0) {
|
|
|
|
|
|
+ JSONObject jsonArr = userService.getLoginNameByUserInfo(employeeNo, request);
|
|
|
|
+ JSONObject data = (JSONObject) jsonArr.get("data");
|
|
|
|
+ if ("操作成功".equals(String.valueOf(data.get("msg")))){
|
|
DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
|
|
DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
|
|
if (null != deptAssessmentDeclaration) {
|
|
if (null != deptAssessmentDeclaration) {
|
|
- deptAssessmentDeclaration.setDeptLeaderId(userList.get(0).getId());
|
|
|
|
- deptAssessmentDeclaration.setDeptLeaderNo(userList.get(0).getNo());
|
|
|
|
- deptAssessmentDeclaration.setDeptLeaderName(userList.get(0).getName());
|
|
|
|
|
|
+ deptAssessmentDeclaration.setDeptLeaderId(String.valueOf(data.get("id")));
|
|
|
|
+ deptAssessmentDeclaration.setDeptLeaderNo(String.valueOf(data.get("no")));
|
|
|
|
+ deptAssessmentDeclaration.setDeptLeaderName(String.valueOf(data.get("name")));
|
|
b = deptAssessmentDeclarationService.updateById(deptAssessmentDeclaration);
|
|
b = deptAssessmentDeclarationService.updateById(deptAssessmentDeclaration);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -677,16 +673,14 @@ public class DeptAssessmentDeclarationController {
|
|
public R addRepeatBatchLeader(@RequestParam(value = "id") String id,
|
|
public R addRepeatBatchLeader(@RequestParam(value = "id") String id,
|
|
@RequestParam(value = "employeeNo") String employeeNo) {
|
|
@RequestParam(value = "employeeNo") String employeeNo) {
|
|
boolean b = false;
|
|
boolean b = false;
|
|
- JSONObject jsonArr = userService.pageList(1, 500, "", "", "", employeeNo, "", "", request);
|
|
|
|
- JSONObject jsonArr1 = (JSONObject) jsonArr.get("data");
|
|
|
|
- JSONArray array = JSONUtil.parseArray(jsonArr1.get("records"));
|
|
|
|
- List<UserDTO> userList = JSONUtil.toList(array, UserDTO.class);
|
|
|
|
- if (userList.size() > 0) {
|
|
|
|
|
|
+ JSONObject jsonArr = userService.getLoginNameByUserInfo(employeeNo, request);
|
|
|
|
+ JSONObject data = (JSONObject) jsonArr.get("data");
|
|
|
|
+ if ("操作成功".equals(String.valueOf(data.get("msg")))){
|
|
DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
|
|
DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
|
|
if (null != deptAssessmentDeclaration) {
|
|
if (null != deptAssessmentDeclaration) {
|
|
- deptAssessmentDeclaration.setSeconderId(userList.get(0).getId());
|
|
|
|
- deptAssessmentDeclaration.setSeconderNo(userList.get(0).getNo());
|
|
|
|
- deptAssessmentDeclaration.setSeconderName(userList.get(0).getName());
|
|
|
|
|
|
+ deptAssessmentDeclaration.setSeconderId(String.valueOf(data.get("id")));
|
|
|
|
+ deptAssessmentDeclaration.setSeconderNo(String.valueOf(data.get("no")));
|
|
|
|
+ deptAssessmentDeclaration.setSeconderName(String.valueOf(data.get("name")));
|
|
b = deptAssessmentDeclarationService.updateById(deptAssessmentDeclaration);
|
|
b = deptAssessmentDeclarationService.updateById(deptAssessmentDeclaration);
|
|
}
|
|
}
|
|
}
|
|
}
|