明细表BUG修复
This commit is contained in:
parent
7c79718d6e
commit
10bb8159aa
|
|
@ -37,5 +37,5 @@ public interface ExtDTMapper {
|
|||
* @param mainId
|
||||
* @return
|
||||
*/
|
||||
int deleteByMainID(@Param("tableName") String tableName, @Param("mainId") long mainId);
|
||||
int deleteByMainID(@Param("tableName") String tableName, @Param("mainId") long mainId, @Param("groupId") Long groupId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@
|
|||
delete
|
||||
from ${tableName}
|
||||
where mainid = #{mainId}
|
||||
<if test=" null!=groupId ">
|
||||
and group_id = #{groupId}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<select id="listCompExtDT" resultType="map">
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ public class CompServiceImpl extends Service implements CompService {
|
|||
new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.CANCELED, map).sync();
|
||||
// 删除拓展表、明细表
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).deleteByID("jcl_org_compext", id);
|
||||
MapperProxyFactory.getProxy(ExtDTMapper.class).deleteByMainID("jcl_org_compext_dt1", id);
|
||||
MapperProxyFactory.getProxy(ExtDTMapper.class).deleteByMainID("jcl_org_compext_dt1", id,null);
|
||||
}
|
||||
return getCompMapper().deleteByIds(ids);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
new OrganizationSyncEc(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.CANCELED, map).sync();
|
||||
// 删除拓展表、明细表
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).deleteByID("jcl_org_deptext", id);
|
||||
MapperProxyFactory.getProxy(ExtDTMapper.class).deleteByMainID("jcl_org_deptext_dt1", id);
|
||||
MapperProxyFactory.getProxy(ExtDTMapper.class).deleteByMainID("jcl_org_deptext_dt1", id, null);
|
||||
}
|
||||
|
||||
return getDepartmentMapper().deleteByIds(ids);
|
||||
|
|
@ -677,7 +677,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
new OrganizationSyncEc(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.CANCELED, map).sync();
|
||||
// 删除拓展表、明细表
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).deleteByID("jcl_org_deptext", mergeParam.getId());
|
||||
MapperProxyFactory.getProxy(ExtDTMapper.class).deleteByMainID("jcl_org_deptext_dt1", mergeParam.getId());
|
||||
MapperProxyFactory.getProxy(ExtDTMapper.class).deleteByMainID("jcl_org_deptext_dt1", mergeParam.getId(), null);
|
||||
getDepartmentMapper().deleteByIds(DeleteParam.builder().ids(mergeParam.getId().toString()).build().getIds());
|
||||
// 更新组织架构图
|
||||
new DepartmentTriggerRunnable(mergeDepartment).run();
|
||||
|
|
|
|||
|
|
@ -176,7 +176,6 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
tableMap.put("hide", false);
|
||||
tableMap.put("tabname", getExtendGroupMapper().getGroupNameById(Util.null2String(entry.getKey())));
|
||||
Map<String, Object> tabinfoMap = new HashMap<>();
|
||||
//TODO 需优化
|
||||
tabinfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(user, entry.getValue(), viewAttr, showLabel));
|
||||
tabinfoMap.put("rownum", "rownum" + entry.getKey());
|
||||
|
||||
|
|
@ -301,7 +300,7 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
int rowNum = Util.getIntValue((String) params.get("rownum" + groupId));
|
||||
if (deleteFlag && rowNum > 0) {
|
||||
// 删除原有明细表数据
|
||||
getExtDTMapper().deleteByMainID(tableName, id);
|
||||
getExtDTMapper().deleteByMainID(tableName, id, groupId);
|
||||
deleteFlag = false;
|
||||
}
|
||||
List<ExtendInfoPO> filterS = poMaps.get(groupId);
|
||||
|
|
@ -314,6 +313,7 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
map.put(extendInfoPO.getFieldName(), params.get(extendInfoPO.getFieldName() + "_" + i));
|
||||
}
|
||||
map.put("mainid", id);
|
||||
map.put("group_id", groupId);
|
||||
map.put("creator", user.getUID());
|
||||
map.put("delete_type", 0);
|
||||
map.put("create_time", new Date());
|
||||
|
|
|
|||
|
|
@ -515,7 +515,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.CANCELED, null, jobsById).sync();
|
||||
// 删除拓展表、明细表
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).deleteByID("jcl_org_jobext", jobsById.getId());
|
||||
MapperProxyFactory.getProxy(ExtDTMapper.class).deleteByMainID("jcl_org_jobext_dt1", jobsById.getId());
|
||||
MapperProxyFactory.getProxy(ExtDTMapper.class).deleteByMainID("jcl_org_jobext_dt1", jobsById.getId(), null);
|
||||
}
|
||||
return getJobMapper().deleteByIds(ids);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue