Merge pull request '组织架构图排序' (#200) from feature/dxf into develop
Reviewed-on: http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization/pulls/200
This commit is contained in:
commit
e6600a813c
|
|
@ -6,7 +6,6 @@ import com.engine.organization.entity.chart.ChartPO;
|
||||||
import com.engine.organization.entity.chart.CompanyTreePO;
|
import com.engine.organization.entity.chart.CompanyTreePO;
|
||||||
import com.engine.organization.entity.chart.TreeSelect;
|
import com.engine.organization.entity.chart.TreeSelect;
|
||||||
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
|
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
|
||||||
import com.engine.organization.mapper.jclorgmap.JclOrgMapper;
|
|
||||||
import com.engine.organization.service.ChartService;
|
import com.engine.organization.service.ChartService;
|
||||||
import com.engine.organization.service.OrgChartService;
|
import com.engine.organization.service.OrgChartService;
|
||||||
import com.engine.organization.util.HasRightUtil;
|
import com.engine.organization.util.HasRightUtil;
|
||||||
|
|
@ -54,10 +53,6 @@ public class ChartServiceImpl extends Service implements ChartService {
|
||||||
*/
|
*/
|
||||||
boolean hasVirtualFields;
|
boolean hasVirtualFields;
|
||||||
|
|
||||||
private JclOrgMapper getJclOrgMapMapper() {
|
|
||||||
return MapperProxyFactory.getProxy(JclOrgMapper.class,true);
|
|
||||||
}
|
|
||||||
|
|
||||||
private OrgChartService getOrgChartService(User user) {
|
private OrgChartService getOrgChartService(User user) {
|
||||||
return ServiceUtil.getService(OrgChartServiceImpl.class, user);
|
return ServiceUtil.getService(OrgChartServiceImpl.class, user);
|
||||||
|
|
||||||
|
|
@ -1016,13 +1011,13 @@ public class ChartServiceImpl extends Service implements ChartService {
|
||||||
} else {
|
} else {
|
||||||
if (hasVirtualFields) {
|
if (hasVirtualFields) {
|
||||||
if (showVirtual) {
|
if (showVirtual) {
|
||||||
return "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid where a.id = '" + root + "'";
|
return "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid where a.id = '" + root + "' order by showorder,id";
|
||||||
} else {
|
} else {
|
||||||
return "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid where a.id = '" + root + "' and (b.fblx is null or b.fblx!='1')";
|
return "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid where a.id = '" + root + "' and (b.fblx is null or b.fblx!='1') order by showorder,id";
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return "select id,subcompanyname as name,'1' as type from " + SUB_COMPANY_TABLE + " where id = '" + root + "'";
|
return "select id,subcompanyname as name,'1' as type from " + SUB_COMPANY_TABLE + " where id = '" + root + "' order by showorder,id";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1052,15 +1047,15 @@ public class ChartServiceImpl extends Service implements ChartService {
|
||||||
case "1":
|
case "1":
|
||||||
if (hasVirtualFields) {
|
if (hasVirtualFields) {
|
||||||
if (showVirtual) {
|
if (showVirtual) {
|
||||||
sql = "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid where (a.canceled is null or a.canceled != '1') and a.supsubcomid = '" + fObjId + "'" +
|
sql = "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual,showorder from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid where (a.canceled is null or a.canceled != '1') and a.supsubcomid = '" + fObjId + "'" +
|
||||||
" union select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual from " + DEPARTMENT_TABLE + " a left join " + DEPARTMENT_DEFINED_TABLE + " b on a.id = b.deptid where (a.canceled is null or a.canceled != '1') and (a.supdepid is null or a.supdepid = '0') and subcompanyid1 = '" + fObjId + "'";
|
" union select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual,showorder from " + DEPARTMENT_TABLE + " a left join " + DEPARTMENT_DEFINED_TABLE + " b on a.id = b.deptid where (a.canceled is null or a.canceled != '1') and (a.supdepid is null or a.supdepid = '0') and subcompanyid1 = '" + fObjId + "'";
|
||||||
} else {
|
} else {
|
||||||
sql = "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid where (a.canceled is null or a.canceled != '1') and (b.fblx is null or b.fblx != '1') and a.supsubcomid = '" + fObjId + "'" +
|
sql = "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual,showorder from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid 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 from " + DEPARTMENT_TABLE + " a left join " + DEPARTMENT_DEFINED_TABLE + " b on a.id = b.deptid 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,showorder from " + DEPARTMENT_TABLE + " a left join " + DEPARTMENT_DEFINED_TABLE + " b on a.id = b.deptid 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 + "'";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sql = "select a.id,a.subcompanyname as name,'1' as type from " + SUB_COMPANY_TABLE + " a where (canceled is null or canceled != '1') and supsubcomid = '" + fObjId + "'" +
|
sql = "select a.id,a.subcompanyname as name,'1' as type,showorder from " + SUB_COMPANY_TABLE + " a where (canceled is null or canceled != '1') and supsubcomid = '" + fObjId + "'" +
|
||||||
" union select a.id,a.departmentname as name,'2' as type from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and (supdepid is null or supdepid = '0') and subcompanyid1 = '" + fObjId + "'";
|
" union select a.id,a.departmentname as name,'2' as type,showorder from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and (supdepid is null or supdepid = '0') and subcompanyid1 = '" + fObjId + "'";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
|
|
@ -1077,6 +1072,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
sql += " order by showorder,id";
|
||||||
}
|
}
|
||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue