Esempio n. 1
0
 /** 修改保存操作 */
 public String doSaveEdit() {
   try {
     if (b00401Service.isExist(b00401PO.getMA001())) {
       b00401Service.updateB00401(b00401PO);
       setUpdateSuccessMsg();
     } else {
       setEmptyDataMsg();
     }
   } catch (Exception e) {
     e.printStackTrace();
     setUpdateFailedMsg();
   }
   return JSON_MSG;
 }
Esempio n. 2
0
  /** 分页方法重写 (没有PO类) */
  public String queryData1() throws Exception {
    // 分页信息
    pagerData = initPagerData();
    // 参数Map
    Map<String, Object> paramMap = new HashMap<String, Object>();
    paramMap.put("pagerData", pagerData);
    // 根据条件查询分页数据
    paramMap.put("po", b00401PO); // 查询条件
    pagerData.setRows(b00401Service.retrieveByPage1(paramMap));

    // 根据条件查询总条数
    paramMap.put("selectCount", true);
    pagerData.setRecords(b00401Service.retrieveByPage1(paramMap));

    return JSON_PAGER;
  }
Esempio n. 3
0
 /**
  * 函 数 名:queryData2 功能描述:危险源等级详情 分页方法
  *
  * @throws Exception
  * @return String 创建人:王贺喜 创建时间:2012-12-8 上午10:46:20
  */
 public String queryData2() throws Exception {
   try {
     pagerData = initPagerData();
     Map<String, Object> paramMap = new HashMap<String, Object>();
     paramMap.put("pagerData", pagerData);
     paramMap.put(ORGAN_UUID, getSessionUserPO().getORGAN_UUID());
     if (!"true".equals(request.getParameter("qc"))) {
       pagerData.setRows(b00401Service.retrieveByPage2(paramMap));
     }
     paramMap.put("selectCount", true);
     pagerData.setRecords(b00401Service.retrieveByPage2(paramMap));
   } catch (Exception e) {
     e.printStackTrace();
   }
   return JSON_PAGER;
 }
Esempio n. 4
0
 /**
  * 函 数 名:doGroupLevel 功能描述:危险源级别统计实现方法(画图)
  *
  * @return String 创建人:王贺喜 创建时间:2012-12-7 下午2:33:30
  */
 public String doGroupLevel() {
   HashMap<String, Object> map = new HashMap<String, Object>();
   map.put("corpid", this.getSessionUserPO().getCorpid());
   mapList = b00401Service.getGroupDangerLevel(map);
   setJstr(UtilPlot.setColPieData(mapList));
   return JSON_STR;
 }
Esempio n. 5
0
  /**
   * ajaxGetName(动态获取名称)
   *
   * @param name
   * @param @return 设定文件
   * @return String DOM对象 @Exception 异常对象
   * @since CodingExample Ver(编码范例查看) 1.1
   */
  public String ajaxGetName() {
    StringBuffer sb = new StringBuffer(200);
    try {
      Map<String, String> map = new HashMap<String, String>();
      map.put("MA006", b00401PO.getMA006());
      map.put("MA004", b00401PO.getMA004());
      List<B00401PO> poList = b00401Service.retrieveB00401ByPinyin(map);
      B00401PO po = null;
      sb.append("[");
      if (poList != null && poList.size() > 0) {
        for (int i = 0, n = poList.size(); i < n; i++) {
          po = poList.get(i);
          sb.append("{'id':'" + i + "','name':'" + po.getMA004() + "'},");
        }
        sb = new StringBuffer(sb.substring(0, sb.length() - 1));
      }
      sb.append("]");

      this.getResponse().setCharacterEncoding("utf-8");
      PrintWriter out = this.getResponse().getWriter();
      out.write(sb.toString());

    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Esempio n. 6
0
 /**
  * doGetstatChart(统计图)
  *
  * @param name
  * @param @return 设定文件
  * @return String DOM对象 @Exception 异常对象
  * @since CodingExample Ver(编码范例查看) 1.1
  */
 public String doGetstatChart() {
   try {
     setJstr(UtilPlot.setColPieData(b00401Service.statDevide(getSessionUserPO().getCorpid())));
   } catch (Exception e) {
     e.printStackTrace();
   }
   return JSON_STR;
 }
Esempio n. 7
0
  /**
   * doGetStat(统计查询)
   *
   * @param name
   * @param @return 设定文件
   * @return String DOM对象 @Exception 异常对象
   * @since CodingExample Ver(编码范例查看) 1.1
   */
  public String doGetStat() {
    try {
      list = b00401Service.statDevide(getSessionUserPO().getCorpid());

    } catch (Exception e) {
      e.printStackTrace();
    }
    return "stat";
  }
Esempio n. 8
0
 /** 增加保存操作 */
 public String doSaveAdd() {
   try {
     b00401PO.setMA001(UUIDGenerater.getUUID());
     b00401PO.setMA002(getSessionUserPO().getCorpid());
     b00401PO.setMA003(getSessionUserPO().getOrgName());
     b00401PO.setMA017(getSessionUserPO().getId());
     b00401Service.insertB00401(b00401PO);
     setAddSuccessMsg();
   } catch (Exception e) {
     e.printStackTrace();
     setAddFailedMsg();
   }
   return JSON_MSG;
 }
Esempio n. 9
0
 /** 修改操作 */
 public String doEdit() {
   try {
     b00401PO = b00401Service.retrieveB00401ByID(b00401PO.getMA001());
     if (b00401PO == null) {
       setEmptyDataMsg();
       return JSON_MSG;
     } else {
       setEmptyDataMsg();
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   return JSON_PO;
 }
Esempio n. 10
0
 /** 修改记录 */
 public String doEditB00401() {
   try {
     b00401PO = b00401Service.retrieveB00401ByID(b00401PO.getMA001());
     codeValueSBLX = codevalueService.retrieveCodeByType("equip_type");
     if (b00401PO == null) {
       setEmptyDataMsg();
       return JSON_MSG;
     } else {
       setEmptyDataMsg();
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   return "queryB00401";
 }
Esempio n. 11
0
 /**
  * 函 数 名:doGetDangerLevel 功能描述:危险源级别统计 控制列表
  *
  * @return String 创建人:王贺喜 创建时间:2012-12-8 上午11:00:51
  */
 public String doGetDangerLevel() {
   HashMap<String, Object> map = new HashMap<String, Object>();
   map.put("corpid", this.getSessionUserPO().getCorpid());
   mapList = b00401Service.getGroupDangerLevel(map);
   return "level";
 }