|
|
|
@ -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;
|
|
|
|
@ -780,6 +781,8 @@ public class HrmImportProcessE9 extends BaseBean {
|
|
|
|
|
flag = false;
|
|
|
|
|
if (updateWorkData(vo.getWorkFields(), vo.getWorkFieldsValue(), id)) //添加工作字段信息
|
|
|
|
|
flag = false;
|
|
|
|
|
// 更新聚才林相关字段
|
|
|
|
|
CusFieldDataTrigger.run((long) id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*添加人员缓存,人员默认按id显示顺序,HrmResource_Trigger_Insert 人员共享 入职维护项目状态*/
|
|
|
|
@ -1392,6 +1395,9 @@ public class HrmImportProcessE9 extends BaseBean {
|
|
|
|
|
if (updateWorkData(vo.getWorkFields().trim(), vo.getWorkFieldsValue(), keyMap.get(key)))
|
|
|
|
|
flag = false;
|
|
|
|
|
|
|
|
|
|
// 更新聚才林相关字段
|
|
|
|
|
CusFieldDataTrigger.run((long) keyMap.get(key));
|
|
|
|
|
|
|
|
|
|
/*update HrmResource_Trigger */
|
|
|
|
|
if (flag) {
|
|
|
|
|
recordSet.executeSql("select id from HrmResource_Trigger where id=" + hrmId);
|
|
|
|
@ -1574,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")) {
|
|
|
|
@ -1592,10 +1609,7 @@ public class HrmImportProcessE9 extends BaseBean {
|
|
|
|
|
writeLog(e);
|
|
|
|
|
}
|
|
|
|
|
recordSet.setNoAutoEncrypt(true);
|
|
|
|
|
boolean execute = recordSet.execute(sql);
|
|
|
|
|
// 更新聚才林相关字段
|
|
|
|
|
CusFieldDataTrigger.run((long) id);
|
|
|
|
|
return execute;
|
|
|
|
|
return recordSet.execute(sql);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1655,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")) {
|
|
|
|
|
//是否需要加密
|
|
|
|
@ -1662,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("'");
|
|
|
|
@ -1676,10 +1702,7 @@ public class HrmImportProcessE9 extends BaseBean {
|
|
|
|
|
}
|
|
|
|
|
recordSet.setNoAutoEncrypt(true);
|
|
|
|
|
if (flag) {
|
|
|
|
|
boolean execute = recordSet.execute(sql);
|
|
|
|
|
// 更新聚才林相关字段
|
|
|
|
|
CusFieldDataTrigger.run((long) id);
|
|
|
|
|
return !execute;
|
|
|
|
|
return !recordSet.execute(sql);
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|