feat:武汉联特科技 人员自定义字段更新定时任务增加字段

This commit is contained in:
liangcheng 2025-08-15 14:25:51 +08:00
parent 4e4edb0c2d
commit 363e244199
4 changed files with 66 additions and 25 deletions

View File

@ -1,26 +1,41 @@
## \u7B2C\u4E00\u5B66\u5386 ## ????
firstDegree=field29 firstDegree=field74
## \u7B2C\u4E00\u5B66\u5386\u4E13\u4E1A ## ??????
firstDegreeMajor=field30 firstDegreeMajor=field17
## \u6700\u9AD8\u5B66\u5386 ## ????????
highestDegree=field31 firstEducationDate=field55
## \u6700\u9AD8\u5B66\u5386\u4E13\u4E1A ## ????????
highestDegreeMajor=field32 firstSchoolName=field16
## \u5E74\u9F84 ## ????
age=field33 highestDegree=field75
## \u6700\u8FD1\u4E00\u4EFD\u5DE5\u4F5C\u5355\u4F4D\u540D\u79F0 ## ??????
lastWorkunitName=field34 highestDegreeMajor=field43
## \u6700\u8FD1\u4E00\u4EFD\u5DE5\u4F5C\u5C97\u4F4D ## ????????
lastJobName=field35 highEducationDate=field97
## \u4E2A\u4EBA\u4FE1\u606F ## ????????
highSchoolName=field42
## ??????????
lastWorkunitName=field44
## ????????
lastJobName=field45
## ??
age=field15
## ????
scopeid=1 scopeid=1
## \u6D88\u606F\u63D0\u9192ID ## ????ID
messageRemindId=1186 messageRemindId=1229
## ?????? ??id (????)
messageModeId=296

View File

