fo bo 머지작업(admin)
This commit is contained in:
@@ -1,12 +1,19 @@
|
|||||||
package com.wb.domainserver.domain.admin.sys.authgrp.controller;
|
package com.wb.domainserver.domain.admin.sys.authgrp.controller;
|
||||||
|
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
import com.wb.domainserver.domain.admin.sys.authgrp.service.BOMaAuthgrpService;
|
import com.wb.domainserver.domain.admin.sys.authgrp.service.BOMaAuthgrpService;
|
||||||
import com.wb.domainserver.domain.admin.sys.authgrp.vo.BOMaAuthgrpVO;
|
import com.wb.domainserver.domain.admin.sys.authgrp.vo.BOMaAuthgrpVO;
|
||||||
import com.wb.domainserver.domain.admin.sys.authgrp.vo.MaAuthgrpVO;
|
import com.wb.domainserver.domain.admin.sys.authgrp.vo.MaAuthgrpVO;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||||
|
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||||
|
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.RESRC;
|
import com.wb.domainserver.util.communicate.RESRC;
|
||||||
@@ -18,6 +25,7 @@ import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -53,9 +61,6 @@ import java.util.*;
|
|||||||
@RequestMapping("/admin/sys/authgrp")
|
@RequestMapping("/admin/sys/authgrp")
|
||||||
public class MaAuthgrpController {
|
public class MaAuthgrpController {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private BOMaAuthgrpService service;
|
|
||||||
|
|
||||||
/** WebClient 호출을 위한 wrapper */
|
/** WebClient 호출을 위한 wrapper */
|
||||||
@Autowired
|
@Autowired
|
||||||
private WnbtWebClientResponseHandler responseHandler;
|
private WnbtWebClientResponseHandler responseHandler;
|
||||||
@@ -66,19 +71,58 @@ public class MaAuthgrpController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaAuthgrpService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaComncdService boMaComncdService;
|
||||||
/**
|
/**
|
||||||
* 권한그룹 목록 화면
|
* 권한그룹 목록 화면
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectAuthGrpListInqireForm")
|
@RequestMapping("/selectAuthGrpListInqireForm")
|
||||||
public String selectAuthGrpListInqireForm(MaAuthgrpVO vo, ModelMap model) {
|
public String selectAuthGrpListInqireForm(BOMaAuthgrpVO vo, ModelMap model) {
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
// 페이징
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
vo.setPaginationInfo(paginationInfo);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpListInqireForm", vo),
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
model,
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
"resultMap"
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
);
|
|
||||||
|
// 공통코드 호출
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("SYS_DV"); // 시스템구분(SYS_DV)
|
||||||
|
List<?> sysDvList = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
List<DataMap> srchList = new ArrayList<>();
|
||||||
|
DataMap srchData = new DataMap();
|
||||||
|
srchData.put("srchAuthorNm", vo.getSrchAuthorNm());
|
||||||
|
srchData.put("srchSysDvCd", vo.getSrchSysDvCd());
|
||||||
|
srchData.put("pageUnit", vo.getPageUnit());
|
||||||
|
srchData.put("pageIndex", vo.getPageIndex());
|
||||||
|
srchData.put("pageDv", vo.getPageDv());
|
||||||
|
srchList.add(srchData);
|
||||||
|
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
content.put("sysDvList", sysDvList);
|
||||||
|
content.put("srchList", srchList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpListInqireForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/sys/authgrp/maAuthGrpListInqireForm";
|
return "admin/sys/authgrp/maAuthGrpListInqireForm";
|
||||||
}
|
}
|
||||||
@@ -89,13 +133,33 @@ public class MaAuthgrpController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectAuthGrpListInqire")
|
@RequestMapping("/selectAuthGrpListInqire")
|
||||||
public String selectAuthGrpListInqire(MaAuthgrpVO vo, ModelMap model) {
|
public String selectAuthGrpListInqire(BOMaAuthgrpVO vo, ModelMap model) {
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpListInqire", vo),
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
model,
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
"resultMap"
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
);
|
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
|
List<DataMap> authGrlList = new ArrayList<>();
|
||||||
|
authGrlList = service.selectBOAuthGrpList(vo);
|
||||||
|
content.put("resultList", authGrlList);
|
||||||
|
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpListInqire", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/sys/authgrp/maAuthGrpListInqireR";
|
return "admin/sys/authgrp/maAuthGrpListInqireR";
|
||||||
}
|
}
|
||||||
@@ -106,13 +170,33 @@ public class MaAuthgrpController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectAuthGrpRegistForm")
|
@RequestMapping("/selectAuthGrpRegistForm")
|
||||||
public String selectAuthGrpRegistForm(MaAuthgrpVO vo, ModelMap model) {
|
public String selectAuthGrpRegistForm(BOMaAuthgrpVO vo, ModelMap model) {
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpRegistForm", vo),
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
model,
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
"resultMap"
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
);
|
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
|
List<DataMap> authGrlList = new ArrayList<>();
|
||||||
|
authGrlList = service.selectBOAuthGrpList(vo);
|
||||||
|
content.put("resultList", authGrlList);
|
||||||
|
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpRegistForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/sys/authgrp/maAuthGrpC";
|
return "admin/sys/authgrp/maAuthGrpC";
|
||||||
}
|
}
|
||||||
@@ -122,16 +206,27 @@ public class MaAuthgrpController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/insertAuthGrpRegist")
|
@RequestMapping(value = "/insertAuthGrpRegist", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> insertAuthGrpRegist(@Validated MaAuthgrpVO vo, BindingResult bindingResult){
|
public ResponseEntity<WnbtResponse> insertAuthGrpRegist(@Validated BOMaAuthgrpVO vo, BindingResult bindingResult){
|
||||||
|
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/insertBOAuthGrpRegist", vo),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
vo.setRegusr(user.getUserInnb());
|
||||||
|
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
content = service.insertAuthGrp(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/insertBOAuthGrpRegist", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 권한그룹 수정 화면이동
|
* 권한그룹 수정 화면이동
|
||||||
@@ -139,13 +234,45 @@ public class MaAuthgrpController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectAuthGrpUpdtForm")
|
@RequestMapping("/selectAuthGrpUpdtForm")
|
||||||
public String selectAuthGrpUpdtForm(MaAuthgrpVO vo, ModelMap model) {
|
public String selectAuthGrpUpdtForm(BOMaAuthgrpVO vo, ModelMap model) {
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
List<DataMap> authGrlList = new ArrayList<>();
|
||||||
|
DataMap authGrlMap = new DataMap();
|
||||||
|
authGrlMap = service.selectBOAuthGrpUpdtForm(vo);
|
||||||
|
authGrlList.add(authGrlMap);
|
||||||
|
content.put("mbrGradList", authGrlList);
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
List<DataMap> codeList = new ArrayList<>();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpUpdtForm", vo),
|
DataMap codeMap = new DataMap();
|
||||||
model,
|
codeMap = service.selectBOFnctCode();
|
||||||
"resultMap"
|
codeList.add(codeMap);
|
||||||
);
|
content.put("codeList", codeList);
|
||||||
|
|
||||||
|
// 공통코드 호출
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("SYS_DV"); // 시스템구분(SYS_DV)
|
||||||
|
List<?> sysDvList = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
bOMaComncdVO.setGroupCd("FNCT_DV"); // 기능구분(FNCT_DV)
|
||||||
|
List<?> fnctDvList = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
List<DataMap> srchList = new ArrayList<>();
|
||||||
|
DataMap srchData = new DataMap();
|
||||||
|
srchData.put("srchAuthorNm", vo.getSrchAuthorNm());
|
||||||
|
srchData.put("srchSysDvCd", vo.getSrchSysDvCd());
|
||||||
|
srchData.put("pageUnit", vo.getPageUnit());
|
||||||
|
srchData.put("pageIndex", vo.getPageIndex());
|
||||||
|
srchData.put("pageDv", vo.getPageDv());
|
||||||
|
srchList.add(srchData);
|
||||||
|
content.put("srchList", srchList);
|
||||||
|
content.put("sysDvList", sysDvList);
|
||||||
|
content.put("fnctDvList", fnctDvList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpUpdtForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/sys/authgrp/maAuthGrpU";
|
return "admin/sys/authgrp/maAuthGrpU";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,16 +281,27 @@ public class MaAuthgrpController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateAuthGrpUpdt")
|
@RequestMapping(value = "/updateAuthGrpUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateAuthGrpUpdt(@Validated MaAuthgrpVO vo, BindingResult bindingResult){
|
public ResponseEntity<WnbtResponse> updateAuthGrpUpdt(@Validated BOMaAuthgrpVO vo, BindingResult bindingResult){
|
||||||
|
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/updateBOAuthGrpUpdt", vo),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
content = service.updateBOAuthGrpUpdt(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/updateBOAuthGrpUpdt", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -171,12 +309,27 @@ public class MaAuthgrpController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/deleteAuthGrpDel", method = RequestMethod.POST)
|
@RequestMapping(value = "/deleteAuthGrpDel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> deleteAuthGrpDel(MaAuthgrpVO vo) {
|
public ResponseEntity<WnbtResponse> deleteAuthGrpDel(BOMaAuthgrpVO vo) {
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/deleteBOAuthGrpDel", vo),
|
vo.setUpdusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
|
||||||
|
String mbrId = MemberJwtContextHolder.getMemberInfo().getId();
|
||||||
|
String mbrDvCd = MemberJwtContextHolder.getMemberInfo().getMbrDvCd();
|
||||||
|
|
||||||
|
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
content = service.updateBOAuthGrpDel(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/deleteBOAuthGrpDel", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -185,13 +338,31 @@ public class MaAuthgrpController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectAuthGrpListInqirePopup")
|
@RequestMapping("/selectAuthGrpListInqirePopup")
|
||||||
public String selectAuthGrpListInqirePopup(MaAuthgrpVO vo, ModelMap model) {
|
public String selectAuthGrpListInqirePopup(BOMaAuthgrpVO vo, ModelMap model) {
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
// 페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
vo.setPaginationInfo(paginationInfo);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpListInqirePopup", vo),
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
model,
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
"resultMap"
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
);
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
|
List<DataMap> fnctList = service.selectBOFnctListInqire(vo);
|
||||||
|
content.put("fnctList", fnctList);
|
||||||
|
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpListInqirePopup", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/sys/authgrp/maAuthGrpListInqirePopupR";
|
return "admin/sys/authgrp/maAuthGrpListInqirePopupR";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -20,14 +21,15 @@ public class BOMaAuthgrpVO extends AbstractVO {
|
|||||||
// private String authorGroupCd;
|
// private String authorGroupCd;
|
||||||
|
|
||||||
/** 권한그룹명 */
|
/** 권한그룹명 */
|
||||||
|
@NotEmpty(message = "권한그룹명")
|
||||||
private String authorNm;
|
private String authorNm;
|
||||||
// private String authorGroupNm;
|
// private String authorGroupNm;
|
||||||
|
|
||||||
/** 권한그룹설명 */
|
/** 권한그룹설명 */
|
||||||
|
@NotEmpty(message = "권한그룹설명")
|
||||||
private String authorDc;
|
private String authorDc;
|
||||||
// private String authorGroupDc;
|
// private String authorGroupDc;
|
||||||
|
|
||||||
|
|
||||||
/** 권한그룹목록 */
|
/** 권한그룹목록 */
|
||||||
/** 권한명 */
|
/** 권한명 */
|
||||||
private String srchAuthorNm;
|
private String srchAuthorNm;
|
||||||
@@ -86,7 +88,9 @@ public class BOMaAuthgrpVO extends AbstractVO {
|
|||||||
private DataMap codeMap;
|
private DataMap codeMap;
|
||||||
private List<DataMap> codeList;
|
private List<DataMap> codeList;
|
||||||
|
|
||||||
|
@NotEmpty(message = "시스템 구분")
|
||||||
private String sysDvCd;
|
private String sysDvCd;
|
||||||
|
|
||||||
private String sysDvNm;
|
private String sysDvNm;
|
||||||
|
|
||||||
private int updusr;
|
private int updusr;
|
||||||
|
|||||||
@@ -3,12 +3,18 @@ package com.wb.domainserver.domain.admin.sys.author.controller;
|
|||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
import com.wb.domainserver.domain.admin.sys.author.service.BOMaAuthorService;
|
import com.wb.domainserver.domain.admin.sys.author.service.BOMaAuthorService;
|
||||||
import com.wb.domainserver.domain.admin.sys.author.vo.BOMaAuthorVO;
|
import com.wb.domainserver.domain.admin.sys.author.vo.BOMaAuthorVO;
|
||||||
import com.wb.domainserver.domain.admin.sys.author.vo.MaAuthorVO;
|
import com.wb.domainserver.domain.admin.sys.author.vo.MaAuthorVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
|
import com.wb.domainserver.exception.code.ErrorCode;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||||
|
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||||
|
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.RESRC;
|
import com.wb.domainserver.util.communicate.RESRC;
|
||||||
@@ -19,6 +25,7 @@ import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -50,8 +57,6 @@ import java.util.*;
|
|||||||
@RequestMapping("/admin/sys/author")
|
@RequestMapping("/admin/sys/author")
|
||||||
public class MaAuthorController {
|
public class MaAuthorController {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private BOMaAuthorService service;
|
|
||||||
/** WebClient 호출을 위한 wrapper */
|
/** WebClient 호출을 위한 wrapper */
|
||||||
@Autowired
|
@Autowired
|
||||||
private WnbtWebClientResponseHandler responseHandler;
|
private WnbtWebClientResponseHandler responseHandler;
|
||||||
@@ -62,17 +67,40 @@ public class MaAuthorController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaAuthorService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 권한 목록 화면
|
* 권한 목록 화면
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectAuthorListInqireForm")
|
@RequestMapping("/selectAuthorListInqireForm")
|
||||||
public String selectAuthorListInqireForm(MaAuthorVO vo, ModelMap model) {
|
public String selectAuthorListInqireForm(BOMaAuthorVO vo, ModelMap model) {
|
||||||
|
DataMap resultMap = new DataMap();
|
||||||
|
// 페이징
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
vo.setPaginationInfo(paginationInfo);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthorListInqireForm",vo)
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
);
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
List<DataMap> codeList = service.managerCode();
|
||||||
|
resultMap.put("cgn036", codeList);
|
||||||
|
|
||||||
|
resultMap.put("paramVO", vo);
|
||||||
|
resultMap.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthorListInqireForm",vo)
|
||||||
|
// );
|
||||||
|
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
try {
|
try {
|
||||||
@@ -80,9 +108,10 @@ public class MaAuthorController {
|
|||||||
|
|
||||||
} catch(JsonProcessingException e) {
|
} catch(JsonProcessingException e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
throw new WnbtRestException("에러가 발생했습니다."+e);
|
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
}
|
}
|
||||||
model.addAttribute("resultMap", resultMap);
|
model.addAttribute("resultMap", resultMap);
|
||||||
|
|
||||||
@@ -95,13 +124,32 @@ public class MaAuthorController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectAuthorListInqire")
|
@RequestMapping("/selectAuthorListInqire")
|
||||||
public String selectAuthorListInqire(MaAuthorVO vo, ModelMap model) {
|
public String selectAuthorListInqire(BOMaAuthorVO vo, ModelMap model) {
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
vo.setPaginationInfo(paginationInfo);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthorListInqire", vo),
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
model,
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
"resultMap"
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
);
|
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
|
List<DataMap> authorList = new ArrayList<>();
|
||||||
|
authorList = service.selectBOAuthorListInqire(vo);
|
||||||
|
content.put("authorList", authorList);
|
||||||
|
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthorListInqire", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/sys/author/maAuthorListInqireR";
|
return "admin/sys/author/maAuthorListInqireR";
|
||||||
}
|
}
|
||||||
@@ -112,12 +160,17 @@ public class MaAuthorController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectAuthorUpdtForm")
|
@RequestMapping("/selectAuthorUpdtForm")
|
||||||
public String selectAuthorUpdtForm(MaAuthorVO vo, ModelMap model) {
|
public String selectAuthorUpdtForm(BOMaAuthorVO vo, ModelMap model) {
|
||||||
|
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
DataMap resultMap = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthorUpdtForm",vo)
|
resultMap = service.selectBOAuthorUpdtForm(vo);
|
||||||
);
|
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthorUpdtForm",vo)
|
||||||
|
// );
|
||||||
|
|
||||||
resultMap.put("srchInfo", vo);
|
resultMap.put("srchInfo", vo);
|
||||||
model.addAttribute("resultMap", resultMap);
|
model.addAttribute("resultMap", resultMap);
|
||||||
@@ -129,12 +182,23 @@ public class MaAuthorController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value ="/updateAuthorUpdt")
|
@RequestMapping(value ="/updateAuthorUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateAuthorUpdt(MaAuthorVO vo) {
|
public ResponseEntity<WnbtResponse> updateAuthorUpdt(BOMaAuthorVO vo) {
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/updateBOAuthorUpdt", vo),
|
vo.setUpdusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
content = service.updateBOAuthorUpdt(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/updateBOAuthorUpdt", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -142,12 +206,20 @@ public class MaAuthorController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value ="/selectAuthGrpFuntPopup")
|
@RequestMapping(value ="/selectAuthGrpFuntPopup", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> selectAuthGrpFuntPopup(MaAuthorVO vo) {
|
public ResponseEntity<WnbtResponse> selectAuthGrpFuntPopup(BOMaAuthorVO vo) {
|
||||||
return responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthGrpFuntPopup", vo),
|
content = service.selectBOMenuFnctListInqire(vo);
|
||||||
ReplyFromResrc::getReply
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthGrpFuntPopup", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,25 @@
|
|||||||
package com.wb.domainserver.domain.admin.sys.comncd.controller;
|
package com.wb.domainserver.domain.admin.sys.comncd.controller;
|
||||||
|
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.MaComncdVO;
|
import com.wb.domainserver.domain.admin.sys.comncd.vo.MaComncdVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||||
|
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||||
|
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.*;
|
import com.wb.domainserver.util.communicate.*;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -51,166 +60,274 @@ public class MaComncdController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaComncdService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 공통코드 목록 조회 폼
|
* 공통코드 목록 조회 폼
|
||||||
* @param maComncdVO
|
* @param boMaComncdVO
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectCmmnCodeListInqireForm")
|
@RequestMapping("/selectCmmnCodeListInqireForm")
|
||||||
public String selectCmmnCodeListInqireForm(MaComncdVO maComncdVO,
|
public String selectCmmnCodeListInqireForm(BOMaComncdVO boMaComncdVO, ModelMap model) {
|
||||||
ModelMap model) {
|
Map<String, Object> content = new HashMap<>();
|
||||||
responseHandler.handleResponse(
|
content.put("BOMaComncdVO", boMaComncdVO);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqireForm", maComncdVO),
|
|
||||||
model,
|
model.addAttribute("resultMap", content);
|
||||||
"resultMap"
|
// responseHandler.handleResponse(
|
||||||
);
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqireForm", maComncdVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/sys/comncd/MaCmmnCodeListInqireRForm";
|
return "admin/sys/comncd/MaCmmnCodeListInqireRForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 공통코드 목록 조회 리스트
|
* 공통코드 목록 조회 리스트
|
||||||
* @param maComncdVO
|
* @param boMaComncdVO
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectCmmnCodeListInqire")
|
@RequestMapping("/selectCmmnCodeListInqire")
|
||||||
public String selectCmmnCodeListInqire(MaComncdVO maComncdVO,
|
public String selectCmmnCodeListInqire(BOMaComncdVO boMaComncdVO, ModelMap model) {
|
||||||
ModelMap model) {
|
Map<String, Object> content = new HashMap<>();
|
||||||
responseHandler.handleResponse(
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqire", maComncdVO),
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
model,
|
paginationInfo.setCurrentPageNo(boMaComncdVO.getPageIndex());
|
||||||
"resultMap"
|
paginationInfo.setRecordCountPerPage(boMaComncdVO.getPageUnit());
|
||||||
);
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
boMaComncdVO.setPaginationInfo(paginationInfo);
|
||||||
|
boMaComncdVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
boMaComncdVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
boMaComncdVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
//공통코드 목록조회
|
||||||
|
List<DataMap> list = service.selectBOCmmnCodeListInqire(boMaComncdVO);
|
||||||
|
|
||||||
|
content.put("BOMaComncdVO", boMaComncdVO);
|
||||||
|
content.put("paginationInfo", boMaComncdVO.getPaginationInfo());
|
||||||
|
content.put("list", list);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqire", maComncdVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/sys/comncd/MaCmmnCodeListInqireR";
|
return "admin/sys/comncd/MaCmmnCodeListInqireR";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 공통코드 등록 화면이동
|
* 공통코드 등록 화면이동
|
||||||
* @param maComncdVO
|
* @param boMaComncdVO
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectCmmnCodeRegistForm")
|
@RequestMapping("/selectCmmnCodeRegistForm")
|
||||||
public String selectCmmnCodeRegistForm(MaComncdVO maComncdVO,
|
public String selectCmmnCodeRegistForm(BOMaComncdVO boMaComncdVO, ModelMap model) {
|
||||||
ModelMap model) {
|
Map<String, Object> content = new HashMap<>();
|
||||||
responseHandler.handleResponse(
|
content.put("BOMaComncdVO", boMaComncdVO);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqireForm", maComncdVO),
|
|
||||||
model,
|
model.addAttribute("resultMap", content);
|
||||||
"resultMap"
|
// responseHandler.handleResponse(
|
||||||
);
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqireForm", maComncdVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/sys/comncd/MaCmmnCodeRegistC";
|
return "admin/sys/comncd/MaCmmnCodeRegistC";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 공통코드 수정 화면이동
|
* 공통코드 수정 화면이동
|
||||||
* @param maComncdVO
|
* @param boMaComncdVO
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectCmmnCodeUpdtForm")
|
@RequestMapping("/selectCmmnCodeUpdtForm")
|
||||||
public String selectCmmnCodeUpdtForm(MaComncdVO maComncdVO,
|
public String selectCmmnCodeUpdtForm(BOMaComncdVO boMaComncdVO, ModelMap model) {
|
||||||
ModelMap model) {
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeUpdtForm", maComncdVO),
|
List<DataMap> CodeGrouplist = service.selectBOCmmnCodeGroupDetail(boMaComncdVO);
|
||||||
model,
|
List<DataMap> list = service.selectBOCommcdDetailAllList(boMaComncdVO);
|
||||||
"resultMap"
|
|
||||||
);
|
resultMap.put("BOMaComncdVO", boMaComncdVO);
|
||||||
|
resultMap.put("CodeGrouplist", CodeGrouplist);
|
||||||
|
resultMap.put("list", list);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", resultMap);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeUpdtForm", maComncdVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/sys/comncd/MaCmmnCodeUpdtU";
|
return "admin/sys/comncd/MaCmmnCodeUpdtU";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 공통코드(코드그룹, 코드) 등록 처리
|
* 공통코드(코드그룹, 코드) 등록 처리
|
||||||
* @param maComncdVO
|
* @param boMaComncdVO
|
||||||
* @param bindingResult
|
* @param bindingResult
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/insertCmmnCodeRegist", method = RequestMethod.POST)
|
@RequestMapping(value = "/insertCmmnCodeRegist", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> insertCmmnCodeRegist(@Validated MaComncdVO maComncdVO, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> insertCmmnCodeRegist(@Validated BOMaComncdVO boMaComncdVO, BindingResult bindingResult) {
|
||||||
|
|
||||||
//정합성 검사
|
//정합성 검사
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
|
Map<String, Object> message = new HashMap<>();
|
||||||
|
//사용자 정보 추출 및 적용
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
boMaComncdVO.setRegusr(user.getUserInnb());
|
||||||
|
boMaComncdVO.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
Integer result = service.selectBOCmmnCodeGrpIdDplctInqire(boMaComncdVO.getGroupCd());
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/insertBOCmmnCodeRegist", maComncdVO),
|
if (result > 0) {
|
||||||
ReplyFromResrc::getReply
|
message.put("result", "dublechk");
|
||||||
|
} else{
|
||||||
|
message = service.saveBOCmmnCode(boMaComncdVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/insertBOCmmnCodeRegist", maComncdVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 공통코드 코드그룹 ID 중복 조회
|
* 공통코드 코드그룹 ID 중복 조회
|
||||||
* @param maComncdVO
|
* @param boMaComncdVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectCmmnCodeGrpIdDplctInqire")
|
@RequestMapping(value = "/selectCmmnCodeGrpIdDplctInqire", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<?> selectCmmnCodeGrpIdDplctInqire(MaComncdVO maComncdVO) {
|
public ResponseEntity<?> selectCmmnCodeGrpIdDplctInqire(BOMaComncdVO boMaComncdVO) {
|
||||||
return responseHandler.handleResponse(
|
Integer result = service.selectBOCmmnCodeGrpIdDplctInqire(boMaComncdVO.getGroupCd());
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeGrpIdDplctInqire", maComncdVO),
|
|
||||||
ReplyFromResrc::getReply
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeGrpIdDplctInqire", maComncdVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 공통코드(코드그룹, 코드) 수정 처리
|
* 공통코드(코드그룹, 코드) 수정 처리
|
||||||
* @param maComncdVO
|
* @param boMaComncdVO
|
||||||
* @param bindingResult
|
* @param bindingResult
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateCmmnCodeUpdt", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateCmmnCodeUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateCmmnCodeUpdt(@Validated MaComncdVO maComncdVO, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> updateCmmnCodeUpdt(@Validated BOMaComncdVO boMaComncdVO, BindingResult bindingResult) {
|
||||||
|
|
||||||
//정합성 검사
|
//정합성 검사
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
Map<String, Object> message = new HashMap<>();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/saveBOCmmnCode", maComncdVO),
|
//사용자 정보 추출 및 적용
|
||||||
ReplyFromResrc::getReply
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
boMaComncdVO.setRegusr(user.getUserInnb());
|
||||||
|
boMaComncdVO.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
message = service.saveBOCmmnCode(boMaComncdVO);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/saveBOCmmnCode", maComncdVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 공통코드 삭제(논리, USE_AT Y->N)
|
* 공통코드 삭제(논리, USE_AT Y->N)
|
||||||
* @param maComncdVO
|
* @param boMaComncdVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/deleteCmmnCodeDel", method = RequestMethod.POST)
|
@RequestMapping(value = "/deleteCmmnCodeDel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> deleteCmmnCodeDel(MaComncdVO maComncdVO) {
|
public ResponseEntity<WnbtResponse> deleteCmmnCodeDel(BOMaComncdVO boMaComncdVO) {
|
||||||
|
//사용자 정보 추출 및 적용
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
boMaComncdVO.setRegusr(user.getUserInnb());
|
||||||
|
boMaComncdVO.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
Map<String, Object> message = service.deleteBOCmmnCodeDel(boMaComncdVO);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/deleteBOCmmnCodeDel", maComncdVO),
|
|
||||||
ReplyFromResrc::getReply
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/deleteBOCmmnCodeDel", maComncdVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 공통코드 엑셀 다운로드
|
* 공통코드 엑셀 다운로드
|
||||||
* @param maComncdVO
|
* @param boMaComncdVO
|
||||||
* @param response
|
* @param response
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@RequestMapping(value = "/selectBOCmmnCodeListExcelDwld", method = RequestMethod.POST)
|
@RequestMapping(value = "/selectBOCmmnCodeListExcelDwld", method = RequestMethod.POST)
|
||||||
public void selectBOCmmnCodeListExcelDwld(MaComncdVO maComncdVO, HttpServletResponse response) {
|
public void selectBOCmmnCodeListExcelDwld(BOMaComncdVO boMaComncdVO, HttpServletResponse response) {
|
||||||
|
|
||||||
maComncdVO.setPageIndex(1); //10000건까지 엑셀 출력
|
boMaComncdVO.setPageIndex(1); //10000건까지 엑셀 출력
|
||||||
maComncdVO.setPageUnit(10000); //10000건까지 엑셀 출력
|
boMaComncdVO.setPageUnit(10000); //10000건까지 엑셀 출력
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqire", maComncdVO)
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
);
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(boMaComncdVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(boMaComncdVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
boMaComncdVO.setPaginationInfo(paginationInfo);
|
||||||
|
boMaComncdVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
boMaComncdVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
boMaComncdVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
//공통코드 목록조회
|
||||||
|
List<DataMap> list = service.selectBOCmmnCodeListInqire(boMaComncdVO);
|
||||||
|
|
||||||
|
resultMap.put("BOMaComncdVO", boMaComncdVO);
|
||||||
|
resultMap.put("paginationInfo", boMaComncdVO.getPaginationInfo());
|
||||||
|
resultMap.put("list", list);
|
||||||
|
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqire", maComncdVO)
|
||||||
|
// );
|
||||||
|
|
||||||
List<Map<String, Object>> resultMapList = (List<Map<String, Object>>) resultMap.get("list");
|
List<Map<String, Object>> resultMapList = (List<Map<String, Object>>) resultMap.get("list");
|
||||||
List<Map<String, Object>> dataList = new ArrayList<>();
|
List<Map<String, Object>> dataList = new ArrayList<>();
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.wb.domainserver.domain.admin.sys.comncd.vo;
|
|||||||
|
|
||||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -14,8 +15,10 @@ public class BOMaComncdDetailVO extends AbstractVO {
|
|||||||
/** 그룹코드 */
|
/** 그룹코드 */
|
||||||
private String groupCd;
|
private String groupCd;
|
||||||
/** 코드 */
|
/** 코드 */
|
||||||
|
@NotBlank(message = "코드")
|
||||||
private String cd;
|
private String cd;
|
||||||
/** 코드명 */
|
/** 코드명 */
|
||||||
|
@NotBlank(message = "코드명")
|
||||||
private String cdNm;
|
private String cdNm;
|
||||||
/** 코드설명 */
|
/** 코드설명 */
|
||||||
private String cdDc;
|
private String cdDc;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
|
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -32,14 +34,17 @@ public class BOMaComncdVO extends AbstractVO {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 그룹코드 */
|
/** 그룹코드 */
|
||||||
|
@NotBlank(message = "코드그룹 ID")
|
||||||
private String groupCd;
|
private String groupCd;
|
||||||
/** 코드그룹명 */
|
/** 코드그룹명 */
|
||||||
|
@NotBlank(message = "코드그룹 명")
|
||||||
private String groupCdNm;
|
private String groupCdNm;
|
||||||
/** 코드그룹설명 */
|
/** 코드그룹설명 */
|
||||||
private String groupCdDc;
|
private String groupCdDc;
|
||||||
/** 코드그룹 사용여부 */
|
/** 코드그룹 사용여부 */
|
||||||
private String groupUseAt;
|
private String groupUseAt;
|
||||||
/** 코드정보 */
|
/** 코드정보 */
|
||||||
|
@Valid
|
||||||
private List<BOMaComncdDetailVO> comncdDetailVOList;
|
private List<BOMaComncdDetailVO> comncdDetailVOList;
|
||||||
|
|
||||||
/** 검색 타입 */
|
/** 검색 타입 */
|
||||||
|
|||||||
@@ -8,11 +8,18 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||||
import com.wb.domainserver.domain.admin.sys.fnct.service.BOMaFnctService;
|
import com.wb.domainserver.domain.admin.sys.fnct.service.BOMaFnctService;
|
||||||
import com.wb.domainserver.domain.admin.sys.fnct.vo.BOFnctVO;
|
import com.wb.domainserver.domain.admin.sys.fnct.vo.BOFnctVO;
|
||||||
|
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||||
|
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -47,9 +54,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@RequestMapping("/admin/sys/fnct")
|
@RequestMapping("/admin/sys/fnct")
|
||||||
public class MaFnctControlelr {
|
public class MaFnctControlelr {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private BOMaFnctService service;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private WnbtWebClientResponseHandler responseHandler;
|
private WnbtWebClientResponseHandler responseHandler;
|
||||||
|
|
||||||
@@ -59,20 +63,55 @@ public class MaFnctControlelr {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaFnctService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaComncdService boMaComncdService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 기능 목록 화면
|
* 기능 목록 화면
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectFnctListInqireForm")
|
@RequestMapping(value = "/selectFnctListInqireForm")
|
||||||
public String selectFnctListInqireForm(MaFnctVO vo, ModelMap model) {
|
public String selectFnctListInqireForm(BOFnctVO vo, ModelMap model) {
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
|
||||||
|
// 페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
vo.setPaginationInfo(paginationInfo);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctListInqireForm", vo),
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
model,
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
"resultMap"
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
);
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
|
List<DataMap> codeList = new ArrayList<>();
|
||||||
|
DataMap codeMap = new DataMap();
|
||||||
|
codeMap = service.selectBOFnctCode();
|
||||||
|
codeList.add(codeMap);
|
||||||
|
|
||||||
|
// 공통코드 호출
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("SYS_DV"); // 관리자구분코드(MNGR_DV)->시스템구분(SYS_DV) --시스템구분
|
||||||
|
List<?> mngrDvList = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
content.put("codeList", codeList);
|
||||||
|
content.put("mngrDvList", mngrDvList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctListInqireForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/sys/fnct/maFnctListInqireForm";
|
return "admin/sys/fnct/maFnctListInqireForm";
|
||||||
}
|
}
|
||||||
@@ -82,14 +121,39 @@ public class MaFnctControlelr {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectFnctListInqire")
|
@RequestMapping(value = "/selectFnctListInqire")
|
||||||
public String selectFnctListInqire(MaFnctVO vo, ModelMap model) {
|
public String selectFnctListInqire(BOFnctVO vo, ModelMap model) {
|
||||||
|
// 페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctListInqire", vo),
|
content.put("paramVO", vo);
|
||||||
model,
|
|
||||||
"resultMap"
|
List<DataMap> fnctList = new ArrayList<>();
|
||||||
);
|
fnctList = service.selectBOFnctListInqire(vo);
|
||||||
|
|
||||||
|
List<DataMap> codeList = new ArrayList<>();
|
||||||
|
DataMap codeMap = new DataMap();
|
||||||
|
codeMap = service.selectBOFnctCode();
|
||||||
|
codeList.add(codeMap);
|
||||||
|
|
||||||
|
content.put("resultList", fnctList);
|
||||||
|
content.put("codeList", codeList);
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctListInqire", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/sys/fnct/maFnctListInqire";
|
return "admin/sys/fnct/maFnctListInqire";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,14 +163,27 @@ public class MaFnctControlelr {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectFnctRegistForm")
|
@RequestMapping(value = "/selectFnctRegistForm")
|
||||||
public String selectFnctRegistForm(MaFnctVO vo, ModelMap model) {
|
public String selectFnctRegistForm(BOFnctVO vo, ModelMap model) {
|
||||||
|
List<DataMap> codeList = new ArrayList<>();
|
||||||
|
codeList = service.selectBOFnctRegistForm();
|
||||||
|
|
||||||
|
// 공통코드 호출
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("SYS_DV"); //시스템구분(SYS_DV)
|
||||||
|
List<?> mngrDvList = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctRegistForm", vo),
|
content.put("codeList", codeList);
|
||||||
model,
|
content.put("vo", vo);
|
||||||
"resultMap"
|
content.put("mngrDvList", mngrDvList);
|
||||||
);
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctRegistForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/sys/fnct/maFnctC";
|
return "admin/sys/fnct/maFnctC";
|
||||||
}
|
}
|
||||||
@@ -116,9 +193,8 @@ public class MaFnctControlelr {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/insertFnctRegist")
|
@RequestMapping(value = "/insertFnctRegist", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> insertFnctRegist(@Validated MaFnctVO vo, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> insertFnctRegist(@Validated BOFnctVO vo, BindingResult bindingResult) {
|
||||||
|
|
||||||
|
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
@@ -127,10 +203,22 @@ public class MaFnctControlelr {
|
|||||||
throw new WnbtRestException("URL 중복확인 해주세요.");
|
throw new WnbtRestException("URL 중복확인 해주세요.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/insertBOFnctRegist", vo),
|
vo.setRegusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
DataMap result = new DataMap();
|
||||||
|
result = service.insertBOFnctRegist(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/insertBOFnctRegist", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -138,13 +226,20 @@ public class MaFnctControlelr {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectFnctUrlDplctInqire")
|
@RequestMapping(value = "/selectFnctUrlDplctInqire", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> selectFnctUrlDplctInqire(MaFnctVO vo) {
|
public ResponseEntity<WnbtResponse> selectFnctUrlDplctInqire(BOFnctVO vo) {
|
||||||
|
DataMap result = new DataMap();
|
||||||
|
result = service.selectBOFnctUrlDplctInqire(vo);
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
return ResponseEntity.ok(
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctUrlDplctInqire", vo),
|
WnbtResponse.builder()
|
||||||
ReplyFromResrc::getReply
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctUrlDplctInqire", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -153,14 +248,36 @@ public class MaFnctControlelr {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectFnctUpdtForm")
|
@RequestMapping(value = "/selectFnctUpdtForm")
|
||||||
public String selectFnctUpdtForm(MaFnctVO vo, ModelMap model) {
|
public String selectFnctUpdtForm(BOFnctVO vo, ModelMap model) {
|
||||||
|
BOFnctVO fnctVo = new BOFnctVO();
|
||||||
|
fnctVo = service.selectBOfnctUpdtForm(vo);
|
||||||
|
|
||||||
|
List<DataMap> codeList = new ArrayList<>();
|
||||||
|
codeList = service.selectBOFnctRegistForm();
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
fnctVo.setSrchFnctDv(vo.getSrchFnctDv());
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctUpdtForm", vo),
|
fnctVo.setSrchFnctNm(vo.getSrchFnctNm());
|
||||||
model,
|
fnctVo.setSrchFnctUrl(vo.getSrchFnctUrl());
|
||||||
"resultMap"
|
fnctVo.setSrchSysDvCd(vo.getSrchSysDvCd());
|
||||||
);
|
fnctVo.setPageIndex(vo.getPageIndex());
|
||||||
|
fnctVo.setPageUnit(vo.getPageUnit());
|
||||||
|
|
||||||
|
// 공통코드 호출
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("SYS_DV"); //시스템구분(SYS_DV)
|
||||||
|
List<?> mngrDvList = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
content.put("codeList", codeList);
|
||||||
|
content.put("vo", fnctVo);
|
||||||
|
content.put("mngrDvList", mngrDvList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctUpdtForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/sys/fnct/maFnctU";
|
return "admin/sys/fnct/maFnctU";
|
||||||
}
|
}
|
||||||
@@ -170,17 +287,26 @@ public class MaFnctControlelr {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateFnctUpdt")
|
@RequestMapping(value = "/updateFnctUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateFnctUpdt(@Validated MaFnctVO vo, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> updateFnctUpdt(@Validated BOFnctVO vo, BindingResult bindingResult) {
|
||||||
|
|
||||||
|
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/updateBOFnctUpdt", vo),
|
vo.setUpdusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
|
||||||
|
DataMap result = new DataMap();
|
||||||
|
result = service.updateBOFnctUpdt(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/updateBOFnctUpdt", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -188,14 +314,24 @@ public class MaFnctControlelr {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/deleteFnctDel", method = RequestMethod.GET)
|
@RequestMapping(value = "/deleteFnctDel", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> deleteFnctDel(MaFnctVO vo) {
|
public ResponseEntity<WnbtResponse> deleteFnctDel(BOFnctVO vo) {
|
||||||
|
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
DataMap result = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/deleteBOFnctDel", vo),
|
result = service.deleteBOFnctDel(vo);
|
||||||
ReplyFromResrc::getReply
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/deleteBOFnctDel", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -18,6 +19,7 @@ public class BOFnctVO extends AbstractVO {
|
|||||||
/** 기능ID */
|
/** 기능ID */
|
||||||
private String fnctId;
|
private String fnctId;
|
||||||
/** 시스템자구분 */
|
/** 시스템자구분 */
|
||||||
|
@NotBlank(message = "시스템 구분")
|
||||||
private String sysDvCd;
|
private String sysDvCd;
|
||||||
/** 시스템자구분 */
|
/** 시스템자구분 */
|
||||||
private String sysDvCdNm;
|
private String sysDvCdNm;
|
||||||
@@ -38,8 +40,10 @@ public class BOFnctVO extends AbstractVO {
|
|||||||
/** 메뉴명 */
|
/** 메뉴명 */
|
||||||
private String menuNm;
|
private String menuNm;
|
||||||
/** 기능명 */
|
/** 기능명 */
|
||||||
|
@NotBlank(message = "기능명")
|
||||||
private String fnctNm;
|
private String fnctNm;
|
||||||
/** 기능구분 조회|화면이동|수정|삭제 */
|
/** 기능구분 조회|화면이동|수정|삭제 */
|
||||||
|
@NotBlank(message = "기능구분")
|
||||||
private String fnctDvCd;
|
private String fnctDvCd;
|
||||||
/** 기능Url */
|
/** 기능Url */
|
||||||
private String fnctUrl;
|
private String fnctUrl;
|
||||||
@@ -65,6 +69,8 @@ public class BOFnctVO extends AbstractVO {
|
|||||||
private DataMap codeMap;
|
private DataMap codeMap;
|
||||||
private List<DataMap> codeList;
|
private List<DataMap> codeList;
|
||||||
|
|
||||||
|
/** 중복 여부 */
|
||||||
|
private String isChckDup;
|
||||||
|
|
||||||
/* 권한메뉴기능고유번호 */
|
/* 권한메뉴기능고유번호 */
|
||||||
private String authorMenuFnctInnb;
|
private String authorMenuFnctInnb;
|
||||||
|
|||||||
@@ -2,20 +2,32 @@ package com.wb.domainserver.domain.admin.sys.menu.controller;
|
|||||||
|
|
||||||
import com.nimbusds.jose.shaded.gson.Gson;
|
import com.nimbusds.jose.shaded.gson.Gson;
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.menu.service.BOMaMenuService;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.menu.vo.BOMaMenuVO;
|
||||||
import com.wb.domainserver.domain.admin.sys.menu.vo.MaMenuVO;
|
import com.wb.domainserver.domain.admin.sys.menu.vo.MaMenuVO;
|
||||||
|
import com.wb.domainserver.domain.admin.user.mngr.service.BOMaMngrService;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||||
|
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||||
|
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.*;
|
import com.wb.domainserver.util.communicate.RESRC;
|
||||||
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -48,6 +60,14 @@ public class MaMenuController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaMenuService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaMngrService mngrService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaComncdService boMaComncdService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 메뉴 수정 화면이동
|
* 메뉴 수정 화면이동
|
||||||
@@ -55,10 +75,20 @@ public class MaMenuController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectMenuSaveForm")
|
@RequestMapping("/selectMenuSaveForm")
|
||||||
public String selectMenuSaveForm(MaMenuVO vo, ModelMap model) {
|
public String selectMenuSaveForm(BOMaMenuVO vo, ModelMap model) {
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
// 공통코드 호출
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/menu/selectBOMenuListInqire",vo)
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
);
|
bOMaComncdVO.setGroupCd("EXPSR_LC_DV"); //노출위치구분 (EXPSR_LC_DV)
|
||||||
|
List<?> expsrLcDvCd = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
resultMap.put("expsrLcDvCd", expsrLcDvCd);
|
||||||
|
resultMap.put("menuList", service.selectBOMenuManage(vo));
|
||||||
|
resultMap.put("mngrDvList", mngrService.selectBOMngrDvList());
|
||||||
|
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/menu/selectBOMenuListInqire",vo)
|
||||||
|
// );
|
||||||
List<Map<String, Object>> resultMapList = (List<Map<String, Object>>) resultMap.get("menuList");
|
List<Map<String, Object>> resultMapList = (List<Map<String, Object>>) resultMap.get("menuList");
|
||||||
String jsonMenuList = new Gson().toJson(resultMapList);
|
String jsonMenuList = new Gson().toJson(resultMapList);
|
||||||
model.addAttribute("resultMap", resultMap);
|
model.addAttribute("resultMap", resultMap);
|
||||||
@@ -72,13 +102,26 @@ public class MaMenuController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/updateMenuUpdt")
|
@RequestMapping(value = "/updateMenuUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateMenuUpdt(MaMenuVO vo, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> updateMenuUpdt(BOMaMenuVO vo, BindingResult bindingResult) {
|
||||||
|
//사용자 정보 추출 및 적용
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
vo.setRegusr(user.getUserInnb());
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
//메뉴 저장 로직
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/menu/updateBOMenuUpdt", vo),
|
DataMap message = new DataMap();
|
||||||
ReplyFromResrc::getReply
|
message = service.updateBOMenuManage(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/menu/updateBOMenuUpdt", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -86,12 +129,25 @@ public class MaMenuController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/deleteMenuDel")
|
@RequestMapping(value = "/deleteMenuDel", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> deleteMenuDel(MaMenuVO vo) {
|
public ResponseEntity<WnbtResponse> deleteMenuDel(BOMaMenuVO vo) {
|
||||||
return responseHandler.handleResponse(
|
//사용자 정보 추출 및 적용
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/menu/deleteBOMenuDel", vo),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
vo.setRegusr(user.getUserInnb());
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
//메뉴 삭제 로직
|
||||||
|
DataMap message = service.deleteBOMenuManage(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/menu/deleteBOMenuDel", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,33 +1,50 @@
|
|||||||
package com.wb.domainserver.domain.admin.user.mbr.controller;
|
package com.wb.domainserver.domain.admin.user.mbr.controller;
|
||||||
|
|
||||||
import com.wb.domainserver.domain.mngr.mbr.vo.MbrAppnVO;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
import com.wb.domainserver.domain.mngr.mbr.vo.WithdrawalVO;
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||||
|
import com.wb.domainserver.domain.admin.store.sopmal.vo.BOMaSopmalVO;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mbr.service.BOMbrService;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrAppnVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrSrchVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOWithdrawalVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ntcn.mssage.service.BOMssageService;
|
||||||
|
import com.wb.domainserver.domain.gcone.setup.ordrmngr.service.BOOrdrMngrService;
|
||||||
|
import com.wb.domainserver.domain.gcone.setup.ordrmngr.vo.BOSetupOrdrVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.util.communicate.*;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
|
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||||
|
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||||
|
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||||
|
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||||
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
|
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
|
import com.wb.domainserver.util.string.StringUtil;
|
||||||
import com.wb.domainserver.util.util.Util;
|
import com.wb.domainserver.util.util.Util;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpSession;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import java.util.ArrayList;
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import java.util.HashMap;
|
||||||
import com.wb.domainserver.domain.admin.user.mbr.vo.MaMbrSrchVO;
|
import java.util.List;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
|
||||||
import com.wb.domainserver.response.WnbtResponseBody;
|
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
|
||||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,23 +76,90 @@ public class MaMbrController {
|
|||||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMbrService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaComncdService bOMaComncdService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaSopmalService maSopmalService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOCommonService boCommonService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOCommonService commonService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMssageService boMssageService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOOrdrMngrService boOrdrMngrService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 회원 목록 검색 폼 조회
|
* 회원 목록 검색 폼 조회
|
||||||
* @param maMbrSrchVO
|
* @param vo
|
||||||
* @return MaMbrListInqireR.jsp
|
* @return MaMbrListInqireR.jsp
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value="/selectMaMbrListInqireForm")
|
@RequestMapping(value="/selectMaMbrListInqireForm")
|
||||||
public String selectMaMbrListInqireForm(ModelMap model,MaMbrSrchVO maMbrSrchVO) {
|
public String selectMaMbrListInqireForm(ModelMap model,BOMbrSrchVO vo) {
|
||||||
/*페이지 구분 set => 브랜드 조회*/
|
|
||||||
maMbrSrchVO.setReqPageDv("integ");
|
|
||||||
|
|
||||||
//BO에서 API 호출(회원 목록 조회)
|
/*페이지 구분 set => 브랜드 조회*/
|
||||||
responseHandler.handleResponse(
|
vo.setReqPageDv("integ");
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrListInqireForm", maMbrSrchVO),
|
|
||||||
model,
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
"resultMap"
|
if("01".equals(user.getSysDvCd())){
|
||||||
);
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
vo.setSrchMbrDvCd(user.getMbrDvCd());
|
||||||
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
|
||||||
|
/*회원리스트 조회일때만*/
|
||||||
|
if (!"Y".equals(vo.getPopDv())) {
|
||||||
|
//리셀러 여부 o
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("RSLR_APPN_DV");
|
||||||
|
List<?> appen = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
content.put("appen", appen);
|
||||||
|
}
|
||||||
|
|
||||||
|
//쇼핑몰 브랜드 검색
|
||||||
|
List<DataMap> sopmal = new ArrayList<>();
|
||||||
|
if ("integ".equals(vo.getReqPageDv())) {
|
||||||
|
sopmal = maSopmalService.selectBOSopmalCdNm();
|
||||||
|
content.put("sopmal", sopmal);
|
||||||
|
}
|
||||||
|
// Shop 정보 조회
|
||||||
|
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||||
|
boOrdrVO.setSopmalCd(vo.getSopmalCd());
|
||||||
|
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
content.put("vo", vo);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrListInqireForm", maMbrSrchVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/use/mbr/MaMbrListInqireRForm";
|
return "admin/use/mbr/MaMbrListInqireRForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,13 +169,50 @@ public class MaMbrController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectMaMbrListInqire")
|
@RequestMapping("/selectMaMbrListInqire")
|
||||||
public String selectMbrMaListInqire(ModelMap model,MaMbrSrchVO maMbrSrchVO) {
|
public String selectMbrMaListInqire(ModelMap model,BOMbrSrchVO vo) {
|
||||||
responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrListInqire", maMbrSrchVO),
|
|
||||||
model,
|
if("01".equals(user.getSysDvCd())){
|
||||||
"resultListMap"
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
);
|
}
|
||||||
model.addAttribute("maMbrSrchVO",maMbrSrchVO);
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
//리셀러 여부 o
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("RSLR_APPN_DV");
|
||||||
|
List<?> appen = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
// Shop 정보 조회
|
||||||
|
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||||
|
boOrdrVO.setSopmalCd(vo.getSopmalCd());
|
||||||
|
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||||
|
|
||||||
|
//회원 목록 조회 결과 및 페이징정보 넣기
|
||||||
|
String secretKey = commonService.selectSecretkey();
|
||||||
|
vo.setSecretKey(secretKey);
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
content.put("resultMap", service.selectBOMbrListInqire(vo));
|
||||||
|
content.put("appen", appen);
|
||||||
|
|
||||||
|
model.addAttribute("resultListMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrListInqire", maMbrSrchVO),
|
||||||
|
// model,
|
||||||
|
// "resultListMap"
|
||||||
|
// );
|
||||||
|
model.addAttribute("maMbrSrchVO",vo);
|
||||||
return "admin/use/mbr/MaMbrListInqireR";
|
return "admin/use/mbr/MaMbrListInqireR";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,26 +222,46 @@ public class MaMbrController {
|
|||||||
* @return ResponseEntity<WnbtResponse>
|
* @return ResponseEntity<WnbtResponse>
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@PostMapping(value = "/updateMaMbrRslrMvmn")
|
@PostMapping(value = "/updateMaMbrRslrMvmn", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateMaMbrRslrMvmn(@Validated MbrAppnVO vo, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> updateMaMbrRslrMvmn(@Validated BOMbrAppnVO vo, BindingResult bindingResult) {
|
||||||
|
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
//BO API 호출 => 리셀러 등록
|
|
||||||
return responseHandler.handleResponse(
|
Map<String, Object> message = new HashMap<>();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/updateBOMbrRslr", vo),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
vo.setRegusr(user.getUserInnb());
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
String secretKey = boCommonService.selectSecretkey();
|
||||||
|
vo.setSecretKey(secretKey);
|
||||||
|
|
||||||
|
//회원 목록 조회 결과 및 페이징정보 넣기
|
||||||
|
service.updateBOMbrRslr(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/updateBOMbrRslr", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 통합관리자 > 회원 탈퇴
|
* 통합관리자 > 회원 탈퇴
|
||||||
* @param vo
|
* @param bowithdrawalVO
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@PostMapping(value="/updateMaMbrSecsnUpdt")
|
@PostMapping(value="/updateMaMbrSecsnUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateMaMbrSecsnUpdt (@Validated WithdrawalVO vo, BindingResult bindingResult, HttpServletRequest request){
|
public ResponseEntity<WnbtResponse> updateMaMbrSecsnUpdt (@Validated BOWithdrawalVO bowithdrawalVO, BindingResult bindingResult, HttpServletRequest request){
|
||||||
//validation 체크
|
//validation 체크
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
@@ -130,26 +271,130 @@ public class MaMbrController {
|
|||||||
Map<String,String> requestInfo = Util.getRequestInfo(request);
|
Map<String,String> requestInfo = Util.getRequestInfo(request);
|
||||||
String ip = (String) requestInfo.get("XForwardedFor");
|
String ip = (String) requestInfo.get("XForwardedFor");
|
||||||
|
|
||||||
//BO API 호출 => 리셀러 등록
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
return responseHandler.handleResponse(
|
if (StringUtil.isEmpty(bowithdrawalVO.getSopmalCd())) {//사용자
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/updateBOMbrSecsn", vo),
|
bowithdrawalVO.setSopmalCd(user.getSopmalCd());
|
||||||
ReplyFromResrc::getReply
|
}
|
||||||
|
bowithdrawalVO.setRegusr(user.getUserInnb());
|
||||||
|
bowithdrawalVO.setUpdusr(user.getUserInnb());
|
||||||
|
bowithdrawalVO.setSecretKey(commonService.selectSecretkey());
|
||||||
|
|
||||||
|
|
||||||
|
if ("sopmal".equals(bowithdrawalVO.getServerDv())) {
|
||||||
|
List<String> mbrArr = new ArrayList<>();
|
||||||
|
List<String> mbrDvCdArr = new ArrayList<>();
|
||||||
|
mbrArr.add(String.valueOf(user.getUserInnb()));
|
||||||
|
mbrDvCdArr.add(String.valueOf(user.getMbrDvCd()));
|
||||||
|
bowithdrawalVO.setMbrarr(mbrArr);
|
||||||
|
bowithdrawalVO.setMbrDvCdArr(mbrDvCdArr);
|
||||||
|
}
|
||||||
|
|
||||||
|
//관리자 로그 문장 만듦
|
||||||
|
DataMap mngrLog = new DataMap();
|
||||||
|
DataMap data = new DataMap();
|
||||||
|
data.put("id", user.getMbrId());
|
||||||
|
data.put("registIp", bowithdrawalVO.getRegistIp());
|
||||||
|
data.put("before", "일반회원");
|
||||||
|
data.put("after", "탈퇴회원");
|
||||||
|
data.put("actionDv", "withdrawal");
|
||||||
|
|
||||||
|
mngrLog = service.makeMngrLog(data);
|
||||||
|
|
||||||
|
bowithdrawalVO.setMngrLogStrt(StringUtil.isNullToString(mngrLog.get("mngrLogStrt")));
|
||||||
|
bowithdrawalVO.setMngrLogEnd(StringUtil.isNullToString(mngrLog.get("mngrLogEnd")));
|
||||||
|
|
||||||
|
//회원탈퇴
|
||||||
|
Map<String, Object> message = new HashMap<>();
|
||||||
|
message = service.updateBOMbrSecsn(bowithdrawalVO);
|
||||||
|
|
||||||
|
//회원탈퇴 안내문자
|
||||||
|
String result = (String) message.get("result");
|
||||||
|
if ("success".equals(result)) {
|
||||||
|
//메세지 타겟 대상
|
||||||
|
List<DataMap> messageTarget = new ArrayList<>();
|
||||||
|
List<DataMap> withdrawalList = new ArrayList<>();
|
||||||
|
withdrawalList = (List<DataMap>) message.get("withdrawalList");
|
||||||
|
//회원 고유번호
|
||||||
|
if (!CollectionUtils.isEmpty(withdrawalList)) {
|
||||||
|
//메시지
|
||||||
|
Map<String, Object> sopmalInfoMap = new HashMap<>();
|
||||||
|
BOMaSopmalVO vo = new BOMaSopmalVO();
|
||||||
|
vo.setSopmalCd(bowithdrawalVO.getSopmalCd());
|
||||||
|
DataMap sopmalInfo = (DataMap) sopmalInfoMap.get("sopmalInfo");
|
||||||
|
for (DataMap withdrawal : withdrawalList) {
|
||||||
|
DataMap mbrInfo = new DataMap();
|
||||||
|
mbrInfo = service.selectSimpleMbrInfo(withdrawal);
|
||||||
|
withdrawal.put("formDvCd", "FORM_DV_MBR");
|
||||||
|
withdrawal.put("formDtlDvCd", "02");
|
||||||
|
withdrawal.put("userid",mbrInfo.get("mbrId"));
|
||||||
|
withdrawal.put("sopmalCd", vo.getSopmalCd());
|
||||||
|
messageTarget.add(withdrawal);
|
||||||
|
}
|
||||||
|
|
||||||
|
boMssageService.insertBOAtmcsndng(messageTarget);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/updateBOMbrSecsn", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 통합관리자 > 회원 정보 조회
|
* 통합관리자 > 회원 정보 조회
|
||||||
* @param maMbrSrchVO
|
* @param vo
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@PostMapping(value="/selectMbrInfo")
|
@PostMapping(value="/selectMbrInfo")
|
||||||
public String selectMbrInfo (ModelMap model,MaMbrSrchVO maMbrSrchVO){
|
public String selectMbrInfo (ModelMap model,BOMbrVO vo){
|
||||||
responseHandler.handleResponse(
|
// 사용자 정보 추출 및 적용
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrCrmInfoPopupInqire", maMbrSrchVO),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
model,
|
if("01".equals(user.getSysDvCd())){
|
||||||
"resultMap"
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
);
|
}else if ("04".equals(user.getSysDvCd())){//인트라넷이면 대표브랜드로 검색
|
||||||
|
vo.setSopmalCd(user.getReprsntBrand());
|
||||||
|
}
|
||||||
|
|
||||||
|
String secretKey = commonService.selectSecretkey();
|
||||||
|
vo.setSecretKey(secretKey);
|
||||||
|
// 회원 활동 정보 조회 ( 마일리지, 쿠폰, 누적 결재 금액, 누적 주문 건수, 최근 로그인 ip, 최근 수정일시 )
|
||||||
|
DataMap result = new DataMap();
|
||||||
|
result = service.selectBOMbrActInfoInqire(vo);
|
||||||
|
|
||||||
|
|
||||||
|
// sns 연동 조회
|
||||||
|
List<DataMap> sns = new ArrayList<>();
|
||||||
|
sns = service.selectBOMbrExtrlMbrInfoInqire(vo);
|
||||||
|
|
||||||
|
// 고객 주문관련, 게시글관련 데이터 조회
|
||||||
|
Map<String, Object> orderData = new HashMap<>();
|
||||||
|
orderData = service.selectBOMbrDataOrderInqireCrmPopup(vo);
|
||||||
|
|
||||||
|
// Shop 정보 조회
|
||||||
|
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||||
|
boOrdrVO.setSopmalCd(vo.getSopmalCd());
|
||||||
|
|
||||||
|
// Map객체에 필요 정보 할당
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||||
|
content.put("result", result);
|
||||||
|
content.put("sns", sns);
|
||||||
|
content.put("acttData", orderData);
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrCrmInfoPopupInqire", maMbrSrchVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/use/mbr/MaMbrInfoPopupR";
|
return "admin/use/mbr/MaMbrInfoPopupR";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,19 +2,36 @@ package com.wb.domainserver.domain.admin.user.mngr.controller;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||||
|
import com.wb.domainserver.domain.admin.user.mngr.service.BOJobUserService;
|
||||||
|
import com.wb.domainserver.domain.admin.user.mngr.vo.BOJobUserVO;
|
||||||
import com.wb.domainserver.domain.admin.user.mngr.vo.MAJobUserVO;
|
import com.wb.domainserver.domain.admin.user.mngr.vo.MAJobUserVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||||
|
import com.wb.domainserver.domain.gcone.common.vo.BOCommonVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.setup.mngr.sevice.BOMngrInfoService;
|
||||||
|
import com.wb.domainserver.domain.gcone.setup.mngr.vo.BOMngrInfoVO;
|
||||||
import com.wb.domainserver.domain.mngr.setup.mngr.vo.SetupMngrInfoVO;
|
import com.wb.domainserver.domain.mngr.setup.mngr.vo.SetupMngrInfoVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
|
import com.wb.domainserver.exception.code.ErrorCode;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||||
|
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||||
|
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.*;
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
|
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||||
import com.wb.domainserver.util.string.StringUtil;
|
import com.wb.domainserver.util.string.StringUtil;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -24,6 +41,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.math.BigInteger;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
@@ -42,26 +60,65 @@ public class MAJobUserController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
@Autowired
|
||||||
|
private BOJobUserService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOCommonService commonService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOJobUserService jobUserService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaComncdService bOMaComncdService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOCommonService boCommonService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMngrInfoService boMngrInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 업무 사용자 전체조회 화면
|
* 업무 사용자 전체조회 화면
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectJobUserListInqireForm")
|
@RequestMapping(value = "/selectJobUserListInqireForm")
|
||||||
public String selectJobUserListInqireForm(MAJobUserVO vo, ModelMap model) {
|
public String selectJobUserListInqireForm(BOJobUserVO vo, ModelMap model) {
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
DataMap resultMap = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListInqireForm",vo)
|
// 페이징
|
||||||
);
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
resultMap.put("paramVO", vo);
|
||||||
|
List<DataMap> codeList = service.managerCode();
|
||||||
|
resultMap.put("cgn036", codeList);
|
||||||
|
resultMap.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListInqireForm",vo)
|
||||||
|
// );
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
try {
|
try {
|
||||||
resultMap.put("cgn036", objectMapper.writeValueAsString(resultMap.get("cgn036")));
|
resultMap.put("cgn036", objectMapper.writeValueAsString(resultMap.get("cgn036")));
|
||||||
|
|
||||||
} catch (WnbtRestException wre){
|
} catch (WnbtRestException wre){
|
||||||
throw new WnbtRestException(wre.getMessage());
|
log.error(wre.getMessage(), wre);
|
||||||
|
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
}
|
}
|
||||||
model.addAttribute("resultMap", resultMap);
|
model.addAttribute("resultMap", resultMap);
|
||||||
|
|
||||||
@@ -69,33 +126,66 @@ public class MAJobUserController {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 업무 사용자 조회 리스트 화면
|
* 업무 사용자 조회 리스트 화면
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectJobUserListInqire")
|
@RequestMapping(value = "/selectJobUserListInqire")
|
||||||
public String selectJobUserListInqire(MAJobUserVO vo, ModelMap model) {
|
public String selectJobUserListInqire(BOJobUserVO vo, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
Map<String, Object> content = new HashMap<>();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListInqire", vo),
|
|
||||||
model,
|
// 페이징
|
||||||
"resultMap"
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
);
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
|
String secretKey = commonService.selectSecretkey();
|
||||||
|
vo.setSecretKey(secretKey);
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
// 맵에 페이징 정보와 리스트를 넣어줌
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
|
List<DataMap> resultList = service.selectBOJobUserListInqire(vo);
|
||||||
|
|
||||||
|
content.put("resultList", resultList);
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListInqire", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/use/mngr/maJobUserListInqireR";
|
return "admin/use/mngr/maJobUserListInqireR";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 업무 사용자 등록 화면이동
|
* 업무 사용자 등록 화면이동
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @param model
|
* @param model
|
||||||
* @return 등록폼경로
|
* @return 등록폼경로
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value ="/selectJobUserRegistForm")
|
@RequestMapping(value ="/selectJobUserRegistForm")
|
||||||
public String selectJobUserRegistForm(MAJobUserVO vo, ModelMap model) {
|
public String selectJobUserRegistForm(BOJobUserVO vo, ModelMap model) {
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
DataMap resultMap = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserRegistForm",vo)
|
List<DataMap> codeList = new ArrayList<>();
|
||||||
);
|
codeList = service.emailCode();
|
||||||
|
List<DataMap> managerCodeList = new ArrayList<>();
|
||||||
|
managerCodeList = service.managerCode();
|
||||||
|
|
||||||
|
resultMap.put("managerCodeList", managerCodeList);
|
||||||
|
resultMap.put("emailCode", codeList);
|
||||||
|
resultMap.put("vo", vo);
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserRegistForm",vo)
|
||||||
|
// );
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
try {
|
try {
|
||||||
resultMap.put("managerCodeList", objectMapper.writeValueAsString(resultMap.get("managerCodeList")));
|
resultMap.put("managerCodeList", objectMapper.writeValueAsString(resultMap.get("managerCodeList")));
|
||||||
@@ -111,13 +201,13 @@ public class MAJobUserController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 업무사용자 등록
|
* 업무사용자 등록
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @param model
|
* @param bindingResult
|
||||||
* @return ResponseEntity<String> 등록한 업무사용자 고유번호, 실패시 null
|
* @return ResponseEntity<String> 등록한 업무사용자 고유번호, 실패시 null
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/insertJobUserRegist")
|
@RequestMapping(value = "/insertJobUserRegist", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> insertJobUserRegist(@Validated MAJobUserVO vo, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> insertJobUserRegist(@Validated BOJobUserVO vo, BindingResult bindingResult) {
|
||||||
List<Map<String, String>> errorList = new ArrayList<>();
|
List<Map<String, String>> errorList = new ArrayList<>();
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
@@ -143,32 +233,80 @@ public class MAJobUserController {
|
|||||||
if(errorList != null && errorList.size() > 0) {
|
if(errorList != null && errorList.size() > 0) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/insertBOJobUserRegist", vo),
|
vo.setRegusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
|
||||||
|
String secretKey = commonService.selectSecretkey();
|
||||||
|
vo.setSecretKey(secretKey);
|
||||||
|
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
BigInteger result = BigInteger.ZERO;
|
||||||
|
result = service.insertBOJobUserRegist(vo);
|
||||||
|
content.put("mngrInnb", result);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/insertBOJobUserRegist", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 업무 사용자 수정 화면이동
|
* 업무 사용자 수정 화면이동
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value ="/selectJobUserUpdtForm")
|
@RequestMapping(value ="/selectJobUserUpdtForm")
|
||||||
public String selectJobUserUpdtForm(MAJobUserVO vo, ModelMap model) {
|
public String selectJobUserUpdtForm(BOJobUserVO vo, ModelMap model) {
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
DataMap resultMap = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserUpdtForm",vo)
|
|
||||||
);
|
String secretKey = commonService.selectSecretkey();
|
||||||
|
vo.setSecretKey(secretKey);
|
||||||
|
|
||||||
|
List<DataMap> detail = new ArrayList<>();
|
||||||
|
detail = service.selectBOJobUserDetail(vo);
|
||||||
|
|
||||||
|
List<DataMap> codeList = new ArrayList<>();
|
||||||
|
codeList = service.emailCode();
|
||||||
|
|
||||||
|
List<DataMap> managerCodeList = new ArrayList<>();
|
||||||
|
managerCodeList = service.managerCode();
|
||||||
|
|
||||||
|
DataMap srchData = new DataMap();
|
||||||
|
srchData.put("srchType", vo.getSrchType());
|
||||||
|
srchData.put("srchStr", vo.getSrchStr());
|
||||||
|
srchData.put("srchMngrDv", vo.getSrchMngrDv());
|
||||||
|
srchData.put("srchStartDate", vo.getSrchStartDate());
|
||||||
|
srchData.put("srchEndDate", vo.getSrchEndDate());
|
||||||
|
srchData.put("srchDatePick", vo.getSrchDatePick());
|
||||||
|
srchData.put("pageUnit", vo.getPageUnit());
|
||||||
|
srchData.put("pageIndex", vo.getPageIndex());
|
||||||
|
srchData.put("pageDv", vo.getPageDv());
|
||||||
|
|
||||||
|
resultMap.put("srchData", srchData);
|
||||||
|
resultMap.put("detail", detail);
|
||||||
|
resultMap.put("managerCodeList", managerCodeList);
|
||||||
|
resultMap.put("emailCode", codeList);
|
||||||
|
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserUpdtForm",vo)
|
||||||
|
// );
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
try {
|
try {
|
||||||
resultMap.put("managerCodeList", objectMapper.writeValueAsString(resultMap.get("managerCodeList")));
|
resultMap.put("managerCodeList", objectMapper.writeValueAsString(resultMap.get("managerCodeList")));
|
||||||
resultMap.put("emailCode", objectMapper.writeValueAsString(resultMap.get("emailCode")));
|
resultMap.put("emailCode", objectMapper.writeValueAsString(resultMap.get("emailCode")));
|
||||||
} catch (WnbtRestException wre){
|
} catch (WnbtRestException wre){
|
||||||
throw new WnbtRestException(wre.getMessage());
|
log.error(wre.getMessage(), wre);
|
||||||
|
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
}
|
}
|
||||||
model.addAttribute("resultMap", resultMap);
|
model.addAttribute("resultMap", resultMap);
|
||||||
return "admin/use/mngr/maJobUserU";
|
return "admin/use/mngr/maJobUserU";
|
||||||
@@ -176,13 +314,12 @@ public class MAJobUserController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 업무 사용자 아이디 중복 조회
|
* 업무 사용자 아이디 중복 조회
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @param model
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectJobUserIdbDplctInqire", method = RequestMethod.POST)
|
@RequestMapping(value = "/selectJobUserIdbDplctInqire", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<?> selectJobUserIdbDplctInqire(MAJobUserVO vo) {
|
public ResponseEntity<?> selectJobUserIdbDplctInqire(BOJobUserVO vo) {
|
||||||
|
|
||||||
List<Map<String, String>> errorList = new ArrayList<>();
|
List<Map<String, String>> errorList = new ArrayList<>();
|
||||||
|
|
||||||
@@ -195,49 +332,86 @@ public class MAJobUserController {
|
|||||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
int result = service.selectBOJobUserIdbDplctInqire(vo);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserIdbDplctInqire", vo),
|
|
||||||
ReplyFromResrc::getReply
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserIdbDplctInqire", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 업무사용자 비밀번호 초기화
|
* 업무사용자 비밀번호 초기화
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateJobUserPswdInitl", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateJobUserPswdInitl", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<?> updateJobUserPswdInitl(MAJobUserVO vo) {
|
public ResponseEntity<?> updateJobUserPswdInitl(BOJobUserVO vo) {
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/updateBOJobUserPswdInitl", vo),
|
vo.setUpdusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
int result = service.updateBOJobUserPswdInitl(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/updateBOJobUserPswdInitl", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 업무사용자 활성화/비활성화
|
* 업무사용자 활성화/비활성화
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateJobUserInactvty", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateJobUserInactvty", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<?> updateJobUserInactvty(MAJobUserVO vo) {
|
public ResponseEntity<?> updateJobUserInactvty(BOJobUserVO vo) {
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/updateBOJobUserInactvty", vo),
|
vo.setUpdusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
|
||||||
|
int result = 0;
|
||||||
|
//활성화
|
||||||
|
if(vo.getMngrSttusCd().equals("01")) {
|
||||||
|
result = service.updateBOJobUserActvty(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 비활성화
|
||||||
|
if(vo.getMngrSttusCd().equals("02")) {
|
||||||
|
result = service.updateBOJobUserInactvty(vo);
|
||||||
|
// 퇴사처리
|
||||||
|
}else if(vo.getMngrSttusCd().equals("03")) {
|
||||||
|
result = service.updateBOJobUserResign(vo);
|
||||||
|
}
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/updateBOJobUserInactvty", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 업무사용자 수정
|
* 업무사용자 수정
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateJobUserUpdt", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateJobUserUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<?> updateJobUserUpdt(MAJobUserVO vo, BindingResult bindingResult) {
|
public ResponseEntity<?> updateJobUserUpdt(BOJobUserVO vo, BindingResult bindingResult) {
|
||||||
List<Map<String, String>> errorList = new ArrayList<>();
|
List<Map<String, String>> errorList = new ArrayList<>();
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
@@ -263,15 +437,28 @@ public class MAJobUserController {
|
|||||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/updateBOJobUserUpdt", vo),
|
vo.setUpdusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
|
||||||
|
String secretKey = commonService.selectSecretkey();
|
||||||
|
vo.setSecretKey(secretKey);
|
||||||
|
|
||||||
|
int result = service.updateBOJobUserUpdt(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/updateBOJobUserUpdt", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 업무사용자 접속이력 팝업폼(history)
|
* 업무사용자 접속이력 팝업폼(history)
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -284,24 +471,44 @@ public class MAJobUserController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 업무사용자 접속이력 팝업(history)
|
* 업무사용자 접속이력 팝업(history)
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectJobUserConnHistListInqirePopup")
|
@RequestMapping("/selectJobUserConnHistListInqirePopup")
|
||||||
public String selectJobUserConnHistListInqirePopupList(MAJobUserVO vo, ModelMap model) {
|
public String selectJobUserConnHistListInqirePopupList(BOJobUserVO vo, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserConnHistListInqire", vo),
|
|
||||||
model,
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
"resultMap"
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
);
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
|
List<DataMap> resultList = new ArrayList<>();
|
||||||
|
resultList = service.selectBOJobUserConnHistListInqire(vo);
|
||||||
|
content.put("resultList", resultList);
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserConnHistListInqire", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/use/mngr/maJobUserConnHistListInqirePopupR";
|
return "admin/use/mngr/maJobUserConnHistListInqirePopupR";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 업무사용자 활동내역 팝업폼(log)
|
* 업무사용자 활동내역 팝업폼(log)
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -314,32 +521,66 @@ public class MAJobUserController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 업무사용자 활동내역 팝업(log)
|
* 업무사용자 활동내역 팝업(log)
|
||||||
* @param MAJobUserVO
|
* @param vo
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectJobUserLogListInqirePopup")
|
@RequestMapping("/selectJobUserLogListInqirePopup")
|
||||||
public String selectJobUserLogListInqirePopup(MAJobUserVO vo, ModelMap model) {
|
public String selectJobUserLogListInqirePopup(BOJobUserVO vo, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserLogListInqire", vo),
|
|
||||||
model,
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
"resultMap"
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
);
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
List<DataMap> resultList = service.selectBOJobUserLogListInqire(vo);
|
||||||
|
content.put("resultList", resultList);
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserLogListInqire", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/use/mngr/maJobUserLogListInqirePopupR";
|
return "admin/use/mngr/maJobUserLogListInqirePopupR";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 엑셀 다운로드
|
* 엑셀 다운로드
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@RequestMapping(value = "/excelFileDownload")
|
@RequestMapping(value = "/excelFileDownload")
|
||||||
public void excelFileDownload(MAJobUserVO vo, HttpServletResponse response, ModelMap model) {
|
public void excelFileDownload(BOJobUserVO vo, HttpServletResponse response, ModelMap model) {
|
||||||
|
DataMap resultMap = new DataMap();
|
||||||
|
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListExcelDwld",vo)
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
);
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
|
String secretKey = commonService.selectSecretkey();
|
||||||
|
vo.setSecretKey(secretKey);
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
List<DataMap> resultList = service.selectBOJobUserListExcelDwld(vo);
|
||||||
|
resultMap.put("excelList", resultList);
|
||||||
|
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListExcelDwld",vo)
|
||||||
|
// );
|
||||||
|
|
||||||
//엑셀 항목별 제목에 출력될 내용 설정
|
//엑셀 항목별 제목에 출력될 내용 설정
|
||||||
LinkedHashMap<String, String> headerMap = new LinkedHashMap<String, String>();
|
LinkedHashMap<String, String> headerMap = new LinkedHashMap<String, String>();
|
||||||
@@ -424,8 +665,8 @@ public class MAJobUserController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectJobUserPasswordInqire", method = RequestMethod.POST)
|
@RequestMapping(value = "/selectJobUserPasswordInqire", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> selectJobUserPasswordInqire(MAJobUserVO vo, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> selectJobUserPasswordInqire(BOJobUserVO vo, BindingResult bindingResult) {
|
||||||
// 정합성 검사
|
// 정합성 검사
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
@@ -444,10 +685,29 @@ public class MAJobUserController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserPasswordInqire", vo),
|
vo.setMngrDv(user.getMbrDvCd());
|
||||||
ReplyFromResrc::getReply
|
vo.setMngrInnb(new BigInteger(String.valueOf(user.getUserInnb())));
|
||||||
|
|
||||||
|
// vo.setMngrDv("01");
|
||||||
|
// vo.setMngrInnb(0);
|
||||||
|
Integer result = null;
|
||||||
|
result = service.selectBOJobUserPasswordInqire(vo);
|
||||||
|
|
||||||
|
// Map객체에 필요 정보 할당
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
content.put("result", result);
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserPasswordInqire", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -458,10 +718,38 @@ public class MAJobUserController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value="/selectMngrInfoInqireForm")
|
@RequestMapping(value="/selectMngrInfoInqireForm")
|
||||||
public String selectMngrInfoInqireForm(SetupMngrInfoVO vo, ModelMap model){
|
public String selectMngrInfoInqireForm(BOJobUserVO vo, ModelMap model){
|
||||||
Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
// 작성자 정보 추출
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/mngrInfo/selectBOMngrInfoUpdtForm", vo)
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
);
|
vo.setMngrInnb(BigInteger.valueOf(user.getUserInnb()));
|
||||||
|
// if("01".equals(user.getSysDvCd())){
|
||||||
|
// vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
// }
|
||||||
|
|
||||||
|
DataMap resultMap = new DataMap();
|
||||||
|
|
||||||
|
String secretKey = commonService.selectSecretkey();
|
||||||
|
vo.setSecretKey(secretKey);
|
||||||
|
List<DataMap> detail = new ArrayList<>();
|
||||||
|
detail = jobUserService.selectBOJobUserDetail(vo);
|
||||||
|
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("EMAIL_ADRES");
|
||||||
|
List<?> emailCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
bOMaComncdVO.setGroupCd("MNGR_DV");
|
||||||
|
List<?> mngrDvCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
List<DataMap> managerCodeList = new ArrayList<>();
|
||||||
|
managerCodeList = jobUserService.managerCode();
|
||||||
|
|
||||||
|
resultMap.put("detail", detail);
|
||||||
|
resultMap.put("mngrDvCdList", mngrDvCdList);
|
||||||
|
resultMap.put("emailCdList", emailCdList);
|
||||||
|
|
||||||
|
// Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/mngrInfo/selectBOMngrInfoUpdtForm", vo)
|
||||||
|
// );
|
||||||
model.addAttribute("resultMap", resultMap);
|
model.addAttribute("resultMap", resultMap);
|
||||||
return "admin/use/mngr/MaMngrInfoDtlU";
|
return "admin/use/mngr/MaMngrInfoDtlU";
|
||||||
}
|
}
|
||||||
@@ -471,8 +759,8 @@ public class MAJobUserController {
|
|||||||
* @param vo
|
* @param vo
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value="/updateMngrInfoUpdt")
|
@RequestMapping(value="/updateMngrInfoUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<?> updateMngrInfoUpdt(@Validated SetupMngrInfoVO vo, BindingResult bindingResult){
|
public ResponseEntity<?> updateMngrInfoUpdt(@Validated SetupMngrInfoVO vo, BOJobUserVO boJobUserVO, BOMngrInfoVO boMngrInfoVO, BindingResult bindingResult){
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
@@ -480,10 +768,16 @@ public class MAJobUserController {
|
|||||||
/*비밀번호 체크*/
|
/*비밀번호 체크*/
|
||||||
if("Y".equals(vo.getPwChngAt())){
|
if("Y".equals(vo.getPwChngAt())){
|
||||||
/*1 비밀번호 변경 시 현재 비밀번호 확인*/
|
/*1 비밀번호 변경 시 현재 비밀번호 확인*/
|
||||||
Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserPasswordInqire", vo)
|
boJobUserVO.setMngrDv(user.getMbrDvCd());
|
||||||
);
|
boJobUserVO.setMngrInnb(new BigInteger(String.valueOf(user.getUserInnb())));
|
||||||
int result = (int) resultMap.get("result");
|
|
||||||
|
int result = service.selectBOJobUserPasswordInqire(boJobUserVO);
|
||||||
|
|
||||||
|
// Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserPasswordInqire", vo)
|
||||||
|
// );
|
||||||
|
|
||||||
if(result == 0){
|
if(result == 0){
|
||||||
throw new WnbtRestException("현재 비밀번호가 일치하지 않습니다");
|
throw new WnbtRestException("현재 비밀번호가 일치하지 않습니다");
|
||||||
}
|
}
|
||||||
@@ -505,9 +799,45 @@ public class MAJobUserController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/mngrInfo/updateBOMngrInfoUpdt", vo),
|
boMngrInfoVO.setUpdusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
// if("01".equals(user.getSysDvCd())){
|
||||||
|
// vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
// }
|
||||||
|
|
||||||
|
String secretKey = boCommonService.selectSecretkey();
|
||||||
|
boMngrInfoVO.setSecretKey(secretKey);
|
||||||
|
|
||||||
|
DataMap resultInfo = new DataMap();
|
||||||
|
|
||||||
|
/*비밀번호 인증 수정*/
|
||||||
|
if("Y".equals(vo.getPwChngAt())){
|
||||||
|
/* 암호화 필수값
|
||||||
|
pass(사용자입력 비밀번호)
|
||||||
|
encptKeyDvCd(암호화키구분코드) => 01(회원),02(관리자), 03(매장)
|
||||||
|
idntfcInnb(식별고유번호) => 회원/관리자/매장관리자 고유번호*/
|
||||||
|
BOCommonVO commVO = new BOCommonVO();
|
||||||
|
commVO.setPass(vo.getChngPw());
|
||||||
|
commVO.setEncptKeyDvCd("02");
|
||||||
|
commVO.setIdntfcInnb(String.valueOf(vo.getMngrInnb()));
|
||||||
|
String encptyPw = boCommonService.generateKey(commVO);
|
||||||
|
vo.setPassword(encptyPw);
|
||||||
|
resultInfo.put("chngePwAt","Y");
|
||||||
|
}else{
|
||||||
|
resultInfo.put("chngePwAt","N");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*관리자 정보 수정*/
|
||||||
|
int result = boMngrInfoService.updateBOMngrInfoUpdt(boMngrInfoVO);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/mngrInfo/updateBOMngrInfoUpdt", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.wb.domainserver.domain.admin.user.mngr.vo;
|
|||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.wb.domainserver.common.validate.MngrPassword;
|
||||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
@@ -25,13 +26,23 @@ public class BOJobUserVO extends AbstractVO {
|
|||||||
@NotBlank(message="사용자명")
|
@NotBlank(message="사용자명")
|
||||||
@Length(min = 1, max = 20, message = "사용자명")
|
@Length(min = 1, max = 20, message = "사용자명")
|
||||||
private String mngrNm;
|
private String mngrNm;
|
||||||
|
|
||||||
/** 부서명 */
|
/** 부서명 */
|
||||||
|
@Length(max = 50, message = "부서명")
|
||||||
private String partnm;
|
private String partnm;
|
||||||
|
|
||||||
/** 사용자ID(관리자) */
|
/** 사용자ID(관리자) */
|
||||||
|
@NotBlank(message="아이디")
|
||||||
private String mngrId;
|
private String mngrId;
|
||||||
|
|
||||||
/** 사용자비밀번호(관리자) */
|
/** 사용자비밀번호(관리자) */
|
||||||
|
@NotBlank(message="비밀번호")
|
||||||
|
@MngrPassword(message="비밀번호 규칙")
|
||||||
|
@Length(min = 10, max = 20, message = "비밀번호")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
/** 이메일 */
|
/** 이메일 */
|
||||||
|
@NotBlank(message="이메일")
|
||||||
private String email;
|
private String email;
|
||||||
/** 전화번호 */
|
/** 전화번호 */
|
||||||
private String telnb;
|
private String telnb;
|
||||||
@@ -99,5 +110,7 @@ public class BOJobUserVO extends AbstractVO {
|
|||||||
private String cnfirmChngPw;
|
private String cnfirmChngPw;
|
||||||
/*비밀번호 변경 여부*/
|
/*비밀번호 변경 여부*/
|
||||||
private String pwChngAt;
|
private String pwChngAt;
|
||||||
|
/** 비밀번호변경 여부 */
|
||||||
|
private String mbrPwdChngAt;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,5 +188,9 @@ public class BOMbrSrchVO extends AbstractVO {
|
|||||||
/** 웹 쿠폰 이벤트 광고 수신 예외 플래그 **/
|
/** 웹 쿠폰 이벤트 광고 수신 예외 플래그 **/
|
||||||
private String eventYn;
|
private String eventYn;
|
||||||
|
|
||||||
|
/*회원고유번호*/
|
||||||
|
private String mbrInnb;
|
||||||
|
/*회원구분코드*/
|
||||||
|
private String mbrDvCd;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ package com.wb.domainserver.domain.gcone.mbr.mbr.vo;
|
|||||||
|
|
||||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -44,18 +46,15 @@ public class BOWithdrawalVO extends AbstractVO{
|
|||||||
/**일자는 01로 입력*/
|
/**일자는 01로 입력*/
|
||||||
private String brthDe;
|
private String brthDe;
|
||||||
/**탈퇴사유*/
|
/**탈퇴사유*/
|
||||||
private String secsnResn;
|
@NotBlank(message = "탈퇴 사유")
|
||||||
|
@Length(min = 1 , max = 1333)
|
||||||
|
public String secsnResn;
|
||||||
/**등록아이피*/
|
/**등록아이피*/
|
||||||
private String registIp;
|
private String registIp;
|
||||||
/**메모*/
|
/**메모*/
|
||||||
private String memo;
|
private String memo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// fm_member
|
// fm_member
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** 회원등급 */
|
/** 회원등급 */
|
||||||
private String mbrGradInnb;
|
private String mbrGradInnb;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user