2024-01-30 12:03 관리자 권한 수정(찾교 관리자 담당업무추가 가능, 기소유예관할 담당업무 추가 가능)
This commit is contained in:
parent
8bd39e3b8a
commit
2c275c8e20
@ -119,35 +119,53 @@ public class EgovUserManageServiceImpl extends EgovAbstractServiceImpl implement
|
||||
userManageVO.setUniqId(uniqId);
|
||||
|
||||
String pass = "1";
|
||||
if("ROLE_ADMIN".equals(userManageVO.getAuthorCode()) || "ROLE_VISIT".equals(userManageVO.getAuthorCode())){
|
||||
if(
|
||||
"ROLE_ADMIN".equals(userManageVO.getAuthorCode()) //최고관리자
|
||||
|| "ROLE_VISIT".equals(userManageVO.getAuthorCode()) //찾교 관리자
|
||||
|| "ROLE_ADR_JRSDC".equals(userManageVO.getAuthorCode()) //기소유예관할
|
||||
){
|
||||
//관리자
|
||||
//패스워드 암호화
|
||||
pass = EgovFileScrty.encryptPassword(userManageVO.getPassword(), userManageVO.getEmplyrId());
|
||||
userManageVO.setPassword(pass);
|
||||
}else {
|
||||
//관리자 이외
|
||||
userManageVO.setPassword(pass);
|
||||
}
|
||||
|
||||
userManageVO.setEmplyrSttusCode("P"); //강제승인
|
||||
String result = "";
|
||||
|
||||
if( !("ROLE_ADMIN".equals(userManageVO.getAuthorCode())
|
||||
|| "ROLE_VISIT".equals(userManageVO.getAuthorCode()) )) {
|
||||
if(
|
||||
"ROLE_ADMIN".equals(userManageVO.getAuthorCode()) //최고관리자
|
||||
|| "ROLE_VISIT".equals(userManageVO.getAuthorCode()) //찾교 관리자
|
||||
|| "ROLE_ADR_JRSDC".equals(userManageVO.getAuthorCode()) //기소유예관할
|
||||
|
||||
) {
|
||||
|
||||
//관리자
|
||||
result = userManageDAO.insertUser(userManageVO);
|
||||
|
||||
result = userManageDAO.insertUser_GNR(userManageVO);
|
||||
}else {
|
||||
result = userManageDAO.insertUser(userManageVO);
|
||||
//관리자 이외
|
||||
result = userManageDAO.insertUser_GNR(userManageVO);
|
||||
}
|
||||
|
||||
AuthorGroup authorGroup = new AuthorGroup(); //사용자별권한관리에 등록해줌
|
||||
authorGroup.setUniqId(uniqId);
|
||||
authorGroup.setAuthorCode(userManageVO.getAuthorCode());
|
||||
//authorGroup.setAuthorCode("ROLE_ADMIN");
|
||||
if(!"ROLE_ADMIN".equals(userManageVO.getAuthorCode())
|
||||
|| !"ROLE_VISIT".equals(userManageVO.getAuthorCode())){
|
||||
|
||||
authorGroup.setMberTyCode("GNR");
|
||||
if(
|
||||
"ROLE_ADMIN".equals(userManageVO.getAuthorCode()) //최고 관리자
|
||||
|| "ROLE_VISIT".equals(userManageVO.getAuthorCode()) //찾교 관리자
|
||||
|| "ROLE_ADR_JRSDC".equals(userManageVO.getAuthorCode()) //기소유예관할
|
||||
|
||||
) {
|
||||
authorGroup.setMberTyCode("USR"); //관리자
|
||||
|
||||
}else {
|
||||
authorGroup.setMberTyCode("USR");
|
||||
authorGroup.setMberTyCode("GNR"); //사용자
|
||||
//authorGroup.setMberTyCode("USR"); //관리자
|
||||
}
|
||||
egovAuthorGroupService.insertAuthorGroup(authorGroup);
|
||||
return result;
|
||||
|
||||
@ -213,8 +213,9 @@ public class EgovUserManageController {
|
||||
List<?> resultList = userManageService.selectUserList(userSearchVO) ;
|
||||
model.addAttribute("resultList", resultList);
|
||||
//paginationInfo.setTotalRecordCount( resultList.size()> 0 ? ((Long)((EgovMap)resultList.get(0)).get("totCnt")).intValue() : 0);
|
||||
int i_resultList = resultList.size();
|
||||
|
||||
//int i_resultList = resultList.size();
|
||||
int i_resultList = Integer.parseInt(String.valueOf(((EgovMap)resultList.get(0)).get("totCnt")));
|
||||
//int i_resultList = ((Long)((EgovMap)resultList.get(0)).get("totCnt")).intValue();
|
||||
/*
|
||||
if (i_resultList>0) {
|
||||
String g_resultList = ((EgovMap)resultList.get(0)).get("totCnt").toString();
|
||||
@ -222,6 +223,7 @@ public class EgovUserManageController {
|
||||
*/
|
||||
|
||||
//paginationInfo.setTotalRecordCount( resultList.size()> 0 ? ((int)((EgovMap)resultList.get(0)).get("totCnt")) : 0);
|
||||
|
||||
paginationInfo.setTotalRecordCount(i_resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
@ -230,13 +232,14 @@ public class EgovUserManageController {
|
||||
vo.setCodeId("COM038");
|
||||
model.addAttribute("emplyrSttusCode_result", cmmUseService.selectCmmCodeDetail(vo));//사용자상태코드목록
|
||||
|
||||
//권한조회
|
||||
//권한조회
|
||||
AuthorManageVO authorManageVO = new AuthorManageVO();
|
||||
authorManageVO.setFirstIndex(0);
|
||||
authorManageVO.setLastIndex(10);
|
||||
authorManageVO.setRecordCountPerPage(10);
|
||||
authorManageVO.setAuthorManageList(egovAuthorManageService.selectAuthorList(authorManageVO));
|
||||
model.addAttribute("authorList", authorManageVO.getAuthorManageList());
|
||||
|
||||
|
||||
if("/uss/umt/user/EgovUserManageMenuAjax.do".equals(request.getServletPath())) {
|
||||
return "cmm/uss/umt/EgovUserManageMenuAjax";
|
||||
@ -471,7 +474,11 @@ public class EgovUserManageController {
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/uss/umt/user/EgovUserInsert.do")
|
||||
public String insertUser(@ModelAttribute("userManageVO") UserManageVO userManageVO, BindingResult bindingResult, Model model , RedirectAttributes redirectAttributes) throws Exception {
|
||||
public String insertUser(@ModelAttribute("userManageVO") UserManageVO userManageVO
|
||||
, BindingResult bindingResult, Model model
|
||||
, RedirectAttributes redirectAttributes
|
||||
, HttpServletRequest request
|
||||
) throws Exception {
|
||||
if (!EgovDoubleSubmitHelper.checkAndSaveToken("someKey")) {
|
||||
return "redirect:/uss/umt/user/EgovUserManage.do";
|
||||
}
|
||||
@ -520,6 +527,19 @@ public class EgovUserManageController {
|
||||
return "cmm/uss/umt/EgovUserInsert";
|
||||
}else{
|
||||
try{
|
||||
userManageVO = this._findUserWork(userManageVO, request);
|
||||
/*
|
||||
_findWork
|
||||
String s_authorCode = request.getParameter("authorCode");
|
||||
String[] s_arr = request.getParameterValues("userWork");
|
||||
|
||||
if ("ROLE_ADR_JRSDC".equals(s_authorCode)) { //기소유예관할인 경우
|
||||
userManageVO.setUserWork(s_arr[1]);
|
||||
}else {
|
||||
userManageVO.setUserWork(s_arr[0].replaceAll(","+s_arr[1], ""));
|
||||
}
|
||||
*/
|
||||
|
||||
userManageService.insertUser(userManageVO);
|
||||
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.insert"));
|
||||
}catch(Exception e){
|
||||
@ -771,11 +791,14 @@ public class EgovUserManageController {
|
||||
*/
|
||||
@RequestMapping(value= {"/uss/umt/user/EgovUserSelectUpdt.do", "/uss/umt/user/EgovUserSelectUpdtAjax.do"})
|
||||
public String updateUser(@ModelAttribute("userManageVO") UserManageVO userManageVO,
|
||||
HttpSession session, HttpServletRequest request ,
|
||||
HttpSession session,
|
||||
HttpServletRequest request ,
|
||||
BindingResult bindingResult,
|
||||
RedirectAttributes redirectAttributes,
|
||||
Model model) throws Exception {
|
||||
|
||||
userManageVO = this._findUserWork(userManageVO, request);
|
||||
/*
|
||||
String s_authorCode = request.getParameter("authorCode");
|
||||
String[] s_arr = request.getParameterValues("userWork");
|
||||
|
||||
@ -784,6 +807,7 @@ public class EgovUserManageController {
|
||||
}else {
|
||||
userManageVO.setUserWork(s_arr[0].replaceAll(","+s_arr[1], ""));
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@ -2185,4 +2209,25 @@ public class EgovUserManageController {
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
|
||||
private UserManageVO _findUserWork(
|
||||
UserManageVO p_userManageVO,
|
||||
HttpServletRequest p_request
|
||||
)throws Exception{
|
||||
|
||||
String s_authorCode = p_request.getParameter("authorCode");
|
||||
String[] s_arr = p_request.getParameterValues("userWork");
|
||||
|
||||
if ("ROLE_ADR_JRSDC".equals(s_authorCode)) { //기소유예관할인 경우
|
||||
p_userManageVO.setUserWork(s_arr[1]);
|
||||
}else if ("ROLE_VISIT".equals(s_authorCode)) { //찾교 담당자인 경우
|
||||
p_userManageVO.setUserWork(s_arr[2]);
|
||||
}else {
|
||||
p_userManageVO.setUserWork(s_arr[0]);
|
||||
|
||||
//p_userManageVO.setUserWork(s_arr[0].replaceAll(","+s_arr[1], ""));
|
||||
}
|
||||
|
||||
return p_userManageVO;
|
||||
}
|
||||
}
|
||||
@ -71,6 +71,7 @@
|
||||
</select>
|
||||
|
||||
<insert id="authorGroupDAO.insertAuthorGroup" parameterClass="AuthorGroup">
|
||||
/* authorGroupDAO.insertAuthorGroup */
|
||||
<![CDATA[
|
||||
INSERT INTO LETTNEMPLYRSCRTYESTBS
|
||||
( SCRTY_DTRMN_TRGET_ID
|
||||
|
||||
@ -163,7 +163,7 @@
|
||||
|
||||
|
||||
<insert id="userManageDAO.insertUser_S">
|
||||
|
||||
/* userManageDAO.insertUser_S 운영자 */
|
||||
INSERT INTO LETTNEMPLYRINFO
|
||||
(
|
||||
ESNTL_ID ,
|
||||
@ -290,6 +290,7 @@
|
||||
)
|
||||
</insert> -->
|
||||
<insert id="userManageDAO.insertUser_GNR">
|
||||
/* userManageDAO.insertUser_GNR 일반사용자 */
|
||||
INSERT
|
||||
INTO lettngnrlmber
|
||||
(
|
||||
|
||||
@ -88,12 +88,20 @@ function authorChange(obj) {
|
||||
$("#rank2").attr('disabled', false);
|
||||
}
|
||||
|
||||
if (obj.options[obj.selectedIndex].value=='ROLE_ADR_JRSDC'){
|
||||
if (obj.options[obj.selectedIndex].value=='ROLE_ADR_JRSDC'){ //기소유예검찰담당자
|
||||
$('#userWork_case1').hide();
|
||||
$('#userWork_case2').show();
|
||||
$('#userWork_case3').hide();
|
||||
|
||||
}else if (obj.options[obj.selectedIndex].value=='ROLE_VISIT'){ //찾교담당자
|
||||
$('#userWork_case1').hide();
|
||||
$('#userWork_case2').hide();
|
||||
$('#userWork_case3').show();
|
||||
|
||||
}else{
|
||||
$('#userWork_case1').show();
|
||||
$('#userWork_case2').hide();
|
||||
$('#userWork_case2').hide();
|
||||
$('#userWork_case3').hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -439,7 +447,10 @@ function wrapWindowByMask(){
|
||||
</div>
|
||||
<div style="display:;" id="userWork_case2">
|
||||
<ve:select codeId="VEA008" name="userWork" id="userWork" styleClass="sel_type1" selectedValue="${userManageVO.userWork}" defaultValue=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:;" id="userWork_case3">
|
||||
<ve:select codeId="VE0011" name="userWork" id="userWork" styleClass="sel_type1" selectedValue="${userManageVO.userWork}" defaultValue=""/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="double-submit" uri="http://www.egovframe.go.kr/tags/double-submit/jsp" %>
|
||||
<%@ taglib prefix="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
|
||||
@ -250,7 +251,17 @@ function userListExcelDownload(){
|
||||
<c:out value="${result.fxNum}"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${result.userWork}"/>
|
||||
<c:choose>
|
||||
<c:when test="${result.authorCode eq 'ROLE_ADR_JRSDC'}">
|
||||
<ve:code codeId="VEA008" code="${result.userWork }"/>
|
||||
</c:when>
|
||||
<c:when test="${result.authorCode eq 'ROLE_VISIT'}">
|
||||
<ve:code codeId="VE0011" code="${result.userWork }"/>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:out value="${result.userWork}"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${result.sbscrbDe}"/>
|
||||
|
||||
@ -74,7 +74,9 @@ $( document ).ready(function(){
|
||||
$("#rank1").attr('disabled', true);
|
||||
$("#rank2").attr('disabled', false);
|
||||
}
|
||||
|
||||
|
||||
_chgAuthorSelect("${userManageVO.authorCode}");
|
||||
/*
|
||||
if("${userManageVO.authorCode}" == "ROLE_ADR_JRSDC"){
|
||||
$('#userWork_case1').hide();
|
||||
$('#userWork_case2').show();
|
||||
@ -82,6 +84,7 @@ $( document ).ready(function(){
|
||||
$('#userWork_case1').show();
|
||||
$('#userWork_case2').hide();
|
||||
}
|
||||
*/
|
||||
});
|
||||
|
||||
function setOrgDepth_01(){
|
||||
@ -336,6 +339,8 @@ function authorChange(obj) {
|
||||
|
||||
//alert(obj.options[obj.selectedIndex].value);
|
||||
|
||||
_chgAuthorSelect(obj.options[obj.selectedIndex].value);
|
||||
/*
|
||||
if (obj.options[obj.selectedIndex].value=='ROLE_ADR_JRSDC'){
|
||||
$('#userWork_case1').hide();
|
||||
$('#userWork_case2').show();
|
||||
@ -343,8 +348,29 @@ function authorChange(obj) {
|
||||
$('#userWork_case1').show();
|
||||
$('#userWork_case2').hide();
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
//권한에 따라서 담당업무를 변경한다.
|
||||
function _chgAuthorSelect(p_obj_selectedIndex){
|
||||
if (p_obj_selectedIndex=='ROLE_ADR_JRSDC'){ //기소유예검찰담당자
|
||||
$('#userWork_case1').hide();
|
||||
$('#userWork_case2').show();
|
||||
$('#userWork_case3').hide();
|
||||
|
||||
}else if (p_obj_selectedIndex=='ROLE_VISIT'){ //찾교담당자
|
||||
$('#userWork_case1').hide();
|
||||
$('#userWork_case2').hide();
|
||||
$('#userWork_case3').show();
|
||||
|
||||
}else{
|
||||
$('#userWork_case1').show();
|
||||
$('#userWork_case2').hide();
|
||||
$('#userWork_case3').hide();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@ -467,6 +493,9 @@ function authorChange(obj) {
|
||||
<div style="display:;" id="userWork_case2">
|
||||
<ve:select codeId="VEA008" name="userWork" id="userWork" styleClass="sel_type1" selectedValue="${userManageVO.userWork}" defaultValue=""/>
|
||||
</div>
|
||||
<div style="display:;" id="userWork_case3">
|
||||
<ve:select codeId="VE0011" name="userWork" id="userWork" styleClass="sel_type1" selectedValue="${userManageVO.userWork}" defaultValue=""/>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user