no message

main
이범준 1 year ago
parent 1c40c3fea9
commit 2108eb80c4

@ -1,18 +0,0 @@
package cokr.xit.fims.framework.biz.cmm.dao;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.sql.SQLException;
@Mapper
public interface XitFrameSchedulerMapper {
/**
* <pre> : </pre>
* @return
* @throws SQLException int
* @author:
* @date: 2020. 5. 4.
*/
public int addSysLogSummaryOfYesterday() throws SQLException;
}

@ -1,10 +0,0 @@
package cokr.xit.fims.framework.biz.cmm.dao;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
@Mapper
public interface XitLoginMapper {
}

@ -1,55 +0,0 @@
package cokr.xit.fims.framework.biz.cmm.service;
import cokr.xit.fims.framework.biz.cmm.XitLoginVO;
public interface XitLoginService {
/**
* <pre> : ( ) .</pre>
* @param vo XitLoginVO
* @return
* @throws Exception XitLoginVO
* @author:
* @date: 2020. 3. 23.
*/
XitLoginVO actionLogin(XitLoginVO vo) throws Exception;
/**
* <pre> : </pre>
* @throws Exception void
* @author:
* @date: 2020. 3. 23.
*/
void actionLoginSuccess() throws Exception;
/**
* <pre> : </pre>
* @param vo XitLoginVO
* @return
* @throws Exception XitLoginVO
* @author:
* @date: 2020. 3. 23.
*/
XitLoginVO findId(XitLoginVO vo) throws Exception;
/**
* <pre> : </pre>
* @param vo XitLoginVO
* @return
* @throws Exception XitLoginVO
* @author:
* @date: 2020. 3. 23.
*/
XitLoginVO findPassword(XitLoginVO vo) throws Exception;
/**
* <pre> : .
* </pre>
* @param vo
* @throws Exception void
* @author:
* @date: 2020. 3. 23.
*/
void modifyPassword(XitLoginVO vo) throws Exception;
}

@ -1,400 +0,0 @@
package cokr.xit.fims.framework.biz.cmm.web;
import cokr.xit.foundation.web.AbstractController;
import cokr.xit.fims.framework.biz.cmm.service.XitFrameCodeService;
import cokr.xit.fims.framework.biz.cmm.service.XitFrameUnitService;
import cokr.xit.fims.framework.biz.mng.user.XitUserRegMngSearchVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserRegMngVO;
import cokr.xit.fims.framework.biz.mng.user.service.UserMgtService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import cokr.xit.fims.framework.core.constants.FrameworkConstants.USER_SE;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
import cokr.xit.fims.framework.support.util.AjaxUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
*
* @: XIT Controller
* @: .
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Controller
@RequestMapping(name = "", value = "/_anonymous_/")
public class XitFrameAnonymousController extends AbstractController {
@Resource
private XitFrameCodeService xitFrameCodeService;
@Resource
private UserMgtService xitUserRegMngService;
@Resource
private XitFrameUnitService xitFrameUnitService;
private String MEMBER_STATUS ="A";
private String MEMBER_STATUS_USR = "";
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 4. 10.
*/
@RequestMapping(name = "", value="login/IdDuplCnfirm", method={RequestMethod.GET, RequestMethod.POST})
public String IdDuplCnfirm(@RequestParam(value="checkId", required=false, defaultValue="") String checkId, ModelMap modelMap) {
if(XitCmmnUtil.isEmpty(checkId)) {
modelMap.addAttribute("checkId", "");
modelMap.addAttribute("usedCnt", "-1");
}else {
modelMap.addAttribute("usedCnt", xitFrameUnitService.findUserAcntDuplCheck(checkId));
modelMap.addAttribute("checkId", checkId);
}
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"cmm/anonymous/XitIdDuplCnfirm";
}
/**
* <pre> : Validation rule dynamic java script</pre>
* @return String
* @author:
* @date: 2020. 6. 2.
*/
@RequestMapping(name = "", value="login/validator", method={RequestMethod.GET, RequestMethod.POST})
public String validate() {
return "include/fims/validator";
}
/**
* <pre> : </pre>
* @param model
* @return String
* @author:
* @date: 2020. 6. 11.
*/
@RequestMapping(name = "", value = "login/UserReg_{cmd}", method={RequestMethod.GET, RequestMethod.POST})
public String UserReg_page(@PathVariable String cmd
, @ModelAttribute("userSearchVO") XitUserRegMngSearchVO searchVO
, @ModelAttribute("userManageVO") XitUserRegMngVO userManageVO
, @RequestParam(value="userTyForPassword", required=false, defaultValue="") String userTyForPassword
, ModelMap model) {
switch (cmd) {
case "input": //업무사용자 회원가입 페이지
/*================
*
================*/
model.addAttribute("passwdHint_result" , xitFrameCodeService.findCmmnDetailCodes("XIT022")); //패스워트힌트코드 목록
model.addAttribute("gender_result" , xitFrameCodeService.findCmmnDetailCodes("XIT014")); //성별구분코드 목록
model.addAttribute("nsttCd_result" , xitFrameCodeService.findCmmnDetailCodes("XIT025")); //소속기관코드 목록
model.addAttribute("orgId_result" , xitFrameCodeService.findOrgnztCodes("XIT_ORGNZT_INFO")); //조직정보코드 목록
model.addAttribute("grpId_result" , xitFrameCodeService.findGroupCodes("XIT_ORGNZT_INFO")); //그룹정보코드 목록
break;
case "inputEvr": //(일반/기업/업무사용자) 회원가입 페이지
// /*================
// * 코드목록 조회
// ================*/
// //모든 사용자 공통
// model.addAttribute("passwdHint_result" , xitFrameCodeService.findCmmnDetailCodes("XIT022")); //패스워트힌트코드 목록
// model.addAttribute("gender_result" , xitFrameCodeService.findCmmnDetailCodes("XIT014")); //성별구분코드 목록
// model.addAttribute("grpId_result" , xitFrameCodeService.findGroupCodes("XIT_ORGNZT_INFO")); //그룹정보코드 목록
// List<XitCodeVO> userSttus_result = xitFrameCodeService.findCmmnDetailCodes("XIT013");
//
// //일반회원
// model.addAttribute("mberSttus_result" , userSttus_result); //사용자상태코드 목록
// //기업회원
// model.addAttribute("entrprsMberSttus_result" , userSttus_result); //사용자상태코드 목록
// model.addAttribute("entrprsSeCode_result" , xitFrameCodeService.findCmmnDetailCodes("XIT026")); //기업구분코드 목록
// model.addAttribute("indutyCode_result" , xitFrameCodeService.findCmmnDetailCodes("XIT027")); //업종코드 목록
// //업무사용자
// model.addAttribute("stts_result" , userSttus_result); //사용자상태코드 목록
// model.addAttribute("nsttCd_result" , xitFrameCodeService.findCmmnDetailCodes("XIT025")); //소속기관코드 목록
// model.addAttribute("orgId_result" , xitFrameCodeService.findOrgnztCodes("XIT_ORGNZT_INFO")); //조직정보코드 목록
break;
default:
throw new RuntimeException("유효하지 않은 요청 페이지 입니다.");
}
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"cmm/anonymous/XitUserReg_"+cmd;
}
@RequestMapping(name = "", value = "login/UserReg_Forms_{cmd}", method={RequestMethod.GET, RequestMethod.POST})
public String UserReg_Forms_page(@PathVariable String cmd
, @ModelAttribute("userSearchVO") XitUserRegMngSearchVO searchVO
, @ModelAttribute("userManageVO") XitUserRegMngVO userManageVO
, @RequestParam(value="userTyForPassword", required=false, defaultValue="") String userTyForPassword
, ModelMap model) {
String page= "";
page = "UserForm";
/*================
*
================*/
model.addAttribute("passwdHint_result" , xitFrameCodeService.findCmmnDetailCodes("XIT022")); //패스워트힌트코드 목록
model.addAttribute("gender_result" , xitFrameCodeService.findCmmnDetailCodes("XIT014")); //성별구분코드 목록
model.addAttribute("grpId_result" , xitFrameCodeService.findGroupCodes("XIT_ORGNZT_INFO")); //그룹정보코드 목록
model.addAttribute("stts_result" , xitFrameCodeService.findCmmnDetailCodes("XIT013")); //사용자상태코드 목록
model.addAttribute("nsttCd_result" , xitFrameCodeService.findCmmnDetailCodes("XIT025")); //소속기관코드 목록
model.addAttribute("orgId_result" , xitFrameCodeService.findOrgnztCodes("XIT_ORGNZT_INFO")); //조직정보코드 목록
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"cmm/anonymous/forms/"+page;
}
/**
* <pre> : C </pre>
* @return String
* @author:
* @throws IOException
* @throws ServletException
* @date: 2020. 6. 11.
*/
@RequestMapping(name = "", value = "login/UserReg_insert_proc", method=RequestMethod.POST)
public void UserReg_insert_proc(@RequestParam(value="userSe", required=true) String userSe
,@ModelAttribute("userManageVO") XitUserRegMngVO userManageVO
,BindingResult bindingResult
,Model model
,HttpServletRequest request
,HttpServletResponse response
) throws ServletException, IOException {
USER_SE constUserSe = USER_SE.valueOf(userSe);
if(XitCmmnUtil.isEmpty(constUserSe))
throw new RuntimeException("유효하지 않은 요청 입니다.");
String sLocationUrl = null;
String referer = request.getHeader("referer");
// if(referer.contains("UserReg_input"))
// sLocationUrl = "forward:/_anonymous_/login/UserReg_input";
// else
sLocationUrl = "forward:/_anonymous_/login/UserReg_inputEvr.do";
String message = null;
/**
*
*/
ValidateBreakPoint:
switch (constUserSe) {
case GNR: //일반회원
break;
case ENT: //기업회원
break;
case USR: //업무사용자
sLocationUrl = "forward:/_anonymous_/login/UserReg_Forms_USR.do";
if (bindingResult.hasErrors()) {
message = "생성에 실패하였습니다.";
}
/**
*
*/
userManageVO.setStts(this.getStts(constUserSe)); //사용자상태코드(A: 신청, D: 삭제, P:승인)
/**
*
*/
try {
// TODO: refactor 적용
xitUserRegMngService.addUser(null);
message = "정상적으로 등록 되었습니다.";
} catch (RuntimeException e) {
message = e.getMessage();
} catch (Exception e) {
message = "생성에 실패하였습니다.";
}
break;
default:
break;
}
/**
*
*/
/* ============================
* 2020.09.10
*
* - ajax json
* [AS-IS] String, return url "forward"
* [TO-BE] void, DispatchServlet forward , ajax json forward
============================ */
//2020.09.10 주석처리
// model.addAttribute("message", message);
// return sLocationUrl;
model.addAttribute("message", message);
if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시
//반환 데이터 설정
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", message);
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
}else { //submit 요청 시
XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
}
}
/**
* <pre> : (//) .
* [ ]
* </pre>
* @param userSe
* @return String
* @author:
* @date: 2020. 11. 26.
*/
private String getStts(USER_SE userSe) {
String sttusCode = MEMBER_STATUS;
if(!XitCmmnUtil.isEmpty(userSe)) {
switch (userSe) {
case GNR: //일반회원
break;
case ENT: //기업회원
break;
case USR: //업무사용자
if(XitCmmnUtil.notEmpty(MEMBER_STATUS_USR))
sttusCode = MEMBER_STATUS_USR;
break;
default:
break;
}
}
return sttusCode;
}
/**
* <pre> : </pre>
* @param request
* @param response void
* @author:
* @date: 2020. 9. 22.
*/
@RequestMapping(name = "", value = "captcha", method={RequestMethod.GET, RequestMethod.POST})
public void captcha(HttpServletRequest request, HttpServletResponse response) {
}
/**
* <pre> : API</pre>
* @return String
* @author:
* @date: 2020. 10. 5.
*/
@RequestMapping(name = "", value = "api/AdresSearch", method={RequestMethod.GET, RequestMethod.POST})
public String AdresSearch() {
/* ======================
* 2021.06.22.
* API
* -.: popup Api
* -.: popup api -> api
====================== */
//2021.06.22. 주석처리
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"cmm/anonymous/api/XitAdresSearchApi";
}
/* ==========================
*
========================== */
@GetMapping(name = "", value = "step1")
public String step1(HttpServletRequest req) {
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"cmm/anonymous/step1";
}
@GetMapping(name = "", value = "step2")
public String step2() {
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"cmm/anonymous/step2";
}
@GetMapping(name = "", value = "login")
public String login(HttpServletRequest req) {
HttpSession session = req.getSession();
session.setAttribute("ids", "dummyvalue");
return "redirect: /_anonymous_/step1.do";
}
@GetMapping(name = "", value = "logout")
public String logout(HttpServletRequest req) {
HttpSession session = req.getSession();
session.setAttribute("ids", null);
return "redirect: /_anonymous_/step1.do";
}
/* ==========================
* //비회원 인증서비스를 위한 테스트 샘플
========================== */
}

@ -1,67 +0,0 @@
package cokr.xit.fims.framework.biz.cmm.web;
import cokr.xit.foundation.web.AbstractController;
import cokr.xit.fims.framework.biz.cmm.service.XitFrameSchedulerService;
import cokr.xit.fims.framework.biz.cmm.service.XitFrameUnitService;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
*
* @: XIT Controller
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Controller
public class XitFrameSchedulerController extends AbstractController {
private static final Logger logger = LoggerFactory.getLogger(XitFrameSchedulerController.class);
@Resource
private XitFrameSchedulerService xitFrameSchedulerService;
@Resource
private XitFrameUnitService xitFrameUnitService;
/**
* <pre> :
* - .
* - .
* </pre>
* void
* @author:
* @date: 2020. 9. 21.
*/
public void longTermDisconectUserProc() {
/**
*
* - .
*/
List<Map<String, String>> result = xitFrameUnitService.findLongTermDisconectUser(-1);
/**
*
* - () .
*/
for(Map<String, String> map : result) {
String userId = map.get("USER_ID");
try {
xitFrameSchedulerService.addLongTermDisconectUser(userId);
} catch (Exception e) {
logger.debug(String.format("사용자 부재상태(휴먼계정) 전환 처리 실패 --> %s", userId));
}
}
}
}

@ -1,22 +0,0 @@
package cokr.xit.fims.framework.biz.mng.admin;
import cokr.xit.fims.framework.core.XitBaseSearchVO;
/**
*
* @: DB SearchVO
* @:
* @: 2020. 9. 28. 9:03:41
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public class XitAdminDbMngSearchVO extends XitBaseSearchVO{
/**
* serialVersionUID
*/
private static final long serialVersionUID = -6846231080841076534L;
}

@ -1,22 +0,0 @@
package cokr.xit.fims.framework.biz.mng.admin;
import cokr.xit.fims.framework.core.BaseVO;
/**
*
* @: DB VO
* @:
* @: 2020. 9. 28. 9:05:16
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public class XitAdminDbMngVO extends BaseVO {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1580904213010710064L;
}

@ -1,59 +0,0 @@
package cokr.xit.fims.framework.biz.mng.admin.dao;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.sql.SQLException;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
*
* @: DB Mapper
* @:
* @: 2020. 9. 28. 9:03:28
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface XitAdminDbMngMapper {
/**
* <pre> : DB </pre>
* @param dynamicSql
* @return
* @throws SQLException List<LinkedHashMap<String,Object>>
* @author:
* @date: 2020. 9. 28.
*/
public List<LinkedHashMap<String, Object>> findDynamicSql(Map<String, String> param) throws SQLException;
/**
* <pre> : DB </pre>
* @param dynamicSql
* @return
* @throws SQLException List<Map<String,Object>>
* @author:
* @date: 2020. 9. 28.
*/
public int addDynamicSql(Map<String, String> param) throws SQLException;
/**
* <pre> : DB </pre>
* @param dynamicSql
* @return
* @throws SQLException List<Map<String,Object>>
* @author:
* @date: 2020. 9. 28.
*/
public int modifyDynamicSql(Map<String, String> param) throws SQLException;
/**
* <pre> : DB </pre>
* @param dynamicSql
* @return
* @throws SQLException List<Map<String,Object>>
* @author:
* @date: 2020. 9. 28.
*/
public int removeDynamicSql(Map<String, String> param) throws SQLException;
}

@ -1,54 +0,0 @@
package cokr.xit.fims.framework.biz.mng.admin.service;
import java.util.LinkedHashMap;
import java.util.List;
/**
*
* @: DB Service
* @:
* @: 2020. 9. 28. 9:03:11
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface XitAdminDbMngService {
/**
* <pre> : DB </pre>
* @param dynamicSql
* @return List<LinkedHashMap<String,Object>>
* @author:
* @date: 2020. 9. 28.
*/
public List<LinkedHashMap<String, Object>> findList(String dynamicSql);
/**
* <pre> : DB </pre>
* @param dynamicSql
* @return int
* @author:
* @date: 2020. 9. 28.
*/
public int addProc(String dynamicSql);
/**
* <pre> : DB </pre>
* @param dynamicSql
* @return int
* @author:
* @date: 2020. 9. 28.
*/
public int modifyProc(String dynamicSql);
/**
* <pre>
* : DB
* </pre>
*
* @param dynamicSql
* @return int
* @author:
* @date: 2020. 9. 28.
*/
public int removeProc(String dynamicSql);
}

@ -1,68 +0,0 @@
package cokr.xit.fims.framework.biz.mng.admin.service.bean;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.fims.framework.biz.cmm.service.XitFrameCrudService;
import cokr.xit.fims.framework.biz.mng.admin.dao.XitAdminDbMngMapper;
import cokr.xit.fims.framework.biz.mng.admin.service.XitAdminDbMngService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@Service
public class XitAdminDbMngServiceBean extends AbstractServiceBean implements XitAdminDbMngService {
@Resource
private XitAdminDbMngMapper xitAdminDbMngMapper;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Override
public List<LinkedHashMap<String, Object>> findList(String dynamicSql) {
Map<String, String> param = new HashMap<String, String>();
param.put("dynamicSql", dynamicSql);
try {
return xitAdminDbMngMapper.findDynamicSql(param);
} catch (SQLException e) {
throw new RuntimeException(String.format("관리자DB관리 동적질의문 목록 조회 FAIL::%s", e));
}
}
@Override
public int addProc(String dynamicSql) {
Map<String, String> param = new HashMap<String, String>();
param.put("dynamicSql", dynamicSql);
try {
return xitAdminDbMngMapper.addDynamicSql(param);
} catch (SQLException e) {
throw new RuntimeException(String.format("관리자DB관리 동적질의문 등록 FAIL::%s", e));
}
}
@Override
public int modifyProc(String dynamicSql) {
Map<String, String> param = new HashMap<String, String>();
param.put("dynamicSql", dynamicSql);
try {
return xitAdminDbMngMapper.modifyDynamicSql(param);
} catch (SQLException e) {
throw new RuntimeException(String.format("관리자DB관리 동적질의문 수정 FAIL::%s", e));
}
}
@Override
public int removeProc(String dynamicSql) {
Map<String, String> param = new HashMap<String, String>();
param.put("dynamicSql", dynamicSql);
try {
return xitAdminDbMngMapper.removeDynamicSql(param);
} catch (SQLException e) {
throw new RuntimeException(String.format("관리자DB관리 동적질의문 삭제 FAIL::%s", e));
}
}
}

@ -1,235 +0,0 @@
package cokr.xit.fims.framework.biz.mng.admin.web;
import cokr.xit.foundation.web.AbstractController;
import cokr.xit.fims.framework.biz.mng.admin.XitAdminDbMngSearchVO;
import cokr.xit.fims.framework.biz.mng.admin.service.XitAdminDbMngService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import cokr.xit.fims.framework.support.util.AjaxUtils;
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.support.SessionStatus;
import javax.annotation.Resource;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.*;
/**
*
* @: DB Controller
* @: DB DML .
* @: 2020. 9. 28. 9:02:51
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Controller
@RequestMapping(name = "", value = "/framework/biz/mng/admin/")
public class XitAdminDbMngController extends AbstractController {
@Resource
private XitAdminDbMngService xitAdminDbMngService;
private final String SALTKEY = "U2FsdGVkX19FBBXlVS6d0Ga56ELuRsy";
/**
* <pre> : </pre>
* @param sql
* @return String
* @author:
* @date: 2020. 10. 26.
*/
private String getCmd(String sql) {
String result = null;
sql = sql.toLowerCase();
//주석구문 제거
sql = this.removeAnnotation(sql);
/* ========================================
* 2020.10.27.
*
* - parameter DB
* - .(KISA / "SQL 인젝션" )
* -
* -select/insert/update/delete
* []
* else
* as-is: else result = "update";
* to-be: else result = "";
======================================== */
//커맨드 분기
if(sql.startsWith("select"))
result = "select";
else if(sql.startsWith("insert"))
result = "insert";
else if(sql.startsWith("update"))
result = "update";
else if(sql.startsWith("delete"))
result = "delete";
//2020.10.27. 주석처리
else
result = "update";
// else
// result = "";
return result;
}
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 10. 26.
*/
private String removeAnnotation(String sql) {
//주석구문 제거
if(sql.contains("/*")) { //주석구문 /* */ 제거
String strAnnotation = sql.substring(sql.indexOf("/*"),sql.indexOf("*/")+2);
sql = sql.replace(strAnnotation, "").trim();
return this.removeAnnotation(sql);
}else {
return sql;
}
}
/**
* <pre> : </pre>
* @param ciphertext
* @param passphrase salt
* @return String
* @author:
* @date: 2020. 10. 27.
*/
public String decrypt(String ciphertext, String passphrase) {
/* ============================================================
*
* 2020.10.27.
* / ( : https://mirotic91.tistory.com/21 )
*
* -: java.security.InvalidKeyException: Illegal key size
*
* -: JAVA AES128 . ( AES256 )
* AES256 .
* JDK8 , .
*
* -JDK: OracleJDK8 , OpenJDK8 . jar
* ,JDK1.8u151 jar .
*
* -: WAS JDK jar
* -> local_policy.jar
* -> US_export_policy.jar
*
* -jar: ${JAVA_HOME}/jre/lib/security
*
* -JDK
* ->JDK7: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
* ->JDK8: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
*
============================================================ */
try {
final int keySize = 256;
final int ivSize = 128;
String charSet= "UTF-8";
// 텍스트를 BASE64 형식으로 디코드 한다.
byte[] ctBytes = Base64.getDecoder().decode(ciphertext.getBytes(charSet));
// 솔트를 구한다. (생략된 8비트는 Salted__ 시작되는 문자열이다.)
byte[] saltBytes = Arrays.copyOfRange(ctBytes, 8, 16);
// System.out.println( Hex.encodeHexString(saltBytes) );
// 암호화된 테스트를 구한다.( 솔트값 이후가 암호화된 텍스트 값이다.)
byte[] ciphertextBytes = Arrays.copyOfRange(ctBytes, 16, ctBytes.length);
// 비밀번호와 솔트에서 키와 IV값을 가져온다.
byte[] key = new byte[keySize / 8];
byte[] iv = new byte[ivSize / 8];
EvpKDF(passphrase.getBytes(charSet), keySize, ivSize, saltBytes, key, iv);
// 복호화
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "AES"), new IvParameterSpec(iv));
byte[] recoveredPlaintextBytes = cipher.doFinal(ciphertextBytes);
return new String(recoveredPlaintextBytes);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
private byte[] EvpKDF(byte[] password, int keySize, int ivSize, byte[] salt, byte[] resultKey, byte[] resultIv) throws NoSuchAlgorithmException {
return EvpKDF(password, keySize, ivSize, salt, 1, "MD5", resultKey, resultIv);
}
private byte[] EvpKDF(byte[] password, int keySize, int ivSize, byte[] salt, int iterations, String hashAlgorithm, byte[] resultKey, byte[] resultIv) throws NoSuchAlgorithmException {
keySize = keySize / 32;
ivSize = ivSize / 32;
int targetKeySize = keySize + ivSize;
byte[] derivedBytes = new byte[targetKeySize * 4];
int numberOfDerivedWords = 0;
byte[] block = null;
MessageDigest hasher = MessageDigest.getInstance(hashAlgorithm);
while (numberOfDerivedWords < targetKeySize) {
if (block != null) {
hasher.update(block);
}
hasher.update(password);
// Salting
block = hasher.digest(salt);
hasher.reset();
// Iterations : 키 스트레칭(key stretching)
for (int i = 1; i < iterations; i++) {
block = hasher.digest(block);
hasher.reset();
}
System.arraycopy(block, 0, derivedBytes, numberOfDerivedWords * 4, Math.min(block.length, (targetKeySize - numberOfDerivedWords) * 4));
numberOfDerivedWords += block.length / 4;
}
System.arraycopy(derivedBytes, 0, resultKey, 0, keySize * 4);
System.arraycopy(derivedBytes, keySize * 4, resultIv, 0, ivSize * 4);
return derivedBytes; // key + iv
}
}

@ -1,24 +0,0 @@
package cokr.xit.fims.framework.biz.mng.auth.dao;
import cokr.xit.fims.framework.biz.mng.auth.XitAuthUsrMngVO;
import org.apache.ibatis.session.RowBounds;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.util.List;
import java.util.Map;
/**
*
* @: Mapper
* @:
* @: 2020. 4. 16. 9:38:07
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface AuthByUserMgtMapper {
List<XitAuthUsrMngVO> selectAuthUsers(final Map<String,Object> paraMap, final RowBounds rowBounds);
<T> XitAuthUsrMngVO selectAuthUser(final T t);
}

@ -1,28 +0,0 @@
package cokr.xit.fims.framework.biz.mng.auth.dao;
import cokr.xit.fims.framework.biz.mng.auth.XitAuthorGroupInfoVO;
import org.apache.ibatis.session.RowBounds;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.util.List;
import java.util.Map;
/**
*
* @: Mapper
* @:
* @: 2020. 4. 16. 9:38:07
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface AuthGrpMgtMapper {
List<XitAuthorGroupInfoVO> selectAuthorGroupInfos(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> XitAuthorGroupInfoVO selectAuthorGroupInfo(final T t);
int insertAuthorGroupInfo(final XitAuthorGroupInfoVO vo);
int updateAuthorGroupInfo(final XitAuthorGroupInfoVO vo);
int deleteAuthorGroupInfo(final String grpId);
}

@ -1,24 +0,0 @@
package cokr.xit.fims.framework.biz.mng.auth.dao;
import cokr.xit.fims.framework.biz.mng.auth.XitAuthHierarchyMngVO;
import org.apache.ibatis.session.RowBounds;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.util.List;
import java.util.Map;
/**
*
* @: Mapper
* @:
* @: 2020. 11. 2. 9:38:07
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface AuthHierarchyMgtMapper {
List<XitAuthHierarchyMngVO> selectAuthHierarchies(final Map<String, Object> paraMap, final RowBounds rowBounds);
}

@ -1,24 +0,0 @@
package cokr.xit.fims.framework.biz.mng.auth.service;
import cokr.xit.fims.framework.biz.mng.auth.XitAuthUsrMngVO;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
import java.util.Map;
/**
*
* @: Service
* @:
* @: 2020. 4. 16. 9:38:56
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface AuthByUserMgtService {
List<XitAuthUsrMngVO> findAuthUsers(final Map<String,Object> paraMap, final RowBounds rowBounds);
void saveAuthUserList(final List<Map<String, Object>> paraList);
void removeAuthUserList(final List<Map<String, Object>> paraList);
}

@ -1,28 +0,0 @@
package cokr.xit.fims.framework.biz.mng.auth.service;
import cokr.xit.fims.framework.biz.mng.auth.XitAuthorGroupInfoVO;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
import java.util.Map;
/**
*
* @: Service
* @:
* @: 2020. 4. 16. 9:38:56
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface AuthGrpMgtService {
List<XitAuthorGroupInfoVO> findAuthGrps(final Map<String,Object> paraMap, final RowBounds rowBounds);
<T> XitAuthorGroupInfoVO findAuthGrp(final T t);
void addAuthGrp(final XitAuthorGroupInfoVO vo);
void modifyAuthGrp(final XitAuthorGroupInfoVO vo);
void removeAuthGrp(final String authId);
void isCheckUserForCanChange(final String uniqId, final String trgetAuthId);
}

@ -1,25 +0,0 @@
package cokr.xit.fims.framework.biz.mng.auth.service;
import cokr.xit.fims.framework.biz.mng.auth.XitAuthHierarchyMngVO;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
import java.util.Map;
/**
*
* @: Service
* @:
* @: 2020. 11. 2. 9:38:56
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface AuthHierarchyMgtService {
List<XitAuthHierarchyMngVO> findAuthHierarchies(final Map<String, Object> paraMap, final RowBounds pagingInfo);
XitAuthHierarchyMngVO findAuthHierarchyInfo(final XitAuthHierarchyMngVO vo);
void saveAuthHierarchy(final XitAuthHierarchyMngVO vo);
}

@ -1,69 +0,0 @@
package cokr.xit.fims.framework.biz.mng.auth.service.bean;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.fims.framework.biz.mng.auth.dao.AuthByUserMgtMapper;
import cokr.xit.fims.framework.biz.mng.auth.XitAuthUsrMngVO;
import cokr.xit.fims.framework.biz.mng.auth.service.AuthByUserMgtService;
import cokr.xit.fims.framework.biz.mng.auth.service.AuthGrpMgtService;
import cokr.xit.fims.framework.biz.mng.user.dao.UserMgtMapper;
import cokr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO;
import cokr.xit.fims.framework.biz.mng.user.service.UserMgtService;
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@RequiredArgsConstructor
@Service
public class AuthByUserMgtServiceBean extends AbstractServiceBean implements AuthByUserMgtService {
private final AuthByUserMgtMapper mapper;
private final UserMgtMapper userMapper;
private final UserMgtService userMgtService;
@Override
@Transactional(readOnly = true)
public List<XitAuthUsrMngVO> findAuthUsers(final Map<String,Object> paraMap, final RowBounds rowBounds) {
return mapper.selectAuthUsers(paraMap, rowBounds);
}
@Override
@Transactional
public void saveAuthUserList(List<Map<String, Object>> paraList) {
String sessionUniqId = XitCmmnUtil.getUserInfo().getUniqId();
paraList.forEach(map -> {
XitUserScrtySetupVO vo = new XitUserScrtySetupVO();
vo.setUserId(String.valueOf(map.get("uniqId")));
vo.setAuthId(String.valueOf(map.get("authId")));
if(Objects.equals("N", map.get("regYn"))){
userMapper.insertUserScrtySetup(vo);
}else{
userMapper.updateUserScrtySetup(vo);
}
});
}
@Override
@Transactional
public void removeAuthUserList(List<Map<String, Object>> paraList) {
//삭제 시 사용자의 권한을 소속 그룹의 권한 또는 Defualt 권한으로 설정
paraList.forEach(map -> {
XitUserScrtySetupVO vo = new XitUserScrtySetupVO();
vo.setUserId(String.valueOf(map.get("uniqId")));
vo.setAuthId(userMgtService.getDefaultAuthId(String.valueOf(map.get("grpId"))));
userMapper.updateUserScrtySetup(vo);
});
}
}

@ -1,72 +0,0 @@
package cokr.xit.fims.framework.biz.mng.auth.web;
import cokr.xit.foundation.web.AbstractController;
import cokr.xit.fims.framework.biz.cache.util.CacheServiceUtils;
import cokr.xit.fims.framework.biz.mng.auth.service.AuthByUserMgtService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.util.List;
import java.util.Map;
/**
*
* @: Controller
* @:
* @: 2020. 4. 16. 9:39:52
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@RequiredArgsConstructor
@Controller
@RequestMapping(name = "", value = "/framework/biz/mng/auth")
public class AuthByUserMgtController extends AbstractController {
private final AuthByUserMgtService service;
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 4. 16.
*/
@RequestMapping(name = "", value = "/mngAuthByUserMgtForm")
public ModelAndView mngAuthByUserMgtForm() {
ModelAndView mav = new ModelAndView();
mav.addObject("authorList", CacheServiceUtils.getComboCodes(null, "AUTHOR"));
return mav;
}
@GetMapping(name = "", value = "/findAuthUsers")
public ModelAndView findAuthUsers(@RequestParam final Map<String,Object> paraMap) {
return new ModelAndView("jsonView").addObject("result",service.findAuthUsers(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@PostMapping(name = "", value = "/saveAuthUserList")
public ModelAndView saveAuthUserList(@RequestBody final List<Map<String, Object>> paraList) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveAuthUserList(paraList);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
@PostMapping(name = "", value = "/removeAuthUserList")
public ModelAndView removeAuthUserList(@RequestBody final List<Map<String, Object>> paraList) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeAuthUserList(paraList);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
}

@ -1,84 +0,0 @@
package cokr.xit.fims.framework.biz.mng.auth.web;
import cokr.xit.foundation.web.AbstractController;
import cokr.xit.fims.framework.biz.mng.auth.XitAuthorGroupInfoVO;
import cokr.xit.fims.framework.biz.mng.auth.service.AuthGrpMgtService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.Checks;
import cokr.xit.fims.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.util.Map;
/**
*
* @: Controller
* @:
* @: 2020. 4. 16. 9:39:52
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@RequiredArgsConstructor
@Controller
@RequestMapping(name = "", value = "/framework/biz/mng/auth")
public class AuthGrpMgtController extends AbstractController {
@RequestMapping(name = "", value = "/mngAuthGrpMgtPopup")
public ModelAndView mngAuthAuthorMgtPopup(@ModelAttribute final XitAuthorGroupInfoVO vo){
ModelAndView mav = new ModelAndView();
if(Checks.isEmpty(vo) || Checks.isEmpty(vo.getGrpId())){
mav.addObject("groupManage", new XitAuthorGroupInfoVO());
mav.addObject("pageTitle", "권한그룹 등록");
} else {
}
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/mngAuthGrpMgtPopup.popup");
return mav;
}
@GetMapping(name = "", value = "/findAuthGrps")
public ModelAndView findAuthAuthors(@RequestParam final Map<String,Object> paraMap) {
return new ModelAndView("jsonView").addObject("result",null);
}
@PostMapping(name = "", value = "/addAuthGrp")
//public ModelAndView addAuthAuthor(@ModelAttribute final XitAuthorInfoVO vo, final BindingResult bindingResult){
public ModelAndView addAuthAuthor(@ModelAttribute final XitAuthorGroupInfoVO vo){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
@PostMapping(name = "", value = "/modifyAuthGrp")
//public ModelAndView modifyAuthAuthor(@ModelAttribute final XitAuthorInfoVO vo, final BindingResult bindingResult){
public ModelAndView modifyAuthAuthor(@ModelAttribute final XitAuthorGroupInfoVO vo){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav;
}
@PostMapping(name = "", value = "/removeAuthGrp")
public ModelAndView removeAuthAuthor(final String grpId){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav;
}
}

@ -1,22 +0,0 @@
package cokr.xit.fims.framework.biz.mng.menu;
import cokr.xit.fims.framework.core.XitBaseSearchVO;
/**
*
* @: SearchVO
* @:
* @: 2020. 3. 26. 1:33:08
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public class MenuCreateMngSearchVO extends XitBaseSearchVO{
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
}

@ -1,221 +0,0 @@
package cokr.xit.fims.framework.biz.mng.menu;
import cokr.xit.fims.framework.core.BaseVO;
/**
*
* @: VO
* @:
* @: 2020. 3. 26. 1:32:49
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public class MenuCreateMngVO extends BaseVO {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
/** 메뉴번호 */
private int menuNo;
/** 맵생성ID */
private String mapCreatId;
/** 권한코드 */
private String authId;
/** 권한정보설정 */
/** 권한명 */
private String authNm;
/** 권한설명 */
private String dscrp;
/** 권한생성일자 */
private String regDt;
/** 기타VO변수 */
/** 생성자ID **/
private String creatPersonId;
/** 체크여부 **/
private String chkYeoBu;
/** 부모메뉴ID **/
private String prntNo;
/** 메뉴순서 **/
private String srtOrd;
/** 메뉴명 **/
private String menuNm;
/** 프로그램명 **/
private String pgrmFileNm;
/**
* menuNo attribute .
* @return int
*/
public int getMenuNo() {
return menuNo;
}
/**
* menuNo attribute .
* @param menuNo int
*/
public void setMenuNo(int menuNo) {
this.menuNo = menuNo;
}
/**
* mapCreatId attribute .
* @return String
*/
public String getMapCreatId() {
return mapCreatId;
}
/**
* mapCreatId attribute .
* @param mapCreatId String
*/
public void setMapCreatId(String mapCreatId) {
this.mapCreatId = mapCreatId;
}
/**
* authId attribute .
* @return String
*/
public String getAuthId() {
return authId;
}
/**
* authId attribute .
* @param authId String
*/
public void setAuthId(String authId) {
this.authId = authId;
}
/**
* authNm attribute .
* @return String
*/
public String getAuthNm() {
return authNm;
}
/**
* authNm attribute .
* @param authNm String
*/
public void setAuthNm(String authNm) {
this.authNm = authNm;
}
/**
* dscrp attribute .
* @return String
*/
public String getDscrp() {
return dscrp;
}
/**
* dscrp attribute .
* @param dscrp String
*/
public void setDscrp(String dscrp) {
this.dscrp = dscrp;
}
/**
* regDt attribute .
* @return String
*/
public String getRegDt() {
return regDt;
}
/**
* regDt attribute .
* @param regDt String
*/
public void setRegDt(String regDt) {
this.regDt = regDt;
}
/**
* creatPersonId attribute .
* @return String
*/
public String getCreatPersonId() {
return creatPersonId;
}
/**
* creatPersonId attribute .
* @param creatPersonId String
*/
public void setCreatPersonId(String creatPersonId) {
this.creatPersonId = creatPersonId;
}
/**
* chkYeoBu attribute .
* @return String
*/
public String getChkYeoBu() {
return chkYeoBu;
}
/**
* chkYeoBu attribute .
* @param chkYeoBu String
*/
public void setChkYeoBu(String chkYeoBu) {
this.chkYeoBu = chkYeoBu;
}
/**
* prntNo attribute .
* @return String
*/
public String getPrntNo() {
return prntNo;
}
/**
* prntNo attribute .
* @param prntNo String
*/
public void setPrntNo(String prntNo) {
this.prntNo = prntNo;
}
/**
* srtOrd attribute .
* @return String
*/
public String getSrtOrd() {
return srtOrd;
}
/**
* srtOrd attribute .
* @param srtOrd String
*/
public void setSrtOrd(String srtOrd) {
this.srtOrd = srtOrd;
}
/**
* menuNm attribute .
* @return String
*/
public String getMenuNm() {
return menuNm;
}
/**
* menuNm attribute .
* @param menuNm String
*/
public void setMenuNm(String menuNm) {
this.menuNm = menuNm;
}
/**
* pgrmFileNm attribute .
* @return String
*/
public String getPgrmFileNm() {
return pgrmFileNm;
}
/**
* pgrmFileNm attribute .
* @param pgrmFileNm String
*/
public void setPgrmFileNm(String pgrmFileNm) {
this.pgrmFileNm = pgrmFileNm;
}
}

@ -1,22 +0,0 @@
package cokr.xit.fims.framework.biz.mng.menu;
import cokr.xit.fims.framework.core.XitBaseSearchVO;
/**
*
* @: SearchVO
* @:
* @: 2020. 3. 26. 1:33:08
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public class MenuListMngSearchVO extends XitBaseSearchVO{
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
}

@ -1,337 +0,0 @@
package cokr.xit.fims.framework.biz.mng.menu;
/**
*
* @: VO
* @:
* @: 2020. 3. 26. 1:32:49
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public class MenuListMngVO {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
/** 메뉴정보 */
/** 메뉴번호 */
private int menuNo;
/** 메뉴순서 */
private int srtOrd;
/** 메뉴명 */
private String menuNm;
/** 상위메뉴번호 */
private int prntNo;
/** 메뉴설명 */
private String dscrp;
/** 관련이미지경로 */
private String relateImagePath;
/** 관련이미지명 */
private String imgNm;
/** 프로그램파일명 */
private String pgrmFileNm;
/** 사이트맵 */
/** 생성자ID **/
private String creatPersonId;
/** 권한정보설정 */
/** 권한코드 */
private String authId;
/** 기타VO변수 */
private String tempValue;
private int tempInt;
/** Login 메뉴관련 VO변수 */
/** tmpId */
private String tmpId;
/** tmpName */
private String tmpName;
/** tmpUserSe */
private String tmpUserSe;
/** tmpEmail */
private String tmpEmail;
/** tmpOrgId */
private String tmpOrgId;
/** tmpUniqId */
private String tmpUniqId;
/** tmpCmd */
private String tmpCmd;
/**
* menuNo attribute .
* @return int
*/
public int getMenuNo() {
return menuNo;
}
/**
* menuNo attribute .
* @param menuNo int
*/
public void setMenuNo(int menuNo) {
this.menuNo = menuNo;
}
/**
* srtOrd attribute .
* @return int
*/
public int getSrtOrd() {
return srtOrd;
}
/**
* srtOrd attribute .
* @param srtOrd int
*/
public void setSrtOrd(int srtOrd) {
this.srtOrd = srtOrd;
}
/**
* menuNm attribute .
* @return String
*/
public String getMenuNm() {
return menuNm;
}
/**
* menuNm attribute .
* @param menuNm String
*/
public void setMenuNm(String menuNm) {
this.menuNm = menuNm;
}
/**
* prntNo attribute .
* @return int
*/
public int getPrntNo() {
return prntNo;
}
/**
* prntNo attribute .
* @param prntNo int
*/
public void setPrntNo(int prntNo) {
this.prntNo = prntNo;
}
/**
* dscrp attribute .
* @return String
*/
public String getDscrp() {
return dscrp;
}
/**
* dscrp attribute .
* @param dscrp String
*/
public void setDscrp(String dscrp) {
this.dscrp = dscrp;
}
/**
* relateImagePath attribute .
* @return String
*/
public String getRelateImagePath() {
return relateImagePath;
}
/**
* relateImagePath attribute .
* @param relateImagePath String
*/
public void setRelateImagePath(String relateImagePath) {
this.relateImagePath = relateImagePath;
}
/**
* imgNm attribute .
* @return String
*/
public String getImgNm() {
return imgNm;
}
/**
* imgNm attribute .
* @param imgNm String
*/
public void setImgNm(String imgNm) {
this.imgNm = imgNm;
}
/**
* pgrmFileNm attribute .
* @return String
*/
public String getPgrmFileNm() {
return pgrmFileNm;
}
/**
* pgrmFileNm attribute .
* @param pgrmFileNm String
*/
public void setPgrmFileNm(String pgrmFileNm) {
this.pgrmFileNm = pgrmFileNm;
}
/**
* creatPersonId attribute .
* @return String
*/
public String getCreatPersonId() {
return creatPersonId;
}
/**
* creatPersonId attribute .
* @param creatPersonId String
*/
public void setCreatPersonId(String creatPersonId) {
this.creatPersonId = creatPersonId;
}
/**
* authId attribute .
* @return String
*/
public String getAuthId() {
return authId;
}
/**
* authId attribute .
* @param authId String
*/
public void setAuthId(String authId) {
this.authId = authId;
}
/**
* tmpId attribute .
* @return String
*/
public String getTmpId() {
return tmpId;
}
/**
* tmpId attribute .
* @param tmpId String
*/
public void setTmpId(String tmpId) {
this.tmpId = tmpId;
}
/**
* tmpName attribute .
* @return String
*/
public String getTmpName() {
return tmpName;
}
/**
* tmpName attribute .
* @param tmpName String
*/
public void setTmpName(String tmpName) {
this.tmpName = tmpName;
}
/**
* tmpUserSe attribute .
* @return String
*/
public String getTmpUserSe() {
return tmpUserSe;
}
/**
* tmpUserSe attribute .
* @param tmpUserSe String
*/
public void setTmpUserSe(String tmpUserSe) {
this.tmpUserSe = tmpUserSe;
}
/**
* tmpEmail attribute .
* @return String
*/
public String getTmpEmail() {
return tmpEmail;
}
/**
* tmpEmail attribute .
* @param tmpEmail String
*/
public void setTmpEmail(String tmpEmail) {
this.tmpEmail = tmpEmail;
}
/**
* tmpOrgId attribute .
* @return String
*/
public String getTmpOrgId() {
return tmpOrgId;
}
/**
* tmpOrgId attribute .
* @param tmpOrgId String
*/
public void setTmpOrgId(String tmpOrgId) {
this.tmpOrgId = tmpOrgId;
}
/**
* tmpUniqId attribute .
* @return String
*/
public String getTmpUniqId() {
return tmpUniqId;
}
/**
* tmpUniqId attribute .
* @param tmpUniqId String
*/
public void setTmpUniqId(String tmpUniqId) {
this.tmpUniqId = tmpUniqId;
}
/**
* tmpCmd attribute .
* @return String
*/
public String getTmpCmd() {
return tmpCmd;
}
/**
* tmpCmd attribute .
* @param tmpCmd String
*/
public void setTmpCmd(String tmpCmd) {
this.tmpCmd = tmpCmd;
}
/**
* tempValue attribute .
* @return String
*/
public String getTempValue() {
return tempValue;
}
/**
* tempValue attribute .
* @param tempValue String
*/
public void setTempValue(String tempValue) {
this.tempValue = tempValue;
}
/**
* tempInt attribute .
* @return int
*/
public int getTempInt() {
return tempInt;
}
/**
* tempInt attribute .
* @param tempInt int
*/
public void setTempInt(int tempInt) {
this.tempInt = tempInt;
}
}

@ -1,22 +0,0 @@
package cokr.xit.fims.framework.biz.mng.menu;
import cokr.xit.fims.framework.core.XitBaseSearchVO;
/**
*
* @: SearchVO
* @:
* @: 2020. 3. 26. 1:33:08
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public class ProgramMngSearchVO extends XitBaseSearchVO{
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
}

@ -1,40 +0,0 @@
package cokr.xit.fims.framework.biz.mng.menu;
import lombok.*;
/**
*
* @: VO
* @:
* @: 2020. 3. 26. 1:32:49
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@Builder
@ToString
public class ProgramMngVO {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
/** 프로그램파일명 */
private String pgrmFileNm;
/** 프로그램저장경로 */
private String progrmStreCours;
private String progrmStrePath;
/** 프로그램한글명 */
private String progrmKoreanNm;
/** URL */
private String URL;
/** 프로그램설명 */
private String dscrp;
}

@ -1,29 +0,0 @@
package cokr.xit.fims.framework.biz.mng.menu;
import lombok.*;
/**
*
* @: VO
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@Builder
@ToString
public class XitMenuInfoVO {
private static final long serialVersionUID = -1346557609566350808L;
private String menuNo; //메뉴 번호
private String menuNm; //메뉴 명
private String action; //메뉴화면 파일명
private String prntNo; //상위 메뉴 번호
private String srtOrd; //메뉴 순서
private String dscrp; //메뉴 설명
private String imgCnf; //관계 이미지 경로
private String relateImagePath; //관계 이미지 경로
private String imgNm; //관계 이미지 명
private String pgrmFileNm; //프로그램 파일 명
}

@ -1,68 +0,0 @@
package cokr.xit.fims.framework.biz.mng.menu.dao;
import cokr.xit.fims.framework.biz.mng.menu.MenuCreateMngSearchVO;
import cokr.xit.fims.framework.biz.mng.menu.MenuCreateMngVO;
import cokr.xit.fims.framework.biz.mng.menu.XitMenuInfoVO;
import org.apache.ibatis.session.RowBounds;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.sql.SQLException;
import java.util.List;
/**
*
* @: Mapper
* @:
* @: 2020. 3. 26. 10:03:50
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface MenuMgtMapper {
<T> List<XitMenuInfoVO> selectMenuInfos(final T t, final RowBounds rowBounds);
<T> List<XitMenuInfoVO> selectMenuInfos(final T t);
<T> XitMenuInfoVO selectMenuInfo(final T t);
<T> List<XitMenuInfoVO> selectMenuCreatDtls(final T t);
int insertMenuInfo(final XitMenuInfoVO vo);
int updateMenuInfo(final XitMenuInfoVO vo);
int deleteMenuInfo(final String menuNo);
int deleteMenuCreatDtlsList(final String menuNo);
/**
* <pre> : </pre>
* @return
* @throws SQLException int
* @author:
* @date: 2020. 3. 27.
*/
public int deleteAllMenuList() throws SQLException;
/**
* <pre> : </pre>
* @param searchVO
* @return XitMenuCreateMngVO
* @author:
* @date: 2020. 3. 31.
*/
public MenuCreateMngVO findUserScrtySetupByUsr(MenuCreateMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @return int
* @author:
* @date: 2020. 3. 31.
*/
public int deleteAllMenuCreatDtlsList() throws SQLException;
}

@ -1,76 +0,0 @@
package cokr.xit.fims.framework.biz.mng.menu.service;
import cokr.xit.fims.framework.biz.mng.menu.MenuListMngVO;
import cokr.xit.fims.framework.biz.mng.menu.XitMenuInfoVO;
import org.apache.ibatis.session.RowBounds;
import java.io.FileInputStream;
import java.util.List;
import java.util.Map;
/**
*
* @: Service
* @:
* @: 2020. 3. 26. 10:07:11
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface MenuMgtService {
/**
* <pre> : </pre>
* @param paraMap
* @return List<MenuListMngVO>
* @author:
* @date: 2022. 10. 18.
*/
List<XitMenuInfoVO> findMenus(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> XitMenuInfoVO findMenu(final T t);
void addMenu(final XitMenuInfoVO vo);
void modifyMenu(final XitMenuInfoVO vo);
void removeMenu(final String menuNo);
/**
* <pre> :
* - ,
* </pre>
* @return boolean
* @author:
* @date: 2020. 3. 27.
*/
public boolean menuBndeAllDelete() throws Exception;
/**
* <pre> : </pre>
* @param vo
* @param inputStream
* @return
* @throws Exception String
* @author:
* @date: 2020. 3. 27.
*/
public String addsProc(MenuListMngVO vo, FileInputStream inputStream) throws Exception;
}

@ -1,447 +0,0 @@
package cokr.xit.fims.framework.biz.mng.menu.service.bean;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.fims.framework.biz.cache.service.CacheService;
import cokr.xit.fims.framework.biz.cmm.ProgrmListVO;
import cokr.xit.fims.framework.biz.mng.menu.dao.MenuMgtMapper;
import cokr.xit.fims.framework.biz.mng.menu.MenuListMngVO;
import cokr.xit.fims.framework.biz.mng.menu.ProgramMngVO;
import cokr.xit.fims.framework.biz.mng.menu.XitMenuInfoVO;
import cokr.xit.fims.framework.biz.mng.menu.service.MenuMgtService;
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
import cokr.xit.fims.framework.support.exception.BizRuntimeException;
import cokr.xit.fims.framework.support.util.Checks;
import cokr.xit.fims.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.session.RowBounds;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.FileInputStream;
import java.util.List;
import java.util.Map;
//TODO : 캐쉬 반영??
@Slf4j
@RequiredArgsConstructor
@Service
public class MenuMgtServiceBean extends AbstractServiceBean implements MenuMgtService {
private final MenuMgtMapper mapper;
private final CacheService cacheService;
@Override
@Transactional(readOnly = true)
public List<XitMenuInfoVO> findMenus(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectMenuInfos(paraMap);
}
@Override
@Transactional(readOnly = true)
public <T> XitMenuInfoVO findMenu(final T t){return mapper.selectMenuInfo(t); }
@Override
@Transactional
public void addMenu(final XitMenuInfoVO vo) {
// 메뉴 등록 여부
if(Checks.isNotEmpty(mapper.selectMenuInfo(XitMenuInfoVO.builder()
.menuNo(vo.getMenuNo())
.build())))
throw BizRuntimeException.create(MessageKey.DUP_ERR_MSG);
// 프로그램 존재 여부
//if(Checks.isEmpty(programMngMapper.selectProgram(ProgramMngVO.builder()
// .pgrmFileNm(vo.getPgrmFileNm())
// .build())))
// throw BizRuntimeException.create(MessageKey.NOT_FOUND_MSG);
mapper.insertMenuInfo(vo);
cacheService.evictAllMenuCache();
}
@Override
@Transactional
public void modifyMenu(final XitMenuInfoVO vo) {
mapper.updateMenuInfo(vo);
cacheService.evictAllMenuCache();
}
@Override
@Transactional
public void removeMenu(final String menuNo) {
// 참조하는 메뉴 조회
if(mapper.selectMenuInfos(XitMenuInfoVO.builder().prntNo(menuNo).build()).size() > 0)
throw BizRuntimeException.create("fail.common.delete.upperMenuExist");
//권한별 메뉴 관리 조회 후 삭제
if(mapper.selectMenuCreatDtls(XitMenuInfoVO.builder().menuNo(menuNo).build()).size() > 0)
mapper.deleteMenuCreatDtlsList(menuNo);
mapper.deleteMenuInfo(menuNo);
cacheService.evictAllMenuCache();
}
@Override
@Transactional
public boolean menuBndeAllDelete() throws Exception {
//if(!deleteAllProgrmDtls()){return false;} // 프로그램변경요청 테이블
if (!deleteAllMenuCreatDtlsList()) {
return false;
} // 메뉴정보생성내역 테이블
if (!deleteAllMenuList()) {
return false;
} // 메뉴정보 테이블
if (!deleteAllProgrm()) {
return false;
} // 프로그램목록 테이블
return true;
}
/**
*
* @return boolean
* @exception Exception
*/
private boolean deleteAllMenuList() throws Exception {
//mapper.deleteMenuInfo(null);
return true;
}
/**
*
* @return boolean
* @exception Exception
*/
private boolean deleteAllMenuCreatDtlsList() throws Exception {
mapper.deleteAllMenuCreatDtlsList();
return true;
}
/**
*
* @return boolean
* @exception Exception
*/
private boolean deleteAllProgrm() {
//programMngMapper.deleteProgram(null);
return true;
}
/**
*
* @return boolean
* @exception Exception
*/
private boolean deleteAllProgrmDtls() {
//programMngMapper.deleteAllProgrmDtls();
return true;
}
@Override
@Transactional
public String addsProc(MenuListMngVO vo, FileInputStream inputStream) throws Exception {
String message = addsProc(inputStream);
String sMessage = null;
switch (Integer.parseInt(message)) {
case 99:
log.debug("프로그램목록/메뉴정보테이블 데이타 존재오류 - 초기화 하신 후 다시 처리하세요.");
sMessage = "프로그램목록/메뉴정보테이블 데이타 존재오류 - 초기화 하신 후 다시 처리하세요.";
break;
case 90:
log.debug("파일존재하지 않음.");
sMessage = "파일존재하지 않음.";
break;
case 91:
log.debug("프로그램시트의 cell 갯수 오류.");
sMessage = "프로그램시트의 cell 갯수 오류.";
break;
case 92:
log.debug("메뉴정보시트의 cell 갯수 오류.");
sMessage = "메뉴정보시트의 cell 갯수 오류.";
break;
case 93:
log.debug("엑셀 시트갯수 오류.");
sMessage = "엑셀 시트갯수 오류.";
break;
case 95:
log.debug("메뉴정보 입력시 에러.");
sMessage = "메뉴정보 입력시 에러.";
break;
case 96:
log.debug("프로그램목록입력시 에러.");
sMessage = "프로그램목록입력시 에러.";
break;
default:
log.debug("일괄배치처리 완료.");
sMessage = "일괄배치처리 완료.";
break;
}
log.debug(message);
return sMessage;
}
/**
* _
* @param inputStream InputStream
* @return String
* @exception Exception
*/
private String addsProc(FileInputStream inputStream) throws Exception {
boolean success = false;
String requestValue = null;
//char FILE_SEPARATOR = File.separatorChar;
int progrmSheetRowCnt = 0;
int menuSheetRowCnt = 0;
//String xlsFile = null;
try {
/*
message = "99"; //프로그램목록테이블 데이타 존재오류.
message = "99"; //메뉴정보테이블 데이타 존재오류.
message = "90"; //파일존재하지 않음.
message = "91"; //프로그램시트의 cell 갯수 오류
message = "92"; //메뉴정보시트의 cell 갯수 오류
message = "93"; //엑셀 시트갯수 오류
message = "95"; //메뉴정보 입력시 에러
message = "96"; //프로그램목록입력시 에러
message = "0"; //일괄배치처리 완료
*/
//List<ProgrmListVO> listProgrmListVO = xitFrameCrudService.findXitProgrmLists(new ProgrmListVO());
List<ProgramMngVO> listProgrmListVO = null;
if (XitCmmnUtil.notEmpty(listProgrmListVO) && listProgrmListVO.size() > 1) {
return requestValue = "99";
} //프로그램목록테이블 데이타 존재오류.
//List<XitMenuInfoVO> listMenuInfoVO = xitFrameCrudService.findXitMenuInfos(new XitMenuInfoVO());
List<XitMenuInfoVO> listMenuInfoVO = mapper.selectMenuInfos(null);
if (XitCmmnUtil.notEmpty(listMenuInfoVO) && listMenuInfoVO.size() > 1) {
return requestValue = "99";
} //메뉴정보테이블 데이타 존재오류.
Workbook hssfWB = null;
//log.debug("hssfWB:::::"+hssfWB);
// 엑셀 파일 시트 갯수 확인 sheet = 2 첫번째시트 = 프로그램목록 두번째시트 = 메뉴목록
if (hssfWB.getNumberOfSheets() == 2) {
Sheet progrmSheet = hssfWB.getSheetAt(0); //프로그램목록 시트 가져오기
Sheet menuSheet = hssfWB.getSheetAt(1); //메뉴정보 시트 가져오기
Row progrmRow = progrmSheet.getRow(1); //프로그램 row 가져오기
Row menuRow = menuSheet.getRow(1); //메뉴정보 row 가져오기
progrmSheetRowCnt = progrmRow.getPhysicalNumberOfCells(); //프로그램 cell Cnt
menuSheetRowCnt = menuRow.getPhysicalNumberOfCells(); //메뉴정보 cell Cnt
// 프로그램 시트 파일 데이타 검증 cell = 5개
if (progrmSheetRowCnt != 5) {
return requestValue = "91"; //프로그램시트의 cell 갯수 오류
}
// 메뉴목록 시트 파일 데이타 검증 cell = 8개
if (menuSheetRowCnt != 8) {
return requestValue = "92"; //메뉴정보시트의 cell 갯수 오류
}
/* sheet1번 = 프로그램목록 , sheet2번 = 메뉴정보 */
success = progrmRegist(progrmSheet);
if (success) {
success = menuRegist(menuSheet);
if (success) {
return requestValue = "0"; // 일괄배치처리 완료
} else {
deleteAllMenuCreatDtlsList();
deleteAllMenuList();
// deleteAllProgrmDtls(); //2020.04.09 박민규-프로그램변경내역 테이블이 없어 주석처리
deleteAllProgrm();
return requestValue = "95"; // 메뉴정보 입력시 에러
}
} else {
// deleteAllProgrmDtls(); //2020.04.09 박민규-프로그램변경내역 테이블이 없어 주석처리
deleteAllProgrm();
return requestValue = "96"; // 프로그램목록입력시 에러
}
} else {
return requestValue = "93"; // 엑셀 시트갯수 오류
}
} catch (Exception e) {
log.debug("{}", e);
requestValue = "99";
}
return requestValue;
}
/**
*
* @param progrmSheet HSSFSheet
* @return boolean
* @exception Exception
*/
private boolean progrmRegist(Sheet progrmSheet) throws Exception {
int count = 0;
boolean success = false;
try {
int rows = progrmSheet.getPhysicalNumberOfRows(); //행 갯수 가져오기
for (int j = 1; j < rows; j++) { //row 루프
ProgramMngVO vo = new ProgramMngVO();
Row row = progrmSheet.getRow(j); //row 가져오기
if (row != null) {
//int cells=row.getPhysicalNumberOfCells(); //cell 갯수 가져오기
Cell cell = null;
cell = row.getCell(0); //프로그램명
if (cell != null) {
vo.setPgrmFileNm("" + cell.getStringCellValue());
}
cell = row.getCell(1); //프로그램한글명
if (cell != null) {
vo.setProgrmKoreanNm("" + cell.getStringCellValue());
}
cell = row.getCell(2); //프로그램저장경로
if (cell != null) {
vo.setProgrmStrePath("" + cell.getStringCellValue());
}
cell = row.getCell(3); //프로그램 URL
if (cell != null) {
vo.setURL("" + cell.getStringCellValue());
}
cell = row.getCell(4); //프로그램설명
if (cell != null) {
vo.setDscrp("" + cell.getStringCellValue());
}
}
if (insertProgrm(vo)) {
count++;
}
}
if (count == rows - 1) {
success = true;
} else {
success = false;
}
} catch (Exception e) {
log.debug("{}", e);
success = false;
}
return success;
}
/**
*
* @param menuSheet HSSFSheet
* @return boolean
* @exception Exception
*/
private boolean menuRegist(Sheet menuSheet) throws Exception {
boolean success = false;
int count = 0;
try {
int rows = menuSheet.getPhysicalNumberOfRows(); //행 갯수 가져오기
for (int j = 1; j < rows; j++) { //row 루프
XitMenuInfoVO vo = new XitMenuInfoVO();
Row row = menuSheet.getRow(j); //row 가져오기
if (row != null) {
//int cells=row.getPhysicalNumberOfCells(); //cell 갯수 가져오기
Cell cell = null;
cell = row.getCell(0); //메뉴번호
if (cell != null) {
Double doubleCell = null;
//vo.setMenuNo(Integer.parseInt("" + doubleCell.longValue()));
vo.setMenuNo("" + doubleCell.longValue());
}
cell = row.getCell(1); //메뉴순서
if (cell != null) {
Double doubleCell = null;
//vo.setSrtOrd(Integer.parseInt("" + doubleCell.longValue()));
vo.setSrtOrd("" + doubleCell.longValue());
}
cell = row.getCell(2); //메뉴명
if (cell != null) {
vo.setMenuNm("" + cell.getStringCellValue());
}
cell = row.getCell(3); //상위메뉴번호
if (cell != null) {
Double doubleCell = null;
//vo.setPrntNo(Integer.parseInt("" + doubleCell.longValue()));
vo.setPrntNo("" + doubleCell.longValue());
}
cell = row.getCell(4); //메뉴설명
if (cell != null) {
vo.setDscrp("" + cell.getStringCellValue());
}
cell = row.getCell(5); //관련이미지경로
if (cell != null) {
vo.setRelateImagePath("" + cell.getStringCellValue());
}
cell = row.getCell(6); //관련이미지명
if (cell != null) {
vo.setImgNm("" + cell.getStringCellValue());
}
cell = row.getCell(7); //프로그램파일명
if (cell != null) {
vo.setPgrmFileNm("" + cell.getStringCellValue());
}
}
try {
this.addMenu(vo);
if (true) {
count++;
}
} catch (Exception e) {
throw e;
}
}
if (count == rows - 1) {
success = true;
} else {
}
} catch (Exception e) {
log.debug("{}", e);
success = false;
}
return success;
}
/**
*
* @param vo ProgrmManageVO
* @return boolean
* @exception Exception
*/
private boolean insertProgrm(ProgramMngVO vo) throws Exception {
//if(XitCmmnUtil.isEmpty(programMngService.findProgram(vo)))
// programMngService.addProc(vo);
//else
// programMngService.modifyProc(vo);
return true;
}
}

@ -1,173 +0,0 @@
package cokr.xit.fims.framework.biz.mng.menu.web;
import cokr.xit.foundation.web.AbstractController;
import cokr.xit.fims.framework.biz.mng.menu.XitMenuInfoVO;
import cokr.xit.fims.framework.biz.mng.menu.service.MenuMgtService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
import cokr.xit.fims.framework.core.utils.attachfile.XitAttachFileUtil;
import cokr.xit.fims.framework.core.utils.attachfile.XitAttachFileVO;
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.AjaxUtils;
import cokr.xit.fims.framework.support.util.Checks;
import cokr.xit.fims.framework.support.util.ValidationError;
import cokr.xit.fims.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* @: Controller
* @:
* @: 2020. 3. 25. 4:05:40
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Controller
@Slf4j
@RequiredArgsConstructor
@RequestMapping(name = "", value = "/framework/biz/mng/menu")
public class MenuMgtController extends AbstractController {
private final MenuMgtService service;
/**
* / popup page
* @param vo
* @return ModelAndView
*/
@RequestMapping(name = "", value = "/mngMenuMgtPopup")
public ModelAndView mngMenuMgtPopup(final XitMenuInfoVO vo) {
ModelAndView mav = new ModelAndView();
if(Checks.isEmpty(vo.getMenuNm())){
mav.addObject("menuManageVO", vo);
mav.addObject("pageTitle", "메뉴 정보 등록");
} else {
mav.addObject("menuManageVO", service.findMenu(vo));
mav.addObject("pageTitle", "메뉴 정보 변경");
}
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngMenuMgtPopup.popup");
return mav;
}
@GetMapping(name = "", value = "/findMenus")
public ModelAndView findMenus(@RequestParam final Map<String,Object> paraMap) {
return new ModelAndView("jsonView").addObject("result",service.findMenus(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@PostMapping(name = "", value = "/addMenu")
public ModelAndView addMenu(final XitMenuInfoVO vo, final BindingResult bindingResult){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
ValidationError.of("menuManageVO", vo, bindingResult);
service.addMenu(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
@PostMapping(name = "", value = "/modifyMenu")
public ModelAndView modifyMenu(final XitMenuInfoVO vo, final BindingResult bindingResult){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
ValidationError.of("menuManageVO", vo, bindingResult);
service.modifyMenu(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav;
}
@PostMapping(name = "", value = "/removeMenu")
public ModelAndView removeMenu(final String menuNo){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeMenu(menuNo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav;
}
public void uploadMenuExcels(XitMenuInfoVO vo, HttpServletRequest request, HttpServletResponse response){
List<XitAttachFileVO> listAttchFile = null;
listAttchFile = XitAttachFileUtil.fileUpload(request, XitCmmnUtil.setOsPath("/home/tempUpload"), true, 5);
if(XitCmmnUtil.isEmpty(listAttchFile)) {
}else {
XitAttachFileVO fileVO = listAttchFile.get(0);
File file = new File(fileVO.getFileFullPath());
try(FileInputStream fis = new FileInputStream(file)){
if (!"".equals(fileVO.getFileName())) {
// 2011.10.07 업로드 파일에 대한 확장자를 체크
if (fileVO.getFileName().toLowerCase().endsWith(".xls") || fileVO.getFileName().toLowerCase().endsWith(".xlsx")) {
if (service.menuBndeAllDelete()) {
} else {
}
} else {
if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시
//반환 데이터 설정
Map<String, Object> resultMap = new HashMap<String, Object>();
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
}else { //submit 요청 시
}
}
} else {
}
} catch (FileNotFoundException e) {
} catch (ServletException e) {
throw new RuntimeException(e);
} catch (IOException e) {
throw new RuntimeException(e);
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
}
}
//sLocationUrl = "forward:/framework/biz/mng/menu/MenuListMng_inputs.do";
//break;
}
}

@ -1,73 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user;
import cokr.xit.fims.framework.core.XitBaseSearchVO;
import java.util.List;
/**
*
* @: SearchVO
* @:
* @: 2020. 4. 10. 4:42:43
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public class XitUserAbsntMngSearchVO extends XitBaseSearchVO{
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
/**
*
*/
List<XitUserAbsntMngVO> userAbsnceList;
/**
*
*/
String[] delYn;
/**
*
*/
String selAbsnceAt;
/**
* @return the userAbsnceList
*/
public List<XitUserAbsntMngVO> getUserAbsnceList() {
return userAbsnceList;
}
/**
* @param userAbsnceList the userAbsnceList to set
*/
public void setUserAbsnceList(List<XitUserAbsntMngVO> userAbsnceList) {
this.userAbsnceList = userAbsnceList;
}
/**
* @return the delYn
*/
public String[] getDelYn() {
return delYn;
}
/**
* @param delYn the delYn to set
*/
public void setDelYn(String[] delYn) {
this.delYn = delYn;
}
/**
* @return the selAbsnceAt
*/
public String getSelAbsnceAt() {
return selAbsnceAt;
}
/**
* @param selAbsnceAt the selAbsnceAt to set
*/
public void setSelAbsnceAt(String selAbsnceAt) {
this.selAbsnceAt = selAbsnceAt;
}
}

@ -1,121 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user;
import cokr.xit.fims.framework.core.BaseVO;
/**
*
* @: VO
* @:
* @: 2020. 4. 10. 4:43:26
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public class XitUserAbsntMngVO extends BaseVO {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String userId;
/**
*
*/
private String userNm;
/**
*
*/
private String userAbsnceYn;
/**
* ID
*/
private String mdfr;
/**
*
*/
private String mdfcnDt;
/**
*
*/
private String regYn;
/**
* @return the userId
*/
public String getUserId() {
return userId;
}
/**
* @param userId the userId to set
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
* @return the userNm
*/
public String getUserNm() {
return userNm;
}
/**
* @param userNm the userNm to set
*/
public void setUserNm(String userNm) {
this.userNm = userNm;
}
/**
* @return the userAbsnceYn
*/
public String getUserAbsnceYn() {
return userAbsnceYn;
}
/**
* @param userAbsnceYn the userAbsnceYn to set
*/
public void setUserAbsnceYn(String userAbsnceYn) {
this.userAbsnceYn = userAbsnceYn;
}
/**
* @return the mdfr
*/
public String getMdfr() {
return mdfr;
}
/**
* @param mdfr the mdfr to set
*/
public void setMdfr(String mdfr) {
this.mdfr = mdfr;
}
/**
* @return the mdfcnDt
*/
public String getMdfcnDt() {
return mdfcnDt;
}
/**
* @param mdfcnDt the mdfcnDt to set
*/
public void setMdfcnDt(String mdfcnDt) {
this.mdfcnDt = mdfcnDt;
}
/**
* @return the regYn
*/
public String getRegYn() {
return regYn;
}
/**
* @param regYn the regYn to set
*/
public void setRegYn(String regYn) {
this.regYn = regYn;
}
}

@ -1,22 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user;
import cokr.xit.fims.framework.core.XitBaseSearchVO;
/**
*
* @: SearchVO
* @:
* @: 2020. 11. 5. 1:32:49
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public class XitUserEtcOptMngSearchVO extends XitBaseSearchVO{
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
}

@ -1,152 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user;
import cokr.xit.fims.framework.core.BaseVO;
import java.util.List;
/**
*
* @: VO
* @:
* @: 2020. 11. 5. 1:32:49
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public class XitUserEtcOptMngVO extends BaseVO {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
private List<XitUserEtcOptMngVO> listVO;
/**
* ID
*/
private String uniqId;
/**
* ID
*/
private String userId;
/**
* ID
*/
private String userAcnt;
/**
*
*/
private String userNm;
private String emplyrUniqId;
private String emplyrId;
private String emplyrNm;
/**
*
*/
private String jobDataAuthor;
/**
*
*/
private String userManageAuthor;
/**
*
*/
private String elctrnsanctnUseYn;
/**
*
*/
private String jobConfmAuthorYn;
public List<XitUserEtcOptMngVO> getListVO() {
return listVO;
}
public void setListVO(List<XitUserEtcOptMngVO> listVO) {
this.listVO = listVO;
}
public String getUniqId() {
return uniqId;
}
public void setUniqId(String uniqId) {
this.uniqId = uniqId;
}
public String getUserAcnt() {
return userAcnt;
}
public void setUserAcnt(String userAcnt) {
this.userAcnt = userAcnt;
}
public String getEmplyrUniqId() {
return emplyrUniqId;
}
public void setEmplyrUniqId(String emplyrUniqId) {
this.emplyrUniqId = emplyrUniqId;
}
public String getEmplyrId() {
return emplyrId;
}
public void setEmplyrId(String emplyrId) {
this.emplyrId = emplyrId;
}
public String getEmplyrNm() {
return emplyrNm;
}
public void setEmplyrNm(String emplyrNm) {
this.emplyrNm = emplyrNm;
}
/**
* userId attribute .
* @return String
*/
public String getUserId() {
return userId;
}
/**
* userId attribute .
* @param userId String
*/
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserNm() {
return userNm;
}
public void setUserNm(String userNm) {
this.userNm = userNm;
}
public String getJobDataAuthor() {
return jobDataAuthor;
}
public void setJobDataAuthor(String jobDataAuthor) {
this.jobDataAuthor = jobDataAuthor;
}
public String getUserManageAuthor() {
return userManageAuthor;
}
public void setUserManageAuthor(String userManageAuthor) {
this.userManageAuthor = userManageAuthor;
}
public String getElctrnsanctnUseYn() {
return elctrnsanctnUseYn;
}
public void setElctrnsanctnUseYn(String elctrnsanctnUseYn) {
this.elctrnsanctnUseYn = elctrnsanctnUseYn;
}
public String getJobConfmAuthorYn() {
return jobConfmAuthorYn;
}
public void setJobConfmAuthorYn(String jobConfmAuthorYn) {
this.jobConfmAuthorYn = jobConfmAuthorYn;
}
}

@ -1,33 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user;
import lombok.*;
/**
*
* @: VO
* @: . ( )
* @: 2020. 11. 5. 4:41:01
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@ToString
public class XitUserEtcOptionVO {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 2424456977596618565L;
protected String userId; //사용자 id
protected String jobDataAuthor; //업무 데이터 권한
protected String userManageAuthor; //사용자 관리 권한
protected String elctrnsanctnUseYn; //전자결재 사용 여부(시스템별 필요 시 사용)
protected String jobConfmAuthorYn; //업무 승인 권한(시스템별 필요 시 사용)
}

@ -1,63 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user;
import lombok.*;
/**
*
* @: VO
* @:
* @: 2020. 3. 21. 11:03:03
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ToString
public class XitUserInfoVO extends XitUserEtcOptionVO {
/**
* serialVersionUID
*/
private static final long serialVersionUID = -4545167436366021662L;
protected String userId; //고유 id
protected String userAcnt; //계정 id
protected String passwd; //비밀번호
protected String passwd2; //비밀번호
protected String orgId; //조직 id
protected String userNm; //사용자 명
protected String empNo; //사원 번호
protected String gender; //성별 코드
protected String brdt; //생일
protected String fxno; //팩스번호
protected String addr; //주택 주소
protected String passwdHint; //비밀번호 힌트
protected String passwdNsr; //비밀번호 정답
protected String areaNo; //지역 번호
protected String daddr; //상세 주소
protected String zip; //우편번호
protected String telno; //사무실 전화번호
protected String mblTelno; //이동전화번호
protected String emlAdrs; //이메일 주소
protected String posNm; //직위 명
protected String grpId; //그룹 id - 업무그룹(sgg_cd)
protected String nsttCd; //소속기관 코드 - 시스템코드(sysSeCd)
protected String stts; //사용자 상태 코드
protected String crtfcDn; //인증 dn 값
protected String regDt; //가입 일
protected String emplyrId;
protected String emplyrNm;
protected String orgnztNm;
protected String uniqId;
protected String userTy;
protected String sttsNm;
protected String rgtr;
protected String mdfr;
}

@ -1,22 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user;
import cokr.xit.fims.framework.core.XitBaseSearchVO;
/**
*
* @: SearchVO
* @:
* @: 2020. 3. 26. 1:33:08
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public class XitUserRegMngSearchVO extends XitBaseSearchVO{
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
}

@ -1,150 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user;
import cokr.xit.fims.framework.core.BaseVO;
import lombok.*;
/**
*
* @: VO
* @:
* @: 2020. 3. 26. 1:32:49
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ToString
public class XitUserRegMngVO extends BaseVO {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
/** 이전비밀번호 - 비밀번호 변경시 사용*/
private String oldPassword = "";
/**
*
*/
private String regDt;
/**
*
*/
private String uniqId="";
/**
*
*/
private String userTy;
/**
*
*/
private String areaNo;
/**
*
*/
private String brdt;
/**
*
*/
private String daddr;
/**
*
*/
private String emlAdrs;
/**
*
*/
private String empNo;
/**
* ID
*/
private String emplyrId;
/**
*
*/
private String emplyrNm;
/**
*
*/
private String stts;
/**
*
*/
private String fxno;
/**
* ID
*/
private String grpId;
/**
*
*/
private String addr;
/**
*
*/
private String nsttCd;
/**
*
*/
private String mberTy;
/**
*
*/
private String mblTelno;
/**
*
*/
private String posNm;
/**
*
*/
private String telno;
/**
* ID
*/
private String orgId;
/**
*
*/
private String passwd;
/**
*
*/
private String passwdNsr;
/**
*
*/
private String passwdHint;
/**
*
*/
private String sbscrbDeBegin;
/**
*
*/
private String sbscrbDeEnd;
/**
*
*/
private String gender;
/**
*
*/
private String zip;
/**
* DN
*/
private String crtfcDn;
/*========================
* select
========================*/
private String userId;
private String userAcnt;
private String userNm;
}

@ -1,29 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user;
import lombok.*;
/**
*
* @: VO
* @:
* @: 2020. 3. 21. 11:07:43
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@ToString
public class XitUserScrtySetupVO {
/**
* serialVersionUID
*/
private static final long serialVersionUID = -4431553754531650113L;
protected String userId; //보안 설정 대상 id
protected String authId; //권한 코드
}

