@ -80,9 +81,40 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
item.setFname(rs.getString("fname"));
companySet.add(item);
}
List<CompanyTreePO>companyTree=newArrayList<>();
sql="select id as 'id', id as 'value', subcompanyname as 'title', supsubcomid as 'pId' from hrmsubcompany where (canceled is null or canceled != '1') and "+DBType.get(newRecordSet().getDBType()).ifNull("supsubcomid","0")+" = '0'";
Stringsql="select id as 'id', id as 'value', subcompanyname as 'title', supsubcomid as 'pId' from hrmsubcompany where (canceled is null or canceled != '1') and "+DBType.get(newRecordSet().getDBType()).ifNull("supsubcomid","0")+" = '"+subcompany+"'";
sql="select id as 'id', id as 'value', subcompanyname as 'title', supsubcomid as 'pId' from hrmsubcompanyvirtual where (canceled is null or canceled != '1') and "+DBType.get(newRecordSet().getDBType()).ifNull("supsubcomid","0")+" = '"+subcompany+"' and companyid = '"+fclass+"'";
@ -100,7 +132,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
StringwhereSql=" where 1 = 1 ";
if(DBType.isOracle()){
whereSql+=" and ((fdatebegin <= to_date('"+date+"','yyyy-MM-DD') and fdateend >= to_date('"+date+"','yyyy-MM-DD')) or (fdatebegin <= to_date('"+date+"','yyyy-MM-DD') and fdateend is null )) ";
}else{
}else{
whereSql+=" and ((fdatebegin <= '"+date+"' and fdateend >= '"+date+"') or (fdatebegin <= '"+date+"' and fdateend is null )) ";
}
whereSql+=" and fclass = "+fclass+" ";
@ -227,7 +259,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
StringwhereSql=" where 1 = 1 ";
if(DBType.isOracle()){
whereSql+=" and ((t.fdatebegin <= to_date('"+date+"','yyyy-MM-DD') and t.fdateend >= to_date('"+date+"','yyyy-MM-DD')) or (t.fdatebegin <= to_date('"+date+"','yyyy-MM-DD') and t.fdateend is null )) ";
}else{
}else{
whereSql+=" and ((t.fdatebegin <= '"+date+"' and t.fdateend >= '"+date+"') or (t.fdatebegin <= '"+date+"' and t.fdateend is null )) ";