Commit 7aaac12691885019da9c484048f6299bfe52b0d0

Authored by liquanyu
1 parent 9323d89606

update

Showing 1 changed file with 4 additions and 6 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AreaCountFacade.java View file @ 7aaac12
... ... @@ -335,8 +335,7 @@
335 335 " A.HOSPITAL_NO,\n" +
336 336 " A.HOSPITAL_NAME,\n" +
337 337 " A.YCY_STSTEM_ID\n" +
338   - " ) BB ON AAA.HOSPITAL_NO=BB.HOSPITAL_NO\n" +
339   - " GROUP BY ROLLUP("+groupBySql1+")" ;
  338 + " ) BB ON AAA.HOSPITAL_NO=BB.HOSPITAL_NO\n" ;
340 339 if (StringUtils.isNotEmpty(hospitalId))
341 340 {
342 341 countSql+=" WHERE AAA.YCY_STSTEM_ID= '" +hospitalId+"'";
... ... @@ -350,7 +349,7 @@
350 349 }
351 350  
352 351 }
353   - countSql+=" ORDER BY 1,2,3";
  352 + countSql+=" GROUP BY ROLLUP("+groupBySql1+") ORDER BY 1,2,3";
354 353  
355 354 System.out.println("basesql===="+sql1);
356 355 System.out.println("countSql====" + countSql);
... ... @@ -1172,8 +1171,7 @@
1172 1171 " A.HOSPITAL_NO,\n" +
1173 1172 " A.HOSPITAL_NAME,\n" +
1174 1173 " A.YCY_STSTEM_ID\n" +
1175   - " ) BB ON AAA.HOSPITAL_NO=BB.HOSPITAL_NO\n" +
1176   - " GROUP BY ROLLUP("+groupBySql1+" ) " ;
  1174 + " ) BB ON AAA.HOSPITAL_NO=BB.HOSPITAL_NO\n" ;
1177 1175 if (StringUtils.isNotEmpty(hospitalId))
1178 1176 {
1179 1177 countSql+=" WHERE AAA.YCY_STSTEM_ID= '" +hospitalId+"'";
... ... @@ -1187,7 +1185,7 @@
1187 1185 }
1188 1186  
1189 1187 }
1190   - countSql+=" ORDER BY 1,2,3";
  1188 + countSql+=" GROUP BY ROLLUP("+groupBySql1+" ) ORDER BY 1,2,3";
1191 1189  
1192 1190  
1193 1191