修复同步试用期人眼bug
This commit is contained in:
parent
3c43aef7cc
commit
695393bcbf
@ -324,7 +324,7 @@ public class DingTalkUtil {
|
|||||||
departmentStaffBo.setEmail(json.getString("email"));//邮箱,钉钉的企业邮箱才可以,需要单独授权手机权限
|
departmentStaffBo.setEmail(json.getString("email"));//邮箱,钉钉的企业邮箱才可以,需要单独授权手机权限
|
||||||
departmentStaffBo.setAvatar(json.getString("avatar"));//头像
|
departmentStaffBo.setAvatar(json.getString("avatar"));//头像
|
||||||
departmentStaffBo.setPosition(json.getString("title"));
|
departmentStaffBo.setPosition(json.getString("title"));
|
||||||
if(mapProbation.containsKey(departmentStaffBo.getEmployeeId())){
|
if(mapProbation != null && mapProbation.containsKey(departmentStaffBo.getEmployeeId())){
|
||||||
departmentStaffBo.setEmployeeType(2);
|
departmentStaffBo.setEmployeeType(2);
|
||||||
}else{
|
}else{
|
||||||
departmentStaffBo.setEmployeeType(1);
|
departmentStaffBo.setEmployeeType(1);
|
||||||
|
|||||||
@ -843,6 +843,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
/*if(model.getMaxCount() != null && model.getDetailDtos().size() > model.getMaxCount().intValue()){
|
/*if(model.getMaxCount() != null && model.getDetailDtos().size() > model.getMaxCount().intValue()){
|
||||||
return R.error(model.getName() + "维度指标数量不能超过" + model.getMaxCount());
|
return R.error(model.getName() + "维度指标数量不能超过" + model.getMaxCount());
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
for (ResultDetailDto detailDto:model.getDetailDtos()
|
for (ResultDetailDto detailDto:model.getDetailDtos()
|
||||||
) {//排序
|
) {//排序
|
||||||
ResultDetail resultDetail = new ResultDetail();
|
ResultDetail resultDetail = new ResultDetail();
|
||||||
|
|||||||
@ -203,8 +203,11 @@ public class DingtalkBusiness {
|
|||||||
|
|
||||||
if(departmentInfosBos.size() > 0){
|
if(departmentInfosBos.size() > 0){
|
||||||
List<String> probationUserIDS = getProbationStaff(token);//获取试用期人员信息
|
List<String> probationUserIDS = getProbationStaff(token);//获取试用期人员信息
|
||||||
Map<String, String> mapProbation =
|
Map<String, String> mapProbation = null;
|
||||||
probationUserIDS.stream().collect(Collectors.toMap(String::toString, Function.identity(), (e, r) -> e));
|
if(probationUserIDS != null){
|
||||||
|
mapProbation = probationUserIDS.stream().collect(Collectors.toMap(String::toString, Function.identity(), (e, r) -> e));
|
||||||
|
}
|
||||||
|
|
||||||
//获取原有部门信息
|
//获取原有部门信息
|
||||||
Map<String, DepartmentInfosBo> mapDepartmentInfosBos
|
Map<String, DepartmentInfosBo> mapDepartmentInfosBos
|
||||||
= departmentInfosBos.stream().collect(Collectors.toMap(DepartmentInfosBo::getId, Function.identity(), (e, r) -> e));
|
= departmentInfosBos.stream().collect(Collectors.toMap(DepartmentInfosBo::getId, Function.identity(), (e, r) -> e));
|
||||||
@ -574,7 +577,7 @@ public class DingtalkBusiness {
|
|||||||
|
|
||||||
private List<String> getProbationStaff(String token){
|
private List<String> getProbationStaff(String token){
|
||||||
//获取试用期员工信息
|
//获取试用期员工信息
|
||||||
|
List<String> ids = null;
|
||||||
try {
|
try {
|
||||||
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/smartwork/hrm/employee/queryonjob");
|
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/smartwork/hrm/employee/queryonjob");
|
||||||
OapiSmartworkHrmEmployeeQueryonjobRequest req = new OapiSmartworkHrmEmployeeQueryonjobRequest();
|
OapiSmartworkHrmEmployeeQueryonjobRequest req = new OapiSmartworkHrmEmployeeQueryonjobRequest();
|
||||||
@ -582,7 +585,7 @@ public class DingtalkBusiness {
|
|||||||
req.setStatusList("2");
|
req.setStatusList("2");
|
||||||
req.setSize(50L);
|
req.setSize(50L);
|
||||||
boolean isNext = false;
|
boolean isNext = false;
|
||||||
List<String> ids = new ArrayList<>();
|
ids = new ArrayList<>();
|
||||||
{
|
{
|
||||||
req.setOffset(offSet);
|
req.setOffset(offSet);
|
||||||
OapiSmartworkHrmEmployeeQueryonjobResponse rsp = client.execute(req, token);
|
OapiSmartworkHrmEmployeeQueryonjobResponse rsp = client.execute(req, token);
|
||||||
@ -599,13 +602,12 @@ public class DingtalkBusiness {
|
|||||||
}else{
|
}else{
|
||||||
logger.info("钉钉请求返回错误{}", jsonObject);
|
logger.info("钉钉请求返回错误{}", jsonObject);
|
||||||
}
|
}
|
||||||
}while(isNext)
|
}while(isNext);
|
||||||
return ids;
|
|
||||||
|
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return null;
|
return ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
7
src/test/java/com/lz/mysql/ControlScanner.java
Normal file
7
src/test/java/com/lz/mysql/ControlScanner.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package com.lz.mysql;
|
||||||
|
|
||||||
|
public class ControlScanner {
|
||||||
|
private String filePath;//文件地址
|
||||||
|
static final String[] notesSym = {"/*", "*/", "//", "\\n"};//注释符号,成对出现,偶数为起始符号,奇数为结束符号
|
||||||
|
|
||||||
|
}
|
||||||
8
src/test/java/com/lz/mysql/SourceData.java
Normal file
8
src/test/java/com/lz/mysql/SourceData.java
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
package com.lz.mysql;
|
||||||
|
|
||||||
|
public class SourceData {
|
||||||
|
private String[] remarks;
|
||||||
|
private String name;//属性或者方法名称
|
||||||
|
private String[] params;//参数名称
|
||||||
|
private String reParam;//返回参数
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user