コード例 #1
0
  // 儲存新增的問題
  @RequestMapping("/saveQuestion")
  public ModelAndView saveQuestion(
      String productionType,
      String userIdentity,
      String userName,
      String email,
      String tel,
      String questionType,
      String questionContent) {
    System.out.println("saveQuestion==>");
    System.out.println(
        "    productionType="
            + productionType
            + ", userIdentity="
            + userIdentity
            + ", userName="******", email="
            + email
            + ", tel="
            + tel
            + ", questionType="
            + questionType
            + ", questionContent="
            + questionContent);
    String questionDate = "2011/11/01";

    personService.saveQuestion(
        productionType, userIdentity, userName, email, tel, questionType, questionContent);
    return new ModelAndView("addQuestion");
  }
コード例 #2
0
  // 查詢問題清單 (base on 查詢條件)
  @RequestMapping("/queryQuestionList")
  public ModelAndView queryQuestionList(
      String adminId,
      String startDate,
      String endDate,
      String productionType,
      String questionType,
      String email,
      String handleStatus,
      Model model) {
    System.out.println("queryQuestionList==>");
    System.out.println(
        "	startDate="
            + startDate
            + ", endDate="
            + endDate
            + ", productionType="
            + productionType
            + ", questionType="
            + questionType);

    Question[] questionList =
        personService.queryQuestion(
            startDate, endDate, productionType, email, questionType, handleStatus);
    model.addAttribute("admin", adminId);
    model.addAttribute("questionList", questionList);
    return new ModelAndView("queryQuestionList");
  }
コード例 #3
0
  // 查詢問題清單 (base on 問題管理連結)
  @RequestMapping("/manageQuestion")
  public ModelAndView manageQuestion(Model model, String adminId) {
    System.out.println("manageQuestion==>");

    Question[] questionList = personService.queryQuestion("", "", "", "", "", "");
    model.addAttribute("admin", adminId);
    model.addAttribute("questionList", questionList);
    return new ModelAndView("manageQuestion");
  }
コード例 #4
0
  // 儲存回覆內容
  @RequestMapping("/saveAnswer")
  public ModelAndView saveAnswer(
      String adminId, String qId, String answer, String adminName, Model model) {
    System.out.println("saveAnswer==>");
    System.out.println("    qId=" + qId + ", adminId=" + adminId + ", answer=" + answer);

    personService.saveAnswer(Long.valueOf(qId), Long.valueOf(adminId), answer, adminName);

    return new ModelAndView("saveAnswer");
  }
コード例 #5
0
  // 儲存備註
  @RequestMapping("/saveNote")
  public ModelAndView saveNote(
      String adminId, String qId, String note, String adminName, Model model) {
    System.out.println("saveNote==>");
    System.out.println(
        "    qId=" + qId + ", adminId=" + adminId + ", note=" + note + ", adminName=" + adminName);

    personService.saveNote(Long.valueOf(qId), Long.valueOf(adminId), note, adminName);

    return new ModelAndView("saveNote");
  }
コード例 #6
0
  // 查詢問題detail
  @RequestMapping("/queryQuestionDetail")
  public ModelAndView queryQuestionDetail(String adminId, String qId, Model model) {
    System.out.println("queryQuestionDetail==>");
    System.out.println("	qId=" + qId);

    Question q = personService.queryQuestionDetail(Long.parseLong(qId));

    model.addAttribute("admin", adminId);
    model.addAttribute("questionDetail", q);
    return new ModelAndView("queryQuestionDetail");
  }
コード例 #7
0
  // 管理者新增備註 (window open)
  @RequestMapping("/addNote")
  public ModelAndView addNote(String adminId, String qId, Model model) {
    System.out.println("addNote==>");
    System.out.println("    qId=" + qId + ", adminId=" + adminId);

    Admin admin = personService.queryAdminName(Long.parseLong(adminId));

    model.addAttribute("qId", qId);
    model.addAttribute("admin", admin);
    model.addAttribute("adminId", adminId);
    return new ModelAndView("addNote");
  }