2022-08-26 15:36:06 +08:00
package com.engine.organization.thread ;
import com.engine.common.util.ServiceUtil ;
import com.engine.hrm.service.impl.HrmJobServiceImpl ;
import com.engine.hrm.service.impl.OrganizationServiceImpl ;
import com.engine.organization.entity.commom.RecordInfo ;
import com.engine.organization.entity.job.po.JobPO ;
import com.engine.organization.enums.LogModuleNameEnum ;
import com.engine.organization.enums.OperateTypeEnum ;
import com.engine.organization.mapper.hrmresource.SystemDataMapper ;
import com.engine.organization.mapper.job.JobMapper ;
import com.engine.organization.util.OrganizationAssert ;
import com.engine.organization.util.db.MapperProxyFactory ;
import com.engine.organization.util.relation.EcHrmRelationUtil ;
2022-10-12 15:28:11 +08:00
import com.engine.organization.util.relation.ResourceSyncUtil ;
2022-08-26 15:36:06 +08:00
import org.apache.commons.collections.CollectionUtils ;
import org.apache.commons.lang.StringUtils ;
2022-11-22 09:41:11 +08:00
import weaver.conn.RecordSet ;
2022-08-26 15:36:06 +08:00
import weaver.general.Util ;
import weaver.hrm.User ;
import java.util.HashMap ;
import java.util.List ;
import java.util.Map ;
import java.util.stream.Collectors ;
/ * *
* @author : dxfeng
* @createTime : 2022 / 08 / 26
* @version : 1 . 0
* /
public class OrganizationSyncEc {
2022-10-12 15:28:11 +08:00
private final LogModuleNameEnum moduleName ;
private final OperateTypeEnum operateType ;
2022-10-14 09:13:28 +08:00
private Map < String , Object > params ;
2022-10-12 15:28:11 +08:00
private final User user ;
2022-08-26 15:36:06 +08:00
private JobPO oldJobPO ;
Map < String , Object > resultMap ;
private boolean throwException = true ;
private SystemDataMapper getSystemDataMapper ( ) {
return MapperProxyFactory . getProxy ( SystemDataMapper . class ) ;
}
public OrganizationSyncEc ( User user , LogModuleNameEnum moduleName , OperateTypeEnum operateType , Map < String , Object > params ) {
this . moduleName = moduleName ;
this . operateType = operateType ;
this . params = params ;
this . user = user ;
}
public OrganizationSyncEc ( User user , LogModuleNameEnum moduleName , OperateTypeEnum operateType , Map < String , Object > params , boolean throwException ) {
this . moduleName = moduleName ;
this . operateType = operateType ;
this . params = params ;
this . user = user ;
this . throwException = throwException ;
}
public OrganizationSyncEc ( User user , LogModuleNameEnum moduleName , OperateTypeEnum operateType , Map < String , Object > params , JobPO oldJobPO ) {
this . moduleName = moduleName ;
this . operateType = operateType ;
this . params = params ;
this . user = user ;
this . oldJobPO = oldJobPO ;
}
2022-09-23 09:19:42 +08:00
2022-09-15 18:31:11 +08:00
public OrganizationSyncEc ( User user , LogModuleNameEnum moduleName , OperateTypeEnum operateType , Map < String , Object > params , JobPO oldJobPO , boolean throwException ) {
this . moduleName = moduleName ;
this . operateType = operateType ;
this . params = params ;
this . user = user ;
this . oldJobPO = oldJobPO ;
this . throwException = throwException ;
}
2022-08-26 15:36:06 +08:00
public Map < String , Object > sync ( ) {
switch ( moduleName ) {
case COMPANY :
refreshCompany ( ) ;
break ;
case DEPARTMENT :
refreshDepartment ( ) ;
break ;
case JOB :
refreshJob ( ) ;
break ;
2022-10-12 15:28:11 +08:00
case RESOURCE :
refreshResource ( ) ;
2022-08-26 15:36:06 +08:00
default :
break ;
}
2022-08-30 10:46:42 +08:00
if ( throwException & & null ! = resultMap ) {
2022-08-29 14:26:10 +08:00
OrganizationAssert . isTrue ( " 1 " . equals ( Util . null2String ( resultMap . get ( " status " ) ) ) | | " 1 " . equals ( Util . null2String ( resultMap . get ( " sign " ) ) ) , Util . null2String ( resultMap . get ( " message " ) ) ) ;
}
2022-08-26 15:36:06 +08:00
return resultMap ;
}
/ * *
* 刷新HrmSubCompany表数据
* /
private void refreshCompany ( ) {
switch ( operateType ) {
case ADD :
addCompany ( ) ;
break ;
case UPDATE :
updateCompany ( ) ;
break ;
case CANCELED :
cancelCompany ( ) ;
break ;
default :
break ;
}
}
/ * *
* 刷新HrmDepartment表数据
* /
private void refreshDepartment ( ) {
switch ( operateType ) {
case ADD :
addDepartment ( ) ;
break ;
case UPDATE :
updateDepartment ( ) ;
break ;
case CANCELED :
cancelDepartment ( ) ;
break ;
default :
break ;
}
}
private void refreshJob ( ) {
switch ( operateType ) {
case ADD :
addJob ( ) ;
break ;
case UPDATE :
updateJob ( ) ;
break ;
case CANCELED :
cancelJob ( ) ;
break ;
default :
break ;
}
}
2022-11-22 09:41:11 +08:00
private void refreshResource ( ) {
2022-10-12 15:28:11 +08:00
switch ( operateType ) {
case ADD :
addResource ( ) ;
break ;
case UPDATE :
2022-10-14 09:13:28 +08:00
updateResource ( ) ;
2022-10-12 15:28:11 +08:00
break ;
case CANCELED :
default :
break ;
}
}
private void addResource ( ) {
2022-10-14 09:13:28 +08:00
Map < String , Object > convertParams = ResourceSyncUtil . convertEcResourceParams ( params ) ;
this . resultMap = ResourceSyncUtil . addResource ( user , convertParams ) ;
2022-10-12 15:28:11 +08:00
}
private void updateResource ( ) {
2022-10-14 09:13:28 +08:00
Map < String , Object > convertParams = ResourceSyncUtil . convertEcResourceParams ( params ) ;
this . resultMap = ResourceSyncUtil . editResourceBase ( user , convertParams ) ;
2022-10-12 15:28:11 +08:00
}
2022-08-26 15:36:06 +08:00
/ * *
* 新增岗位
*
* < p >
* 1 、 EC表HrmJobTitles
* < p >
* 2 、 系统中新建 “ 聚才林 ” 、 “ 默认职务 ” ( sql写入 )
* < p >
* 3 、 检索岗位名称jobtitlename , 如果已存在 , 判断是否封存 , 对已封存数据解封操作
* < p >
* 4 、 如果不存在 , 在 “ 聚才林 - - 默认职务 ” 下新建岗位
* /
private void addJob ( ) {
// 判断是否存在同名岗位、存在不做处理,不存在,在“默认职务分类--默认职务”下新建岗位
String jobName = Util . null2String ( params . get ( " job_name " ) ) ;
RecordInfo hrmJobActivity = getSystemDataMapper ( ) . getHrmJobTitleByName ( jobName ) ;
Map < String , Object > map = new HashMap < > ( ) ;
//存在且已封存,对岗位解封
if ( null ! = hrmJobActivity ) {
map . put ( " ids " , hrmJobActivity . getId ( ) ) ;
map . put ( " canceled " , " docanceled " ) ;
this . resultMap = ServiceUtil . getService ( HrmJobServiceImpl . class , user ) . doCanceled ( map , user ) ;
} else {
// 不存在则新建职务
map . put ( " operateIp " , Util . null2String ( user . getLoginip ( ) ) ) ;
map . put ( " jobtitlemark " , jobName ) ;
map . put ( " jobtitlename " , jobName ) ;
map . put ( " jobactivityid " , Util . null2String ( params . get ( " jobactivityid " ) ) ) ;
map . put ( " jobresponsibility " , Util . null2String ( params . get ( " work_duty " ) ) ) ;
map . put ( " jobcompetency " , Util . null2String ( params . get ( " work_authority " ) ) ) ;
map . put ( " jobtitleremark " , Util . null2String ( params . get ( " description " ) ) ) ;
map . put ( " jobtitlecode " , Util . null2String ( params . get ( " job_no " ) ) ) ;
this . resultMap = ServiceUtil . getService ( HrmJobServiceImpl . class , user ) . addJobTitle ( map , user ) ;
}
}
/ * *
* 更新岗位
* /
private void updateJob ( ) {
Long jclJobId = oldJobPO . getId ( ) ;
String oldName = oldJobPO . getJobName ( ) ;
String newName = Util . null2String ( params . get ( " job_name " ) ) ;
2022-11-22 09:41:11 +08:00
if ( newName . equals ( oldName ) ) {
2022-11-18 16:28:02 +08:00
this . resultMap = new HashMap < > ( ) ;
this . resultMap . put ( " sign " , " 1 " ) ;
return ;
}
2022-08-26 15:36:06 +08:00
RecordInfo oldHrmJobTitle = getSystemDataMapper ( ) . getHrmJobTitleByName ( oldName ) ;
Map < String , Object > map = new HashMap < > ( ) ;
// 修改前不存在共用
if ( EcHrmRelationUtil . isNotExistJob ( oldName , jclJobId ) ) {
// 修改后不存在共用、直接修改EC岗位表数据
if ( EcHrmRelationUtil . isNotExistJob ( newName , jclJobId ) ) {
// 查询ec表ID
2022-09-23 09:19:42 +08:00
RecordInfo hrmJobTitle = getSystemDataMapper ( ) . getHrmJobTitleByName ( newName ) ;
2022-09-20 09:18:24 +08:00
if ( null ! = hrmJobTitle ) {
map . put ( " id " , Util . null2String ( hrmJobTitle . getId ( ) ) ) ;
map . put ( " operateIp " , Util . null2String ( user . getLoginip ( ) ) ) ;
map . put ( " jobtitlemark " , newName ) ;
map . put ( " jobtitlename " , newName ) ;
map . put ( " jobactivityid " , Util . null2String ( params . get ( " jobactivityid " ) ) ) ;
map . put ( " jobresponsibility " , Util . null2String ( params . get ( " work_duty " ) ) ) ;
map . put ( " jobcompetency " , Util . null2String ( params . get ( " work_authority " ) ) ) ;
map . put ( " jobtitleremark " , Util . null2String ( params . get ( " description " ) ) ) ;
map . put ( " jobtitlecode " , Util . null2String ( params . get ( " job_no " ) ) + " _ " + System . currentTimeMillis ( ) ) ;
// 修改岗位表数据
this . resultMap = ServiceUtil . getService ( HrmJobServiceImpl . class , user ) . editJobTitle ( map , user ) ;
} else {
// 不存在则新建职务
map . put ( " operateIp " , Util . null2String ( user . getLoginip ( ) ) ) ;
map . put ( " jobtitlemark " , newName ) ;
map . put ( " jobtitlename " , newName ) ;
map . put ( " jobactivityid " , Util . null2String ( params . get ( " jobactivityid " ) ) ) ;
map . put ( " jobresponsibility " , Util . null2String ( params . get ( " work_duty " ) ) ) ;
map . put ( " jobcompetency " , Util . null2String ( params . get ( " work_authority " ) ) ) ;
map . put ( " jobtitleremark " , Util . null2String ( params . get ( " description " ) ) ) ;
map . put ( " jobtitlecode " , Util . null2String ( params . get ( " job_no " ) ) + " _ " + System . currentTimeMillis ( ) ) ;
this . resultMap = ServiceUtil . getService ( HrmJobServiceImpl . class , user ) . addJobTitle ( map , user ) ;
}
2022-08-26 15:36:06 +08:00
} else {
// 修改后存在共用、不修改岗位表数据, 更新对应人员的岗位信息为当前岗位的ID
RecordInfo hrmJobTitle = getSystemDataMapper ( ) . getHrmJobTitleByName ( newName ) ;
// 查询原分部、原岗位下的人员, 并更新岗位ID
List < Long > hrmResourceIds = getSystemDataMapper ( ) . getHrmResourceIds ( oldJobPO . getParentDept ( ) , oldHrmJobTitle . getId ( ) ) ;
2022-09-23 09:19:42 +08:00
if ( CollectionUtils . isNotEmpty ( hrmResourceIds ) ) {
2022-09-15 16:51:35 +08:00
getSystemDataMapper ( ) . updateResourceJobTitleByIds ( Util . null2String ( hrmJobTitle . getId ( ) ) , hrmResourceIds ) ;
}
2022-08-26 15:36:06 +08:00
// 封存原名称岗位
map . put ( " ids " , oldHrmJobTitle . getId ( ) ) ;
map . put ( " canceled " , " canceled " ) ;
this . resultMap = ServiceUtil . getService ( HrmJobServiceImpl . class , user ) . doCanceled ( map , user ) ;
}
} else {
// 修改前存在共用,不对原有数据进行操作。
// 修改后不存在共用、新建岗位, 更新原有岗位下人员的岗位ID
if ( EcHrmRelationUtil . isNotExistJob ( newName , jclJobId ) ) {
2022-09-21 16:23:09 +08:00
RecordInfo hrmJobActivity = getSystemDataMapper ( ) . getHrmJobTitleByName ( newName ) ;
//存在且已封存,对岗位解封
if ( null ! = hrmJobActivity ) {
map . put ( " ids " , hrmJobActivity . getId ( ) ) ;
map . put ( " canceled " , " docanceled " ) ;
this . resultMap = ServiceUtil . getService ( HrmJobServiceImpl . class , user ) . doCanceled ( map , user ) ;
} else {
// 不存在则新建职务
map . put ( " operateIp " , Util . null2String ( user . getLoginip ( ) ) ) ;
map . put ( " jobtitlemark " , newName ) ;
map . put ( " jobtitlename " , newName ) ;
map . put ( " jobactivityid " , Util . null2String ( params . get ( " jobactivityid " ) ) ) ;
map . put ( " jobresponsibility " , Util . null2String ( params . get ( " work_duty " ) ) ) ;
map . put ( " jobcompetency " , Util . null2String ( params . get ( " work_authority " ) ) ) ;
map . put ( " jobtitleremark " , Util . null2String ( params . get ( " description " ) ) ) ;
map . put ( " jobtitlecode " , Util . null2String ( params . get ( " job_no " ) ) ) ;
this . resultMap = ServiceUtil . getService ( HrmJobServiceImpl . class , user ) . addJobTitle ( map , user ) ;
}
2022-08-26 15:36:06 +08:00
} else {
this . resultMap = new HashMap < > ( ) ;
this . resultMap . put ( " sign " , " 1 " ) ;
}
// 查询原分部、原岗位下的人员, 并更新岗位ID
RecordInfo hrmJobTitle = getSystemDataMapper ( ) . getHrmJobTitleByName ( newName ) ;
List < Long > hrmResourceIds = getSystemDataMapper ( ) . getHrmResourceIds ( oldJobPO . getParentDept ( ) , oldHrmJobTitle . getId ( ) ) ;
if ( CollectionUtils . isNotEmpty ( hrmResourceIds ) ) {
getSystemDataMapper ( ) . updateResourceJobTitleByIds ( Util . null2String ( hrmJobTitle . getId ( ) ) , hrmResourceIds ) ;
}
}
}
/ * *
* 封存 、 解封岗位
* /
private void cancelJob ( ) {
Map < String , Object > map = new HashMap < > ( ) ;
RecordInfo hrmJobTitleByName = getSystemDataMapper ( ) . getHrmJobTitleByName ( oldJobPO . getJobName ( ) ) ;
2022-08-30 10:46:42 +08:00
if ( null = = hrmJobTitleByName ) {
return ;
}
2022-08-26 15:36:06 +08:00
if ( 0 = = oldJobPO . getForbiddenTag ( ) ) {
// 启用
map . put ( " ids " , hrmJobTitleByName . getId ( ) ) ;
map . put ( " canceled " , " docanceled " ) ;
this . resultMap = ServiceUtil . getService ( HrmJobServiceImpl . class , user ) . doCanceled ( map , user ) ;
} else {
// 禁用
List < JobPO > jobPOS = MapperProxyFactory . getProxy ( JobMapper . class ) . listByNameExceptId ( oldJobPO . getJobName ( ) , oldJobPO . getId ( ) ) ;
// 不存在共用
if ( CollectionUtils . isEmpty ( jobPOS ) ) {
map . put ( " ids " , hrmJobTitleByName . getId ( ) ) ;
map . put ( " canceled " , " canceled " ) ;
this . resultMap = ServiceUtil . getService ( HrmJobServiceImpl . class , user ) . doCanceled ( map , user ) ;
} else {
List < JobPO > collect = jobPOS . stream ( ) . filter ( item - > 0 = = item . getForbiddenTag ( ) ) . collect ( Collectors . toList ( ) ) ;
// 不存在非禁用
if ( CollectionUtils . isEmpty ( collect ) ) {
map . put ( " ids " , hrmJobTitleByName . getId ( ) ) ;
map . put ( " canceled " , " canceled " ) ;
this . resultMap = ServiceUtil . getService ( HrmJobServiceImpl . class , user ) . doCanceled ( map , user ) ;
}
}
}
}
/ * *
* 新增部门
* /
private void addDepartment ( ) {
Map < String , Object > map = new HashMap < > ( ) ;
map . put ( " departmentmark " , Util . null2String ( params . get ( " dept_name_short " ) ) ) ;
map . put ( " departmentname " , Util . null2String ( params . get ( " dept_name " ) ) ) ;
// 上级分部通过UUID联查ec表ID
String parentCompany = Util . null2String ( params . get ( " parent_comp " ) ) ;
if ( StringUtils . isNotBlank ( parentCompany ) ) {
map . put ( " subcompanyid1 " , EcHrmRelationUtil . getEcCompanyId ( parentCompany ) ) ;
}
// 上级部门通过UUID联查ec表ID
String parentDepartment = Util . null2String ( params . get ( " parent_dept " ) ) ;
if ( StringUtils . isNotBlank ( parentDepartment ) ) {
map . put ( " supdepid " , EcHrmRelationUtil . getEcDepartmentId ( parentDepartment ) ) ;
}
map . put ( " showorder " , Util . null2String ( params . get ( " show_order " ) ) ) ;
map . put ( " departmentcode " , Util . null2String ( params . get ( " dept_no " ) ) ) ;
map . put ( " coadjutant " , Util . null2String ( params . get ( " dept_principal " ) ) ) ;
this . resultMap = ServiceUtil . getService ( OrganizationServiceImpl . class , user ) . addDepartment ( map , user ) ;
// 更新jcl_org_dept表 uuid字段
//if ("1".equals(Util.null2String(resultMap.get("status"))) && null != resultMap.get("id")) {
// updateJclUUID(Util.null2String(resultMap.get("id")), HRM_DEPARTMENT, JCL_DEPARTMENT);
//}
}
/ * *
* 封存 、 解封部门
* /
private void cancelDepartment ( ) {
String forbiddenTag = Util . null2String ( params . get ( " forbiddenTag " ) ) ;
if ( " 0 " . equals ( forbiddenTag ) ) {
// 解封
2022-11-29 09:54:18 +08:00
this . resultMap = ServiceUtil . getService ( OrganizationServiceImpl . class , user ) . doDepartmentISCanceled ( params , user ) ;
2022-08-26 15:36:06 +08:00
} else {
// 封存
2022-11-29 09:54:18 +08:00
this . resultMap = ServiceUtil . getService ( OrganizationServiceImpl . class , user ) . doDepartmentCancel ( params , user ) ;
2022-08-26 15:36:06 +08:00
}
}
/ * *
* 更新部门
* /
private void updateDepartment ( ) {
Map < String , Object > map = new HashMap < > ( ) ;
2022-11-22 09:41:11 +08:00
buildEcDepartmentData ( map ) ;
2022-08-26 15:36:06 +08:00
map . put ( " departmentmark " , Util . null2String ( params . get ( " dept_name_short " ) ) ) ;
map . put ( " departmentname " , Util . null2String ( params . get ( " dept_name " ) ) ) ;
// 上级分部通过UUID联查ec表ID
String parentCompany = Util . null2String ( params . get ( " parent_comp " ) ) ;
if ( StringUtils . isNotBlank ( parentCompany ) ) {
map . put ( " subcompanyid1 " , EcHrmRelationUtil . getEcCompanyId ( parentCompany ) ) ;
}
// 上级部门通过UUID联查ec表ID
String parentDepartment = Util . null2String ( params . get ( " parent_dept " ) ) ;
if ( StringUtils . isNotBlank ( parentDepartment ) ) {
map . put ( " supdepid " , EcHrmRelationUtil . getEcDepartmentId ( parentDepartment ) ) ;
}
map . put ( " showorder " , Util . null2String ( params . get ( " show_order " ) ) ) ;
map . put ( " departmentcode " , Util . null2String ( params . get ( " dept_no " ) ) ) ;
map . put ( " coadjutant " , Util . null2String ( params . get ( " dept_principal " ) ) ) ;
this . resultMap = ServiceUtil . getService ( OrganizationServiceImpl . class , user ) . editDepartment ( map , user ) ;
}
/ * *
* 新增分部
* /
private void addCompany ( ) {
2022-11-24 17:56:32 +08:00
this . resultMap = ServiceUtil . getService ( OrganizationServiceImpl . class , user ) . addSubCompany ( params , user ) ;
2022-08-26 15:36:06 +08:00
}
/ * *
* 更新分部
* /
private void updateCompany ( ) {
Map < String , Object > map = new HashMap < > ( ) ;
// 获取ec表ID
2022-11-22 09:41:11 +08:00
buildEcCompanyData ( map ) ;
2022-11-24 17:56:32 +08:00
map . putAll ( params ) ;
2022-08-26 15:36:06 +08:00
this . resultMap = ServiceUtil . getService ( OrganizationServiceImpl . class , user ) . editSubCompany ( map , user ) ;
}
/ * *
* 封存 、 解封分部
* /
private void cancelCompany ( ) {
2022-11-28 11:15:54 +08:00
// TODO
2022-08-26 15:36:06 +08:00
String forbiddenTag = Util . null2String ( params . get ( " forbiddenTag " ) ) ;
if ( " 0 " . equals ( forbiddenTag ) ) {
// 解封
2022-11-28 11:15:54 +08:00
this . resultMap = ServiceUtil . getService ( OrganizationServiceImpl . class , user ) . doSubCompanyISCanceled ( params , user ) ;
2022-08-26 15:36:06 +08:00
} else {
// 删除封存、禁用封存
2022-11-28 11:15:54 +08:00
this . resultMap = ServiceUtil . getService ( OrganizationServiceImpl . class , user ) . doSubCompanyCancel ( params , user ) ;
2022-08-26 15:36:06 +08:00
}
}
2022-11-22 09:41:11 +08:00
2022-11-28 11:15:54 +08:00
/ * *
* 补全分部参数信息
* @param map
* /
2022-11-22 09:41:11 +08:00
private void buildEcCompanyData ( Map < String , Object > map ) {
2022-11-24 17:56:32 +08:00
String ecCompanyId = Util . null2String ( params . get ( " id " ) ) ;
2022-11-22 09:41:11 +08:00
map . put ( " id " , ecCompanyId ) ;
RecordSet rs = new RecordSet ( ) ;
// 先查拓展表
rs . execute ( " select * from hrmsubcompanydefined where subcomid = ' " + ecCompanyId + " ' " ) ;
int colcount = rs . getColCounts ( ) ;
if ( rs . next ( ) ) {
for ( int i = 1 ; i < = colcount ; i + + ) {
map . put ( rs . getColumnName ( i ) . toLowerCase ( ) , Util . null2String ( rs . getString ( i ) ) ) ;
}
}
// 再查主表
rs . execute ( " select * from hrmsubcompany where id = ' " + ecCompanyId + " ' " ) ;
colcount = rs . getColCounts ( ) ;
if ( rs . next ( ) ) {
for ( int i = 1 ; i < = colcount ; i + + ) {
map . put ( rs . getColumnName ( i ) . toLowerCase ( ) , Util . null2String ( rs . getString ( i ) ) ) ;
}
}
}
2022-11-28 11:15:54 +08:00
/ * *
* 补全部门参数信息
* @param map
* /
2022-11-22 09:41:11 +08:00
private void buildEcDepartmentData ( Map < String , Object > map ) {
String ecDepartment = EcHrmRelationUtil . getEcDepartmentId ( Util . null2String ( params . get ( " id " ) ) ) ;
map . put ( " id " , ecDepartment ) ;
RecordSet rs = new RecordSet ( ) ;
// 先查拓展表
rs . execute ( " select * from hrmdepartmentdefined where deptid = ' " + ecDepartment + " ' " ) ;
int colcount = rs . getColCounts ( ) ;
if ( rs . next ( ) ) {
for ( int i = 1 ; i < = colcount ; i + + ) {
map . put ( rs . getColumnName ( i ) . toLowerCase ( ) , Util . null2String ( rs . getString ( i ) ) ) ;
}
}
// 再查主表
2022-11-23 09:34:06 +08:00
rs . execute ( " select id,departmentmark,departmentname,subcompanyid1,supdepid,allsupdepid,canceled,departmentcode,coadjutant,outkey,budgetatuomoveorder,ecology_pinyin_search,tlevel,created,creater,modified,modifier,uuid,showorder,showorderoftree,tenant_key from hrmdepartment where id = ' " + ecDepartment + " ' " ) ;
2022-11-22 09:41:11 +08:00
colcount = rs . getColCounts ( ) ;
if ( rs . next ( ) ) {
for ( int i = 1 ; i < = colcount ; i + + ) {
map . put ( rs . getColumnName ( i ) . toLowerCase ( ) , Util . null2String ( rs . getString ( i ) ) ) ;
}
}
}
2022-08-26 15:36:06 +08:00
}