@ -1,63 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user.dao;
import cokr.xit.fims.framework.biz.mng.user.XitUserEtcOptionVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserInfoVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO;
import org.apache.ibatis.session.RowBounds;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.util.List;
import java.util.Map;
/**
*
* @: Mapper
* @:
* @: 2020. 4. 8. 3:33:35
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface UserMgtMapper {
/**
* <pre> : </pre>
*/
<T> List<XitUserInfoVO> selectUsers(final T t, final RowBounds rowBounds);
<T> XitUserInfoVO selectUser(final T t);
@SuppressWarnings("MybatisXMapperMethodInspection")
Map<String,Object> selectCheckUserInfo(final String userId);
int insertUserInfo(final XitUserInfoVO vo);
int updateUserInfo(final XitUserInfoVO vo);
int deleteUserInfo(final String userId);
//Map<String,Object> selectAuthorGroupInfo(final Map<String,Object> map);
List<XitUserScrtySetupVO> selectUserScrtySetups(final XitUserScrtySetupVO vo);
XitUserScrtySetupVO selectUserScrtySetup(final String userId);
int insertUserScrtySetup(final XitUserScrtySetupVO vo);
int updateUserScrtySetup(final XitUserScrtySetupVO vo);
int deleteUserScrtySetup(String userId);
int insertUserEtcOption(final XitUserEtcOptionVO vo);
int insertUserInfoChangeDtls(final String userId);
int deleteUserInfoChangeDtlsList(final String userId);
}

@ -1,49 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user.dao;
import cokr.xit.fims.framework.biz.mng.user.XitUserAbsntMngSearchVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserAbsntMngVO;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.sql.SQLException;
import java.util.List;
/**
*
* @: Mapper
* @:
* @: 2020. 4. 10. 4:41:35
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface XitUserAbsntMngMapper {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitUserAbsntMngVO>
* @author:
* @date: 2020. 4. 10.
*/
public List<XitUserAbsntMngVO> findList(XitUserAbsntMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 4. 10.
*/
public int findListTotCnt(XitUserAbsntMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param vo
* @return XitUserAbsntMngVO
* @author:
* @date: 2020. 4. 10.
*/
public XitUserAbsntMngVO findView(XitUserAbsntMngVO vo) throws SQLException;
}

@ -1,50 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user.dao;
import cokr.xit.fims.framework.biz.mng.user.XitUserEtcOptMngSearchVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserEtcOptMngVO;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.sql.SQLException;
import java.util.List;
/**
*
* @: Mapper
* @:
* @: 2020. 11. 5. 3:32:51
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface XitUserEtcOptMngMapper {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitUserEtcOptMngVO>
* @author:
* @date: 2020. 11. 5.
*/
public List<XitUserEtcOptMngVO> findList(XitUserEtcOptMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 11. 5.
*/
public int findListTotCnt(XitUserEtcOptMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param vo
* @return XitUserEtcOptMngVO
* @author:
* @date: 2020. 11. 5.
*/
public XitUserEtcOptMngVO findView(XitUserEtcOptMngVO vo) throws SQLException;
}

@ -1,63 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user.service;
import cokr.xit.fims.framework.biz.mng.user.XitUserEtcOptionVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserInfoVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
import java.util.Map;
/**
*
* @: Service
* @:
* @: 2020. 4. 8. 3:33:18
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface UserMgtService {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitUserRegMngVO>
* @author:
* @date: 2020. 4. 8.
*/
List<XitUserInfoVO> findUsers(final Map<String, Object> paraMap, final RowBounds rowBounds);
XitUserInfoVO findUser(final String uniqId);
void addUser(final XitUserInfoVO userInfoVO);
void modifyUser(final XitUserInfoVO userInfoVO);
void removeUser(final String uniqId);
String getDefaultAuthId(final String grpId);
int addUserScrtySetup(final XitUserScrtySetupVO vo);
int addXitUserEtcOption(final XitUserEtcOptionVO vo);
/**
* <pre> : </pre>
* @param uniqId ID
* @param id ID
* @param oldPassword
* @param newPassword
* @param newPassword2
* @return void
* @author:
* @date: 2020. 4. 10.
*/
public void modifyPwdProc(String uniqId, String id, String oldPassword, String newPassword, String newPassword2);
}

@ -1,79 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user.service;
import cokr.xit.fims.framework.biz.mng.user.XitUserAbsntMngSearchVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserAbsntMngVO;
import java.util.List;
/**
*
* @: Service
* @:
* @: 2020. 4. 10. 4:41:16
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface XitUserAbsntMngService {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitUserAbsntMngVO>
* @author:
* @date: 2020. 4. 10.
*/
public List<XitUserAbsntMngVO> findList(XitUserAbsntMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 4. 10.
*/
public int findListTotCnt(XitUserAbsntMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param vo
* @return XitUserAbsntMngVO
* @author:
* @date: 2020. 4. 10.
*/
public XitUserAbsntMngVO findView(XitUserAbsntMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 10.
*/
public void addProc(XitUserAbsntMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 10.
*/
public void modifyProc(XitUserAbsntMngVO vo);
/**
* <pre> : </pre>
* @param id void
* @author:
* @date: 2020. 4. 10.
*/
public void removeProc(String id);
/**
* <pre> : </pre>
* @param ids void
* @author:
* @date: 2020. 4. 10.
*/
public void removesProc(String ids);
}

@ -1,78 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user.service;
import cokr.xit.fims.framework.biz.mng.user.XitUserEtcOptMngSearchVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserEtcOptMngVO;
import java.util.List;
/**
*
* @: Service
* @:
* @: 2020. 11. 5. 3:32:51
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface XitUserEtcOptMngService {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitUserEtcOptMngVO>
* @author:
* @date: 2020. 11. 5.
*/
public List<XitUserEtcOptMngVO> findList(XitUserEtcOptMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 11. 5.
*/
public int findListTotCnt(XitUserEtcOptMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param vo
* @return XitUserEtcOptMngVO
* @author:
* @date: 2020. 11. 5.
*/
public XitUserEtcOptMngVO findView(XitUserEtcOptMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 11. 5.
*/
public void addProc(XitUserEtcOptMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 11. 5.
*/
public void modifyProc(XitUserEtcOptMngVO vo);
/**
* <pre> : </pre>
* @param id void
* @author:
* @date: 2020. 11. 5.
*/
public void removeProc(String id);
/**
* <pre> : </pre>
* @param ids void
* @author:
* @date: 2020. 11. 5.
*/
public void removesProc(String ids);
}

@ -1,330 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user.service.bean;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.fims.framework.biz.cmm.XitLoginVO;
import cokr.xit.fims.framework.biz.cmm.service.XitFrameCrudService;
import cokr.xit.fims.framework.biz.mng.auth.dao.AuthGrpMgtMapper;
import cokr.xit.fims.framework.biz.mng.auth.XitAuthorGroupInfoVO;
import cokr.xit.fims.framework.biz.mng.user.dao.UserMgtMapper;
import cokr.xit.fims.framework.biz.mng.user.XitUserEtcOptionVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserInfoVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserRegMngVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO;
import cokr.xit.fims.framework.biz.mng.user.service.UserMgtService;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
import cokr.xit.fims.framework.core.utils.XitScrtyUtil;
import cokr.xit.fims.framework.support.exception.BizRuntimeException;
import cokr.xit.fims.framework.support.util.Checks;
import cokr.xit.fims.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.session.RowBounds;
import org.egovframe.rte.fdl.cmmn.exception.FdlException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@RequiredArgsConstructor
@Service
public class UserMgtServiceBean extends AbstractServiceBean implements UserMgtService {
private final UserMgtMapper mapper;
private final AuthGrpMgtMapper authGrpMgtMapper;
private final XitFrameCrudService xitFrameCrudService;
@Override
@Transactional(readOnly = true)
public List<XitUserInfoVO> findUsers(final Map<String,Object> paraMap, RowBounds rowBounds) {
return mapper.selectUsers(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public XitUserInfoVO findUser(final String uniqId) {
// TODO : 적용 체크
if(!this.isUserModifyAuth(uniqId))
throw new RuntimeException("대상에 대한 열람 권한이 없습니다.");
return mapper.selectUser(uniqId);
}
@Override
@Transactional
public void addUser(final XitUserInfoVO vo) {
vo.setRgtr(XitCmmnUtil.getUserInfo().getUniqId());
vo.setMdfr(XitCmmnUtil.getUserInfo().getUniqId());
vo.setUniqId("nextstringid");
vo.setUserId(vo.getUniqId());
vo.setUserAcnt(vo.getEmplyrId()); //처리대상 사용자 id
vo.setUserNm(vo.getEmplyrNm()); //처리대상 사용자 명
try {
vo.setPasswd(XitScrtyUtil.encryptPassword(vo.getPasswd(), vo.getUserAcnt()));
} catch (Exception e) {
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, String.format("비밀번호 암호화 실패:: %s", e.getMessage()));
}
mapper.insertUserInfo(vo);
// 사용자 권한
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
userScrtySetupVO.setUserId(vo.getUserId());
userScrtySetupVO.setAuthId(this.getDefaultAuthId(vo.getGrpId()));
mapper.insertUserScrtySetup(userScrtySetupVO);
// 기타 option
XitUserEtcOptionVO userEtcOptionVO = new XitUserEtcOptionVO();
userEtcOptionVO.setUserId(vo.getUniqId());
userEtcOptionVO.setJobDataAuthor("ONESELF"); //업무 데이터 권한
userEtcOptionVO.setUserManageAuthor("ONESELF"); //사용자 관리 권한
mapper.insertUserEtcOption(userEtcOptionVO);
}
@Override
@Transactional
public void modifyUser(final XitUserInfoVO vo) {
vo.setMdfr(XitCmmnUtil.getUserInfo().getUniqId());
// TODO : 적용 체크
if(!this.isUserModifyAuth(vo.getUniqId()))
throw new RuntimeException("대상에 대한 수정 권한이 없습니다.");
vo.setUserAcnt(vo.getEmplyrId()); //사용자 id
vo.setUserNm(vo.getEmplyrNm()); //사용자 명
vo.setUserId(vo.getUniqId());
Map<String,Object> userInfoCheckMap = mapper.selectCheckUserInfo(vo.getUserAcnt());
if(Checks.isEmpty(userInfoCheckMap) || !Objects.equals(vo.getUserId(), userInfoCheckMap.get("user_id")))
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "사용자 고유식별값이 일치하지 않습니다.");
// 변경이력 등록 and 사용자 정보 변경
mapper.insertUserInfoChangeDtls(vo.getUserId());
mapper.updateUserInfo(vo);
//그룹ID가 변경되었을 경우 사용자의 권한 갱신
if(!Objects.equals(vo.getGrpId(), userInfoCheckMap.get("grp_id"))) {
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
userScrtySetupVO.setUserId(vo.getUniqId());
userScrtySetupVO.setAuthId(this.getDefaultAuthId(vo.getGrpId()));
if(Checks.isEmpty(mapper.selectUserScrtySetup(userScrtySetupVO.getUserId()))) {
mapper.insertUserScrtySetup(userScrtySetupVO);
}else {
mapper.updateUserScrtySetup(userScrtySetupVO);
}
}
}
@Override
@Transactional
public void removeUser(final String userId) {
//업무사용자 삭제
Map<String,Object> userInfoCheckMap = mapper.selectCheckUserInfo(userId);
String targetUserId = String.valueOf(userInfoCheckMap.get("user_id"));
//사용자보안설정 삭제
if(Checks.isNotEmpty(mapper.selectUserScrtySetup(targetUserId))) {
mapper.deleteUserScrtySetup(targetUserId);
}
//사용자정보변경내역 전체 삭제
mapper.deleteUserInfoChangeDtlsList(targetUserId);
//업무사용자(직원)삭제
mapper.deleteUserInfo(targetUserId);
}
/**
* <pre>
* : .
* - (Empty) "일반사용자(ROLE_USER)"
* - "일반사용자(ROLE_USER)"
* - (Empty) "일반사용자(ROLE_USER)"
* -
* </pre>
*
* @param grpId ID
* @return String
* @author:
* @date: 2020. 10. 30.
*/
@Override
@Transactional(readOnly = true)
public String getDefaultAuthId(final String grpId) {
if(Checks.isEmpty(grpId)) return "ROLE_USER";
XitAuthorGroupInfoVO vo = authGrpMgtMapper.selectAuthorGroupInfo(grpId);
// 권한 설정
if (Checks.isEmpty(vo))
return "ROLE_USER";
else {
if (Checks.isEmpty(vo.getAuthId()))
return "ROLE_USER";
else
return vo.getAuthId();
}
}
@Override
@Transactional
public int addUserScrtySetup(final XitUserScrtySetupVO vo) {
return mapper.insertUserScrtySetup(vo);
}
@Override
@Transactional
public int addXitUserEtcOption(final XitUserEtcOptionVO vo) {
return mapper.insertUserEtcOption(vo);
}
/**
* <pre> :
* - .
* :"ROLE_ADMIN 권한" .
* :"ROLE_ADMIN 권한" "ROLE_ADMIN 권한" .
* : "ROLE_ADMIN 권한" "사용자관리권한" .
* </pre>
* @param uniqId ID
* @return boolean
* @author:
* @date: 2020. 6. 9.
*/
private boolean isUserModifyAuth(String uniqId) {
XitLoginVO loginSessionVO = XitCmmnUtil.getUserInfo();
//본인정보인 경우
if(loginSessionVO.getUniqId().equals(uniqId)) {
return true;
}else {
//사용자(수정대상) 권한 조회
XitUserScrtySetupVO scrtyVO = mapper.selectUserScrtySetup(uniqId);
String tgtAuthId = scrtyVO.getAuthId();
//사용자(수정자) 권한 조회
scrtyVO = mapper.selectUserScrtySetup(loginSessionVO.getUniqId());;
String userAuthId = scrtyVO.getAuthId();
//사용자(수정자)가 ROLE_ADMIN 권한의 사용자인 경우
if("ROLE_ADMIN".equals(userAuthId)) {
return true;
}else {
//사용자(수정대상)가 ROLE_ADMIN 권한의 사용자인 경우
if("ROLE_ADMIN".equals(tgtAuthId)) {
return false;
}
XitUserInfoVO tgtUserVO = mapper.selectUser(uniqId);
//Map<String,Object> tgtUserMap = mapper.selectCheckUserInfo(tgtUserVO.getEmplyrId());
//사용자관리권한별 분기
XitUserInfoVO loginUserVO = mapper.selectUser(loginSessionVO.getUniqId());
//Map<String,Object> loginUserMap = mapper.selectCheckUserInfo(loginUserVO.getEmplyrId());
//사용자(수정자) 정보 조회
switch(loginSessionVO.getUserManageAuthor()) {
case "ALL": //모든 사용자
return true;
case "DEPT": //자신이 속한 부서의 모든 사용자
if(loginUserVO.getNsttCd().equals(tgtUserVO.getNsttCd()))
return true;
break;
case "ORGNZT": //자신이 속한 조직의 모든 사용자
if(loginSessionVO.getOrgId().equals(tgtUserVO.getOrgId()))
return true;
break;
default:
return false;
}
}
return false;
}
}
@Override
public void modifyPwdProc(String uniqId, String accountId, String oldPassword, String newPassword, String newPassword2) {
/**
*
*/
if(!this.isUserModifyAuth(uniqId))
throw new RuntimeException("대상에 대한 수정 권한이 없습니다.");
XitUserRegMngVO vo = new XitUserRegMngVO();
vo.setUniqId(uniqId);
// vo = this.findView(vo);
String encryptPass = null;
String encryptNewPass = null;
try {
encryptPass = XitScrtyUtil.encryptPassword(oldPassword, accountId);
encryptNewPass = XitScrtyUtil.encryptPassword(newPassword, accountId);
} catch (Exception e) {
throw new RuntimeException(String.format("비밀번호 암호화 실패:: %s", e.getMessage()));
}
//비밀번호 동일 여부
if (vo.getPasswd().equals(encryptPass)) {
//신 비밀번호/비밀번호 확인 동일 여부
if (!newPassword.equals(newPassword2)) {
throw new RuntimeException("비밀번호와 비밀번호 확인이 맞지 않습니다.");
}
} else {
throw new RuntimeException("현재 비밀번호가 맞지 않습니다.");
}
/**
*
*/
XitUserInfoVO xitUserInfoVO = new XitUserInfoVO();
xitUserInfoVO.setUserId(uniqId);
xitUserInfoVO.setPasswd(encryptNewPass);
/**
*
*/
xitFrameCrudService.modifyXitUserInfo(xitUserInfoVO);
}
}

@ -1,132 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user.service.bean;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.fims.framework.biz.cmm.XitUserAbsnceVO;
import cokr.xit.fims.framework.biz.cmm.service.XitFrameCrudService;
import cokr.xit.fims.framework.biz.mng.user.dao.XitUserAbsntMngMapper;
import cokr.xit.fims.framework.biz.mng.user.XitUserAbsntMngSearchVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserAbsntMngVO;
import cokr.xit.fims.framework.biz.mng.user.service.XitUserAbsntMngService;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.SQLException;
import java.util.List;
@Service
public class XitUserAbsntMngServiceBean extends AbstractServiceBean implements XitUserAbsntMngService {
private static final Logger logger = LoggerFactory.getLogger(XitUserAbsntMngServiceBean.class);
@Resource
private XitUserAbsntMngMapper xitUserAbsntMngMapper;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Override
public List<XitUserAbsntMngVO> findList(XitUserAbsntMngSearchVO searchVO) {
List<XitUserAbsntMngVO> result = null;
try {
result = xitUserAbsntMngMapper.findList(searchVO);
} catch (SQLException e) {
throw new RuntimeException("사용자부재관리 목록 조회 FAIL::", e);
}
return result;
}
@Override
public int findListTotCnt(XitUserAbsntMngSearchVO searchVO) {
int result = 0;
try {
result = xitUserAbsntMngMapper.findListTotCnt(searchVO);
} catch (SQLException e) {
throw new RuntimeException("사용자부재관리 목록 총건수 조회 FAIL::", e);
}
return result;
}
@Override
public XitUserAbsntMngVO findView(XitUserAbsntMngVO vo) {
XitUserAbsntMngVO result = null;
try {
result = xitUserAbsntMngMapper.findView(vo);
} catch (SQLException e) {
throw new RuntimeException("사용자부재관리 상세정보 조회 FAIL::", e);
}
return result;
}
@Override
public void addProc(XitUserAbsntMngVO vo) {
/**
*
*/
XitUserAbsnceVO userAbsnceVO = convertToCrudVO(vo);
/**
*
*/
xitFrameCrudService.addXitUserAbsnce(userAbsnceVO);
}
@Override
public void modifyProc(XitUserAbsntMngVO vo) {
/**
*
*/
XitUserAbsnceVO userAbsnceVO = convertToCrudVO(vo);
/**
*
*/
xitFrameCrudService.modifyXitUserAbsnce(userAbsnceVO);
}
@Override
public void removeProc(String id) {
/**
*
*/
XitUserAbsnceVO userAbsnceVO = new XitUserAbsnceVO();
userAbsnceVO.setUserId(id);
/**
*
*/
xitFrameCrudService.removeXitUserAbsnce(userAbsnceVO);
}
@Override
public void removesProc(String ids) {
/**
*
*/
String[] strUserIds = ids.split(";");
for (int i = 0; i < strUserIds.length; i++) {
this.removeProc(strUserIds[i]);
}
}
/**
* <pre> : VO CRUD Service VO .</pre>
* @return XitUserAbsnceVO
* @author:
* @date: 2020. 3. 27.
*/
private XitUserAbsnceVO convertToCrudVO(XitUserAbsntMngVO vo) {
XitUserAbsnceVO userAbsnceVO = new XitUserAbsnceVO();
userAbsnceVO.setUserId(vo.getUserId()); //사용자 id
userAbsnceVO.setUserAbsnceYn(vo.getUserAbsnceYn()); //사용자 부재 여부
// userAbsnceVO.setRegDt(vo.get); //최초 등록 시점
userAbsnceVO.setRgtr (vo.getMdfr()); //최초 등록자 id
// userAbsnceVO.setMdfcnDt(vo.get); //최종 수정 시점
userAbsnceVO.setMdfr(vo.getMdfr()); //최종 수정자 id
return userAbsnceVO;
}
}

@ -1,119 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user.service.bean;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.fims.framework.biz.cmm.service.XitFrameCrudService;
import cokr.xit.fims.framework.biz.cmm.service.XitFrameUnitService;
import cokr.xit.fims.framework.biz.mng.user.dao.XitUserEtcOptMngMapper;
import cokr.xit.fims.framework.biz.mng.user.XitUserEtcOptMngSearchVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserEtcOptMngVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserEtcOptionVO;
import cokr.xit.fims.framework.biz.mng.user.service.XitUserEtcOptMngService;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.SQLException;
import java.util.List;
@Service
public class XitUserEtcOptMngServiceBean extends AbstractServiceBean implements XitUserEtcOptMngService {
@Resource
private XitUserEtcOptMngMapper xitUserEtcOptMngMapper;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Resource
private XitFrameUnitService xitFrameUnitService;
@Override
public List<XitUserEtcOptMngVO> findList(XitUserEtcOptMngSearchVO searchVO) {
List<XitUserEtcOptMngVO> result = null;
try {
result = xitUserEtcOptMngMapper.findList(searchVO);
} catch (SQLException e) {
throw new RuntimeException("사용자기타옵션관리 목록 조회 FAIL::", e);
}
return result;
}
@Override
public int findListTotCnt(XitUserEtcOptMngSearchVO searchVO) {
int result = 0;
try {
result = xitUserEtcOptMngMapper.findListTotCnt(searchVO);
} catch (SQLException e) {
throw new RuntimeException("사용자기타옵션관리 목록 총건수 조회 FAIL::", e);
}
return result;
}
@Override
public XitUserEtcOptMngVO findView(XitUserEtcOptMngVO vo) {
XitUserEtcOptMngVO result = null;
try {
result = xitUserEtcOptMngMapper.findView(vo);
} catch (SQLException e) {
throw new RuntimeException("사용자기타옵션관리 상세정보 조회 FAIL::", e);
}
return result;
}
@Override
public void addProc(XitUserEtcOptMngVO vo) {
}
@Override
public void modifyProc(XitUserEtcOptMngVO vo) {
if(XitCmmnUtil.notEmpty(vo.getListVO()))
for(XitUserEtcOptMngVO row : vo.getListVO()) {
/**
*
*/
XitUserEtcOptionVO userEtcOptionVO = convertToCrudVO(row);
/**
*
*/
if(XitCmmnUtil.isEmpty(xitFrameCrudService.findXitUserEtcOption(userEtcOptionVO)))
xitFrameCrudService.addXitUserEtcOption(userEtcOptionVO);
else
xitFrameCrudService.modifyXitUserEtcOption(userEtcOptionVO);
}
}
@Override
public void removeProc(String id) {
}
@Override
public void removesProc(String userIds) {
}
/**
* <pre> : VO CRUD Service VO .</pre>
* @return XitUserEtcOptionVO
* @author:
* @date: 2020. 11. 5.
*/
private XitUserEtcOptionVO convertToCrudVO(XitUserEtcOptMngVO vo) {
XitUserEtcOptionVO crudVO = new XitUserEtcOptionVO();
crudVO.setUserId(vo.getUserId()); //사용자 id
crudVO.setJobDataAuthor(vo.getJobDataAuthor()); //업무 데이터 권한
crudVO.setUserManageAuthor(vo.getUserManageAuthor()); //사용자 관리 권한
crudVO.setElctrnsanctnUseYn(vo.getElctrnsanctnUseYn()); //전자결재 사용 여부
crudVO.setJobConfmAuthorYn(vo.getJobConfmAuthorYn()); //업무 승인 권한 여부
return crudVO;
}
}

@ -1,235 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user.web;
import cokr.xit.foundation.web.AbstractController;
import cokr.xit.fims.framework.biz.mng.user.XitUserInfoVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserRegMngSearchVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserRegMngVO;
import cokr.xit.fims.framework.biz.mng.user.service.UserMgtService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.AjaxUtils;
import cokr.xit.fims.framework.support.util.ValidationError;
import cokr.xit.fims.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
*
* @: Controller
* @:
* @: 2020. 4. 8. 3:32:51
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@RequiredArgsConstructor
@Controller
@RequestMapping(name = "", value = "/framework/biz/mng/usr")
public class UserMgtController extends AbstractController {
private final UserMgtService service;
/**
* url
* @return
*/
@RequestMapping(name = "", value = "/addUserPopup")
public ModelAndView addUserPopup() {
ModelAndView mav = new ModelAndView();
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/usr/mngUserMgtPopup.popup");
mav.addObject("userInfoVO", new XitUserInfoVO());
mav.addObject("pageTitle", "사용자 정보 등록");
return mav;
}
/**
* url
* @param uniqId
* @return
*/
@RequestMapping(name = "", value = "/modifyUserPopup")
public ModelAndView modifyUserPopup(final String uniqId) {
ModelAndView mav = new ModelAndView();
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/usr/mngUserMgtPopup.popup");
mav.addObject("userInfoVO", service.findUser(uniqId));
mav.addObject("pageTitle", "사용자 정보 변정");
return mav;
}
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@GetMapping(name = "", value = "/findUsers")
public ModelAndView findUsers(@RequestParam final Map<String, Object> paraMap) {
return new ModelAndView("jsonView").addObject("result",service.findUsers(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@PostMapping(name = "", value = "/addUser")
public ModelAndView addUser(@ModelAttribute final XitUserInfoVO vo, final BindingResult bindingResult){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
ValidationError.of("userInfoVO", vo, bindingResult);
service.addUser(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
@PostMapping(name = "", value = "/modifyUser")
public ModelAndView modifyUser(@RequestBody final XitUserInfoVO vo, final BindingResult bindingResult){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
ValidationError.of("userInfoVO", vo, bindingResult);
service.modifyUser(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav;
}
@PostMapping(name = "", value = "/removeUser")
public ModelAndView removeUser(@RequestParam final String userId){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeUser(userId);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav;
}
/**
* <pre> : .</pre>
* @param cmd
* @param model
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "userRegMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST})
public String userRegMng_page_popup(
@PathVariable String cmd
, @ModelAttribute("userSearchVO") XitUserRegMngSearchVO searchVO
, @ModelAttribute("userManageVO") XitUserRegMngVO vo
, ModelMap model
, @RequestParam(value="selectedId", required=false, defaultValue="") String uniqId
, @RequestParam(value="userTyForPassword", required=false, defaultValue="") String userTyForPassword
) {
switch (cmd) {
case "editPwd": //수정(비밀번호) 페이지
vo.setUserTy(userTyForPassword);
model.addAttribute("userManageVO", vo);
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitUserRegMng_"+cmd+"_popup";
}
/**
* <pre> : CUD </pre>
* @return String
* @author:
* @throws IOException
* @throws ServletException
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "modifyUserPwd", method=RequestMethod.POST)
public void modifyUserPwd(@ModelAttribute("userManageVO") XitUserRegMngVO vo
,@RequestParam(value="checkedIdForDel", required=false, defaultValue="") String checkedIdForDel
,@RequestParam(value="isViewPage", required=false, defaultValue="N") String isViewPage
,@RequestParam Map<String, Object> commandMap
, BindingResult bindingResult
, Model model
,HttpServletRequest request
, HttpServletResponse response
) throws ServletException, IOException {
/**
*
*/
String sLocationUrl = "forward:/framework/biz/mng/usr/userRegMng_list";
String message = null;
String oldPassword = (String) commandMap.get("oldPassword");
String newPassword = (String) commandMap.get("newPassword");
String newPassword2 = (String) commandMap.get("newPassword2");
String uniqId = (String) commandMap.get("uniqId");
try {
service.modifyPwdProc(uniqId, vo.getEmplyrId(), oldPassword, newPassword, newPassword2);
//message = "정상적으로 변경 되었습니다.";
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/userRegMng_view":"forward:/framework/biz/mng/usr/userRegMng_edit";
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/userRegMng_view":"forward:/framework/biz/mng/usr/userRegMng_edit";
} catch (Exception e) {
//message = "변경에 실패하였습니다.";
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/userRegMng_view":"forward:/framework/biz/mng/usr/userRegMng_edit";
}
/**
*
*/
/* ============================
* 2020.09.10
*
* - ajax json
* [AS-IS] String, return url "forward"
* [TO-BE] void, DispatchServlet forward , ajax json forward
============================ */
//2020.09.10 주석처리
// model.addAttribute("message", message);
// return sLocationUrl;
model.addAttribute("message", message);
if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시
//반환 데이터 설정
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", message);
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
}else { //submit 요청 시
XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
}
}
}

@ -1,327 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user.web;
import cokr.xit.foundation.web.AbstractController;
import cokr.xit.fims.framework.biz.cmm.XitLoginVO;
import cokr.xit.fims.framework.biz.cmm.service.XitFrameCodeService;
import cokr.xit.fims.framework.biz.mng.user.XitUserAbsntMngSearchVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserAbsntMngVO;
import cokr.xit.fims.framework.biz.mng.user.service.XitUserAbsntMngService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
import cokr.xit.fims.framework.support.util.AjaxUtils;
import org.egovframe.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
*
* @: Controller
* @:
* @: 2020. 4. 10. 4:40:36
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Controller
@RequestMapping(name = "", value = "/framework/biz/mng/usr/")
public class XitUserAbsntMngController extends AbstractController {
private static final Logger logger = LoggerFactory.getLogger(XitUserAbsntMngController.class);
@Resource
private XitUserAbsntMngService xitUserAbsntMngService;
@Resource
private XitFrameCodeService xitFrameCodeService;
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "userAbsntMng_list", method={RequestMethod.GET, RequestMethod.POST})
public String userAbsntMng_list(@RequestParam(value="selAbsnceAt", required=false, defaultValue="") String selAbsnceAt, @ModelAttribute("userAbsnceVO") XitUserAbsntMngSearchVO searchVO, ModelMap model) {
model.addAttribute("message", "정상적으로 조회 되었습니다.");
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitUserAbsntMng_list";
}
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 7. 30.
*/
@RequestMapping(name = "", value = "userAbsntMng_list.do", method={RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public Map<String, Object> userAbsntMng_listAjax(@RequestParam(value="selAbsnceAt", required=false, defaultValue="") String selAbsnceAt, @ModelAttribute("userAbsnceVO") XitUserAbsntMngSearchVO searchVO, ModelMap model) {
/** paging */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageNum()>-1?searchVO.getPageNum():searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getFetchSize()>-1?searchVO.getFetchSize():searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
/**
*
*/
int totCnt = xitUserAbsntMngService.findListTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
/**
*
*/
/* ***************************
* tui Grid Response Set
*************************** */
resultMap.put("result", true); //[tui Grid] result
resultMap.put("message", "정상적으로 조회 되었습니다."); //[tui Grid] result message
Map<String, Object> data = new HashMap<String, Object>();
data.put("contents", xitUserAbsntMngService.findList(searchVO)); //[tui Grid] data-contents
Map<String, Integer> pagination = new HashMap<String, Integer>();
pagination.put("pageNum", searchVO.getPageNum());
pagination.put("totalSize", totCnt);
data.put("pagination", pagination); //[tui Grid] data-paging
resultMap.put("data", data); //[tui Grid] data
/* ***************************
* //tui Grid Response Set
*************************** */
} catch (Exception e) {
/**
*
*/
//tui Grid Response Set
resultMap.put("result", false); //[tui Grid] result
resultMap.put("message", "조회에 실패하였습니다."); //[tui Grid] result message
}
return resultMap;
}
/**
* <pre> : .</pre>
* @param cmd
* @param model
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "userAbsntMng_{cmd}", method={RequestMethod.GET, RequestMethod.POST})
public String userAbsntMng_page(@PathVariable String cmd
, @ModelAttribute("userAbsnceSearchVO") XitUserAbsntMngSearchVO searchVO
, @ModelAttribute("userAbsnceVO") XitUserAbsntMngVO vo
, @RequestParam("userId") String userId
, ModelMap model) {
switch (cmd) {
case "input": //등록 페이지
case "edit": //수정 페이지
case "view": //상세 페이지
vo.setUserId(userId);
model.addAttribute("userAbsnce", xitUserAbsntMngService.findView(vo));
model.addAttribute("message", "정상적으로 조회 되었습니다.");
vo = (XitUserAbsntMngVO) model.get("userAbsnce");
if ("N".equals(vo.getRegYn()))
cmd = "input";
else
cmd = "edit";
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitUserAbsntMng_"+cmd;
}
/**
* <pre> : .</pre>
* @param cmd
* @param model
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "userAbsntMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST})
public String userAbsntMng_page_popup(@PathVariable String cmd
, @ModelAttribute("userAbsnceSearchVO") XitUserAbsntMngSearchVO searchVO
, @ModelAttribute("userAbsnceVO") XitUserAbsntMngVO vo
, @RequestParam("userId") String userId
, ModelMap model
) {
switch (cmd) {
case "": //
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitUserAbsntMng_"+cmd+"_popup";
}
/**
* <pre> : CUD </pre>
* @return String
* @author:
* @throws IOException
* @throws ServletException
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "userAbsntMng_{cmd}_proc", method=RequestMethod.POST)
public void userAbsntMng_cmd_proc(@PathVariable String cmd
,@ModelAttribute("userManageVO") XitUserAbsntMngVO vo
,@RequestParam(value="userIds", required=false, defaultValue="") String userIds
,@RequestParam Map<String, Object> commandMap
,BindingResult bindingResult
,Model model
,HttpServletRequest request
,HttpServletResponse response
) throws ServletException, IOException {
/**
*
*/
String sLocationUrl = "forward:/framework/biz/mng/usr/userAbsntMng_list";
String message = null;
XitLoginVO loginVO = (XitLoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
switch (cmd) {
case "insert": //등록
if (bindingResult.hasErrors()) {
message = "생성에 실패하였습니다.";
sLocationUrl = "forward:/framework/biz/mng/usr/userAbsntMng_input";
break;
}
//처리
try {
vo.setMdfr(loginVO.getUniqId());
xitUserAbsntMngService.addProc(vo);
message = "정상적으로 등록 되었습니다.";
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "forward:/framework/biz/mng/usr/userAbsntMng_input";
} catch (Exception e) {
message = "생성에 실패하였습니다.";
sLocationUrl = "forward:/framework/biz/mng/usr/userAbsntMng_input";
}
break;
// case "inserts": //다건 등록
// break;
case "update": //수정
if (bindingResult.hasErrors()) {
message = "변경에 실패하였습니다.";
sLocationUrl = "forward:/framework/biz/mng/usr/userAbsntMng_edit";
break;
}
//처리
try {
vo.setMdfr(loginVO.getUniqId());
xitUserAbsntMngService.modifyProc(vo);
message = "정상적으로 변경 되었습니다.";
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "forward:/framework/biz/mng/usr/userAbsntMng_edit";
} catch (Exception e) {
message = "변경에 실패하였습니다.";
sLocationUrl = "forward:/framework/biz/mng/usr/userAbsntMng_edit";
}
break;
case "delete": //삭제
//처리
try {
xitUserAbsntMngService.removeProc(vo.getUserId());
message = "정상적으로 삭제 되었습니다.";
break;
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "forward:/framework/biz/mng/usr/userAbsntMng_edit";
} catch (Exception e) {
message = "삭제에 실패하였습니다.";
sLocationUrl = "forward:/framework/biz/mng/usr/userAbsntMng_edit";
}
break;
case "deletes": //다건 삭제
//처리
try {
xitUserAbsntMngService.removesProc(userIds);
message = "정상적으로 삭제 되었습니다.";
} catch (RuntimeException e) {
message = e.getMessage();
} catch (Exception e) {
message = "삭제에 실패하였습니다.";
}
break;
default:
new RuntimeException("유효하지 않은 요청 입니다.");
}
/**
*
*/
/* ============================
* 2020.09.10
*
* - ajax json
* [AS-IS] String, return url "forward"
* [TO-BE] void, DispatchServlet forward , ajax json forward
============================ */
//2020.09.10 주석처리
// model.addAttribute("message", message);
// return sLocationUrl;
model.addAttribute("message", message);
if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시
//반환 데이터 설정
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", message);
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
}else { //submit 요청 시
XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
}
}
}

@ -1,259 +0,0 @@
package cokr.xit.fims.framework.biz.mng.user.web;
import cokr.xit.foundation.web.AbstractController;
import cokr.xit.fims.framework.biz.cmm.service.XitFrameCodeService;
import cokr.xit.fims.framework.biz.mng.user.XitUserEtcOptMngSearchVO;
import cokr.xit.fims.framework.biz.mng.user.XitUserEtcOptMngVO;
import cokr.xit.fims.framework.biz.mng.user.service.XitUserEtcOptMngService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
import cokr.xit.fims.framework.support.util.AjaxUtils;
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
/**
*
* @: Controller
* @:
* @: 2020. 11. 5. 3:32:51
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Controller
@RequestMapping(name = "", value = "/framework/biz/mng/usr/")
public class XitUserEtcOptMngController extends AbstractController {
@Resource
private XitUserEtcOptMngService xitUserEtcOptMngService;
@Resource
private XitFrameCodeService xitFrameCodeService;
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "userEtcOptMng_list", method={RequestMethod.GET, RequestMethod.POST})
public String userEtcOptMng_list(@ModelAttribute("userSearchVO") XitUserEtcOptMngSearchVO searchVO, ModelMap model) {
/*================
*
================*/
model.addAttribute("dataAuthId_result" , xitFrameCodeService.findCmmnDetailCodes("XIT401")); //자료조회및관리범위코드 목록
model.addAttribute("elctrnsanctnUseYnCode_result" , xitFrameCodeService.findCmmnDetailCodes("XIT402")); //전자결재사용여부코드 목록
model.addAttribute("jobConfmAuthorYnCode_result" , xitFrameCodeService.findCmmnDetailCodes("XIT403")); //업무승인권한코드 목록
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitUserEtcOptMng_list";
}
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 7. 29.
*/
@RequestMapping(name = "", value = "userEtcOptMng_list.do", method={RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public Map<String, Object> userEtcOptMng_listAjax(HttpServletRequest req, @ModelAttribute("searchVO") XitUserEtcOptMngSearchVO searchVO, ModelMap model) throws IOException, SQLException, RuntimeException {
/** paging */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageNum()>-1?searchVO.getPageNum():searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getFetchSize()>-1?searchVO.getFetchSize():searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
/**
*
*/
int totCnt = xitUserEtcOptMngService.findListTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
/**
*
*/
/* ***************************
* tui Grid Response Set
*************************** */
resultMap.put("result", true); //[tui Grid] result
resultMap.put("message", "정상적으로 조회 되었습니다."); //[tui Grid] result message
Map<String, Object> data = new HashMap<String, Object>();
data.put("contents", xitUserEtcOptMngService.findList(searchVO)); //[tui Grid] data-contents
Map<String, Integer> pagination = new HashMap<String, Integer>();
pagination.put("pageNum", searchVO.getPageNum());
pagination.put("totalSize", totCnt);
data.put("pagination", pagination); //[tui Grid] data-paging
resultMap.put("data", data); //[tui Grid] data
/* ***************************
* //tui Grid Response Set
*************************** */
} catch (Exception e) {
/**
*
*/
//tui Grid Response Set
resultMap.put("result", false); //[tui Grid] result
resultMap.put("message", "조회에 실패하였습니다."); //[tui Grid] result message
}
return resultMap;
}
/**
* <pre> : .</pre>
* @param page
* @param model
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "userEtcOptMng_{cmd}", method={RequestMethod.GET, RequestMethod.POST})
public String userEtcOptMng_page(@PathVariable String cmd
, @ModelAttribute("userSearchVO") XitUserEtcOptMngSearchVO searchVO
, @ModelAttribute("userEtcOptionManageVO") XitUserEtcOptMngVO vo
, ModelMap model
, HttpServletRequest request) {
switch (cmd) {
case "": //
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitUserEtcOptMng_"+cmd;
}
/**
* <pre> : .</pre>
* @param page
* @param model
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "userEtcOptMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST})
public String userEtcOptMng_page_popup(
@PathVariable String cmd
, @ModelAttribute("userSearchVO") XitUserEtcOptMngSearchVO searchVO
, @ModelAttribute("userEtcOptionManageVO") XitUserEtcOptMngVO vo
, ModelMap model
) {
switch (cmd) {
case "": //
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitUserEtcOptMng_"+cmd+"_popup";
}
/**
* <pre> : CUD </pre>
* @return String
* @author:
* @throws IOException
* @throws ServletException
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "userEtcOptMng_{cmd}_proc", method=RequestMethod.POST)
public void userEtcOptMng_cmd_proc(@PathVariable String cmd
,@ModelAttribute("userEtcOptionManageVO") XitUserEtcOptMngVO vo
,BindingResult bindingResult
,Model model
,HttpServletRequest request
,HttpServletResponse response
) throws ServletException, IOException {
/**
*
*/
String sLocationUrl = "forward:/framework/biz/mng/usr/userEtcOptMng_list";
String message = null;
switch (cmd) {
// case "insert": //등록
// break;
// case "inserts": //다건 등록
// break;
case "update": //수정
//처리
try {
xitUserEtcOptMngService.modifyProc(vo);
message = "정상적으로 변경 되었습니다.";
// sLocationUrl = "forward:/framework/biz/mng/usr/userEtcOptMng_edit";
} catch (RuntimeException e) {
message = e.getMessage();
// sLocationUrl = "forward:/framework/biz/mng/usr/userEtcOptMng_edit";
} catch (Exception e) {
message = "변경에 실패하였습니다.";
// sLocationUrl = "forward:/framework/biz/mng/usr/userEtcOptMng_edit";
}
break;
// case "delete": //삭제
// break;
// case "deletes": //다건 삭제
// break;
default:
new RuntimeException("유효하지 않은 요청 입니다.");
}
/**
*
*/
/* ============================
* 2020.09.10
*
* - ajax json
* [AS-IS] String, return url "forward"
* [TO-BE] void, DispatchServlet forward , ajax json forward
============================ */
//2020.09.10 주석처리
// model.addAttribute("message", message);
// return sLocationUrl;
model.addAttribute("message", message);
if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시
//반환 데이터 설정
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", message);
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
}else { //submit 요청 시
XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
}
}
}

@ -1,604 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!-- 안내문구 영역 -->
<div class="guide">
<ul>
<li style="color: red;">※ CLOB 컬럼 조회 시 오류 대응 방법</li>
<ul>
<li><strong>-.Oracle 인 경우 ex> SELECT DBMS_LOB.SUBSTR([컬럼], 2000, 1) AS "VALUE" FROM TEST</li>
</ul>
</ul>
</div>
<form:form id="listForm" name="listForm" action="<c:url value='/_mng_/admin/db/AdminDbMng_list.do'/>" method="post">
<input type="hidden" id="searchGubun" name="searchGubun" value="excel">
<input type="hidden" name="pageIndex" value="<c:out value='${searchVO.pageIndex}'/>"/>
<div class="container-search">
<table>
<caption>검색조건</caption>
<colgroup>
<col style="width: 8%;"/>
<col style="width: 20%;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col style="width: 7%;"/>
</colgroup>
<tbody>
<tr>
<th><label for="dynamicSql">질의문</label></th>
<td colspan="5">
<textarea id="dynamicSql"></textarea>
</td>
<td>
<button type="button" id="btnSearch" class="btn btn-search" title="실행">실행</button>
</td>
</tr>
<tr>
<th><label for="message">실행결과</label></th>
<td colspan="5">
<!-- 실행결과 출력 -->
<textarea id="message" readonly="readonly"></textarea>
</td>
<td>
<a href="#" id="excel_btn" class="btn btn-green" title="엑셀 저장" onclick="XitAdminDbMng_list.exportExcel(); return false;">export Excel</a>
</td>
</tr>
</tbody>
</table>
</div>
<!-- //검색 -->
<div id="tabs">
<ul>
<li><a href="#tabs-0">Grid 0</a></li>
</ul>
<div id="tabs-0">
</div>
</div>
<!-- //tabs -->
<!-- 실행결과 출력 -->
<div id="message" style="display: none;"></div>
</form:form>
<style type="text/css">
#message {
height: 70px;
width: 90%;
/* overflow-y: scroll; */
/* padding: 10px; */
}
#message ul li {
margin-top: 10px;
}
textarea:not(#message) {
width: 90%;
min-height: 150px;
}
</style>
<script type="text/javascript" src="<c:url value="/3rd-party/cryptoJS/js/aes.js"/>" ></script>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitAdminDbMng_list.init();
});
/* *******************************
* 관리자DB관리 Functions
******************************* */
var XitAdminDbMng_list = {
init : function(){
/**
* Grid Config Settings
*/
//Grid Style Set
Grid.applyTheme('striped'); // Call API of static method
/**
* Elements EventListener Settings
*/
//검색 Event 설정
$('#btnSearch').on({
click: function(){
XitAdminDbMng_list.addData();
}
});
//질의문 Event 설정
$('#dynamicSql').on({
keydown: function(){
ShortCutKeyEvent.trigger('keydown');
},
keyup: function(){
ShortCutKeyEvent.trigger('keyup');
}
});
//Tab 초기화
$( "#tabs" ).tabs();
//Tab 활성화 시 Event 설정
$( "#tabs" ).tabs({ activate: function(event, ui){
var tabId = ui.newPanel[0].id;
if(tabId.indexOf('tabs-')==-1)
return false;
if(ArrInstance.length>0)
ArrInstance[tabId.split('-')[1]].instance.refreshLayout();
}
});
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
//파라미터 설정(이미 설정된 경우는 제외. ex> 단축키 사용. F5,F9,Ctrl+Enter 등.. )
if(document.getElementById('jsonArr')==null||document.getElementById('jsonArr').value=='')
ShortCutKeyEvent.paramSet();
var varFrom = document.getElementById("listForm");
var param = $(varFrom).serialize();
cmmAjax({
url : "/_mng_/admin/db/AdminDbMng_list.do",
data : param,
success : function(data) {
/* ==================
* validation check
================== */
//조회결과
if(!data.result){
return false;
}
//조회건수
const cnt = data.data.pagination.totalSize;
if(cnt==0)
return false;
/* ==================
* column header Get
================== */
const arrKey = [];
const arrOptColums = []
for(let key in data.data.contents[0]){
arrKey.push(key);
arrOptColums.push({header: key, name: key});
}
GridConfig.setOptColumns(arrOptColums);
/* ==================
* grid data Set
================== */
const arrColumn = [];
//column match Info
arrKey.forEach(function(key){
const column = {};
column['header'] = key;
column['name'] = key;
column['sortable'] = true;
column['align'] = 'center';
column['minWidth'] = 150;
column['filter'] = 'select'; //fiter 옵션(select/text/number/date/.. 등이 있으며 설정방법은 상이하므로 사이트 참조)
arrColumn.push(column);
});
//column Declare
instance.setColumns(arrColumn);
//data Declare
instance.resetData(data.data.contents);
},
error: function(){
}
});
//파라미터 제거
document.getElementById('jsonArr').value = '';
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
//파라미터 설정(이미 설정된 경우는 제외. ex> 단축키 사용. F5,F9,Ctrl+Enter 등.. )
if(document.getElementById('jsonArr')==null||document.getElementById('jsonArr').value=='')
ShortCutKeyEvent.paramSet();
const varFrom = document.getElementById("listForm");
cmmAjax({
url : "/_mng_/admin/db/AdminDbMng_proc.do",
data : $(varFrom).serialize(),
success : function(data) {
//처리결과 메시지 출력
const arrMsg = data.arrmessage.split('\\n');
const sb = [];
for(let i=0; i<arrMsg.length; i++){
sb.push('Command-'+(i+1)+':: '+ arrMsg[i]);
}
$('#message').val(sb.join('\n\n'));
//scroll-y 맨밑으로 이동
// document.getElementById('message').scrollTop = document.getElementById('message').scrollHeight;
//Grid 출력
Tabs.drawGrid(data.arrDataset);
},
error: function(){
}
});
//파라미터 제거
document.getElementById('jsonArr').value = '';
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
},
/* ========================
* 엑셀 저장
======================== */
exportExcel : function(){
var tabIdx = $('#tabs').tabs('option', 'active');
var dsIdx = $('#tabs ul > li:eq('+tabIdx+') > a').attr('href').split('-')[1];
ArrInstance[dsIdx].GridConfig.exportExcel();
}
}
/*
* Tabs Event
*/
var ArrInstance = [];
var Tabs = {
tabIndex : 0,
/* ======================
Grid 출력 함수
====================== */
drawGrid : function(arrDataset){
if(arrDataset.length<1)
return false;
/* ==================
* 초기화
================== */
Tabs.tabIndex = 0;
//instance 배열 삭제
ArrInstance = []; //초기화
//tab 삭제
$('li[aria-controls*="tabs-"]').remove();
$('#tabs').children('div[id*="tabs-"]').remove();
arrDataset.forEach(function(ds, idx){
/* ==================
* Create
================== */
//Tab 생성
Tabs.addTab(idx);
//instance 생성
Tabs.tabIndex += 1;
var newInstance = Tabs.newInstance(idx);
/* ==================
* validation check
================== */
//조회건수
var cnt = ds.length;
if(cnt==0){
//Remove all columns
newInstance.setColumns([]);
//Remove all rows
newInstance.clear();
return false;
}
/* ==================
* column header Get
================== */
var arrKey = [];
var arrOptColums = []
for(var key in ds[0]){
arrKey.push(key);
var column = {header: key, name: key};
arrOptColums.push(column);
}
GridConfig.setOptColumns(arrOptColums);
/* ==================
* grid data Set
================== */
var arrColumn = [];
//column match Info
arrKey.forEach(function(key){
var column = {};
column['header'] = key;
column['name'] = key;
column['sortable'] = true;
column['align'] = 'left';
column['minWidth'] = 150;
column['filter'] = 'select'; //fiter 옵션(select/text/number/date/.. 등이 있으며 설정방법은 상이하므로 사이트 참조)
arrColumn.push(column);
});
//column Declare
newInstance.setColumns(arrColumn);
//data Declare
newInstance.resetData(ds);
});
},
/* ======================
Grid instance 생성 & add List
====================== */
newInstance : function(idx){
var GridConfig = new XitTuiGridConfig();
GridConfig.setOptGridId('grid'+idx); //Grid를 출력할 Element ID(해당 Element에 Grid가 출력 됨)
GridConfig.setOptGridHeight(400); //Grid 높이(단위: px)
// GridConfig.setOptRowHeight(40); //Grid row 높이(단위: px)
GridConfig.setOptRowHeaderType('rowNum'); //Row 첫번째 Cell 타입(rowNum: 순번, checkbox: 체크박스, '': 아무것도 출력 안함)
GridConfig.setOptPageOptions({ //페이징(Pagination) 옵션
useClient: true //Client Paging 여부(true 설정 시 클라이언트 자체 페이징 처리. 서버호출 X)
,perPage: 15 //페이지당 표시 건수
});
GridConfig.setOptColumnOptions({ //컬럼고정 옵션
});
GridConfig.setOptDataSource({ //DataSource
/* -----------------------
* DataSource Config Setting
* -설정항목은 Global 적용 되며
* -API별 적용을 원할 경우 각 API 안에 작성 가능(우선순위: 개별->글로벌)
----------------------- */
//contentType: 'application/json',
//headers: { 'x-custom-header': 'custom-header' },
initialRequest: false, //디폴트 값은 true(false: 인스턴스 생성 시 요청은 보내지 않음. 이런 경우 "instance.reloadData()"를 사용하여 요청 가능)
//serializer: function(params) {
//return $(document.listForm).serialize();
// },
/* -----------------------
* DataSource API Setting
----------------------- */
api: {
readData : {}
,createData: { url: '', method: 'POST'}
,updateData: { url: '', method: 'PUT'}
,modifyData: { url: '', method: 'PUT'}
,deleteData: { url: '', method: 'DELETE'}
}
});
GridConfig.setOptHeader({
}); //Grid 헤더 정보(헤더 셀 병합 필요 시 설정)
GridConfig.setOptColumns([ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{
}
]);
var Grid = tui.Grid;
var instance = GridConfig.instance(Grid); //Grid 인스턴스
//배열에 instance객체 담기
var map = {};
map['GridConfig'] = GridConfig;
map['instance'] = instance;
ArrInstance.push(map);
return instance;
},
/* ======================
Grid 탭 생성
====================== */
addTab : function(idx){
var $tabs = $( "#tabs" ).tabs();
var id = "tabs-" + idx;
var li = "<li><a href=\"#tabs-"+idx+"\" >Grid "+idx+"</a></li>";
$tabs.find( ".ui-tabs-nav" ).append( li );
$tabs.append( "<div id=\"" + id + "\"><div id=\"grid"+idx+"\"></div></div>" );
$tabs.tabs( "refresh" );
}
}
/*
* 단축키 Event
*/
var isCtrl = false;
var ShortCutKeyEvent = {
/* ======================
이벤트 실행
====================== */
trigger : function(keyEvent){
if(keyEvent=='keydown'){ //keydown
if(event.keyCode=='17'){ //Ctrl
isCtrl = true;
}else if(event.keyCode=='116'){ //F5
ShortCutKeyEvent.paramSet(ShortCutKeyEvent.F5());
$('#btnSearch').click();
}else if(event.keyCode=='120'){ //F9
ShortCutKeyEvent.paramSet(ShortCutKeyEvent.F9());
$('#btnSearch').click();
}else if(isCtrl&&event.keyCode=='13'){ //Ctrl+Enter
ShortCutKeyEvent.paramSet(ShortCutKeyEvent.CtrlEnter());
$('#btnSearch').click();
}
}else{ //keyup
isCtrl = false;
}
},
/* ======================
파라미터 생성
====================== */
paramSet : function(arrSql){
if(isEmpty(arrSql)){
var arr = []
arr.push(document.getElementById('dynamicSql').value);
arrSql = arr;
}
for(var i=0; i<arrSql.length; i++){
enc = CryptoJS.AES.encrypt(arrSql[i], "U2FsdGVkX19FBBXlVS6d0Ga56ELuRsy");
arrSql[i] = enc.toString();
}
ShortCutKeyEvent.createElement(arrSql);
function isEmpty(val){
if(val==null||val==undefined||val==''||val==[]||val=={})
return true;
return false;
}
},
/* ======================
Element 생성
====================== */
createElement : function(arrSql){
if(arrSql.length==0) //값이 없으면 stop
return false;
if(document.getElementById('jsonArr')==null){
var form = document.listForm;
var input = document.createElement('input');
input.setAttribute('type', 'hidden');
input.setAttribute('id' , 'jsonArr');
input.setAttribute('name', 'jsonArr');
input.setAttribute('value', JSON.stringify(arrSql));
form.appendChild(input);
}else{
document.getElementById('jsonArr').value = JSON.stringify(arrSql);
}
},
/* ======================
F5 단축키 이벤트
====================== */
F5 : function(){
fnRefreshStop();
return fnSqlToArray();
//새로고침(F5) 중지
function fnRefreshStop(){
event.keyCode='0';
event.cancelBubble = true;
event.returnValue = false;
}
//질의문 배열로 생성
function fnSqlToArray(){
//세미콜론(;)을 기준으로 질의문을 분리 한다.
var arrStr = document.getElementById('dynamicSql').value.split(';');
var arrSQL = [];
for(var i=0; i<arrStr.length; i++){
var isEmpty = arrStr[i].replace(/(\s*)/g, '')=='';
if(!isEmpty) //빈(empty) 값이 아닌 경우만
arrSQL.push(arrStr[i].trim()); //앞뒤 공백 제거
}
return arrSQL;
}
},
/* ======================
F9 단축키 이벤트
====================== */
F9 : function(){
return fnSqlToArray();
//질의문 배열로 생성
function fnSqlToArray(){
//커서위치를 기준으로 세미콜론(;)이 나오기 이전까지 질의문을 분리 한다.
var strSQL = document.getElementById('dynamicSql');
var endPos = strSQL.selectionEnd;
var str = strSQL.value;
var beginIdx = str.substring(0, endPos).lastIndexOf(';');
var beginStr = str.substring(beginIdx+1, endPos);
var endStr = str.substring(endPos, str.length);
var sb = [];
for(var i=0; i<endStr.length; i++){
if(endStr.substring(i, i+1)==';')
break;
sb.push(endStr.substring(i, i+1));
}
endStr = sb.join('');
str = beginStr+endStr;
var isEmpty = str.replace(/(\s*)/g, '')=='';
var arrSQL = [];
if(!isEmpty) //빈(empty) 값이 아닌 경우만
arrSQL.push(str.trim())
return arrSQL;
}
},
/* ======================
Ctrl+Enter 단축키 이벤트
====================== */
CtrlEnter : function(){
return fnSqlToArray();
//질의문 배열로 생성
function fnSqlToArray(){
var strSQL = document.getElementById('dynamicSql');
var startPos = strSQL.selectionStart;
var endPos = strSQL.selectionEnd;
if(startPos!=endPos){ //select된 문자열만 분리 한다.
var str = strSQL.value.substring(startPos, endPos);
var isEmpty = str.replace(/(\s*)/g, '')=='';
var arrSQL = [];
if(!isEmpty) //빈(empty) 값이 아닌 경우만
arrSQL.push(str.trim())
return arrSQL;
}else{ //커서위치를 기준으로 세미콜론(;)이 나오기 이전까지 질의문을 분리 한다.
var str = strSQL.value;
var beginIdx = str.substring(0, endPos).lastIndexOf(';');
var beginStr = str.substring(beginIdx+1, endPos);
var endStr = str.substring(endPos, str.length);
var sb = [];
for(var i=0; i<endStr.length; i++){
if(endStr.substring(i, i+1)==';')
break;
sb.push(endStr.substring(i, i+1));
}
endStr = sb.join('');
str = beginStr+endStr;
var isEmpty = str.replace(/(\s*)/g, '')=='';
var arrSQL = [];
if(!isEmpty) //빈(empty) 값이 아닌 경우만
arrSQL.push(str.trim())
return arrSQL;
}
}
}
}
/* ******************************
* Grid 환경 설정
****************************** */
var GridConfig = new XitTuiGridConfig();
var Grid = tui.Grid;
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>

@ -1,35 +0,0 @@
/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
var CryptoJS=CryptoJS||function(u,p){var d={},l=d.lib={},s=function(){},t=l.Base={extend:function(a){s.prototype=this;var c=new s;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},
r=l.WordArray=t.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=p?c:4*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,e=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var k=0;k<a;k++)c[j+k>>>2]|=(e[k>>>2]>>>24-8*(k%4)&255)<<24-8*((j+k)%4);else if(65535<e.length)for(k=0;k<a;k+=4)c[j+k>>>2]=e[k>>>2];else c.push.apply(c,e);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<
32-8*(c%4);a.length=u.ceil(c/4)},clone:function(){var a=t.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],e=0;e<a;e+=4)c.push(4294967296*u.random()|0);return new r.init(c,a)}}),w=d.enc={},v=w.Hex={stringify:function(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j<a;j++){var k=c[j>>>2]>>>24-8*(j%4)&255;e.push((k>>>4).toString(16));e.push((k&15).toString(16))}return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j<c;j+=2)e[j>>>3]|=parseInt(a.substr(j,
2),16)<<24-4*(j%8);return new r.init(e,c/2)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j<a;j++)e.push(String.fromCharCode(c[j>>>2]>>>24-8*(j%4)&255));return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j<c;j++)e[j>>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new r.init(e,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}},
q=l.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,e=c.words,j=c.sigBytes,k=this.blockSize,b=j/(4*k),b=a?u.ceil(b):u.max((b|0)-this._minBufferSize,0);a=b*k;j=u.min(4*a,j);if(a){for(var q=0;q<a;q+=k)this._doProcessBlock(e,q);q=e.splice(0,a);c.sigBytes-=j}return new r.init(q,j)},clone:function(){var a=t.clone.call(this);
a._data=this._data.clone();return a},_minBufferSize:0});l.Hasher=q.extend({cfg:t.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){q.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,e){return(new a.init(e)).finalize(b)}},_createHmacHelper:function(a){return function(b,e){return(new n.HMAC.init(a,
e)).finalize(b)}}});var n=d.algo={};return d}(Math);
(function(){var u=CryptoJS,p=u.lib.WordArray;u.enc.Base64={stringify:function(d){var l=d.words,p=d.sigBytes,t=this._map;d.clamp();d=[];for(var r=0;r<p;r+=3)for(var w=(l[r>>>2]>>>24-8*(r%4)&255)<<16|(l[r+1>>>2]>>>24-8*((r+1)%4)&255)<<8|l[r+2>>>2]>>>24-8*((r+2)%4)&255,v=0;4>v&&r+0.75*v<p;v++)d.push(t.charAt(w>>>6*(3-v)&63));if(l=t.charAt(64))for(;d.length%4;)d.push(l);return d.join("")},parse:function(d){var l=d.length,s=this._map,t=s.charAt(64);t&&(t=d.indexOf(t),-1!=t&&(l=t));for(var t=[],r=0,w=0;w<
l;w++)if(w%4){var v=s.indexOf(d.charAt(w-1))<<2*(w%4),b=s.indexOf(d.charAt(w))>>>6-2*(w%4);t[r>>>2]|=(v|b)<<24-8*(r%4);r++}return p.create(t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
(function(u){function p(b,n,a,c,e,j,k){b=b+(n&a|~n&c)+e+k;return(b<<j|b>>>32-j)+n}function d(b,n,a,c,e,j,k){b=b+(n&c|a&~c)+e+k;return(b<<j|b>>>32-j)+n}function l(b,n,a,c,e,j,k){b=b+(n^a^c)+e+k;return(b<<j|b>>>32-j)+n}function s(b,n,a,c,e,j,k){b=b+(a^(n|~c))+e+k;return(b<<j|b>>>32-j)+n}for(var t=CryptoJS,r=t.lib,w=r.WordArray,v=r.Hasher,r=t.algo,b=[],x=0;64>x;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;r=r.MD5=v.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])},
_doProcessBlock:function(q,n){for(var a=0;16>a;a++){var c=n+a,e=q[c];q[c]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360}var a=this._hash.words,c=q[n+0],e=q[n+1],j=q[n+2],k=q[n+3],z=q[n+4],r=q[n+5],t=q[n+6],w=q[n+7],v=q[n+8],A=q[n+9],B=q[n+10],C=q[n+11],u=q[n+12],D=q[n+13],E=q[n+14],x=q[n+15],f=a[0],m=a[1],g=a[2],h=a[3],f=p(f,m,g,h,c,7,b[0]),h=p(h,f,m,g,e,12,b[1]),g=p(g,h,f,m,j,17,b[2]),m=p(m,g,h,f,k,22,b[3]),f=p(f,m,g,h,z,7,b[4]),h=p(h,f,m,g,r,12,b[5]),g=p(g,h,f,m,t,17,b[6]),m=p(m,g,h,f,w,22,b[7]),
f=p(f,m,g,h,v,7,b[8]),h=p(h,f,m,g,A,12,b[9]),g=p(g,h,f,m,B,17,b[10]),m=p(m,g,h,f,C,22,b[11]),f=p(f,m,g,h,u,7,b[12]),h=p(h,f,m,g,D,12,b[13]),g=p(g,h,f,m,E,17,b[14]),m=p(m,g,h,f,x,22,b[15]),f=d(f,m,g,h,e,5,b[16]),h=d(h,f,m,g,t,9,b[17]),g=d(g,h,f,m,C,14,b[18]),m=d(m,g,h,f,c,20,b[19]),f=d(f,m,g,h,r,5,b[20]),h=d(h,f,m,g,B,9,b[21]),g=d(g,h,f,m,x,14,b[22]),m=d(m,g,h,f,z,20,b[23]),f=d(f,m,g,h,A,5,b[24]),h=d(h,f,m,g,E,9,b[25]),g=d(g,h,f,m,k,14,b[26]),m=d(m,g,h,f,v,20,b[27]),f=d(f,m,g,h,D,5,b[28]),h=d(h,f,
m,g,j,9,b[29]),g=d(g,h,f,m,w,14,b[30]),m=d(m,g,h,f,u,20,b[31]),f=l(f,m,g,h,r,4,b[32]),h=l(h,f,m,g,v,11,b[33]),g=l(g,h,f,m,C,16,b[34]),m=l(m,g,h,f,E,23,b[35]),f=l(f,m,g,h,e,4,b[36]),h=l(h,f,m,g,z,11,b[37]),g=l(g,h,f,m,w,16,b[38]),m=l(m,g,h,f,B,23,b[39]),f=l(f,m,g,h,D,4,b[40]),h=l(h,f,m,g,c,11,b[41]),g=l(g,h,f,m,k,16,b[42]),m=l(m,g,h,f,t,23,b[43]),f=l(f,m,g,h,A,4,b[44]),h=l(h,f,m,g,u,11,b[45]),g=l(g,h,f,m,x,16,b[46]),m=l(m,g,h,f,j,23,b[47]),f=s(f,m,g,h,c,6,b[48]),h=s(h,f,m,g,w,10,b[49]),g=s(g,h,f,m,
E,15,b[50]),m=s(m,g,h,f,r,21,b[51]),f=s(f,m,g,h,u,6,b[52]),h=s(h,f,m,g,k,10,b[53]),g=s(g,h,f,m,B,15,b[54]),m=s(m,g,h,f,e,21,b[55]),f=s(f,m,g,h,v,6,b[56]),h=s(h,f,m,g,x,10,b[57]),g=s(g,h,f,m,t,15,b[58]),m=s(m,g,h,f,D,21,b[59]),f=s(f,m,g,h,z,6,b[60]),h=s(h,f,m,g,C,10,b[61]),g=s(g,h,f,m,j,15,b[62]),m=s(m,g,h,f,A,21,b[63]);a[0]=a[0]+f|0;a[1]=a[1]+m|0;a[2]=a[2]+g|0;a[3]=a[3]+h|0},_doFinalize:function(){var b=this._data,n=b.words,a=8*this._nDataBytes,c=8*b.sigBytes;n[c>>>5]|=128<<24-c%32;var e=u.floor(a/
4294967296);n[(c+64>>>9<<4)+15]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;n[(c+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;b.sigBytes=4*(n.length+1);this._process();b=this._hash;n=b.words;for(a=0;4>a;a++)c=n[a],n[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return b},clone:function(){var b=v.clone.call(this);b._hash=this._hash.clone();return b}});t.MD5=v._createHelper(r);t.HmacMD5=v._createHmacHelper(r)})(Math);
(function(){var u=CryptoJS,p=u.lib,d=p.Base,l=p.WordArray,p=u.algo,s=p.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:p.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,r){for(var p=this.cfg,s=p.hasher.create(),b=l.create(),u=b.words,q=p.keySize,p=p.iterations;u.length<q;){n&&s.update(n);var n=s.update(d).finalize(r);s.reset();for(var a=1;a<p;a++)n=s.finalize(n),s.reset();b.concat(n)}b.sigBytes=4*q;return b}});u.EvpKDF=function(d,l,p){return s.create(p).compute(d,
l)}})();
CryptoJS.lib.Cipher||function(u){var p=CryptoJS,d=p.lib,l=d.Base,s=d.WordArray,t=d.BufferedBlockAlgorithm,r=p.enc.Base64,w=p.algo.EvpKDF,v=d.Cipher=t.extend({cfg:l.extend(),createEncryptor:function(e,a){return this.create(this._ENC_XFORM_MODE,e,a)},createDecryptor:function(e,a){return this.create(this._DEC_XFORM_MODE,e,a)},init:function(e,a,b){this.cfg=this.cfg.extend(b);this._xformMode=e;this._key=a;this.reset()},reset:function(){t.reset.call(this);this._doReset()},process:function(e){this._append(e);return this._process()},
finalize:function(e){e&&this._append(e);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(b,k,d){return("string"==typeof k?c:a).encrypt(e,b,k,d)},decrypt:function(b,k,d){return("string"==typeof k?c:a).decrypt(e,b,k,d)}}}});d.StreamCipher=v.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var b=p.mode={},x=function(e,a,b){var c=this._iv;c?this._iv=u:c=this._prevBlock;for(var d=0;d<b;d++)e[a+d]^=
c[d]},q=(d.BlockCipherMode=l.extend({createEncryptor:function(e,a){return this.Encryptor.create(e,a)},createDecryptor:function(e,a){return this.Decryptor.create(e,a)},init:function(e,a){this._cipher=e;this._iv=a}})).extend();q.Encryptor=q.extend({processBlock:function(e,a){var b=this._cipher,c=b.blockSize;x.call(this,e,a,c);b.encryptBlock(e,a);this._prevBlock=e.slice(a,a+c)}});q.Decryptor=q.extend({processBlock:function(e,a){var b=this._cipher,c=b.blockSize,d=e.slice(a,a+c);b.decryptBlock(e,a);x.call(this,
e,a,c);this._prevBlock=d}});b=b.CBC=q;q=(p.pad={}).Pkcs7={pad:function(a,b){for(var c=4*b,c=c-a.sigBytes%c,d=c<<24|c<<16|c<<8|c,l=[],n=0;n<c;n+=4)l.push(d);c=s.create(l,c);a.concat(c)},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:q}),reset:function(){v.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a,
this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var n=d.CipherParams=l.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),b=(p.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?s.create([1398893684,
1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=s.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return n.create({ciphertext:a,salt:c})}},a=d.SerializableCipher=l.extend({cfg:l.extend({format:b}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var l=a.createEncryptor(c,d);b=l.finalize(b);l=l.cfg;return n.create({ciphertext:b,key:c,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})},
decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),p=(p.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=s.random(8));a=w.create({keySize:b+c}).compute(a,d);c=s.create(a.words.slice(b),4*c);a.sigBytes=4*b;return n.create({key:a,iv:c,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:p}),encrypt:function(b,c,d,l){l=this.cfg.extend(l);d=l.kdf.execute(d,
b.keySize,b.ivSize);l.iv=d.iv;b=a.encrypt.call(this,b,c,d.key,l);b.mixIn(d);return b},decrypt:function(b,c,d,l){l=this.cfg.extend(l);c=this._parse(c,l.format);d=l.kdf.execute(d,b.keySize,b.ivSize,c.salt);l.iv=d.iv;return a.decrypt.call(this,b,c,d.key,l)}})}();
(function(){for(var u=CryptoJS,p=u.lib.BlockCipher,d=u.algo,l=[],s=[],t=[],r=[],w=[],v=[],b=[],x=[],q=[],n=[],a=[],c=0;256>c;c++)a[c]=128>c?c<<1:c<<1^283;for(var e=0,j=0,c=0;256>c;c++){var k=j^j<<1^j<<2^j<<3^j<<4,k=k>>>8^k&255^99;l[e]=k;s[k]=e;var z=a[e],F=a[z],G=a[F],y=257*a[k]^16843008*k;t[e]=y<<24|y>>>8;r[e]=y<<16|y>>>16;w[e]=y<<8|y>>>24;v[e]=y;y=16843009*G^65537*F^257*z^16843008*e;b[k]=y<<24|y>>>8;x[k]=y<<16|y>>>16;q[k]=y<<8|y>>>24;n[k]=y;e?(e=z^a[a[a[G^z]]],j^=a[a[j]]):e=j=1}var H=[0,1,2,4,8,
16,32,64,128,27,54],d=d.AES=p.extend({_doReset:function(){for(var a=this._key,c=a.words,d=a.sigBytes/4,a=4*((this._nRounds=d+6)+1),e=this._keySchedule=[],j=0;j<a;j++)if(j<d)e[j]=c[j];else{var k=e[j-1];j%d?6<d&&4==j%d&&(k=l[k>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255]):(k=k<<8|k>>>24,k=l[k>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255],k^=H[j/d|0]<<24);e[j]=e[j-d]^k}c=this._invKeySchedule=[];for(d=0;d<a;d++)j=a-d,k=d%4?e[j]:e[j-4],c[d]=4>d||4>=j?k:b[l[k>>>24]]^x[l[k>>>16&255]]^q[l[k>>>
8&255]]^n[l[k&255]]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,t,r,w,v,l)},decryptBlock:function(a,c){var d=a[c+1];a[c+1]=a[c+3];a[c+3]=d;this._doCryptBlock(a,c,this._invKeySchedule,b,x,q,n,s);d=a[c+1];a[c+1]=a[c+3];a[c+3]=d},_doCryptBlock:function(a,b,c,d,e,j,l,f){for(var m=this._nRounds,g=a[b]^c[0],h=a[b+1]^c[1],k=a[b+2]^c[2],n=a[b+3]^c[3],p=4,r=1;r<m;r++)var q=d[g>>>24]^e[h>>>16&255]^j[k>>>8&255]^l[n&255]^c[p++],s=d[h>>>24]^e[k>>>16&255]^j[n>>>8&255]^l[g&255]^c[p++],t=
d[k>>>24]^e[n>>>16&255]^j[g>>>8&255]^l[h&255]^c[p++],n=d[n>>>24]^e[g>>>16&255]^j[h>>>8&255]^l[k&255]^c[p++],g=q,h=s,k=t;q=(f[g>>>24]<<24|f[h>>>16&255]<<16|f[k>>>8&255]<<8|f[n&255])^c[p++];s=(f[h>>>24]<<24|f[k>>>16&255]<<16|f[n>>>8&255]<<8|f[g&255])^c[p++];t=(f[k>>>24]<<24|f[n>>>16&255]<<16|f[g>>>8&255]<<8|f[h&255])^c[p++];n=(f[n>>>24]<<24|f[g>>>16&255]<<16|f[h>>>8&255]<<8|f[k&255])^c[p++];a[b]=q;a[b+1]=s;a[b+2]=t;a[b+3]=n},keySize:8});u.AES=p._createHelper(d)})();

@ -1,16 +0,0 @@
/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
var CryptoJS=CryptoJS||function(h,s){var f={},t=f.lib={},g=function(){},j=t.Base={extend:function(a){g.prototype=this;var c=new g;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},
q=t.WordArray=j.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=s?c:4*a.length},toString:function(a){return(a||u).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e<a;e++)c[b+e>>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535<d.length)for(e=0;e<a;e+=4)c[b+e>>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<
32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=j.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d<a;d+=4)c.push(4294967296*h.random()|0);return new q.init(c,a)}}),v=f.enc={},u=v.Hex={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b<a;b++){var e=c[b>>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b<c;b+=2)d[b>>>3]|=parseInt(a.substr(b,
2),16)<<24-4*(b%8);return new q.init(d,c/2)}},k=v.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b<a;b++)d.push(String.fromCharCode(c[b>>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b<c;b++)d[b>>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},l=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}},
x=t.BufferedBlockAlgorithm=j.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=l.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var m=0;m<a;m+=e)this._doProcessBlock(d,m);m=d.splice(0,a);c.sigBytes-=b}return new q.init(m,b)},clone:function(){var a=j.clone.call(this);
a._data=this._data.clone();return a},_minBufferSize:0});t.Hasher=x.extend({cfg:j.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){x.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(c,d){return(new a.init(d)).finalize(c)}},_createHmacHelper:function(a){return function(c,d){return(new w.HMAC.init(a,
d)).finalize(c)}}});var w=f.algo={};return f}(Math);
(function(h){for(var s=CryptoJS,f=s.lib,t=f.WordArray,g=f.Hasher,f=s.algo,j=[],q=[],v=function(a){return 4294967296*(a-(a|0))|0},u=2,k=0;64>k;){var l;a:{l=u;for(var x=h.sqrt(l),w=2;w<=x;w++)if(!(l%w)){l=!1;break a}l=!0}l&&(8>k&&(j[k]=v(h.pow(u,0.5))),q[k]=v(h.pow(u,1/3)),k++);u++}var a=[],f=f.SHA256=g.extend({_doReset:function(){this._hash=new t.init(j.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],m=b[2],h=b[3],p=b[4],j=b[5],k=b[6],l=b[7],n=0;64>n;n++){if(16>n)a[n]=
c[d+n]|0;else{var r=a[n-15],g=a[n-2];a[n]=((r<<25|r>>>7)^(r<<14|r>>>18)^r>>>3)+a[n-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+a[n-16]}r=l+((p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25))+(p&j^~p&k)+q[n]+a[n];g=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&m^f&m);l=k;k=j;j=p;p=h+r|0;h=m;m=f;f=e;e=r+g|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+m|0;b[3]=b[3]+h|0;b[4]=b[4]+p|0;b[5]=b[5]+j|0;b[6]=b[6]+k|0;b[7]=b[7]+l|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes;
d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=g.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=g._createHelper(f);s.HmacSHA256=g._createHmacHelper(f)})(Math);
Loading…
Cancel
Save