招聘 岗位字段变更

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 Integer age;
private String departmentCode; private String departmentCode;
private String positionCode; private String positionCode;
private String positionName;
@Override @Override
public String toString() { 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 = ""; String jobtitleId = "";
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
if (StringUtils.isBlank(jobtitleCode)) { if (StringUtils.isBlank(name)) {
return jobtitleId; return jobtitleId;
} }
rs.executeQuery("select id from hrmjobtitles where jobtitlecode = ?", jobtitleCode); rs.executeQuery("select id from uf_gwgl where gwmc = ?", name);
if (rs.next()) { if (rs.next()) {
jobtitleId = rs.getString("id"); jobtitleId = rs.getString("id");
} }

View File

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