BUG修复
This commit is contained in:
parent
1abb29d584
commit
1318fc1aba
|
|
@ -29,12 +29,20 @@ public interface ExtMapper {
|
|||
int countExtById(ExtendInfoParams params);
|
||||
|
||||
/**
|
||||
* 插入主表拓展表
|
||||
* 插入主表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
int insertExt(ExtendInfoParams params);
|
||||
int insertTable(ExtendInfoParams params);
|
||||
|
||||
/**
|
||||
* 插入拓展表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
int insertExtTable(ExtendInfoParams params);
|
||||
|
||||
/**
|
||||
* 更新主表拓展表
|
||||
|
|
@ -42,5 +50,5 @@ public interface ExtMapper {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
int updateExt(ExtendInfoParams params);
|
||||
int updateTable(ExtendInfoParams params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.organization.mapper.extend.ExtMapper">
|
||||
|
||||
<insert id="insertExt" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams"
|
||||
<insert id="insertTable" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams"
|
||||
keyProperty="id"
|
||||
keyColumn="id" useGeneratedKeys="true">
|
||||
insert into ${tableName} (
|
||||
|
|
@ -17,8 +17,9 @@
|
|||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertExt" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams" databaseId="oracle">
|
||||
<selectKey keyProperty="id" resultType="long" order="AFTER">
|
||||
<insert id="insertTable" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams"
|
||||
databaseId="oracle">
|
||||
<selectKey keyProperty="id" resultType="long" order="AFTER">
|
||||
select ${sequenceName}.currval from dual
|
||||
</selectKey>
|
||||
|
||||
|
|
@ -33,8 +34,20 @@
|
|||
</foreach>
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertExtTable" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams">
|
||||
insert into ${tableName} (
|
||||
<foreach collection="params" item="value" index="key" separator=",">
|
||||
${key}
|
||||
</foreach>
|
||||
)
|
||||
values (
|
||||
<foreach collection="params" item="value" index="key" separator=",">
|
||||
#{value}
|
||||
</foreach>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateExt" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams">
|
||||
<update id="updateTable" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams">
|
||||
update ${tableName} set
|
||||
<foreach collection="params" item="value" index="key" separator=",">
|
||||
${key} = #{value}
|
||||
|
|
|
|||
|
|
@ -232,14 +232,14 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
int count = getExtMapper().countExtById(infoParams);
|
||||
if (count > 0) {
|
||||
map.put("update_time", new Date());
|
||||
getExtMapper().updateExt(infoParams);
|
||||
getExtMapper().updateTable(infoParams);
|
||||
} else {
|
||||
map.put("creator", user.getUID());
|
||||
map.put("delete_type", 0);
|
||||
map.put("create_time", new Date());
|
||||
map.put("update_time", new Date());
|
||||
map.put("id", id);
|
||||
getExtMapper().insertExt(infoParams);
|
||||
getExtMapper().insertExtTable(infoParams);
|
||||
}
|
||||
} else {
|
||||
if (!tableName.equals("JCL_ORG_HRMRESOURCE")) {
|
||||
|
|
@ -249,7 +249,7 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
map.put("delete_type", 0);
|
||||
map.put("create_time", new Date());
|
||||
map.put("update_time", new Date());
|
||||
getExtMapper().insertExt(infoParams);
|
||||
getExtMapper().insertTable(infoParams);
|
||||
}
|
||||
return infoParams.getId();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -641,7 +641,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
map.put("forbidden_tag", 0);
|
||||
}
|
||||
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName("JCL_ORG_COMP").params(map).build();
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).insertExt(infoParams);
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).insertTable(infoParams);
|
||||
map.put("id", infoParams.getId());
|
||||
new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.ADD, map).run();
|
||||
historyDetailPO.setOperateDetail("添加成功");
|
||||
|
|
@ -657,7 +657,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
}
|
||||
if (checkRepeatNo(compNo, COMPANY_TYPE, companyId)) {
|
||||
map.put("update_time", new Date());
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).updateExt(ExtendInfoParams.builder().id(companyId).tableName("JCL_ORG_COMP").params(map).build());
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(companyId).tableName("JCL_ORG_COMP").params(map).build());
|
||||
map.put("id", companyId);
|
||||
new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, map).run();
|
||||
historyDetailPO.setOperateDetail("更新成功");
|
||||
|
|
@ -828,7 +828,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
map.put("forbidden_tag", 0);
|
||||
}
|
||||
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName("JCL_ORG_DEPT").params(map).build();
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).insertExt(infoParams);
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).insertTable(infoParams);
|
||||
map.put("id", infoParams.getId());
|
||||
new OrganizationRunable(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.ADD, map).run();
|
||||
historyDetailPO.setOperateDetail("添加成功");
|
||||
|
|
@ -844,7 +844,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
}
|
||||
if (checkRepeatNo(deptNo, DEPARTMENT_TYPE, departmentId)) {
|
||||
map.put("update_time", new Date());
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).updateExt(ExtendInfoParams.builder().id(departmentId).tableName("JCL_ORG_DEPT").params(map).build());
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(departmentId).tableName("JCL_ORG_DEPT").params(map).build());
|
||||
map.put("id", departmentId);
|
||||
new OrganizationRunable(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.UPDATE, map).run();
|
||||
historyDetailPO.setOperateDetail("更新成功");
|
||||
|
|
@ -1043,7 +1043,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
map.put("forbidden_tag", 0);
|
||||
}
|
||||
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName("JCL_ORG_JOB").params(map).build();
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).insertExt(infoParams);
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).insertTable(infoParams);
|
||||
map.put("jobactivityid", JobServiceImpl.JOB_ACTIVITY_ID);
|
||||
map.put("id", infoParams.getId());
|
||||
new OrganizationRunable(user, LogModuleNameEnum.JOB, OperateTypeEnum.ADD, map).run();
|
||||
|
|
@ -1060,7 +1060,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
}
|
||||
if (checkRepeatNo(jobNo, JOB_TYPE, jobId)) {
|
||||
map.put("update_time", new Date());
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).updateExt(ExtendInfoParams.builder().id(jobId).tableName("JCL_ORG_JOB").params(map).build());
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(jobId).tableName("JCL_ORG_JOB").params(map).build());
|
||||
map.put("jobactivityid", JobServiceImpl.JOB_ACTIVITY_ID);
|
||||
map.put("id", jobId);
|
||||
new OrganizationRunable(user, LogModuleNameEnum.JOB, OperateTypeEnum.UPDATE, map).run();
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ public class OrganizationRunable implements Runnable {
|
|||
departmentMap.put("uuid", uuid);
|
||||
long jclTableId = Long.parseLong(Util.null2String(params.get("id")));
|
||||
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName(jclTableName).params(departmentMap).id(jclTableId).build();
|
||||
getExtMapper().updateExt(infoParams);
|
||||
getExtMapper().updateTable(infoParams);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public class CusFieldDataTrigger {
|
|||
hrmResourceMap.put("departmentid", ecBmId);
|
||||
// 公司
|
||||
hrmResourceMap.put("subcompanyid1", ecGsId);
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).updateExt(ExtendInfoParams.builder().id(id).tableName("hrmresource").params(hrmResourceMap).build());
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(id).tableName("hrmresource").params(hrmResourceMap).build());
|
||||
updateFlag = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue