Exemplo n.º 1
0
 /**
  * 删除
  *
  * @throws Exception
  */
 public String delete() throws Exception {
   String xtbh = entity.getXtbh();
   if (gqdservice.delete(xtbh)) {
     super.outmessage("删除成功!");
   } else {
     super.outmessage("删除失败!");
   }
   return null;
 }
Exemplo n.º 2
0
 /** 挂墙段的批量逻辑删除 */
 public String batchDelete() {
   String xtbhs = request.getParameter("xtbhs");
   if (gqdservice.batchDelete(xtbhs)) {
     super.outmessage("删除成功!");
   } else {
     super.outmessage("删除失败!");
   }
   return null;
 }
Exemplo n.º 3
0
 /**
  * 获取资源关联树结点串
  *
  * @return 结点串
  * @throws Exception
  */
 public String getTreeNodes() throws Exception {
   prepareViewModel();
   response.setContentType("application/html;charset=UTF-8");
   response.setHeader("Cache-Control", "no-cache");
   PrintWriter out = response.getWriter();
   out.print(gqdservice.getTreeNodes(entity));
   out.flush();
   return null;
 }
Exemplo n.º 4
0
 /**
  * 批量编辑
  *
  * @return
  */
 public String batchEdit() throws Exception {
   String former = request.getQueryString();
   Map<String, Object> map = super.getSerializeForm(former);
   if (gqdservice.batchEdit(map)) {
     super.outmessage("编辑成功!");
   } else {
     super.outmessage("编辑失败!");
   }
   return null;
 }
Exemplo n.º 5
0
 @Override
 protected void prepareViewModel() throws Exception {
   String resId = request.getParameter("xtbh"); // 获取资源id
   request.setAttribute("tipview", super.getParameterValue("tipview")); // tip 视图显示
   if (StringUtils.isNotBlank(resId)) {
     entity = gqdservice.getbyid(resId);
     request.setAttribute("entity", entity);
   } else {
     entity = new GqdEntity();
   }
 }
Exemplo n.º 6
0
 /** 查询杆路段是否已存在 */
 public void checkGqd() {
   try {
     String qdgq = super.getParameterValue("qdgq");
     String zdgq = super.getParameterValue("zdgq");
     Map<String, Object> contionMap = new HashMap<String, Object>();
     contionMap.put("qdgq", qdgq);
     contionMap.put("zdgq", zdgq);
     String count = gqdservice.getGqdIsExist(contionMap);
     Map<String, Object> resultMap = new HashMap<String, Object>();
     resultMap.put("count", count);
     convertmaptojson(resultMap);
   } catch (Exception ex) {
     logger.info("查询杆路段是否已存在!!", ex);
   }
 }
Exemplo n.º 7
0
 /**
  * 挂墙段资源查询结果
  *
  * @throws Exception
  */
 public String list() throws Exception {
   UserInfo user = (UserInfo) request.getSession().getAttribute("user");
   String condition = entity.getSerializeQueryCondition();
   if (StringUtils.isBlank(condition)) {
     condition = request.getQueryString();
   }
   Map<String, Object> conditionMap = super.getDecodeCondtionMap(condition, user);
   Map<String, Object> json =
       gqdservice.queryPageMap(
           "queryGqdList", conditionMap, super.getPage("page"), super.getLimit("rows"));
   request.setAttribute("map", json);
   // 转换为列表参数
   request.setAttribute("condition", condition);
   return "list";
 }
Exemplo n.º 8
0
 /**
  * 挂墙段资源查看详细
  *
  * @return
  */
 public String save() {
   UserInfo user = (UserInfo) request.getSession().getAttribute("user");
   entity.setOrgid(user.getOrgId());
   String toPage;
   if (StringUtils.isNotBlank(entity.getXtbh())) {
     toPage = "view";
   } else {
     toPage = "input";
   }
   if (gqdservice.saveorupdate(entity)) {
     setInfoMessage("保存成功!", toPage);
   } else {
     setInfoMessage("保存失败!", toPage);
   }
   request.setAttribute("entity", entity);
   return toPage;
 }