diff --git a/WEB-INF/prop/wysecond.properties b/WEB-INF/prop/wysecond.properties index c9c022a..26188f1 100644 --- a/WEB-INF/prop/wysecond.properties +++ b/WEB-INF/prop/wysecond.properties @@ -13,6 +13,8 @@ officeEmail=field7 position=field58 #\u4EBA\u5458\u7C7B\u522B personType=field63 +#\u5C97\u4F4D\u65B0 +jobTitle=field69 ####### \u4E2A\u4EBA\u4FE1\u606F ########### #\u5E74\u9F84 diff --git a/src/com/engine/wysecond/service/impl/PersonnelResumeServiceImpl.java b/src/com/engine/wysecond/service/impl/PersonnelResumeServiceImpl.java index 9b64aae..343d114 100644 --- a/src/com/engine/wysecond/service/impl/PersonnelResumeServiceImpl.java +++ b/src/com/engine/wysecond/service/impl/PersonnelResumeServiceImpl.java @@ -3,6 +3,7 @@ package com.engine.wysecond.service.impl; import com.engine.core.impl.Service; import com.engine.wysecond.entity.resume.*; import com.engine.wysecond.service.PersonnelResumeService; +import com.engine.wysecond.util.FieldTransUtils; import lombok.SneakyThrows; import weaver.conn.RecordSet; import weaver.general.Util; @@ -13,6 +14,7 @@ import weaver.hrm.job.JobTitlesComInfo; import java.util.*; + /** * @Author liang.cheng * @Date 2025/2/17 14:41 @@ -142,12 +144,13 @@ public class PersonnelResumeServiceImpl extends Service implements PersonnelResu String postion = rs.getPropValue("wysecond", "postion"); String position = rs.getPropValue("wysecond", "position"); String policy = rs.getPropValue("wysecond", "policy"); + String jobTitle = rs.getPropValue("wysecond", "jobTitle"); DepartmentComInfo dept = new DepartmentComInfo(); JobTitlesComInfo job = new JobTitlesComInfo(); rs.executeQuery("SELECT h.id, workcode, lastname, sex, birthday, resourceimageid, b."+nation+" as nation, nativeplace, \n" + " companystartdate, b."+joinPartyDate+" as joinPartyDate, c."+workStartDate+" as workStartDate, c."+highPersonType+" as highPersonType, \n" + - " b."+jobCall+" as jobCall,departmentid, jobTitle, c."+postion+" as postion,d."+position+" as position, d."+policy+" as policy FROM hrmresource h \n" + + " b."+jobCall+" as jobCall,departmentid, d."+jobTitle+" as jobTitle, c."+postion+" as postion,d."+position+" as position, d."+policy+" as policy FROM hrmresource h \n" + " LEFT JOIN cus_fielddata b on b.id = h.id and b.scopeid = 1 and b.scope = 'HrmCustomFieldByInfoType' \n" + " LEFT JOIN cus_fielddata c on c.id = h.id and c.scopeid = 3 and c.scope = 'HrmCustomFieldByInfoType' \n" + " LEFT JOIN cus_fielddata d on d.id = h.id and d.scopeid = -1 and d.scope = 'HrmCustomFieldByInfoType' \n" + @@ -168,7 +171,7 @@ public class PersonnelResumeServiceImpl extends Service implements PersonnelResu personnelResumePo.setHighPersonType(selectItemValue(highPersonType,Util.getIntValue(rs.getString("highPersonType")),String.valueOf(user.getLanguage()))); personnelResumePo.setJobCall(selectItemValue(jobCall,Util.getIntValue(rs.getString("jobCall")),String.valueOf(user.getLanguage()))); personnelResumePo.setDepartment(dept.getDepartmentName(Util.null2String(rs.getString("departmentid")))); - personnelResumePo.setJobTitle(job.getJobTitlesname(Util.null2String(rs.getString("jobTitle")))); + personnelResumePo.setJobTitle(FieldTransUtils.selectJobTitleName(Util.null2String(rs.getString("jobTitle")))); personnelResumePo.setPostionLevel(selectPostionLevel(Util.null2String(rs.getString("postion")))); personnelResumePo.setPosition(selectItemValue(position,Util.getIntValue(rs.getString("position")),String.valueOf(user.getLanguage()))); personnelResumePo.setPolicy(selectItemValue(policy,Util.getIntValue(rs.getString("policy")),String.valueOf(user.getLanguage()))); @@ -218,6 +221,8 @@ public class PersonnelResumeServiceImpl extends Service implements PersonnelResu return personnelResumePo; } + + private String selectItemValue(String field, Integer selectValue,String language) { field = field.substring("field".length()); RecordSet rs = new RecordSet(); diff --git a/src/com/engine/wysecond/util/FieldTransUtils.java b/src/com/engine/wysecond/util/FieldTransUtils.java index 4a84c2c..e0ac1cd 100644 --- a/src/com/engine/wysecond/util/FieldTransUtils.java +++ b/src/com/engine/wysecond/util/FieldTransUtils.java @@ -27,6 +27,13 @@ public class FieldTransUtils { return Util.formatMultiLang(Util.null2String(rs.getString("selectname")),language); } + public static String selectJobTitleName(String value) { + RecordSet rs = new RecordSet(); + rs.executeQuery("select gwmc from uf_gwgl where id = ?",value); + rs.next(); + return Util.null2String(rs.getString("gwmc")); + } + public static String selectNationName(String value) { RecordSet rs = new RecordSet(); rs.executeQuery("select mz from uf_mz_ where id = ?",value); diff --git a/src/weaver/interfaces/wysecond/ResourceInfoSnipCron.java b/src/weaver/interfaces/wysecond/ResourceInfoSnipCron.java index ff9e25c..b1872d0 100644 --- a/src/weaver/interfaces/wysecond/ResourceInfoSnipCron.java +++ b/src/weaver/interfaces/wysecond/ResourceInfoSnipCron.java @@ -36,6 +36,8 @@ public class ResourceInfoSnipCron extends BaseCronJob { String officeEmail = rs.getPropValue("wysecond", "officeEmail"); String position = rs.getPropValue("wysecond", "position"); String personType = rs.getPropValue("wysecond", "personType"); + String jobTitle = rs.getPropValue("wysecond", "jobTitle"); + //2.个人信息 String age = rs.getPropValue("wysecond", "age"); @@ -116,7 +118,7 @@ public class ResourceInfoSnipCron extends BaseCronJob { List> insertList = new ArrayList<>(); rs.executeQuery("select a.id,a.workcode,a.lastname,a.sex,b."+workPeopleType+" as workPeopleType,b."+workStatus+" as workStatus,\n" + "b."+policy+" as policy,b."+landNumber+" as landNumber,b."+officeEmail+" as officeEmail,b."+position+" as position,b."+personType+" as personType,\n" + - "a.departmentid,a.jobtitle,a.loginid,a.accounttype,a.belongto,a.status,a.resourceimageid,a.locationid,\n" + + "a.departmentid,b."+jobTitle+" as jobtitle,a.loginid,a.accounttype,a.belongto,a.status,a.resourceimageid,a.locationid,\n" + "a.certificatenum,a.birthday,c."+age+" as age,a.height,a.weight,c."+nation+" as nation,a.nativeplace,c."+birthplace+" as birthplace,a.healthinfo,\n" + "c."+residenceAddress+" as residenceAddress,c."+currentAddress+" as currentAddress,c."+residenceType+" as residenceType,c."+maritalStatus+" as maritalStatus,\n" + "c."+marryDate+" as marryDate,c."+religious+" as religious,c."+joinLeagueDate+" as joinLeagueDate,c."+joinPartyDate+" as joinPartyDate,\n" + @@ -149,7 +151,7 @@ public class ResourceInfoSnipCron extends BaseCronJob { peopleList.add(FieldTransUtils.selectItemValue(position.substring("field".length()),Util.getIntValue(rs.getString("position")),"7")); peopleList.add(FieldTransUtils.selectItemValue(personType.substring("field".length()),Util.getIntValue(rs.getString("personType")),"7")); peopleList.add(dept.getDepartmentname(Util.null2String(rs.getString("departmentid")))); - peopleList.add(job.getJobTitlesname(Util.null2String(rs.getString("jobtitle")))); + peopleList.add(FieldTransUtils.selectJobTitleName(Util.null2String(rs.getString("jobTitle")))); peopleList.add(Util.null2String(rs.getString("loginid"))); peopleList.add(FieldTransUtils.selectHrmItem("accounttype",Util.getIntValue(rs.getString("accounttype")),"7")); peopleList.add(Util.getIntValue(rs.getString("belongto")));