Example #1
0
 /**
  * <br>
  * Description:红线项目列表过滤 <br>
  * Author:黎春行 <br>
  * Date:2013-12-25
  *
  * @throws Exception
  */
 public void getReport() throws Exception {
   String keyword = request.getParameter("keyword");
   StringBuffer query = new StringBuffer();
   ITableStyle its = new TableStyleEditRow();
   if (keyword != null) {
     query.append(" where ");
     keyword = UtilFactory.getStrUtil().unescape(keyword);
     StringBuffer querybuffer = new StringBuffer();
     String[][] nameStrings = HxxmReport.shows;
     for (int i = 1; i < nameStrings.length - 1; i++) {
       querybuffer.append("upper(t.").append(nameStrings[i][0]).append(")||");
     }
     querybuffer
         .append("upper(t.")
         .append(nameStrings[nameStrings.length - 1][0])
         .append(")) like '%")
         .append(keyword)
         .append("%'");
     query.append("(");
     query.append(querybuffer);
   }
   Map<String, Object> conditionMap = new HashMap<String, Object>();
   conditionMap.put("query", query.toString());
   response(
       String.valueOf(new CBDReportManager().getReport("HXXM", new Object[] {conditionMap}, its)));
 }
Example #2
0
  /**
   * <br>
   * Description:供地体量查询 <br>
   * Author:陈强峰 <br>
   * Date:2013-10-11
   */
  public void query() {
    String xmmc = UtilFactory.getStrUtil().unescape(request.getParameter("xmmc"));
    String nd = request.getParameter("nd");
    String jd = request.getParameter("jd");
    String sql =
        "select xmmc,nd||'-'||yf as sx,dl,gm,cb,sy,zj,zuj as zujin,rownum-1 as mod,rownum-1 as del,yw_guid  as gdbh,dlz,gmz,cbz,syz,zjz,yf from hx_gdtl  where xmmc=? and nd=? and jd=?";

    List<Map<String, Object>> list = query(sql, YW, new Object[] {xmmc, nd, jd});
    response(list);
  }
Example #3
0
 /**
  * <br>
  * Description:添加一个新的红线项目 <br>
  * Author:黎春行 <br>
  * Date:2013-12-24
  *
  * @throws Exception
  */
 public void insert() throws Exception {
   String xmmc = new String(request.getParameter("xmmc").getBytes("iso-8859-1"), "UTF-8");
   if (xmmc != null) {
     xmmc = UtilFactory.getStrUtil().unescape(xmmc);
     if (new HxxmData().insertHxxm(xmmc)) {
       response("{success:true}");
     } else {
       response("{success:false}");
     }
   } else {
     response("{success:false}");
   }
 }
Example #4
0
 /**
  * <br>
  * Description:删除供地体量 <br>
  * Author:陈强峰 <br>
  * Date:2013-10-11
  */
 public void delete() {
   String xmmc = UtilFactory.getStrUtil().unescape(request.getParameter("gdxmmc"));
   String year = request.getParameter("gdnd");
   String season = request.getParameter("gdjd");
   String xmbh = getXmbh(xmmc);
   String sql = "select nd,jd,xmguid from hx_gdtl where nd=? and jd=? and xmguid=?";
   int flag = update(sql, YW, new Object[] {year, season, xmbh});
   if (flag == 0) {
     response("{success:false}");
   } else {
     removeFromSx(year, season, xmbh);
     updateTj(year, season);
     response("{success:true}");
   }
   response("{success:false}");
 }
Example #5
0
  public void draw() throws Exception {
    // String guid = new String(request.getParameter("guid").getBytes("ISO-8859-1"),"UTF-8");
    String guid = request.getParameter("guid");
    String polygon = request.getParameter("polygon");
    String type = request.getParameter("type");
    if (guid != null) {
      guid = UtilFactory.getStrUtil().unescape(guid);
    } else {
      response("{error:not primary}");
    }
    boolean draw = false;
    if ("3d".equals(type)) {
      draw = new HxxmData().recordGIS(guid, polygon, type);
    } else {
      draw = new HxxmData().recordGIS(guid, polygon);
    }

    response(String.valueOf(draw));
  }