招聘 岗位字段变更

This commit is contained in:
dxfeng 2025-05-28 11:23:50 +08:00
parent b3db90d3bd
commit 6ffa03bb2a
3 changed files with 20 additions and 5 deletions

View File

@ -41,6 +41,7 @@ public class Employee {
private Integer age;
private String departmentCode;
private String positionCode;
private String positionName;
@Override
public String toString() {

View File

@ -49,13 +49,26 @@ public class EmployeeTrans {
}
public static String getJobtitleId(String jobtitleCode) {
//public static String getJobtitleId(String jobtitleCode) {
// String jobtitleId = "";
// RecordSet rs = new RecordSet();
// if (StringUtils.isBlank(jobtitleCode)) {
// return jobtitleId;
// }
// rs.executeQuery("select id from hrmjobtitles where jobtitlecode = ?", jobtitleCode);
// if (rs.next()) {
// jobtitleId = rs.getString("id");
// }
// return jobtitleId;
//}
public static String getJobIdByName(String name) {
String jobtitleId = "";
RecordSet rs = new RecordSet();
if (StringUtils.isBlank(jobtitleCode)) {
if (StringUtils.isBlank(name)) {
return jobtitleId;
}
rs.executeQuery("select id from hrmjobtitles where jobtitlecode = ?", jobtitleCode);
rs.executeQuery("select id from uf_gwgl where gwmc = ?", name);
if (rs.next()) {
jobtitleId = rs.getString("id");
}

View File

@ -136,6 +136,7 @@ public class SyncBeiSenInfoJob extends BaseCronJob {
if (null != position) {
// 设置岗位编号
employeeObject.setPositionCode(position.getCode());
employeeObject.setPositionName(position.getName());
}
employeeList.add(employeeObject);
}
@ -288,7 +289,7 @@ public class SyncBeiSenInfoJob extends BaseCronJob {
insertData.put("ypbm", departmentId);
}
// 职位
String jobtitleId = EmployeeTrans.getJobtitleId(employee.getPositionCode());
String jobtitleId = EmployeeTrans.getJobIdByName(employee.getPositionName());
if (StringUtils.isNotBlank(jobtitleId)) {
insertData.put("ypgw", jobtitleId);
}
@ -346,7 +347,7 @@ public class SyncBeiSenInfoJob extends BaseCronJob {
// insertData.put("ypbm", departmentId);
//}
// 岗位
String jobtitleId = EmployeeTrans.getJobtitleId(employee.getPositionCode());
String jobtitleId = EmployeeTrans.getJobIdByName(employee.getPositionName());
if (StringUtils.isNotBlank(jobtitleId)) {
insertData.put("gw", jobtitleId);
}