@ -379,7 +379,8 @@ public List<Map<String,String>> getSexRpResult(HttpServletRequest request, HttpS
/*
*
*工龄报表查询
*
*#QC3421143#工龄报表数据替换为司龄数据20241211
*
*/
@SuppressWarnings("deprecation")
@ -506,9 +507,9 @@ public List<Map<String,String>> getSeniorityRpResult(HttpServletRequest request,
/*先算出工龄记录为空的人数*/
if(sqlwhere.equals("")){
sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and (workstartdate is null or workstartdate ='')";
sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and (companystartdate is null or companystartdate ='')";
}else{
sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and (workstartdate is null or workstartdate ='')"+sqlwhere;
sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and (companystartdate is null or companystartdate ='')"+sqlwhere;
}
rs.executeSql(sqlstr);
@ -530,9 +531,9 @@ public List<Map<String,String>> getSeniorityRpResult(HttpServletRequest request,
sqlstr="select min(workstartdate) from HrmResource where (accounttype is null or accounttype=0) and workstartdate is not null ";
sqlstr="select min(companystartdate) from HrmResource where (accounttype is null or accounttype=0) and companystartdate is not null ";
}else{
sqlstr="select min(workstartdate) from HrmResource where (accounttype is null or accounttype=0) and workstartdate is not null and workstartdate !=''";
sqlstr="select min(companystartdate) from HrmResource where (accounttype is null or accounttype=0) and companystartdate is not null and companystartdate !=''";
}
rs.executeSql(sqlstr);
rs.next();
@ -558,15 +559,15 @@ public List<Map<String,String>> getSeniorityRpResult(HttpServletRequest request,
if(rs.getDBType().equals("oracle")){
if(sqlwhere.equals("")){
sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and workstartdate >'"+workfrom+"' and workstartdate <='"+workto+"' and workstartdate is not null ";
sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and companystartdate >'"+workfrom+"' and companystartdate <='"+workto+"' and companystartdate is not null ";
}else{
sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and workstartdate >'"+workfrom+"' and workstartdate <='"+workto+"' and workstartdate is not null "+sqlwhere;
sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and companystartdate >'"+workfrom+"' and companystartdate <='"+workto+"' and companystartdate is not null "+sqlwhere;
}
}else{
if(sqlwhere.equals("")){
sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and workstartdate >'"+workfrom+"' and workstartdate <='"+workto+"' and workstartdate<>'' and workstartdate is not null ";
sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and companystartdate >'"+workfrom+"' and companystartdate <='"+workto+"' and companystartdate<>'' and companystartdate is not null ";
}else{
sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and workstartdate >'"+workfrom+"' and workstartdate <='"+workto+"' and workstartdate<>'' and workstartdate is not null "+sqlwhere;
sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and companystartdate >'"+workfrom+"' and companystartdate <='"+workto+"' and companystartdate<>'' and companystartdate is not null "+sqlwhere;