diff --git a/src/main/java/com/api/bokang/xiao/sh_bigdata/mapper/ReportMapper.java b/src/main/java/com/api/bokang/xiao/sh_bigdata/mapper/ReportMapper.java index 6ff3959..e1fd1d5 100644 --- a/src/main/java/com/api/bokang/xiao/sh_bigdata/mapper/ReportMapper.java +++ b/src/main/java/com/api/bokang/xiao/sh_bigdata/mapper/ReportMapper.java @@ -37,12 +37,15 @@ public interface ReportMapper { @CaseConversion(value = false) List> queryReportData2(@ParamMapper("param") Map 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," + - " lxrdh,bz,gzcl,gzry,zs,dyjbr,djr,ldr,lddw,rwzt,ykdh,gbs, " + - " (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," + - " djr, (select lastname from hrmresource where id = djr) djr_span " + - " from uf_zwfwdjjmb main $t{param.whereSql} order by dlsk1 ") + @Select("select main.* " + + " (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(dwclwb,'(', dwcljsywb,')'), ',') WITHIN GROUP (ORDER BY wb) from uf_zwfwdjjmb_dt3 where mainid = main.id) car_people," + + " (select LISTAGG(concat(gzclwb,'(', gzcljsywb,')'), ',') WITHIN GROUP (ORDER BY wb) from uf_zwfwdjjmb_dt4 where mainid = main.id) work_people," + + " (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) List> queryReportData3(@ParamMapper("param") Map param,@ParamMapper("uid") int uid); @@ -60,7 +63,7 @@ public interface ReportMapper { * @param param 查询参数 * @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 " + " inner join hrmresource hrm on ry.zbry = hrm.id " + " inner join hrmresource hrm1 on ry.zbry1 = hrm1.id " + diff --git a/src/main/java/com/api/bokang/xiao/sh_bigdata/service/ReportService.java b/src/main/java/com/api/bokang/xiao/sh_bigdata/service/ReportService.java index e83907c..ceffa97 100644 --- a/src/main/java/com/api/bokang/xiao/sh_bigdata/service/ReportService.java +++ b/src/main/java/com/api/bokang/xiao/sh_bigdata/service/ReportService.java @@ -41,12 +41,12 @@ public class ReportService { //开始日期 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 whereSql = ""; - if(!"".equals(beginDate) && !"".equals(endData)){ - whereSql += " and (dlsk1 between #{param.beginDate} and #{param.endData} )"; + if(!"".equals(beginDate) && !"".equals(endDate)){ + whereSql += " and (dlsk1 between #{param.beginDate} and #{param.endDate} )"; }else { param.put("today", TimeUtil.getCurrentDateString()); whereSql += " and dlsk1 >= #{param.today} "; @@ -55,10 +55,11 @@ public class ReportService { whereSql += " and dyjbr = #{param.registrationPeople} "; } if(!"".equals(flightAndTrain)){ - whereSql += " and hbwb = #{param.flightAndTrain} "; + whereSql += " and hbcc = #{param.flightAndTrain} "; } 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 "); return whereSql;