@ -50,13 +50,15 @@ public class ResourcePersonInfoCron extends BaseCronJob {
//2.教育经历第一学历 //2.教育经历第一学历
List<EducationModePo> educationFirst = new ArrayList<>(); List<EducationModePo> educationFirst = new ArrayList<>();
rs.executeQuery("select id,xm,xl,zy from uf_jxjl where sfwdyxl = 0"); rs.executeQuery("select id,xm,xl,zy,bysj,yxqc from uf_jxjl where sfwdyxl = 0");
while (rs.next()) { while (rs.next()) {
Integer id = Util.getIntValue(rs.getString("id")); Integer id = Util.getIntValue(rs.getString("id"));
Integer userId = Util.getIntValue(rs.getString("xm")); Integer userId = Util.getIntValue(rs.getString("xm"));
Integer firstDegree = Util.getIntValue(rs.getString("xl")); Integer firstDegree = Util.getIntValue(rs.getString("xl"));
String firstDegreeMajor = Util.null2String(rs.getString("zy")); String firstDegreeMajor = Util.null2String(rs.getString("zy"));
educationFirst.add(EducationModePo.builder().id(id).userId(userId).firstDegree(firstDegree).firstDegreeMajor(firstDegreeMajor).build()); String educationDate = Util.null2String(rs.getString("bysj"));
String schoolName = Util.null2String(rs.getString("yxqc"));
educationFirst.add(EducationModePo.builder().id(id).userId(userId).firstDegree(firstDegree).firstDegreeMajor(firstDegreeMajor).educationDate(educationDate).schoolName(schoolName).build());
} }
List<EducationModePo> educationFirstResult = new ArrayList<>(educationFirst.stream() List<EducationModePo> educationFirstResult = new ArrayList<>(educationFirst.stream()
.collect(Collectors.toMap( .collect(Collectors.toMap(
@ -71,13 +73,15 @@ public class ResourcePersonInfoCron extends BaseCronJob {
//2.教育经历最高学历 //2.教育经历最高学历
List<EducationModePo> educationHighest = new ArrayList<>(); List<EducationModePo> educationHighest = new ArrayList<>();
rs.executeQuery("select id,xm,xl,zy from uf_jxjl where sfwzgxl = 0"); rs.executeQuery("select id,xm,xl,zy,bysj,yxqc from uf_jxjl where sfwzgxl = 0");
while (rs.next()) { while (rs.next()) {
Integer id = Util.getIntValue(rs.getString("id")); Integer id = Util.getIntValue(rs.getString("id"));
Integer userId = Util.getIntValue(rs.getString("xm")); Integer userId = Util.getIntValue(rs.getString("xm"));
Integer highestDegree = Util.getIntValue(rs.getString("xl")); Integer highestDegree = Util.getIntValue(rs.getString("xl"));
String highestDegreeMajor = Util.null2String(rs.getString("zy")); String highestDegreeMajor = Util.null2String(rs.getString("zy"));
educationHighest.add(EducationModePo.builder().id(id).userId(userId).highestDegree(highestDegree).highestDegreeMajor(highestDegreeMajor).build()); String educationDate = Util.null2String(rs.getString("bysj"));
String schoolName = Util.null2String(rs.getString("yxqc"));
educationHighest.add(EducationModePo.builder().id(id).userId(userId).highestDegree(highestDegree).highestDegreeMajor(highestDegreeMajor).educationDate(educationDate).schoolName(schoolName).build());
} }
List<EducationModePo> educationHighResult = new ArrayList<>(educationHighest.stream() List<EducationModePo> educationHighResult = new ArrayList<>(educationHighest.stream()
.collect(Collectors.toMap( .collect(Collectors.toMap(
@ -105,11 +109,15 @@ public class ResourcePersonInfoCron extends BaseCronJob {
if (educationModeFirst != null) { if (educationModeFirst != null) {
build.setFirstDegree(educationModeFirst.getFirstDegree()); build.setFirstDegree(educationModeFirst.getFirstDegree());
build.setFirstDegreeMajor(educationModeFirst.getFirstDegreeMajor()); build.setFirstDegreeMajor(educationModeFirst.getFirstDegreeMajor());
build.setFirstEducationDate(educationModeFirst.getEducationDate());
build.setFirstSchoolName(educationModeFirst.getSchoolName());
} }
if (educationModeHigh != null) { if (educationModeHigh != null) {
build.setHighestDegree(educationModeHigh.getHighestDegree()); build.setHighestDegree(educationModeHigh.getHighestDegree());
build.setHighestDegreeMajor(educationModeHigh.getHighestDegreeMajor()); build.setHighestDegreeMajor(educationModeHigh.getHighestDegreeMajor());
build.setHighEducationDate(educationModeHigh.getEducationDate());
build.setHighSchoolName(educationModeHigh.getSchoolName());
} }
otherInfoPos.add(build); otherInfoPos.add(build);
@ -119,11 +127,17 @@ public class ResourcePersonInfoCron extends BaseCronJob {
String scopeId = bb.getPropValue("seclinktel", "scopeid"); String scopeId = bb.getPropValue("seclinktel", "scopeid");
String firstDegree = bb.getPropValue("seclinktel", "firstDegree"); String firstDegree = bb.getPropValue("seclinktel", "firstDegree");
String firstDegreeMajor = bb.getPropValue("seclinktel", "firstDegreeMajor"); String firstDegreeMajor = bb.getPropValue("seclinktel", "firstDegreeMajor");
String firstEducationDate = bb.getPropValue("seclinktel", "firstEducationDate");
String firstSchoolName = bb.getPropValue("seclinktel", "firstSchoolName");
String highestDegree = bb.getPropValue("seclinktel", "highestDegree"); String highestDegree = bb.getPropValue("seclinktel", "highestDegree");
String highestDegreeMajor = bb.getPropValue("seclinktel", "highestDegreeMajor"); String highestDegreeMajor = bb.getPropValue("seclinktel", "highestDegreeMajor");
String highEducationDate = bb.getPropValue("seclinktel", "highEducationDate");
String highSchoolName = bb.getPropValue("seclinktel", "highSchoolName");
String lastWorkunitName = bb.getPropValue("seclinktel", "lastWorkunitName"); String lastWorkunitName = bb.getPropValue("seclinktel", "lastWorkunitName");
String lastJobName = bb.getPropValue("seclinktel", "lastJobName"); String lastJobName = bb.getPropValue("seclinktel", "lastJobName");
otherInfoPos.forEach(e -> { otherInfoPos.forEach(e -> {
//2.插入更新 //2.插入更新
@ -134,13 +148,13 @@ public class ResourcePersonInfoCron extends BaseCronJob {
int nums = Util.getIntValue(rs.getString("nums")); int nums = Util.getIntValue(rs.getString("nums"));
if (nums > 0) { if (nums > 0) {
//更新 //更新
rs.executeUpdate("update cus_fielddata set "+firstDegree+"=?, "+firstDegreeMajor+"=?, "+highestDegree+"=?, "+highestDegreeMajor+"=?, "+lastWorkunitName+"=?, "+lastJobName+"= ? "+ rs.executeUpdate("update cus_fielddata set "+firstDegree+"=?, "+firstDegreeMajor+"=?,"+firstEducationDate+"=?,"+firstSchoolName+"=?, "+highestDegree+"=?, "+highestDegreeMajor+"=?,"+highEducationDate+"=?,"+highSchoolName+"=?, "+lastWorkunitName+"=?, "+lastJobName+"= ? "+
" where id=? and scope = 'HrmCustomFieldByInfoType' and scopeid = 1",e.getFirstDegree(),e.getFirstDegreeMajor(),e.getHighestDegree(),e.getHighestDegreeMajor(),e.getLastWorkunitName(), " where id=? and scope = 'HrmCustomFieldByInfoType' and scopeid = 1",e.getFirstDegree(),e.getFirstDegreeMajor(),e.getFirstEducationDate(),e.getFirstSchoolName(),e.getHighestDegree(),e.getHighestDegreeMajor(),e.getHighEducationDate(),e.getHighSchoolName(),e.getLastWorkunitName(),
e.getLastJobName(),e.getId()); e.getLastJobName(),e.getId());
}else { }else {
//插入 //插入
rs.executeUpdate("insert into cus_fielddata(scope,scopeid,id,"+firstDegree+","+firstDegreeMajor+","+highestDegree+","+highestDegreeMajor+", "+lastWorkunitName+", "+lastJobName+") values(?,?,?,?,?,?,?,?,?)", rs.executeUpdate("insert into cus_fielddata(scope,scopeid,id,"+firstDegree+","+firstDegreeMajor+","+firstEducationDate+","+firstSchoolName+","+highestDegree+","+highestDegreeMajor+","+highEducationDate+","+highSchoolName+", "+lastWorkunitName+", "+lastJobName+") values(?,?,?,?,?,?,?,?,?,?,?,?,?)",
"HrmCustomFieldByInfoType",scopeId,e.getId(),e.getFirstDegree(),e.getFirstDegreeMajor(),e.getHighestDegree(),e.getHighestDegreeMajor(),e.getLastWorkunitName(),e.getLastJobName()); "HrmCustomFieldByInfoType",scopeId,e.getId(),e.getFirstDegree(),e.getFirstDegreeMajor(),e.getFirstEducationDate(),e.getFirstSchoolName(),e.getHighestDegree(),e.getHighestDegreeMajor(),e.getHighEducationDate(),e.getHighSchoolName(),e.getLastWorkunitName(),e.getLastJobName());
} }
}); });

View File

@ -30,4 +30,8 @@ public class EducationModePo {
private String highestDegreeMajor; private String highestDegreeMajor;
private String educationDate;
private String schoolName;
} }

View File

@ -25,10 +25,18 @@ public class ResourceOtherInfoPo {
private String firstDegreeMajor; private String firstDegreeMajor;
private String firstEducationDate;
private String firstSchoolName;
private Integer highestDegree; private Integer highestDegree;
private String highestDegreeMajor; private String highestDegreeMajor;
private String highEducationDate;
private String highSchoolName;
private Integer age; private Integer age;
private String lastWorkunitName; private String lastWorkunitName;