Commit 5dc2ad2057362b43ba106e3dbfc961f456a79109

Authored by 娄高锋
1 parent d62a4b7c

补全 group by 缺漏的字段

src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -893,7 +893,8 @@ public class FormsServiceImpl implements FormsService { @@ -893,7 +893,8 @@ public class FormsServiceImpl implements FormsService {
893 if(fgsdm.length() != 0){ 893 if(fgsdm.length() != 0){
894 sql += " and r.fgs_bm ='"+fgsdm+"'"; 894 sql += " and r.fgs_bm ='"+fgsdm+"'";
895 } 895 }
896 - sql += " group by r.j_gh,r.xl_bm,r.cl_zbh,r.j_name order by r.xl_bm,r.cl_zbh"; 896 + sql += " group by r.fgs_bm,r.j_gh,r.xl_bm,r.cl_zbh,r.j_name " +
  897 + "order by r.xl_bm,r.cl_zbh";
897 898
898 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { 899 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
899 @Override 900 @Override
@@ -924,7 +925,7 @@ public class FormsServiceImpl implements FormsService { @@ -924,7 +925,7 @@ public class FormsServiceImpl implements FormsService {
924 + " WHERE rq = '"+startDate+"'" 925 + " WHERE rq = '"+startDate+"'"
925 + linesql 926 + linesql
926 + " union" 927 + " union"
927 - + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh,fgsdm FROM bsth_c_dlb" 928 + + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh,fgsdm FROM bsth_c_dlb"
928 + " WHERE rq = '"+startDate+"'" 929 + " WHERE rq = '"+startDate+"'"
929 + linesql; 930 + linesql;
930 List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() { 931 List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() {
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -400,7 +400,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -400,7 +400,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
400 sql += " and cl.line_code = '"+line+"'"; 400 sql += " and cl.line_code = '"+line+"'";
401 if(ttId.length() != 0) 401 if(ttId.length() != 0)
402 sql += " and td.ttinfo = '"+ttId+"'"; 402 sql += " and td.ttinfo = '"+ttId+"'";
403 - sql += " group by td.lp"; 403 + sql += " group by td.lp, lp.lp_name";
404 404
405 list = jdbcTemplate.query(sql, 405 list = jdbcTemplate.query(sql,
406 new RowMapper<Map<String, Object>>(){ 406 new RowMapper<Map<String, Object>>(){