parent
c8ae7519d3
commit
c7d9b53e13
|
|
@ -723,7 +723,8 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
List<Integer> jobList = new ArrayList<>();
|
||||
List<Integer> staffList = new ArrayList<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select on_job_num,staff_num from jcl_org_onjob where type = 2 and super_id = 0");
|
||||
rs.executeQuery("select on_job_num,staff_num from jcl_org_onjob a left join uf_shzg_zzjgkz b on a.data_id = b.bmbz\n" +
|
||||
" where a.type = 2 and a.super_id = 0 and b.sfxs = 0");
|
||||
while (rs.next()) {
|
||||
jobList.add(Util.getIntValue(rs.getString("on_job_num"),0));
|
||||
staffList.add(Util.getIntValue(rs.getString("staff_num"),0));
|
||||
|
|
@ -972,11 +973,12 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
" left join JCL_ORG_ONJOB d on a.id=d.data_id and d.type=1 ";
|
||||
deptQuerySql = "select a.id as departmentid, a.departmentmark, a.departmentname, a.subcompanyid1 as subcompanyid, " +
|
||||
"b.SUBCOMPANYNAME as subcompany,a.supdepid as supdepartmentid,c.departmentname as supdepartment," +
|
||||
"a.canceled,a.departmentcode,a.coadjutant,a.tlevel,d.bmlx as isvirtual,a.bmfzr as fleader,e.on_job_num,e.staff_num " +
|
||||
"a.canceled,a.departmentcode,a.coadjutant,a.tlevel,d.bmlx as isvirtual,d.bmfzr as fleader,e.on_job_num,e.staff_num,f.sfxs " +
|
||||
"from hrmdepartment a left join hrmsubcompany b on a.subcompanyid1 = b.id " +
|
||||
"left join hrmdepartment c on a.supdepid = c.id " +
|
||||
"left join hrmdepartmentdefined d on a.id=d.deptid " +
|
||||
"left join JCL_ORG_ONJOB e on a.id=e.data_id and e.type=2 ";
|
||||
"left join JCL_ORG_ONJOB e on a.id=e.data_id and e.type=2 " +
|
||||
"left join uf_shzg_zzjgkz f on a.id = f.bmbz ";
|
||||
|
||||
} else {
|
||||
subCompanyQuerySql = "select a.id as subcompanyid,\n" +
|
||||
|
|
@ -1005,7 +1007,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
" a.departmentcode,\n" +
|
||||
" a.coadjutant,\n" +
|
||||
" a.tlevel,\n" +
|
||||
" a.bmfzr as fleader,\n" +
|
||||
" a.bmfzr as fleader,\n" +
|
||||
" d.on_job_num,\n" +
|
||||
" d.staff_num" +
|
||||
" from hrmdepartment a\n" +
|
||||
|
|
@ -1068,11 +1070,12 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
insertList.add(StringUtils.isBlank(versionId) ? null : Util.getIntValue(versionId));
|
||||
insertList.add(Util.getIntValue(rs.getString("on_job_num"),0));
|
||||
insertList.add(Util.getIntValue(rs.getString("staff_num"),0));
|
||||
insertList.add(Util.getIntValue(rs.getString("sfxs"),1));
|
||||
insertParamList.add(insertList);
|
||||
}
|
||||
String insertDeptSql = "insert into jcl_chart_department(creater, departmentid, departmentmark, departmentname, subcompanyid,\n" +
|
||||
" subcompany, supdepartmentid, supdepartment, canceled, departmentcode,\n" +
|
||||
" coadjutant, fleader,versiondate, isvirtual,versionid,job_num,staff_num) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
" coadjutant, fleader,versiondate, isvirtual,versionid,job_num,staff_num,sfxs) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
insertData(recordSetTrans, insertDeptSql, insertParamList);
|
||||
|
||||
|
||||
|
|
@ -1367,7 +1370,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
" union select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual,showorder,c.on_job_num,c.staff_num from " + DEPARTMENT_TABLE + " a left join " + DEPARTMENT_DEFINED_TABLE + " b on a.id = b.deptid left join jcl_org_onjob c on a.id=c.data_id and c.type=2 where (a.canceled is null or a.canceled != '1') and (a.supdepid is null or a.supdepid = '0') and subcompanyid1 = '" + fObjId + "'";
|
||||
} else {
|
||||
sql = "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual,0,showorder,c.on_job_num,c.staff_num from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid left join jcl_org_onjob c on a.id=c.data_id and c.type=1 where (a.canceled is null or a.canceled != '1') and (b.fblx is null or b.fblx != '1') and a.supsubcomid = '" + fObjId + "'" +
|
||||
" union select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual,b.bmcj,showorder,c.on_job_num,c.staff_num from " + DEPARTMENT_TABLE + " a left join " + DEPARTMENT_DEFINED_TABLE + " b on a.id = b.deptid left join jcl_org_onjob c on a.id=c.data_id and c.type=2 where (a.canceled is null or a.canceled != '1') and (a.supdepid is null or a.supdepid = '0') and (b.bmlx is null or b.bmlx != '1') and subcompanyid1 = '" + fObjId + "'";
|
||||
" union select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual,b.bmcj,showorder,c.on_job_num,c.staff_num from " + DEPARTMENT_TABLE + " a left join " + DEPARTMENT_DEFINED_TABLE + " b on a.id = b.deptid left join jcl_org_onjob c on a.id=c.data_id and c.type=2 left join uf_shzg_zzjgkz d on a.id = d.bmbz where (a.canceled is null or a.canceled != '1') and (a.supdepid is null or a.supdepid = '0') and (b.bmlx is null or b.bmlx != '1') and (d.sfxs != 1 and d.sfxs is not null) and subcompanyid1 = '" + fObjId + "'";
|
||||
}
|
||||
} else {
|
||||
sql = "select a.id,a.subcompanyname as name,'1' as type,showorder,b.on_job_num,b.staff_num from " + SUB_COMPANY_TABLE + " a left join jcl_org_onjob b on a.id=b.data_id and b.type=1 where (canceled is null or canceled != '1') and supsubcomid = '" + fObjId + "'" +
|
||||
|
|
@ -1385,7 +1388,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
if (showVirtual) {
|
||||
sql = "select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual,c.on_job_num,c.staff_num from " + DEPARTMENT_TABLE + " a left join " + DEPARTMENT_DEFINED_TABLE + " b on a.id = b.deptid left join jcl_org_onjob c on a.id=c.data_id and c.type=2 where (a.canceled is null or a.canceled != '1') and supdepid = '" + fObjId + "'";
|
||||
} else {
|
||||
sql = "select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual,b.bmcj,c.on_job_num,c.staff_num from " + DEPARTMENT_TABLE + " a left join hrmdepartmentdefined b on a.id = b.deptid left join jcl_org_onjob c on a.id=c.data_id and c.type=2 where (canceled is null or canceled != '1') and (b.bmlx is null or b.bmlx != '1') and a.supdepid = '" + fObjId + "'";
|
||||
sql = "select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual,b.bmcj,c.on_job_num,c.staff_num from " + DEPARTMENT_TABLE + " a left join hrmdepartmentdefined b on a.id = b.deptid left join jcl_org_onjob c on a.id=c.data_id and c.type=2 left join uf_shzg_zzjgkz d on a.id = d.bmbz where (canceled is null or canceled != '1') and (b.bmlx is null or b.bmlx != '1') and (d.sfxs != 1 and d.sfxs is not null) and a.supdepid = '" + fObjId + "'";
|
||||
}
|
||||
} else {
|
||||
sql = "select a.id,a.departmentname as name,'2' as type,b.on_job_num,b.staff_num from " + DEPARTMENT_TABLE + " a left join jcl_org_onjob b on a.id=b.data_id and b.type=2 where (canceled is null or canceled != '1') and supdepid = '" + fObjId + "'";
|
||||
|
|
@ -1409,8 +1412,9 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
* 查询历史数据,子元素SQL
|
||||
*
|
||||
* @param sql 查询SQL
|
||||
* @param fType 上级元素类型
|
||||
* @param fType 上级元素类型deptLevel
|
||||
* @param fObjId 上级元素ID
|
||||
* todo 部门层级自定义字段未存储(显示未按颜色区分)
|
||||
* @return 查询SQL
|
||||
*/
|
||||
private String getLastTimeChildSql(String sql, String fType, String fObjId, String versionId) {
|
||||
|
|
@ -1437,7 +1441,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
" union select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supdepartmentid is null or a.supdepartmentid = '0') and subcompanyid = '" + fObjId + "' and versionid = " + versionId;
|
||||
} else {
|
||||
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + SUB_COMPANY_TABLE + " a where (a.canceled is null or a.canceled != '1') and (isvirtual is null or isvirtual != '1') and a.supsubcompanyid = '" + fObjId + "' and versionid = " + versionId +
|
||||
" union select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supdepartmentid is null or a.supdepartmentid = '0') and (isvirtual is null or isvirtual != '1') and subcompanyid = '" + fObjId + "' and versionid = " + versionId;
|
||||
" union select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supdepartmentid is null or a.supdepartmentid = '0') and (isvirtual is null or isvirtual != '1') and (a.sfxs = 0 or a.sfxs is null) and subcompanyid = '" + fObjId + "' and versionid = " + versionId;
|
||||
}
|
||||
} else {
|
||||
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type,a.job_num,a.staff_num from " + SUB_COMPANY_TABLE + " a where (canceled is null or canceled != '1') and supsubcompanyid = '" + fObjId + "' and versionid = " + versionId +
|
||||
|
|
@ -1449,7 +1453,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
if (showVirtual) {
|
||||
sql = "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (a.canceled is null or a.canceled != '1') and supdepartmentid = '" + fObjId + "' and versionid = " + versionId;
|
||||
} else {
|
||||
sql = "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and (isvirtual is null or isvirtual != '1') and a.supdepartmentid = '" + fObjId + "' and versionid = " + versionId;
|
||||
sql = "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and (isvirtual is null or isvirtual != '1') and (a.sfxs = 0 or a.sfxs is null) and a.supdepartmentid = '" + fObjId + "' and versionid = " + versionId;
|
||||
}
|
||||
} else {
|
||||
sql = "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and supdepid = '" + fObjId + "' and versionid = " + versionId;
|
||||
|
|
|
|||
|
|
@ -368,14 +368,23 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
|
|||
if (StringUtils.isBlank(ids)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
List<String> leaderList = new ArrayList<>();
|
||||
String[] split = ids.split(",");
|
||||
for (String s : split) {
|
||||
String lastName = MapperProxyFactory.getProxy(SystemDataMapper.class).getScHrmResourceNameById(s);
|
||||
if (StringUtils.isNotBlank(lastName)) {
|
||||
leaderList.add(lastName);
|
||||
//String lastName = MapperProxyFactory.getProxy(SystemDataMapper.class).getScHrmResourceNameById(s);
|
||||
try {
|
||||
ResourceComInfo resourceComInfo = new ResourceComInfo();
|
||||
String lastName = resourceComInfo.getLastname(s);
|
||||
if (StringUtils.isNotBlank(lastName)) {
|
||||
leaderList.add(lastName);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return StringUtils.join(leaderList, ",");
|
||||
}
|
||||
|
||||
|
|
@ -432,7 +441,7 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
|
|||
departmentChartPO.setExpand("1");
|
||||
departmentChartPO.setId("d_"+departmentId);
|
||||
departmentChartPO.setFname(rs.getString("departmentname"));
|
||||
departmentChartPO.setFleader(fLeader);
|
||||
departmentChartPO.setFleader(getDepartmentLeader(fLeader));
|
||||
try {
|
||||
departmentChartPO.setFleaderimg(new ResourceComInfo().getMessagerUrls(fLeader));
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue