BUG修复
This commit is contained in:
parent
38725f97b0
commit
8a9370ee9e
|
|
@ -162,6 +162,8 @@ public interface JobMapper {
|
|||
*/
|
||||
Long getIdByNameAndPid(@Param("jobName") String jobName, @Param("parentCompany") Long parentCompany, @Param("parentDepartment") Long parentDepartment, @Param("parentJob") Long parentJob);
|
||||
|
||||
Long getIdByNameAndEcId(@Param("jobName") String jobName, @Param("ecCompany") String ecCompany, @Param("ecDepartment") String ecDepartment);
|
||||
|
||||
int checkRepeatNo(@Param("jobNo") String jobNo, @Param("id") Long id);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -548,6 +548,14 @@
|
|||
WHERE SCOPE = 'HrmCustomFieldByInfoType'
|
||||
AND SCOPEID = -1
|
||||
</select>
|
||||
<select id="getIdByNameAndEcId" resultType="java.lang.Long">
|
||||
select id
|
||||
from jcl_org_job
|
||||
where delete_type = 0
|
||||
and job_name = #{jobName}
|
||||
and ec_company = #{ecCompany}
|
||||
and ec_department = #{ecDepartment}
|
||||
</select>
|
||||
|
||||
<sql id="nullparentJob">
|
||||
and ifnull(parent_job,0) =
|
||||
|
|
|
|||
|
|
@ -113,6 +113,12 @@ public class CusFieldDataTrigger {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
directionData.setField100002(null);
|
||||
directionData.setField100008(null);
|
||||
directionData.setField100006(null);
|
||||
directionData.setField100007(null);
|
||||
directionData.setField100005(null);
|
||||
}
|
||||
|
||||
// field100001更新,职等职级
|
||||
|
|
|
|||
|
|
@ -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("'");
|
||||
|
|
|
|||
Loading…
Reference in New Issue