组织架构图,岗位数据重复问题处理
This commit is contained in:
parent
240bb21df2
commit
2949a33d71
|
|
@ -279,9 +279,13 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
if (showJob) {
|
||||
// 查询部门下的岗位
|
||||
if (isRealTime) {
|
||||
sql = "select a.id,a.jobtitlename as name from hrmjobtitles a inner join jcl_org_job b on a.id = b.ec_jobtitle and (b.delete_type is null or b.delete_type = 0) where b.ec_department = '" + departmentId + "'";
|
||||
String subcompanyid1 = new DepartmentComInfo().getSubcompanyid1(departmentId);
|
||||
sql = "select a.id,a.jobtitlename as name from hrmjobtitles a inner join jcl_org_job b on a.id = b.ec_jobtitle and (b.delete_type is null or b.delete_type = 0) where b.ec_department = '" + departmentId + "' and b.ec_company='" + subcompanyid1 + "'";
|
||||
} else {
|
||||
sql = "select jobid as id ,jobname as name from jcl_chart_job where departmentid = '" + departmentId + "' and versionid = " + versionId;
|
||||
rs.executeQuery("select subcompanyid from jcl_chart_department where departmentid = '" + departmentId + "' and versionid = " + versionId);
|
||||
rs.next();
|
||||
String subcompanyid = rs.getString("subcompanyid");
|
||||
sql = "select jobid as id ,jobname as name from jcl_chart_job where departmentid = '" + departmentId + "' and subcompanyid = '" + subcompanyid + "' and versionid = " + versionId;
|
||||
}
|
||||
rs.executeQuery(sql);
|
||||
while (rs.next()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue