Esempio n. 1
0
  /** 查询疾病指标 */
  public String execute() {
    // 加载表格数据
    List<Department> list = new ArrayList<Department>();

    if (map.get("deptCode") != null && !map.get("deptCode").equals("")) {
      Department department = new Department();
      department.setDeptCode(map.get("deptCode"));
      list.add(department);
      page.setList(list);
    } else {
      list = SessionData.getDepartmentCode();
    }
    page.setList(list);
    page.setParams(map);
    Map userMap = new HashMap();
    userMap.put("rows", diseaseNameDictService.getDiseaseNameDict(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();
    HttpServletRequest request = ServletActionContext.getRequest();
    try {
      PrintWriter out = response.getWriter();
      out.print(json.toString());
    } catch (IOException e) {
      e.printStackTrace();
    }
    return null;
  }
Esempio n. 2
0
  /**
   * 修改疾病指标状态
   *
   * @return
   */
  public String updateState() {
    DiseaseNameDict f = new DiseaseNameDict();
    f.setUseState(map.get("useState"));
    f.setDiseaseNameId(map.get("diseaseNameId"));
    try {
      int result = diseaseNameDictService.updateState(f);
      if (result == 1) ServletActionContext.getResponse().getWriter().print("修改成功");
      else ServletActionContext.getResponse().getWriter().print("修改失败");
    } catch (IOException e) {
      e.printStackTrace();
    }

    return null;
  }
Esempio n. 3
0
  /**
   * 修改疾病指标
   *
   * @return
   */
  public String updateDiseaseNameDict() {
    HttpServletResponse response = ServletActionContext.getResponse();
    HttpServletRequest request = ServletActionContext.getRequest();
    DiseaseNameDict f = new DiseaseNameDict();
    f.setDeptCode(request.getParameter("deptCode"));
    f.setDiseaseName(request.getParameter("diseaseName"));
    f.setDiseaseNameId(request.getParameter("diseaseNameId"));
    f.setEmployeeCode(SessionData.getEmployeeCode());
    int count = diseaseNameDictService.checkFlupGroup(f);
    try {
      if (count > 0) {
        response.getWriter().print("error");
      } else {
        int result = diseaseNameDictService.updateDiseaseNameDict(f);
        if (result == 1) {
          response.getWriter().print("success");
        }
      }
    } catch (IOException e) {
      e.printStackTrace();
    }

    return null;
  }