上海大数据中心

dev
ic_excellent 2023-07-19 14:01:33 +08:00
parent 7e117e0c76
commit 6cdae28cc4
2 changed files with 16 additions and 12 deletions

View File

@ -37,12 +37,15 @@ public interface ReportMapper {
@CaseConversion(value = false) @CaseConversion(value = false)
List<Map<String, Object>> queryReportData2(@ParamMapper("param") Map<String,Object> param,@ParamMapper("uid") int uid); List<Map<String, Object>> queryReportData2(@ParamMapper("param") Map<String,Object> param,@ParamMapper("uid") int uid);
@Select("select id,hbwb,ysclwb,gzrywb,gzclwb,ldrwb,sfsjyc,ddsjyc,dlsk,yslx,hbcc,sfsj,ddsj,sfd,ddd,wdwcl,dwcljsy,wdwclqt,xcap,lxr," + @Select("select main.* " +
" lxrdh,bz,gzcl,gzry,zs,dyjbr,djr,ldr,lddw,rwzt,ykdh,gbs, " + " (select lastname from hrmresource where id = dyjbr) dyjbr_span," +
" (select lastname from hrmresource where id = djr) djr_span," +
" (select LISTAGG(concat(wb, ',', dw), '-') WITHIN GROUP (ORDER BY wb) from uf_zwfwdjjmb_dt1 where mainid = main.id) ysdx," + " (select LISTAGG(concat(wb, ',', dw), '-') WITHIN GROUP (ORDER BY wb) from uf_zwfwdjjmb_dt1 where mainid = main.id) ysdx," +
" dyjbr, (select lastname from hrmresource where id = dyjbr) dyjbr_span," + " (select LISTAGG(concat(dwclwb,'(', dwcljsywb,')'), ',') WITHIN GROUP (ORDER BY wb) from uf_zwfwdjjmb_dt3 where mainid = main.id) car_people," +
" djr, (select lastname from hrmresource where id = djr) djr_span " + " (select LISTAGG(concat(gzclwb,'(', gzcljsywb,')'), ',') WITHIN GROUP (ORDER BY wb) from uf_zwfwdjjmb_dt4 where mainid = main.id) work_people," +
" from uf_zwfwdjjmb main $t{param.whereSql} order by dlsk1 ") " (select LISTAGG(concat(fjhwb,'(', ysdxwb,')'), ',') WITHIN GROUP (ORDER BY wb) from uf_zwfwdjjmb_dt2 where mainid = main.id) put_up" +
"from uf_zwfwdjjmb main $t{param.whereSql} " +
"order by dlsk1 ")
@CaseConversion(value = false) @CaseConversion(value = false)
List<Map<String, Object>> queryReportData3(@ParamMapper("param") Map<String,Object> param,@ParamMapper("uid") int uid); List<Map<String, Object>> queryReportData3(@ParamMapper("param") Map<String,Object> param,@ParamMapper("uid") int uid);
@ -60,7 +63,7 @@ public interface ReportMapper {
* @param param * @param param
* @return * @return
*/ */
@Select("select hrm.lastname today_welcome,ry.zbry,hrm1.lastname organ_watch,ry.zbry1,hrm2.lastname head_watch,ry.zbry2 " + @Select("select hrm.lastname head_watch,ry.zbry,hrm1.lastname organ_watch,ry.zbry1,hrm2.lastname today_welcome,ry.zbry2 " +
" from uf_ryzbjlbzjb_dt1 ry " + " from uf_ryzbjlbzjb_dt1 ry " +
" inner join hrmresource hrm on ry.zbry = hrm.id " + " inner join hrmresource hrm on ry.zbry = hrm.id " +
" inner join hrmresource hrm1 on ry.zbry1 = hrm1.id " + " inner join hrmresource hrm1 on ry.zbry1 = hrm1.id " +

View File

@ -41,12 +41,12 @@ public class ReportService {
//开始日期 //开始日期
String beginDate = Util.null2String(param.get("beginDate")); String beginDate = Util.null2String(param.get("beginDate"));
//结束日期 //结束日期
String endData = Util.null2String(param.get("endData")); String endDate = Util.null2String(param.get("endDate"));
//航班车次 //航班车次
String flightAndTrain = Util.null2String(param.get("flightAndTrain")); String flightAndTrain = Util.null2String(param.get("flightAndTrain"));
String whereSql = ""; String whereSql = "";
if(!"".equals(beginDate) && !"".equals(endData)){ if(!"".equals(beginDate) && !"".equals(endDate)){
whereSql += " and (dlsk1 between #{param.beginDate} and #{param.endData} )"; whereSql += " and (dlsk1 between #{param.beginDate} and #{param.endDate} )";
}else { }else {
param.put("today", TimeUtil.getCurrentDateString()); param.put("today", TimeUtil.getCurrentDateString());
whereSql += " and dlsk1 >= #{param.today} "; whereSql += " and dlsk1 >= #{param.today} ";
@ -55,10 +55,11 @@ public class ReportService {
whereSql += " and dyjbr = #{param.registrationPeople} "; whereSql += " and dyjbr = #{param.registrationPeople} ";
} }
if(!"".equals(flightAndTrain)){ if(!"".equals(flightAndTrain)){
whereSql += " and hbwb = #{param.flightAndTrain} "; whereSql += " and hbcc = #{param.flightAndTrain} ";
} }
if(!"".equals(project)){ if(!"".equals(project)){
whereSql += " and exits (select 1 from uf_zwfwdjjmb_dt1 where mainid = main.id and ysdx = #{param.project}) "; //whereSql += " and exits (select 1 from uf_zwfwdjjmb_dt1 where mainid = main.id and ysdx = #{param.project}) ";
whereSql += " and exits (select 1 from uf_zwfwdjjmb_dt1 where mainid = main.id and wb like '%$t{param.project}%') ";
} }
whereSql = whereSql.replaceFirst(" and "," where "); whereSql = whereSql.replaceFirst(" and "," where ");
return whereSql; return whereSql;