2022-10-13 09:34:32 +00:00
|
|
|
package com.dbnt.faisp.config;
|
|
|
|
|
|
2022-10-27 00:02:05 +00:00
|
|
|
import com.dbnt.faisp.main.codeMgt.service.CodeMgtService;
|
|
|
|
|
import com.dbnt.faisp.main.menuMgt.model.MenuMgt;
|
|
|
|
|
import com.dbnt.faisp.main.menuMgt.service.MenuMgtService;
|
|
|
|
|
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
|
|
|
|
import com.dbnt.faisp.main.userInfo.service.UserInfoService;
|
2022-10-13 09:34:32 +00:00
|
|
|
import lombok.RequiredArgsConstructor;
|
2022-10-14 08:14:48 +00:00
|
|
|
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
2022-10-13 09:34:32 +00:00
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
@RequestMapping("/modal")
|
|
|
|
|
public class ModalController {
|
|
|
|
|
|
|
|
|
|
private final MenuMgtService menuMgtService;
|
2022-10-21 09:06:42 +00:00
|
|
|
private final UserInfoService userInfoService;
|
2022-10-24 09:18:53 +00:00
|
|
|
private final CodeMgtService codeMgtService;
|
2022-10-13 09:34:32 +00:00
|
|
|
|
|
|
|
|
@GetMapping("/menuModal")
|
2022-10-14 08:14:48 +00:00
|
|
|
public ModelAndView menuModalPage(@AuthenticationPrincipal UserInfo loginUser, MenuMgt menuMgt){
|
2022-10-13 09:34:32 +00:00
|
|
|
ModelAndView mav = new ModelAndView("commonModal/menuModal");
|
2022-10-14 08:14:48 +00:00
|
|
|
menuMgt.setUserSeq(loginUser.getUserSeq());
|
2022-10-13 09:34:32 +00:00
|
|
|
menuMgt.setQueryInfo();
|
2022-10-14 08:14:48 +00:00
|
|
|
mav.addObject("menuMgtList", menuMgtService.selectMenuMgtListToAccessAuth(menuMgt));
|
|
|
|
|
menuMgt.setContentCnt(menuMgtService.selectMenuMgtListToAccessAuthCnt(menuMgt));
|
2022-10-13 09:34:32 +00:00
|
|
|
menuMgt.setPaginationInfo();
|
|
|
|
|
mav.addObject("searchParams", menuMgt);
|
|
|
|
|
return mav;
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-21 09:06:42 +00:00
|
|
|
@GetMapping("/userModal")
|
|
|
|
|
public ModelAndView userMoadlPage(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo){
|
|
|
|
|
ModelAndView mav = new ModelAndView("commonModal/userModal");
|
|
|
|
|
userInfo.setQueryInfo();
|
|
|
|
|
if(userInfo.getUserStatus() == null || userInfo.getUserStatus().equals("")) {
|
|
|
|
|
userInfo.setUserStatus("USC003");
|
|
|
|
|
}
|
2022-10-24 09:18:53 +00:00
|
|
|
mav.addObject("OgList", codeMgtService.selectCodeMgtList("OG"));
|
|
|
|
|
mav.addObject("OfcList", codeMgtService.selectCodeMgtList("OFC"));
|
2022-10-21 09:06:42 +00:00
|
|
|
mav.addObject("userInfoList", userInfoService.selectUserInfoList(userInfo));
|
|
|
|
|
userInfo.setContentCnt(userInfoService.selectUserInfoListCnt(userInfo));
|
|
|
|
|
userInfo.setPaginationInfo();
|
|
|
|
|
mav.addObject("searchParams", userInfo);
|
|
|
|
|
return mav;
|
|
|
|
|
}
|
2022-10-13 09:34:32 +00:00
|
|
|
}
|