Map cityMap = DictionaryInfoCache.getDictionaryCache("CITY");
转换部门编码。
String sql = "select sum(t.FEIYONG) as FEIYONG1,t.CITY from pxfy_view t where 1=1 ";
if (CITY.length() > 0)
sql += " and CITY='" + CITY + "'";
if (DEPT_ID.length() > 0)
sql += " and DEPT_ID=" + DEPT_ID;
sql+=" group by t.CITY "; 分组CITY。本来是在数据库做一个view的。
sql = "select * from ("+sql+")"; 圈套查询