|
@@ -1,88 +1,95 @@
|
|
|
-package com.lemon.lifecenter.controller;
|
|
|
-
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.servlet.ModelAndView;
|
|
|
-
|
|
|
-import com.lemon.lifecenter.common.LifeCenterConfigVO;
|
|
|
-import com.lemon.lifecenter.common.LifeCenterController;
|
|
|
-import com.lemon.lifecenter.common.LifeCenterPaging;
|
|
|
-import com.lemon.lifecenter.dto.StaffDTO;
|
|
|
-import com.lemon.lifecenter.service.StaffService;
|
|
|
-
|
|
|
-// 의료진관리 contorller
|
|
|
-@Controller
|
|
|
-@RequestMapping("/staff")
|
|
|
-public class StaffController extends LifeCenterController {
|
|
|
- private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private StaffService memberService;
|
|
|
- @Autowired
|
|
|
- private LifeCenterConfigVO config;
|
|
|
- private LifeCenterPaging paging;
|
|
|
-
|
|
|
- @RequestMapping("/new")
|
|
|
- public ModelAndView staffNew() {
|
|
|
- ModelAndView mv = setMV("staff/new");
|
|
|
-
|
|
|
- return mv;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping("/info")
|
|
|
- public ModelAndView staffInfo() {
|
|
|
- ModelAndView mv = setMV("staff/info");
|
|
|
-
|
|
|
- return mv;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping("/edit")
|
|
|
- public ModelAndView staffEdit() {
|
|
|
- ModelAndView mv = setMV("staff/edit");
|
|
|
-
|
|
|
- return mv;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping("/list")
|
|
|
- public ModelAndView staffList(
|
|
|
- @ModelAttribute("dto") final StaffDTO dto,
|
|
|
- @RequestParam(value="selectState", required=false, defaultValue="") String selectState,
|
|
|
- @RequestParam(value="sData", required=false, defaultValue="") String sData,
|
|
|
- @RequestParam(value="useYn", required=false, defaultValue="") String useYn,
|
|
|
- @RequestParam(value="page", required=false, defaultValue="1") int page) {
|
|
|
-
|
|
|
- logger.error("selectState -- > " + selectState);
|
|
|
- logger.error("sData -- > " + sData);
|
|
|
- logger.error("useYn -- > " + useYn);
|
|
|
-
|
|
|
- dto.setLimit( ( Integer.valueOf( page ) - 1 ) * config.pageDataSize );
|
|
|
- dto.setLimitMax( config.pageDataSize );
|
|
|
-
|
|
|
- int total = memberService.selectMemeberListCount(dto);
|
|
|
- List<StaffDTO> list = new ArrayList<StaffDTO>();
|
|
|
- if (total > 0) {
|
|
|
- list = memberService.selectMemberList(dto);
|
|
|
- }
|
|
|
- String param = "";
|
|
|
- paging = LifeCenterPaging.getInstance();
|
|
|
- paging.paging(config, total, page, param);
|
|
|
-
|
|
|
- ModelAndView mv = setMV("staff/list");
|
|
|
- mv.addObject("total", total);
|
|
|
- mv.addObject("selectState", selectState);
|
|
|
- mv.addObject("sData", sData);
|
|
|
- mv.addObject("useYn", useYn);
|
|
|
- mv.addObject("item", list);
|
|
|
- mv.addObject("paging", paging);
|
|
|
-
|
|
|
- return mv;
|
|
|
- }
|
|
|
-}
|
|
|
+package com.lemon.lifecenter.controller;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
+
|
|
|
+import com.lemon.lifecenter.common.LifeCenterConfigVO;
|
|
|
+import com.lemon.lifecenter.common.LifeCenterController;
|
|
|
+import com.lemon.lifecenter.common.LifeCenterPaging;
|
|
|
+import com.lemon.lifecenter.dto.StaffDTO;
|
|
|
+import com.lemon.lifecenter.service.StaffService;
|
|
|
+
|
|
|
+// 의료진관리 contorller
|
|
|
+@Controller
|
|
|
+@RequestMapping("/staff")
|
|
|
+public class StaffController extends LifeCenterController {
|
|
|
+ private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private StaffService memberService;
|
|
|
+ @Autowired
|
|
|
+ private LifeCenterConfigVO config;
|
|
|
+ private LifeCenterPaging paging;
|
|
|
+
|
|
|
+ @RequestMapping("/new")
|
|
|
+ public ModelAndView staffNew() {
|
|
|
+ ModelAndView mv = setMV("staff/new");
|
|
|
+
|
|
|
+ return mv;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping("/info")
|
|
|
+ public ModelAndView staffInfo() {
|
|
|
+ ModelAndView mv = setMV("staff/info");
|
|
|
+
|
|
|
+ return mv;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping("/edit")
|
|
|
+ public ModelAndView staffEdit() {
|
|
|
+ ModelAndView mv = setMV("staff/edit");
|
|
|
+
|
|
|
+ return mv;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping("/myinfo")
|
|
|
+ public ModelAndView staffMyinfo() {
|
|
|
+ ModelAndView mv = setMV("staff/myinfo");
|
|
|
+
|
|
|
+ return mv;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping("/list")
|
|
|
+ public ModelAndView staffList(
|
|
|
+ @ModelAttribute("dto") final StaffDTO dto,
|
|
|
+ @RequestParam(value="selectState", required=false, defaultValue="") String selectState,
|
|
|
+ @RequestParam(value="sData", required=false, defaultValue="") String sData,
|
|
|
+ @RequestParam(value="useYn", required=false, defaultValue="") String useYn,
|
|
|
+ @RequestParam(value="page", required=false, defaultValue="1") int page) {
|
|
|
+
|
|
|
+ logger.error("selectState -- > " + selectState);
|
|
|
+ logger.error("sData -- > " + sData);
|
|
|
+ logger.error("useYn -- > " + useYn);
|
|
|
+
|
|
|
+ dto.setLimit( ( Integer.valueOf( page ) - 1 ) * config.pageDataSize );
|
|
|
+ dto.setLimitMax( config.pageDataSize );
|
|
|
+
|
|
|
+ int total = memberService.selectMemeberListCount(dto);
|
|
|
+ List<StaffDTO> list = new ArrayList<StaffDTO>();
|
|
|
+ if (total > 0) {
|
|
|
+ list = memberService.selectMemberList(dto);
|
|
|
+ }
|
|
|
+ String param = "";
|
|
|
+ paging = LifeCenterPaging.getInstance();
|
|
|
+ paging.paging(config, total, page, param);
|
|
|
+
|
|
|
+ ModelAndView mv = setMV("staff/list");
|
|
|
+ mv.addObject("total", total);
|
|
|
+ mv.addObject("selectState", selectState);
|
|
|
+ mv.addObject("sData", sData);
|
|
|
+ mv.addObject("useYn", useYn);
|
|
|
+ mv.addObject("item", list);
|
|
|
+ mv.addObject("paging", paging);
|
|
|
+
|
|
|
+ return mv;
|
|
|
+ }
|
|
|
+}
|