|
|
|
@ -13,6 +13,7 @@ import com.engine.hrm.util.face.bean.CheckItemBean;
|
|
|
|
|
import com.engine.organization.entity.jclimport.po.JclImportHistoryDetailPO;
|
|
|
|
|
import com.engine.organization.mapper.jclimport.JclImportHistoryDetailMapper;
|
|
|
|
|
import com.engine.organization.mapper.jclimport.JclImportHistoryMapper;
|
|
|
|
|
import com.engine.organization.mapper.job.JobMapper;
|
|
|
|
|
import com.engine.organization.thread.HrmResourceTriggerRunnable;
|
|
|
|
|
import com.engine.organization.trigger.cusfielddata.CusFieldDataTrigger;
|
|
|
|
|
import com.engine.organization.util.db.MapperProxyFactory;
|
|
|
|
@ -1579,6 +1580,17 @@ public class HrmImportProcessE9 extends BaseBean {
|
|
|
|
|
fielddbType = jsonObject.getString("fielddbtype");
|
|
|
|
|
jsonObject.put("fieldvalue", baseValues[i]);
|
|
|
|
|
String fieldvalue = HrmFieldManager.getReallyFieldvalue(jsonObject);
|
|
|
|
|
// 处理自动获取时,或取到已删除的数据
|
|
|
|
|
if ("field100002".equalsIgnoreCase(fieldname)) {
|
|
|
|
|
// 根据分部、部门,获取对应的岗位ID
|
|
|
|
|
recordSet.execute("select subcompanyid1,departmentid from hrmresource where id = " + id);
|
|
|
|
|
while (recordSet.next()) {
|
|
|
|
|
String ecCompany = recordSet.getString("subcompanyid1");
|
|
|
|
|
String ecDepartment = recordSet.getString("departmentid");
|
|
|
|
|
Long jobId = MapperProxyFactory.getProxy(JobMapper.class).getIdByNameAndEcId(baseValues[i], ecCompany, ecDepartment);
|
|
|
|
|
fieldvalue = null == jobId ? "" : jobId.toString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EncryptFieldEntity encryptFieldEntity = new EncryptFieldConfigComInfo().getFieldEncryptConfig("cus_fielddata", fieldname, "HrmCustomFieldByInfoType", scopeId);
|
|
|
|
|
if (encryptFieldEntity != null && encryptFieldEntity.getIsEncrypt().equals("1")) {
|
|
|
|
@ -1657,6 +1669,18 @@ public class HrmImportProcessE9 extends BaseBean {
|
|
|
|
|
fielddbType = jsonObject.getString("fielddbtype");
|
|
|
|
|
jsonObject.put("fieldvalue", baseValues[i]);
|
|
|
|
|
String fieldvalue = HrmFieldManager.getReallyFieldvalue(jsonObject);
|
|
|
|
|
// 处理自动获取时,或取到已删除的数据
|
|
|
|
|
if ("field100002".equalsIgnoreCase(fieldname)) {
|
|
|
|
|
// 根据分部、部门,获取对应的岗位ID
|
|
|
|
|
recordSet.execute("select subcompanyid1,departmentid from hrmresource where id = " + id);
|
|
|
|
|
while (recordSet.next()) {
|
|
|
|
|
String ecCompany = recordSet.getString("subcompanyid1");
|
|
|
|
|
String ecDepartment = recordSet.getString("departmentid");
|
|
|
|
|
Long jobId = MapperProxyFactory.getProxy(JobMapper.class).getIdByNameAndEcId(baseValues[i], ecCompany, ecDepartment);
|
|
|
|
|
fieldvalue = null == jobId ? "" : jobId.toString();
|
|
|
|
|
new BaseBean().writeLog("岗位[" + baseValues[i] + "],jobId[" + Util.null2String(jobId) + "],ecCompany[" + ecCompany + "],ecDepartment[" + ecDepartment + "]");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
EncryptFieldEntity encryptFieldEntity = new EncryptFieldConfigComInfo().getFieldEncryptConfig("cus_fielddata", fieldname, "HrmCustomFieldByInfoType", scopeId);
|
|
|
|
|
if (encryptFieldEntity != null && encryptFieldEntity.getIsEncrypt().equals("1")) {
|
|
|
|
|
//是否需要加密
|
|
|
|
@ -1664,7 +1688,7 @@ public class HrmImportProcessE9 extends BaseBean {
|
|
|
|
|
}
|
|
|
|
|
if (fieldvalue.startsWith(",")) fieldvalue = fieldvalue.substring(1);
|
|
|
|
|
if (fieldvalue.endsWith(",")) fieldvalue = fieldvalue.substring(0, fieldvalue.length() - 1);
|
|
|
|
|
if (!fieldvalue.equals("")) {
|
|
|
|
|
if (!fieldvalue.equals("") || "field100002".equalsIgnoreCase(fieldname)) {
|
|
|
|
|
flag = true;
|
|
|
|
|
if (fielddbType.toLowerCase().startsWith("char") || fielddbType.toLowerCase().startsWith("varchar") || fielddbType.toLowerCase().startsWith("text"))
|
|
|
|
|
setStr.append(",").append(baseFields[i]).append("='").append(fieldvalue).append("'");
|
|
|
|
|