Esempio n. 1
0
 public ModelAndView service(HttpServletRequest req, HttpServletResponse res) {
   String teaId = req.getParameter("teaId");
   System.out.println("teaId:" + teaId);
   if (teaId == null) {
     List list = dao.QueryObject("from DocuTeaInfo");
     Map model = new HashMap();
     model.put("list", list);
     return new ModelAndView("/docuview/teaDocuService", model);
   } else {
     List list = dao.QueryObject("from DocuTeaInfo where teaId=" + teaId);
     DocuTeaInfo doc = (DocuTeaInfo) list.get(0);
     list = dao.QueryObject("from SystemSpecialtyCode");
     Map model = new HashMap();
     model.put("doc", doc);
     model.put("list", list);
     return new ModelAndView("/docuview/teaDocuModify", model);
   }
 }
Esempio n. 2
0
 public ModelAndView search(HttpServletRequest req, HttpServletResponse res) {
   String condition = req.getParameter("condition");
   String conditionContent = req.getParameter("conditionContent");
   if (condition.equals("ÐÕÃû")) {
     condition = "name";
   } else if (condition.equals("Éí·ÝÖ¤")) {
     condition = "sfzh";
   } else {
     condition = "teaId";
   }
   List list =
       dao.QueryObject(
           "from DocuTeaInfo where " + condition + " like '" + conditionContent + "%'");
   Map model = new HashMap();
   model.put("list", list);
   return new ModelAndView("/docuview/teaDocuService", model);
 }
Esempio n. 3
0
 public ModelAndView reg(HttpServletRequest req, HttpServletResponse res) {
   List list = dao.QueryObject("from SystemSpecialtyCode");
   Map model = new HashMap();
   model.put("list", list);
   return new ModelAndView("/docuview/doc_tea_info_reg", model);
 }