|
@@ -131,7 +131,10 @@ public class StaffController extends LifeCenterController {
|
|
|
|
|
|
@RequestMapping("/info")
|
|
|
public ModelAndView staffInfo(
|
|
|
+ HttpServletRequest request,HttpServletResponse response,
|
|
|
@RequestParam(value="staffId", required=false, defaultValue="") String staffID) {
|
|
|
+ String sesId = LifeCenterSessionController.getSession( request, "sesId" );
|
|
|
+
|
|
|
|
|
|
StaffDTO dto = new StaffDTO();
|
|
|
dto.setId(staffID);
|
|
@@ -140,7 +143,8 @@ public class StaffController extends LifeCenterController {
|
|
|
|
|
|
ModelAndView mv = setMV("staff/info");
|
|
|
mv.addObject("info", dto);
|
|
|
-
|
|
|
+ mv.addObject( "sesId", sesId );
|
|
|
+
|
|
|
return mv;
|
|
|
}
|
|
|
|
|
@@ -152,22 +156,22 @@ public class StaffController extends LifeCenterController {
|
|
|
StaffDTO dto = new StaffDTO();
|
|
|
dto.setId(staffId);
|
|
|
dto = memberService.selectMemberInfo(dto);
|
|
|
- String groupIdx = LifeCenterFunction.aesEncrypt(config.aesKey, config.IV, String.valueOf(dto.getGroupIdx()));
|
|
|
+// String groupIdx = LifeCenterFunction.aesEncrypt(config.aesKey, config.IV, String.valueOf(dto.getGroupIdx()));
|
|
|
int centerCode = dto.getCenterCode();
|
|
|
|
|
|
- GroupListDTO gDto = new GroupListDTO();
|
|
|
- List<GroupListDTO> groupList = groupListService.selectGroupList(gDto);
|
|
|
+// GroupListDTO gDto = new GroupListDTO();
|
|
|
+// List<GroupListDTO> groupList = groupListService.selectGroupList(gDto);
|
|
|
|
|
|
- for( GroupListDTO data : groupList ) {
|
|
|
- data.setEncryptIdx( LifeCenterFunction.aesEncrypt( config.aesKey, config.IV, String.valueOf( data.getIdx() ) ) );
|
|
|
- }
|
|
|
+// for( GroupListDTO data : groupList ) {
|
|
|
+// data.setEncryptIdx( LifeCenterFunction.aesEncrypt( config.aesKey, config.IV, String.valueOf( data.getIdx() ) ) );
|
|
|
+// }
|
|
|
|
|
|
ModelAndView mv = setMV("staff/edit");
|
|
|
mv.addObject("info", dto);
|
|
|
mv.addObject("centerCode", centerCode);
|
|
|
- mv.addObject("groupIdx", groupIdx);
|
|
|
+// mv.addObject("groupIdx", groupIdx);
|
|
|
// mv.addObject("centerList", centerList);
|
|
|
- mv.addObject( "groupList", groupList );
|
|
|
+// mv.addObject( "groupList", groupList );
|
|
|
|
|
|
return mv;
|
|
|
}
|
|
@@ -175,18 +179,14 @@ public class StaffController extends LifeCenterController {
|
|
|
@RequestMapping("edit/update")
|
|
|
public String editUpdate(
|
|
|
HttpServletRequest request,HttpServletResponse response,
|
|
|
- @ModelAttribute("dto") StaffDTO dto,
|
|
|
- @RequestParam(value="encGroupIdx", required=true) String encGroupIdx) throws Exception {
|
|
|
+ @ModelAttribute("dto") StaffDTO dto
|
|
|
+ ) throws Exception {
|
|
|
|
|
|
String sesId = LifeCenterSessionController.getSession( request, "sesId" );
|
|
|
- String groupIdx = LifeCenterFunction.aesDecrypt(config.aesKey, config.IV, encGroupIdx);
|
|
|
dto.setUpdateById(sesId);
|
|
|
- dto.setGroupIdx(Integer.parseInt(groupIdx));
|
|
|
-
|
|
|
|
|
|
int rts = memberService.updateEditMember(dto);
|
|
|
|
|
|
-
|
|
|
return "redirect:/staff/info?staffId=" + dto.getId();
|
|
|
}
|
|
|
|
|
@@ -248,7 +248,7 @@ public class StaffController extends LifeCenterController {
|
|
|
@RequestParam(value="useYn", required=false, defaultValue="") String useYn,
|
|
|
@RequestParam(value="page", required=false, defaultValue="1") int page,
|
|
|
HttpServletRequest request, HttpServletResponse response) {
|
|
|
-
|
|
|
+ String sesId = LifeCenterSessionController.getSession( request, "sesId" );
|
|
|
String sesCenterCode = LifeCenterSessionController.getSession( request, "sesCenterCode" );
|
|
|
|
|
|
if (selectState.equals("sId")) {
|
|
@@ -263,7 +263,7 @@ public class StaffController extends LifeCenterController {
|
|
|
dto.setLimit( ( Integer.valueOf( page ) - 1 ) * config.pageDataSize );
|
|
|
dto.setLimitMax( config.pageDataSize );
|
|
|
|
|
|
- int total = memberService.selectMemeberListCount(dto);
|
|
|
+ int total = memberService.selectMemberListCount(dto);
|
|
|
List<StaffDTO> list = new ArrayList<StaffDTO>();
|
|
|
if (total > 0) {
|
|
|
list = memberService.selectMemberList(dto);
|
|
@@ -279,6 +279,7 @@ public class StaffController extends LifeCenterController {
|
|
|
mv.addObject("useYn", useYn);
|
|
|
mv.addObject("item", list);
|
|
|
mv.addObject("paging", paging);
|
|
|
+ mv.addObject( "sesId", sesId );
|
|
|
|
|
|
return mv;
|
|
|
}
|