示例#1
0
 // 获取各部门层级关系
 public String queryDept() throws Exception {
   Map p = this.getParamsAsDmp();
   List list = CommonUtil.getAllDept();
   List<TreeNodes> newlist = CommonUtil.getTreeList(list, "0");
   String listDept = JSON.toJSONString(newlist, true);
   this.setAttributeFromDmp(p);
   this.getResponse().getWriter().write(listDept);
   return null;
 }
示例#2
0
 // 执行增加or修改的操作
 public void saveOrUpdate() throws Exception {
   Map p = this.getParamsAsDmp();
   String summoney = (String) p.get("summoney");
   String starttime = (String) p.get("starttime");
   String endtime = (String) p.get("endtime");
   String xmbm = (String) p.get("xmbm");
   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
   if (summoney != null && !summoney.equals("")) {
     Double sum = Double.valueOf(summoney);
     p.put("summoney", sum);
   }
   if (starttime != null && !starttime.equals("")) {
     Date star = sdf.parse(starttime);
     p.put("starttime", star);
   }
   if (endtime != null && !endtime.equals("")) {
     Date end = sdf.parse(endtime);
     p.put("endtime", end);
   }
   if (xmbm == null || xmbm.equals("")) {
     xmbm = CommonUtil.getXmbmString(p);
     p.put("xmbm", xmbm);
   }
   lxglService.savaOrUpdate(p);
   this.setAttributeFromDmp(p);
 }
示例#3
0
 // 获取项目类型
 public String queryXmtype() throws Exception {
   Map p = this.getParamsAsDmp();
   List list = CommonUtil.queryXmtype();
   String listtype = JSON.toJSONString(list, true);
   this.setAttributeFromDmp(p);
   this.getResponse().getWriter().write(listtype);
   return null;
 }