Exemplo n.º 1
0
  /**
   * 添加信息随访模板维护
   *
   * @return
   */
  public String addFlupModule() {
    HttpServletResponse response = ServletActionContext.getResponse();
    HttpServletRequest request = ServletActionContext.getRequest();
    try {
      FlupModule flupModule = new FlupModule();
      //			flupModule.setInfoCode(request.getParameter("infoCode"));
      flupModule.setInfoName(request.getParameter("infoName"));
      flupModule.setInfoContent(request.getParameter("infoContent"));
      flupModule.setMaintainDept(request.getParameter("maintainDept"));
      flupModule.setInfoBeyone(request.getParameter("infoBeyone"));
      flupModule.setInfoBelong(request.getParameter("infoBelong"));
      flupModule.setOperateEmpolyeeCode(SessionData.getEmployeeCode()); // 医生工号设置成死的暂时
      int result = flupModuleService.savaFlupModule(flupModule);
      if (result == 1) response.getWriter().print("success");
      else response.getWriter().print("faild");

    } catch (Exception e) {
      e.printStackTrace();
      try {
        response.getWriter().print("error");
      } catch (IOException e1) {
        e1.printStackTrace();
      }
    }
    return null;
  }
Exemplo n.º 2
0
 /** 查询信息随访模板维护 */
 public String execute() {
   HttpSession session = ServletActionContext.getRequest().getSession();
   Employee employee = (Employee) session.getAttribute("employee");
   map.put("operateEmpolyeeCode", employee.getJobnum());
   page.setParams(map);
   page.setList(SessionData.getDepartmentCode());
   Map userMap = new HashMap();
   userMap.put("rows", flupModuleService.getFlupModule(page));
   userMap.put("totalRecord", page.getTotalRecord());
   userMap.put("totalPage", page.getTotalPage());
   userMap.put("pageNo", page.getPageNo());
   JSON json = JSONArray.fromObject(userMap);
   HttpServletResponse response = ServletActionContext.getResponse();
   try {
     PrintWriter out = response.getWriter();
     out.print(json.toString());
   } catch (IOException e) {
     e.printStackTrace();
   }
   return null;
 }