示例#1
0
  public Object produceDataset(Map arg0) throws DatasetProduceException {
    DefaultCategoryDataset dataset = new DefaultCategoryDataset();

    HashMap map = new HashMap();
    String sql1 =
        " select ww.he/10000 as he, ww.gl_opun_cod, c.code_value as   cityName "
            + " from ( "
            + "select  qq.he, qq.gl_opun_cod from ( "
            + "select sum(e.gl_dr_bal) he, substr(e.gl_opun_cod,0,3) gl_opun_cod  from "
            + "CRT_TOTAL_ACCOUNT e "
            + "where  e.gl_lg_no='79600000'  and DATA_DATE =(select max(DATA_DATE) from CRT_TOTAL_ACCOUNT) "
            + "group by substr(e.gl_opun_cod,0,3)"
            + "order by  sum(GL_DR_BAL) desc "
            + ") qq  where rownum <=10 )"
            + " ww,  ZCYM_CODE c where "
            + "ww.gl_opun_cod = substr(c.code_key,0,3) and c.code_name='省份' ";

    map.put("sql1", sql1);
    List list = chartUCC.queryDataList(map);
    double num = 0;
    HashMap map2 = null;
    if (list != null) {
      for (int i = 0; i < list.size(); i++) {
        map2 = (HashMap) list.get(i);
        BigDecimal big = (BigDecimal) map2.get("he");
        String cityName = (String) map2.get("cityName");
        if (big != null) {
          num = big.doubleValue();
        }
        dataset.addValue(num, "委托贷款余额", cityName);
      }
    }

    return dataset;
  }
示例#2
0
 /**
  * 委托贷款统计饼图
  *
  * @return
  */
 public String wtdkCount() {
   HashMap map = new HashMap();
   Wtdk wtdk = null;
   try {
     Map<?, ?> data = chartUCC.queryWdData();
     wtdk = new Wtdk();
     wtdk.setData(data);
     wtdk.setArg(map);
   } catch (Exception e) {
     e.printStackTrace();
   }
   request.setAttribute("wtdk", wtdk);
   return "wtdk";
 }
示例#3
0
 /**
  * 担险委托贷款
  *
  * @return
  */
 public String queryDxwddkData() {
   try {
     String address = request.getParameter("address");
     // 根据省code查询省名称
     String cityName = this.getCityName(address);
     HashMap map = new HashMap();
     map.put("address", address);
     HashMap resultMap = chartUCC.queryDxwddkData(map);
     Double dxwtye = (Double) resultMap.get("dxwtye");
     NumberFormat format = NumberFormat.getInstance();
     format.setMaximumFractionDigits(4);
     String dxwtye2 = format.format(dxwtye);
     response.setCharacterEncoding("UTF-8");
     response.getWriter().print(cityName + "|*|" + dxwtye2);
   } catch (Exception e) {
     e.printStackTrace();
   }
   return null;
 }
示例#4
0
 /**
  * 根据省级编码查询省名称
  *
  * @param addressCode
  * @return
  */
 public String getCityName(String addressCode) {
   String cityName = chartUCC.queryCityName(addressCode);
   return cityName;
 }