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);
|
userManageVO.setUniqId(uniqId);
|
||||||
|
|
||||||
String pass = "1";
|
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());
|
pass = EgovFileScrty.encryptPassword(userManageVO.getPassword(), userManageVO.getEmplyrId());
|
||||||
userManageVO.setPassword(pass);
|
userManageVO.setPassword(pass);
|
||||||
}else {
|
}else {
|
||||||
|
//관리자 이외
|
||||||
userManageVO.setPassword(pass);
|
userManageVO.setPassword(pass);
|
||||||
}
|
}
|
||||||
|
|
||||||
userManageVO.setEmplyrSttusCode("P"); //강제승인
|
userManageVO.setEmplyrSttusCode("P"); //강제승인
|
||||||
String result = "";
|
String result = "";
|
||||||
|
|
||||||
if( !("ROLE_ADMIN".equals(userManageVO.getAuthorCode())
|
if(
|
||||||
|| "ROLE_VISIT".equals(userManageVO.getAuthorCode()) )) {
|
"ROLE_ADMIN".equals(userManageVO.getAuthorCode()) //최고관리자
|
||||||
|
|| "ROLE_VISIT".equals(userManageVO.getAuthorCode()) //찾교 관리자
|
||||||
|
|| "ROLE_ADR_JRSDC".equals(userManageVO.getAuthorCode()) //기소유예관할
|
||||||
|
|
||||||
result = userManageDAO.insertUser_GNR(userManageVO);
|
) {
|
||||||
}else {
|
|
||||||
|
//관리자
|
||||||
result = userManageDAO.insertUser(userManageVO);
|
result = userManageDAO.insertUser(userManageVO);
|
||||||
|
|
||||||
|
}else {
|
||||||
|
//관리자 이외
|
||||||
|
result = userManageDAO.insertUser_GNR(userManageVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
AuthorGroup authorGroup = new AuthorGroup(); //사용자별권한관리에 등록해줌
|
AuthorGroup authorGroup = new AuthorGroup(); //사용자별권한관리에 등록해줌
|
||||||
authorGroup.setUniqId(uniqId);
|
authorGroup.setUniqId(uniqId);
|
||||||
authorGroup.setAuthorCode(userManageVO.getAuthorCode());
|
authorGroup.setAuthorCode(userManageVO.getAuthorCode());
|
||||||
//authorGroup.setAuthorCode("ROLE_ADMIN");
|
//authorGroup.setAuthorCode("ROLE_ADMIN");
|
||||||
if(!"ROLE_ADMIN".equals(userManageVO.getAuthorCode())
|
if(
|
||||||
|| !"ROLE_VISIT".equals(userManageVO.getAuthorCode())){
|
"ROLE_ADMIN".equals(userManageVO.getAuthorCode()) //최고 관리자
|
||||||
|
|| "ROLE_VISIT".equals(userManageVO.getAuthorCode()) //찾교 관리자
|
||||||
|
|| "ROLE_ADR_JRSDC".equals(userManageVO.getAuthorCode()) //기소유예관할
|
||||||
|
|
||||||
|
) {
|
||||||
|
authorGroup.setMberTyCode("USR"); //관리자
|
||||||
|
|
||||||
authorGroup.setMberTyCode("GNR");
|
|
||||||
}else {
|
}else {
|
||||||
authorGroup.setMberTyCode("USR");
|
authorGroup.setMberTyCode("GNR"); //사용자
|
||||||
|
//authorGroup.setMberTyCode("USR"); //관리자
|
||||||
}
|
}
|
||||||
egovAuthorGroupService.insertAuthorGroup(authorGroup);
|
egovAuthorGroupService.insertAuthorGroup(authorGroup);
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@ -213,8 +213,9 @@ public class EgovUserManageController {
|
|||||||
List<?> resultList = userManageService.selectUserList(userSearchVO) ;
|
List<?> resultList = userManageService.selectUserList(userSearchVO) ;
|
||||||
model.addAttribute("resultList", resultList);
|
model.addAttribute("resultList", resultList);
|
||||||
//paginationInfo.setTotalRecordCount( resultList.size()> 0 ? ((Long)((EgovMap)resultList.get(0)).get("totCnt")).intValue() : 0);
|
//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) {
|
if (i_resultList>0) {
|
||||||
String g_resultList = ((EgovMap)resultList.get(0)).get("totCnt").toString();
|
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( resultList.size()> 0 ? ((int)((EgovMap)resultList.get(0)).get("totCnt")) : 0);
|
||||||
|
|
||||||
paginationInfo.setTotalRecordCount(i_resultList);
|
paginationInfo.setTotalRecordCount(i_resultList);
|
||||||
model.addAttribute("paginationInfo", paginationInfo);
|
model.addAttribute("paginationInfo", paginationInfo);
|
||||||
|
|
||||||
@ -238,6 +240,7 @@ public class EgovUserManageController {
|
|||||||
authorManageVO.setAuthorManageList(egovAuthorManageService.selectAuthorList(authorManageVO));
|
authorManageVO.setAuthorManageList(egovAuthorManageService.selectAuthorList(authorManageVO));
|
||||||
model.addAttribute("authorList", authorManageVO.getAuthorManageList());
|
model.addAttribute("authorList", authorManageVO.getAuthorManageList());
|
||||||
|
|
||||||
|
|
||||||
if("/uss/umt/user/EgovUserManageMenuAjax.do".equals(request.getServletPath())) {
|
if("/uss/umt/user/EgovUserManageMenuAjax.do".equals(request.getServletPath())) {
|
||||||
return "cmm/uss/umt/EgovUserManageMenuAjax";
|
return "cmm/uss/umt/EgovUserManageMenuAjax";
|
||||||
}
|
}
|
||||||
@ -471,7 +474,11 @@ public class EgovUserManageController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/uss/umt/user/EgovUserInsert.do")
|
@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")) {
|
if (!EgovDoubleSubmitHelper.checkAndSaveToken("someKey")) {
|
||||||
return "redirect:/uss/umt/user/EgovUserManage.do";
|
return "redirect:/uss/umt/user/EgovUserManage.do";
|
||||||
}
|
}
|
||||||
@ -520,6 +527,19 @@ public class EgovUserManageController {
|
|||||||
return "cmm/uss/umt/EgovUserInsert";
|
return "cmm/uss/umt/EgovUserInsert";
|
||||||
}else{
|
}else{
|
||||||
try{
|
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);
|
userManageService.insertUser(userManageVO);
|
||||||
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.insert"));
|
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.insert"));
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
@ -771,11 +791,14 @@ public class EgovUserManageController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value= {"/uss/umt/user/EgovUserSelectUpdt.do", "/uss/umt/user/EgovUserSelectUpdtAjax.do"})
|
@RequestMapping(value= {"/uss/umt/user/EgovUserSelectUpdt.do", "/uss/umt/user/EgovUserSelectUpdtAjax.do"})
|
||||||
public String updateUser(@ModelAttribute("userManageVO") UserManageVO userManageVO,
|
public String updateUser(@ModelAttribute("userManageVO") UserManageVO userManageVO,
|
||||||
HttpSession session, HttpServletRequest request ,
|
HttpSession session,
|
||||||
|
HttpServletRequest request ,
|
||||||
BindingResult bindingResult,
|
BindingResult bindingResult,
|
||||||
RedirectAttributes redirectAttributes,
|
RedirectAttributes redirectAttributes,
|
||||||
Model model) throws Exception {
|
Model model) throws Exception {
|
||||||
|
|
||||||
|
userManageVO = this._findUserWork(userManageVO, request);
|
||||||
|
/*
|
||||||
String s_authorCode = request.getParameter("authorCode");
|
String s_authorCode = request.getParameter("authorCode");
|
||||||
String[] s_arr = request.getParameterValues("userWork");
|
String[] s_arr = request.getParameterValues("userWork");
|
||||||
|
|
||||||
@ -784,6 +807,7 @@ public class EgovUserManageController {
|
|||||||
}else {
|
}else {
|
||||||
userManageVO.setUserWork(s_arr[0].replaceAll(","+s_arr[1], ""));
|
userManageVO.setUserWork(s_arr[0].replaceAll(","+s_arr[1], ""));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
@ -2185,4 +2209,25 @@ public class EgovUserManageController {
|
|||||||
return modelAndView;
|
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>
|
</select>
|
||||||
|
|
||||||
<insert id="authorGroupDAO.insertAuthorGroup" parameterClass="AuthorGroup">
|
<insert id="authorGroupDAO.insertAuthorGroup" parameterClass="AuthorGroup">
|
||||||
|
/* authorGroupDAO.insertAuthorGroup */
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
INSERT INTO LETTNEMPLYRSCRTYESTBS
|
INSERT INTO LETTNEMPLYRSCRTYESTBS
|
||||||
( SCRTY_DTRMN_TRGET_ID
|
( SCRTY_DTRMN_TRGET_ID
|
||||||
|
|||||||
@ -163,7 +163,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<insert id="userManageDAO.insertUser_S">
|
<insert id="userManageDAO.insertUser_S">
|
||||||
|
/* userManageDAO.insertUser_S 운영자 */
|
||||||
INSERT INTO LETTNEMPLYRINFO
|
INSERT INTO LETTNEMPLYRINFO
|
||||||
(
|
(
|
||||||
ESNTL_ID ,
|
ESNTL_ID ,
|
||||||
@ -290,6 +290,7 @@
|
|||||||
)
|
)
|
||||||
</insert> -->
|
</insert> -->
|
||||||
<insert id="userManageDAO.insertUser_GNR">
|
<insert id="userManageDAO.insertUser_GNR">
|
||||||
|
/* userManageDAO.insertUser_GNR 일반사용자 */
|
||||||
INSERT
|
INSERT
|
||||||
INTO lettngnrlmber
|
INTO lettngnrlmber
|
||||||
(
|
(
|
||||||
|
|||||||
@ -88,12 +88,20 @@ function authorChange(obj) {
|
|||||||
$("#rank2").attr('disabled', false);
|
$("#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_case1').hide();
|
||||||
$('#userWork_case2').show();
|
$('#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{
|
}else{
|
||||||
$('#userWork_case1').show();
|
$('#userWork_case1').show();
|
||||||
$('#userWork_case2').hide();
|
$('#userWork_case2').hide();
|
||||||
|
$('#userWork_case3').hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -440,6 +448,9 @@ function wrapWindowByMask(){
|
|||||||
<div style="display:;" id="userWork_case2">
|
<div style="display:;" id="userWork_case2">
|
||||||
<ve:select codeId="VEA008" name="userWork" id="userWork" styleClass="sel_type1" selectedValue="${userManageVO.userWork}" defaultValue=""/>
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
<%@ 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="double-submit" uri="http://www.egovframe.go.kr/tags/double-submit/jsp" %>
|
||||||
|
<%@ taglib prefix="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
|
||||||
@ -250,7 +251,17 @@ function userListExcelDownload(){
|
|||||||
<c:out value="${result.fxNum}"/>
|
<c:out value="${result.fxNum}"/>
|
||||||
</td>
|
</td>
|
||||||
<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>
|
||||||
<td>
|
<td>
|
||||||
<c:out value="${result.sbscrbDe}"/>
|
<c:out value="${result.sbscrbDe}"/>
|
||||||
|
|||||||
@ -75,6 +75,8 @@ $( document ).ready(function(){
|
|||||||
$("#rank2").attr('disabled', false);
|
$("#rank2").attr('disabled', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_chgAuthorSelect("${userManageVO.authorCode}");
|
||||||
|
/*
|
||||||
if("${userManageVO.authorCode}" == "ROLE_ADR_JRSDC"){
|
if("${userManageVO.authorCode}" == "ROLE_ADR_JRSDC"){
|
||||||
$('#userWork_case1').hide();
|
$('#userWork_case1').hide();
|
||||||
$('#userWork_case2').show();
|
$('#userWork_case2').show();
|
||||||
@ -82,6 +84,7 @@ $( document ).ready(function(){
|
|||||||
$('#userWork_case1').show();
|
$('#userWork_case1').show();
|
||||||
$('#userWork_case2').hide();
|
$('#userWork_case2').hide();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
});
|
});
|
||||||
|
|
||||||
function setOrgDepth_01(){
|
function setOrgDepth_01(){
|
||||||
@ -336,6 +339,8 @@ function authorChange(obj) {
|
|||||||
|
|
||||||
//alert(obj.options[obj.selectedIndex].value);
|
//alert(obj.options[obj.selectedIndex].value);
|
||||||
|
|
||||||
|
_chgAuthorSelect(obj.options[obj.selectedIndex].value);
|
||||||
|
/*
|
||||||
if (obj.options[obj.selectedIndex].value=='ROLE_ADR_JRSDC'){
|
if (obj.options[obj.selectedIndex].value=='ROLE_ADR_JRSDC'){
|
||||||
$('#userWork_case1').hide();
|
$('#userWork_case1').hide();
|
||||||
$('#userWork_case2').show();
|
$('#userWork_case2').show();
|
||||||
@ -343,8 +348,29 @@ function authorChange(obj) {
|
|||||||
$('#userWork_case1').show();
|
$('#userWork_case1').show();
|
||||||
$('#userWork_case2').hide();
|
$('#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>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -467,6 +493,9 @@ function authorChange(obj) {
|
|||||||
<div style="display:;" id="userWork_case2">
|
<div style="display:;" id="userWork_case2">
|
||||||
<ve:select codeId="VEA008" name="userWork" id="userWork" styleClass="sel_type1" selectedValue="${userManageVO.userWork}" defaultValue=""/>
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user