BUG修复

pull/193/MERGE^2
dxfeng 3 years ago
parent 1abb29d584
commit 1318fc1aba

@ -29,12 +29,20 @@ public interface ExtMapper {
int countExtById(ExtendInfoParams params); int countExtById(ExtendInfoParams params);
/** /**
* *
* *
* @param params * @param params
* @return * @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 * @param params
* @return * @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" > <!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"> <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" keyProperty="id"
keyColumn="id" useGeneratedKeys="true"> keyColumn="id" useGeneratedKeys="true">
insert into ${tableName} ( insert into ${tableName} (
@ -17,7 +17,8 @@
) )
</insert> </insert>
<insert id="insertExt" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams" databaseId="oracle"> <insert id="insertTable" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams"
databaseId="oracle">
<selectKey keyProperty="id" resultType="long" order="AFTER"> <selectKey keyProperty="id" resultType="long" order="AFTER">
select ${sequenceName}.currval from dual select ${sequenceName}.currval from dual
</selectKey> </selectKey>
@ -33,8 +34,20 @@
</foreach> </foreach>
) )
</insert> </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 update ${tableName} set
<foreach collection="params" item="value" index="key" separator=","> <foreach collection="params" item="value" index="key" separator=",">
${key} = #{value} ${key} = #{value}

@ -232,14 +232,14 @@ public class ExtServiceImpl extends Service implements ExtService {
int count = getExtMapper().countExtById(infoParams); int count = getExtMapper().countExtById(infoParams);
if (count > 0) { if (count > 0) {
map.put("update_time", new Date()); map.put("update_time", new Date());
getExtMapper().updateExt(infoParams); getExtMapper().updateTable(infoParams);
} else { } else {
map.put("creator", user.getUID()); map.put("creator", user.getUID());
map.put("delete_type", 0); map.put("delete_type", 0);
map.put("create_time", new Date()); map.put("create_time", new Date());
map.put("update_time", new Date()); map.put("update_time", new Date());
map.put("id", id); map.put("id", id);
getExtMapper().insertExt(infoParams); getExtMapper().insertExtTable(infoParams);
} }
} else { } else {
if (!tableName.equals("JCL_ORG_HRMRESOURCE")) { if (!tableName.equals("JCL_ORG_HRMRESOURCE")) {
@ -249,7 +249,7 @@ public class ExtServiceImpl extends Service implements ExtService {
map.put("delete_type", 0); map.put("delete_type", 0);
map.put("create_time", new Date()); map.put("create_time", new Date());
map.put("update_time", new Date()); map.put("update_time", new Date());
getExtMapper().insertExt(infoParams); getExtMapper().insertTable(infoParams);
} }
return infoParams.getId(); return infoParams.getId();
} }

@ -641,7 +641,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
map.put("forbidden_tag", 0); map.put("forbidden_tag", 0);
} }
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName("JCL_ORG_COMP").params(map).build(); 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()); map.put("id", infoParams.getId());
new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.ADD, map).run(); new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.ADD, map).run();
historyDetailPO.setOperateDetail("添加成功"); historyDetailPO.setOperateDetail("添加成功");
@ -657,7 +657,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
} }
if (checkRepeatNo(compNo, COMPANY_TYPE, companyId)) { if (checkRepeatNo(compNo, COMPANY_TYPE, companyId)) {
map.put("update_time", new Date()); 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); map.put("id", companyId);
new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, map).run(); new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, map).run();
historyDetailPO.setOperateDetail("更新成功"); historyDetailPO.setOperateDetail("更新成功");
@ -828,7 +828,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
map.put("forbidden_tag", 0); map.put("forbidden_tag", 0);
} }
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName("JCL_ORG_DEPT").params(map).build(); 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()); map.put("id", infoParams.getId());
new OrganizationRunable(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.ADD, map).run(); new OrganizationRunable(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.ADD, map).run();
historyDetailPO.setOperateDetail("添加成功"); historyDetailPO.setOperateDetail("添加成功");
@ -844,7 +844,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
} }
if (checkRepeatNo(deptNo, DEPARTMENT_TYPE, departmentId)) { if (checkRepeatNo(deptNo, DEPARTMENT_TYPE, departmentId)) {
map.put("update_time", new Date()); 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); map.put("id", departmentId);
new OrganizationRunable(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.UPDATE, map).run(); new OrganizationRunable(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.UPDATE, map).run();
historyDetailPO.setOperateDetail("更新成功"); historyDetailPO.setOperateDetail("更新成功");
@ -1043,7 +1043,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
map.put("forbidden_tag", 0); map.put("forbidden_tag", 0);
} }
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName("JCL_ORG_JOB").params(map).build(); 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("jobactivityid", JobServiceImpl.JOB_ACTIVITY_ID);
map.put("id", infoParams.getId()); map.put("id", infoParams.getId());
new OrganizationRunable(user, LogModuleNameEnum.JOB, OperateTypeEnum.ADD, map).run(); 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)) { if (checkRepeatNo(jobNo, JOB_TYPE, jobId)) {
map.put("update_time", new Date()); 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("jobactivityid", JobServiceImpl.JOB_ACTIVITY_ID);
map.put("id", jobId); map.put("id", jobId);
new OrganizationRunable(user, LogModuleNameEnum.JOB, OperateTypeEnum.UPDATE, map).run(); new OrganizationRunable(user, LogModuleNameEnum.JOB, OperateTypeEnum.UPDATE, map).run();

@ -436,7 +436,7 @@ public class OrganizationRunable implements Runnable {
departmentMap.put("uuid", uuid); departmentMap.put("uuid", uuid);
long jclTableId = Long.parseLong(Util.null2String(params.get("id"))); long jclTableId = Long.parseLong(Util.null2String(params.get("id")));
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName(jclTableName).params(departmentMap).id(jclTableId).build(); 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("departmentid", ecBmId);
// 公司 // 公司
hrmResourceMap.put("subcompanyid1", ecGsId); 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; updateFlag = true;
} }

Loading…
Cancel
Save