result = xitRollingNotiVO.getList();
-
- if (isRequired) {
- // 무조건 조회
- result = xitFrameUnitMapper.findLatestBbsList(xitRollingNotiVO);
- } else {
- // 목록 데이터가 없을 경우만 조회
- if (XitCmmnUtil.isEmpty(result))
- result = xitFrameUnitMapper.findLatestBbsList(xitRollingNotiVO);
- }
- return result;
- }
/**
*
diff --git a/src/main/java/cokr/xit/fims/framework/biz/cmm/web/CmmAnsTmplController.java b/src/main/java/cokr/xit/fims/framework/biz/cmm/web/CmmAnsTmplController.java
index 1cda11ac..a0f58692 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/cmm/web/CmmAnsTmplController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/cmm/web/CmmAnsTmplController.java
@@ -5,7 +5,7 @@ import cokr.xit.fims.framework.biz.cache.util.CacheServiceUtils;
import cokr.xit.fims.framework.biz.cmm.CmmAnsTmplDTO;
import cokr.xit.fims.framework.biz.cmm.service.CmmAnsTmplService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
-import cokr.xit.fims.framework.core.ResultResponse;
+
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.Checks;
@@ -68,7 +68,7 @@ public class CmmAnsTmplController extends AbstractController {
@GetMapping(name = "", value = "/findCmmAnsTmpls")
public ModelAndView findCmmAnsTmpls(@RequestParam final Map paraMap){
- return ResultResponse.of(service.findCmmAnsTmplList(paraMap, MybatisUtils.getPagingInfo(paraMap)));
+ return new ModelAndView("jsonView").addObject("result",service.findCmmAnsTmplList(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@PostMapping(name = "", value = "/addCmmAnsTmpls")//, consumes = "multipart/form-data"
diff --git a/src/main/java/cokr/xit/fims/framework/biz/cmm/web/CmmFileMgtController.java b/src/main/java/cokr/xit/fims/framework/biz/cmm/web/CmmFileMgtController.java
index 44e9ee45..e766111d 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/cmm/web/CmmFileMgtController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/cmm/web/CmmFileMgtController.java
@@ -5,7 +5,7 @@ import cokr.xit.fims.framework.biz.cmm.CmmFileDTO;
import cokr.xit.fims.framework.biz.cmm.service.CmmFileService;
import cokr.xit.fims.framework.core.constants.ErrorCode;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
-import cokr.xit.fims.framework.core.ResultResponse;
+
import cokr.xit.fims.framework.support.exception.BizRuntimeException;
import cokr.xit.fims.framework.support.exception.CustomBaseException;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
@@ -39,8 +39,8 @@ import java.util.Arrays;
@RequiredArgsConstructor
@RequestMapping(name = "", value = "/framework/biz/cmm/file")
public class CmmFileMgtController extends AbstractController {
- @Value("#{prop['file.upload.root']}")
- private String uploadRoot;
+
+ private String uploadRoot = "/data/fims/upload";
private final CmmFileService cmmFileService;
@RequestMapping(name = "", value = "/cmmImageViewPopup")
@@ -164,7 +164,7 @@ public class CmmFileMgtController extends AbstractController {
@GetMapping(name = "", value = "/{fileMstId:[\\\\d]+}")
public ModelAndView findFiles(@PathVariable("fileMstId") final String fileMstId) {
if(Checks.isEmpty(fileMstId)) throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "대상 파일[fileMstId]을 선택해 주세요.");
- return ResultResponse.of(cmmFileService.findFiles(fileMstId));
+ return new ModelAndView("jsonView").addObject("result",cmmFileService.findFiles(fileMstId));
}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/cmm/web/FrameworkCmmController.java b/src/main/java/cokr/xit/fims/framework/biz/cmm/web/FrameworkCmmController.java
index 8f6b3c9d..1b156eb4 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/cmm/web/FrameworkCmmController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/cmm/web/FrameworkCmmController.java
@@ -36,10 +36,10 @@ public class FrameworkCmmController extends AbstractController {
@Resource(name = "xitMessageSource")
XitMessageSource xitMessageSource;
- @Value("#{prop['Globals.Xit.Pagination.PageUnit']}")
- private int PAGE_UNIT;
- @Value("#{prop['Globals.Xit.Pagination.PageSize']}")
- private int PAGE_SIZE;
+
+ private int PAGE_UNIT = 10;
+
+ private int PAGE_SIZE = 10;
/**
* 메소드 설명: 우편번호 검색 페이지
diff --git a/src/main/java/cokr/xit/fims/framework/biz/cmm/web/XitFrameAnonymousController.java b/src/main/java/cokr/xit/fims/framework/biz/cmm/web/XitFrameAnonymousController.java
index 994c4f02..ec2782ea 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/cmm/web/XitFrameAnonymousController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/cmm/web/XitFrameAnonymousController.java
@@ -55,14 +55,12 @@ public class XitFrameAnonymousController extends AbstractController {
@Resource(name = "xitMessageSource")
XitMessageSource xitMessageSource;
- @Value("#{prop['Globals.Xit.JoinMembership.Sttus']}")
- private String MEMBER_STATUS;
- @Value("#{prop['Globals.Xit.JoinMembership.Sttus.Gnr']}")
- private String MEMBER_STATUS_GNR;
- @Value("#{prop['Globals.Xit.JoinMembership.Sttus.Ent']}")
- private String MEMBER_STATUS_ENT;
- @Value("#{prop['Globals.Xit.JoinMembership.Sttus.Usr']}")
- private String MEMBER_STATUS_USR;
+
+ private String MEMBER_STATUS ="A";
+
+
+
+ private String MEMBER_STATUS_USR = "";
/**
@@ -299,11 +297,9 @@ public class XitFrameAnonymousController extends AbstractController {
/**
* 메소드 설명: (일반/기업/업무)사용자 유형별 회원가입 상태코드를 반환 한다.
- * -사용자 유형별 지정한 상태코드 설정값이 없을 경우 default값(Globals.Xit.JoinMembership.Sttus)를 반환 한다.
+
* [사용자 유형별 회원가입 상태코드 설정]
- * Globals.Xit.JoinMembership.Sttus.Gnr //일반회원
- * Globals.Xit.JoinMembership.Sttus.Ent //기업회원
- * Globals.Xit.JoinMembership.Sttus.Usr //업무사용자
+
*
* @param userSe 사용자 유형
* @return String 요청처리 후 응답객체
diff --git a/src/main/java/cokr/xit/fims/framework/biz/cmm/web/XitFramePopupController.java b/src/main/java/cokr/xit/fims/framework/biz/cmm/web/XitFramePopupController.java
index a681ca7d..32d5128b 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/cmm/web/XitFramePopupController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/cmm/web/XitFramePopupController.java
@@ -35,10 +35,10 @@ public class XitFramePopupController extends AbstractController {
@Resource(name = "xitMessageSource")
XitMessageSource xitMessageSource;
- @Value("#{prop['Globals.Xit.Pagination.PageUnit']}")
- private int PAGE_UNIT;
- @Value("#{prop['Globals.Xit.Pagination.PageSize']}")
- private int PAGE_SIZE;
+
+ private int PAGE_UNIT = 10;
+
+ private int PAGE_SIZE = 10;
/**
* 메소드 설명: 우편번호 검색 페이지
diff --git a/src/main/java/cokr/xit/fims/framework/biz/cmm/web/XitLoginController.java b/src/main/java/cokr/xit/fims/framework/biz/cmm/web/XitLoginController.java
index 20312eb0..3c8efce4 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/cmm/web/XitLoginController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/cmm/web/XitLoginController.java
@@ -51,18 +51,16 @@ public class XitLoginController extends AbstractController {
@Autowired
private XitMessageSource xitMessageSource;
- @Value("#{prop['Globals.Xit.LoginPage']}")
- private String LOGIN_PAGE;
- @Value("#{prop['Globals.Xit.AccessDeniedPage']}")
- private String ACCESS_DENIED_PAGE;
- @Value("#{prop['Globals.Xit.MainPage']}")
- private String MAIN_PAGE;
- @Value("#{prop['Globals.Xit.MainPage.Gnr']}")
- private String MAIN_PAGE_GNR;
- @Value("#{prop['Globals.Xit.MainPage.Ent']}")
- private String MAIN_PAGE_ENT;
- @Value("#{prop['Globals.Xit.MainPage.Usr']}")
- private String MAIN_PAGE_USR;
+
+ private String LOGIN_PAGE ="framework/biz/login/XitLoginUsr";
+
+ private String ACCESS_DENIED_PAGE = "login/XitAccessDenied";
+
+ private String MAIN_PAGE = "/framework/biz/cmm/mainPage.do";
+
+
+
+ private String MAIN_PAGE_USR ="";
/**
* 로그인 후 메인화면으로 들어간다
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/admin/web/XitAdminDbMngController.java b/src/main/java/cokr/xit/fims/framework/biz/mng/admin/web/XitAdminDbMngController.java
index 20dbe0e1..d07ea5be 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/admin/web/XitAdminDbMngController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/mng/admin/web/XitAdminDbMngController.java
@@ -7,7 +7,7 @@ import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import cokr.xit.fims.framework.core.message.XitMessageSource;
import cokr.xit.fims.framework.support.util.AjaxUtils;
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
-import org.json.simple.JSONArray;
+
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
@@ -50,246 +50,16 @@ public class XitAdminDbMngController extends AbstractController {
- /**
- * 메소드 설명: 관리자DB관리 목록 페이지 조회
- * @param searchVO
- * @param model
- * @return String 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 9. 28.
- */
- @RequestMapping(name = "", value = "AdminDbMng_list.ajax", method={RequestMethod.GET, RequestMethod.POST})
- @ResponseBody
- public Map AdminDbMng_listAjax(@ModelAttribute("searchVO") XitAdminDbMngSearchVO searchVO
- , ModelMap model
- , @RequestParam(value="jsonArr", required=false) JSONArray jsonArr
- ) {
-
-
-
-
- /** 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 resultMap = new HashMap();
- try {
- String dynamicSql = jsonArr.get(0).toString();
- dynamicSql = this.decrypt(dynamicSql, SALTKEY);
- String cmd = this.getCmd(dynamicSql);
- if(!cmd.equals("select"))
- throw new RuntimeException("유효하지 않은 요청 입니다.");
-
-
- /**
- * 조회
- */
- List> list = xitAdminDbMngService.findList(dynamicSql);
- int totCnt = list.size();
- paginationInfo.setTotalRecordCount(totCnt);
- /**
- * 반환값 설정
- */
- /* ***************************
- * tui Grid Response Set
- *************************** */
- resultMap.put("result", true); //[tui Grid] result
- resultMap.put("message", xitMessageSource.getMessage("success.common.select")); //[tui Grid] result message
- Map data = new HashMap();
- data.put("contents", list); //[tui Grid] data-contents
- Map pagination = new HashMap();
- 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", xitMessageSource.getMessage("fail.common.select")); //[tui Grid] result message
- }
-
- return resultMap;
- }
+
- /**
- * 메소드 설명: 사용자별권한관리 CUD 처리
- * @return String 요청처리 후 응답객체
- * @author: 박민규
- * @throws IOException
- * @throws ServletException
- * @date: 2020. 4. 16.
- */
- @RequestMapping(name = "", value = "AdminDbMng_proc", method=RequestMethod.POST)
- public String AdminDbMng_proc(
-// @ModelAttribute("vo") XitAdminDbMngVO vo
- @ModelAttribute("searchVO") XitAdminDbMngSearchVO searchVO
- ,BindingResult bindingResult
- ,SessionStatus status
- , @RequestParam(value="jsonArr", required=false) JSONArray jsonArr
- ,Model model
- ,HttpServletRequest request
- ,HttpServletResponse response
- ) throws ServletException, IOException {
-
- /**
- * 처리 분기
- */
- String sLocationUrl = "forward:/framework/biz/mng/admin/AdminDbMng_list.do";
- String message = null;
- int resultCnt = 0;
- String cmd = null; //질의문 명령어 구분
- String dynamicSql = ""; //질의문
- StringBuffer arrmessage = new StringBuffer(); //질의문 처리결과 메시지
- List>> arrDataset = new ArrayList>>();
- //질의문 갯수만큼 loop
- for(int i=0; i 0)
- arrmessage.append("\\n");
- try {
- //질의문 Get
- dynamicSql = jsonArr.get(i).toString();
- dynamicSql = this.decrypt(dynamicSql, SALTKEY);
- //cmd Set
- cmd = this.getCmd(dynamicSql);
-
- //cmd별 질의문 실행
- switch (cmd) {
-
- case "select": //조회
- //처리
- try {
- List> list = xitAdminDbMngService.findList(dynamicSql);
- message = xitMessageSource.getMessage("success.common.select");
- message = String.format("%s건의 데이터가 %s", list.size(), message);
- arrmessage.append(message); //질의문실행결과
- arrDataset.add(list);
- } catch (Exception e) {
- message = xitMessageSource.getMessage("fail.common.select");
- arrmessage.append(String.format("%s :: %s", message, e.getMessage())); //질의문실행결과
- }
- break;
-
- case "insert": //등록
- //처리
- try {
- resultCnt = xitAdminDbMngService.addProc(dynamicSql);
- status.setComplete();
- message = xitMessageSource.getMessage("success.common.insert");
- message = String.format("%s건의 데이터가 %s", resultCnt, message);
- arrmessage.append(message); //질의문실행결과
- } catch (RuntimeException e) {
- message = e.getMessage();
- sLocationUrl = "forward:/framework/biz/mng/admin/AdminDbMng_list.do";
- arrmessage.append(message); //질의문실행결과
- } catch (Exception e) {
- message = xitMessageSource.getMessage("fail.common.insert");
- sLocationUrl = "forward:/framework/biz/mng/admin/AdminDbMng_list.do";
- arrmessage.append(String.format("%s :: %s", message, e.getMessage())); //질의문실행결과
- }
- break;
-
- case "update": //수정
- //처리
- try {
- resultCnt = xitAdminDbMngService.modifyProc(dynamicSql);
- status.setComplete();
- message = xitMessageSource.getMessage("success.common.update");
- message = String.format("%s건의 데이터가 %s", resultCnt, message);
- arrmessage.append(message); //질의문실행결과
- } catch (RuntimeException e) {
- message = e.getMessage();
- sLocationUrl = "forward:/framework/biz/mng/admin/AdminDbMng_list.do";
- arrmessage.append(message); //질의문실행결과
- } catch (Exception e) {
- message = xitMessageSource.getMessage("fail.common.update");
- sLocationUrl = "forward:/framework/biz/mng/admin/AdminDbMng_list.do";
- arrmessage.append(String.format("%s :: %s", message, e.getMessage())); //질의문실행결과
- }
- break;
-
- case "delete": //삭제
- //처리
- try {
- resultCnt = xitAdminDbMngService.removeProc(dynamicSql);
- status.setComplete();
- message = xitMessageSource.getMessage("success.common.delete");
- message = String.format("%s건의 데이터가 %s", resultCnt, message);
- arrmessage.append(message); //질의문실행결과
- } catch (RuntimeException e) {
- message = e.getMessage();
- arrmessage.append(message); //질의문실행결과
- } catch (Exception e) {
- message = xitMessageSource.getMessage("fail.common.delete");
- arrmessage.append(String.format("%s :: %s", message, e.getMessage())); //질의문실행결과
- }
- break;
-
- default:
- new RuntimeException("유효하지 않은 요청 입니다.");
- }
- } catch (RuntimeException e) {
- arrmessage.append(String.format("%s번째 질의문 Getting Fail", i));
- } catch (Exception e) {
- arrmessage.append(e.getMessage());
- }
- }
-
-
+
- /**
- * 응답 설정
- */
- /* ============================
- * 2020.09.10 박민규
- * 서버 호출 방식에 관계 없이 응답처리가 가능하도록 개선
- * -기존 호출방식도 유지하며 ajax로 서버호출 시 json 으로 응답처리가 가능하도록 개선
- * [AS-IS] 반환타입 String, return url에 "forward"구문으로 처리
- * [TO-BE] 반환타입 void, DispatchServlet으로 forward 처리, ajax 호출인 경우 json응답처리 서비스로 forward
- * 2021.05.03 박민규
- * json 응답방식 변경
- * -.사유: 소스코드 간소화
- * -.작업내용
- * AsIs: 간소화
- * ToBe:
- ============================ */
- //2020.09.10 주석처리
-// model.addAttribute("message", message);
-// return sLocationUrl;
- //2021.05.03 주석처리
-// model.addAttribute("message", message);
-// if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시
-// //반환 데이터 설정
-// Map resultMap = new HashMap();
-// resultMap.put("message", message);
-// resultMap.put("arrmessage", arrmessage.toString()); //질의문실행결과
-// XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap, true);
-// }else { //submit 요청 시
-// XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
-// }
- model.addAttribute("message", message);
- model.addAttribute("arrmessage", arrmessage.toString());
- model.addAttribute("arrDataset", arrDataset); //select문 실행결과
- if(AjaxUtils.isAjaxRequest(request)) //ajax 요청시
- return FrameworkConstants.JSON_VIEW;
- else //submit 요청 시
- return sLocationUrl;
- }
+
/**
* 메소드 설명: 질의문 커맨드 반환
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthAuthorMgtController.java b/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthAuthorMgtController.java
index 25370a47..0ecc229a 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthAuthorMgtController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthAuthorMgtController.java
@@ -4,7 +4,7 @@ import cokr.xit.foundation.web.AbstractController;
import cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO;
import cokr.xit.fims.framework.biz.mng.auth.service.AuthAuthorMgtService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
-import cokr.xit.fims.framework.core.ResultResponse;
+
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.Checks;
@@ -58,7 +58,7 @@ public class AuthAuthorMgtController extends AbstractController {
*/
@GetMapping(name = "", value = "findAuthAuthors")
public ModelAndView findAuthAuthors(@RequestParam final Map paraMap) {
- return ResultResponse.of(service.findAuthAuthors(paraMap, MybatisUtils.getPagingInfo(paraMap)));
+ return new ModelAndView("jsonView").addObject("result",service.findAuthAuthors(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@PostMapping(name = "", value = "/addAuthAuthor")
@@ -117,7 +117,7 @@ public class AuthAuthorMgtController extends AbstractController {
@GetMapping(name = "", value="/findAuthRoleGrantList")
public ModelAndView findAuthRoleGrantList(@RequestParam final Map paraMap) {
- return ResultResponse.of(service.findAuthRoleGrantList(paraMap));
+ return new ModelAndView("jsonView").addObject("result",service.findAuthRoleGrantList(paraMap));
}
@PostMapping(name = "", value = "/saveAuthRoleGrantList")
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthByUserMgtController.java b/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthByUserMgtController.java
index 2da4e4ee..2237c24d 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthByUserMgtController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthByUserMgtController.java
@@ -4,7 +4,7 @@ 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.core.ResultResponse;
+
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;
@@ -49,7 +49,7 @@ public class AuthByUserMgtController extends AbstractController {
@GetMapping(name = "", value = "/findAuthUsers")
public ModelAndView findAuthUsers(@RequestParam final Map paraMap) {
- return ResultResponse.of(service.findAuthUsers(paraMap, MybatisUtils.getPagingInfo(paraMap)));
+ return new ModelAndView("jsonView").addObject("result",service.findAuthUsers(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@PostMapping(name = "", value = "/saveAuthUserList")
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthGrpMgtController.java b/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthGrpMgtController.java
index 64f1c377..5dfa010e 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthGrpMgtController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthGrpMgtController.java
@@ -4,7 +4,7 @@ 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.core.ResultResponse;
+
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.Checks;
@@ -52,7 +52,7 @@ public class AuthGrpMgtController extends AbstractController {
@GetMapping(name = "", value = "/findAuthGrps")
public ModelAndView findAuthAuthors(@RequestParam final Map paraMap) {
- return ResultResponse.of(service.findAuthGrps(paraMap, MybatisUtils.getPagingInfo(paraMap)));
+ return new ModelAndView("jsonView").addObject("result",service.findAuthGrps(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@PostMapping(name = "", value = "/addAuthGrp")
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthHierarchyMgtController.java b/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthHierarchyMgtController.java
index d2cdd493..88639f1f 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthHierarchyMgtController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthHierarchyMgtController.java
@@ -6,7 +6,7 @@ import cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO;
import cokr.xit.fims.framework.biz.mng.auth.service.AuthAuthorMgtService;
import cokr.xit.fims.framework.biz.mng.auth.service.AuthHierarchyMgtService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
-import cokr.xit.fims.framework.core.ResultResponse;
+
import cokr.xit.fims.framework.support.exception.BizRuntimeException;
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
@@ -45,9 +45,7 @@ public class AuthHierarchyMgtController extends AbstractController {
private final AuthHierarchyMgtService service;
private final AuthAuthorMgtService authAuthorMgtService;
- private final EgovSecuredObjectService egovSecuredObjectService;
- private final RoleHierarchyImpl roleHierarchyImpl;
- private final EgovJdbcUserDetailsManager egovJdbcUserDetailsManager;
+
@@ -94,7 +92,7 @@ public class AuthHierarchyMgtController extends AbstractController {
@GetMapping(name = "", value = "/findAuthHierarchies")
public ModelAndView findAuthHierarchies(@RequestParam final Map paraMap){
- return ResultResponse.of(service.findAuthHierarchies(paraMap, MybatisUtils.getPagingInfo(paraMap)));
+ return new ModelAndView("jsonView").addObject("result",service.findAuthHierarchies(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@PostMapping(name = "", value = "/saveAuthHierarchy")
@@ -107,25 +105,5 @@ public class AuthHierarchyMgtController extends AbstractController {
return mav;
}
- @PostMapping(name = "", value = "/reloadAuthHierarchy")
- public ModelAndView reloadAuthHierarchy(){
- ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
-
- /**
- * 롤계층정보 reload
- * -재접속 후 변경된 롤계층정보가 적용 됨.
- */
- String hierachicaRoles = null;
- try {
- hierachicaRoles = egovSecuredObjectService.getHierarchicalRoles();
- } catch (Exception e) {
- throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage());
- }
- roleHierarchyImpl.setHierarchy(hierachicaRoles);
- RoleHierarchy roleHierarchy = roleHierarchyImpl;
- egovJdbcUserDetailsManager.setRoleHierarchy(roleHierarchy);
- AjaxMessageMapRenderer.success(mav, MessageKey.CMM_SUCCESS);
- return mav;
- }
}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthRoleMgtController.java b/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthRoleMgtController.java
index 6b2a8e61..05c4f41c 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthRoleMgtController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/mng/auth/web/AuthRoleMgtController.java
@@ -4,7 +4,7 @@ import cokr.xit.foundation.web.AbstractController;
import cokr.xit.fims.framework.biz.mng.auth.XitRoleInfoVO;
import cokr.xit.fims.framework.biz.mng.auth.service.AuthRoleMgtService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
-import cokr.xit.fims.framework.core.ResultResponse;
+
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.Checks;
@@ -59,7 +59,7 @@ public class AuthRoleMgtController extends AbstractController {
*/
@GetMapping(name = "", value = "/findAuthRoles")
public ModelAndView findAuthRoles(@RequestParam final Map paraMap) {
- return ResultResponse.of(service.findAuthRoles(paraMap, MybatisUtils.getPagingInfo(paraMap)));
+ return new ModelAndView("jsonView").addObject("result",service.findAuthRoles(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@PostMapping(name = "", value = "/addAuthRole")
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchRegMngSearchVO.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchRegMngSearchVO.java
deleted file mode 100644
index af2e9daf..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchRegMngSearchVO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch;
-
-import cokr.xit.fims.framework.core.XitBaseSearchVO;
-
-/**
- *
- * @업무그룹명: 배치작업관리 SearchVO
- * @설명:
- * @최초작성일: 2020. 7. 13. 오후 4:49:51
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-public class XitBatchRegMngSearchVO extends XitBaseSearchVO{
-
- /**
- * serialVersionUID
- */
- private static final long serialVersionUID = 1L;
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchRegMngVO.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchRegMngVO.java
deleted file mode 100644
index a21cffb1..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchRegMngVO.java
+++ /dev/null
@@ -1,219 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch;
-
-import cokr.xit.fims.framework.core.BaseVO;
-
-/**
- *
- * @업무그룹명: 배치작업관리 VO
- * @설명:
- * @최초작성일: 2020. 7. 13. 오후 4:50:55
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-public class XitBatchRegMngVO extends BaseVO {
-
- /**
- * serialVersionUID
- */
- private static final long serialVersionUID = 1L;
-
-
- /**
- * 배치작업ID
- */
- private String batchOpertId;
- /**
- * 배치작업명
- */
- private String batchOpertNm;
- /**
- * 배치작업구분 //2021.10.07 박민규 - 추가
- */
- private String batchOpertSe;
- /**
- * 배치프로그램
- */
- private String batchProgrm;
- /**
- * 최종수정자 아이디
- */
- private String mdfr;
- /**
- * 최종수정일
- */
- private String mdfcnDt;
- /**
- * 파라미터
- */
- private String paramtr;
- /**
- * 사용여부
- */
- private String useYn;
- /**
- * 최초등록자 아이디
- */
- private String rgtr;
- /**
- * 최초등록시점
- */
- private String regDt;
-
- /**
- * 배치작업ID를 리턴한다.
- * @return the batchOpertId
- */
- public String getBatchOpertId() {
- return batchOpertId;
- }
-
- /**
- * 배치작업ID를 설정한다.
- * @param batchOpertId 설정할 배치작업ID
- */
- public void setBatchOpertId(String batchOpertId) {
- this.batchOpertId = batchOpertId;
- }
-
- /**
- * 배치작업명을 리턴한다.
- * @return the batchOpertNm
- */
- public String getBatchOpertNm() {
- return batchOpertNm;
- }
-
- /**
- * 배치작업명을 설정한다.
- * @param batchOpertNm 설정할 배치작업명
- */
- public void setBatchOpertNm(String batchOpertNm) {
- this.batchOpertNm = batchOpertNm;
- }
-
- /**
- * 배치작업구분을 리턴한다.
- * @return the batchOpertSe
- */
- public String getBatchOpertSe() {
- return batchOpertSe;
- }
-
- /**
- * 배치작업구분을 설정한다.
- * @param batchOpertSe 설정할 배치작업구분
- */
- public void setBatchOpertSe(String batchOpertSe) {
- this.batchOpertSe = batchOpertSe;
- }
-
- /**
- * 배치프로그램을 리턴한다.
- * @return the batchProgrm
- */
- public String getBatchProgrm() {
- return batchProgrm;
- }
-
- /**
- * 배치프로그램을 설정한다.
- * @param batchProgrm 설정할 배치프로그램
- */
- public void setBatchProgrm(String batchProgrm) {
- this.batchProgrm = batchProgrm;
- }
-
- /**
- * 최종수정자ID를 리턴한다.
- * @return the mdfr
- */
- public String getMdfr() {
- return mdfr;
- }
-
- /**
- * 최종수정자ID를 설정한다.
- * @param mdfr 설정할 최종수정자ID
- */
- public void setMdfr(String mdfr) {
- this.mdfr = mdfr;
- }
-
- /**
- * 최종수정시점을 리턴한다.
- * @return the mdfcnDt
- */
- public String getMdfcnDt() {
- return mdfcnDt;
- }
-
- /**
- * 최종수정시점을 설정한다.
- * @param mdfcnDt 설정할 최종수정시점
- */
- public void setMdfcnDt(String mdfcnDt) {
- this.mdfcnDt = mdfcnDt;
- }
-
- /**
- * 파라미터를 리턴한다.
- * @return the paramtr
- */
- public String getParamtr() {
- return paramtr;
- }
-
- /**
- * 파라미터를 설정한다.
- * @param paramtr 설정할 파라미터
- */
- public void setParamtr(String paramtr) {
- this.paramtr = paramtr;
- }
-
- /**
- * 사용여부를 리턴한다.
- * @return the useYn
- */
- public String getUseYn() {
- return useYn;
- }
-
- /**
- * 사용여부를 설정한다.
- * @param useYn 설정할 사용여부
- */
- public void setUseYn(String useYn) {
- this.useYn = useYn;
- }
-
- /**
- * @return the rgtr
- */
- public String getRgtr() {
- return rgtr;
- }
-
- /**
- * @return the regDt
- */
- public String getRegDt() {
- return regDt;
- }
-
- /**
- * @param rgtr the rgtr to set
- */
- public void setRgtr(String rgtr) {
- this.rgtr = rgtr;
- }
-
- /**
- * @param regDt the regDt to set
- */
- public void setRegDt(String regDt) {
- this.regDt = regDt;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchResultMngSearchVO.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchResultMngSearchVO.java
deleted file mode 100644
index 0557759f..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchResultMngSearchVO.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch;
-
-import cokr.xit.fims.framework.core.XitBaseSearchVO;
-
-/**
- *
- * @업무그룹명: 배치결과관리 SearchVO
- * @설명:
- * @최초작성일: 2020. 7. 13. 오후 4:52:09
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-public class XitBatchResultMngSearchVO extends XitBaseSearchVO{
-
- /**
- * serialVersionUID
- */
- private static final long serialVersionUID = 1L;
-
-
-
- /**
- * 상태
- */
- private String sttus;
-
-
-
- public String getSttus() {
- return sttus;
- }
- public void setSttus(String sttus) {
- this.sttus = sttus;
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchResultMngVO.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchResultMngVO.java
deleted file mode 100644
index eb3af546..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchResultMngVO.java
+++ /dev/null
@@ -1,294 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch;
-
-import cokr.xit.fims.framework.core.BaseVO;
-
-/**
- *
- * @업무그룹명: 배치결과관리 VO
- * @설명:
- * @최초작성일: 2020. 7. 13. 오후 4:51:36
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-public class XitBatchResultMngVO extends BaseVO {
-
- /**
- * serialVersionUID
- */
- private static final long serialVersionUID = 1L;
- /**
- * 배치결과ID
- */
- private String batchResultId;
- /**
- * 배치스케줄ID
- */
- private String batchSchdulId;
-
- /**
- * 배치작업ID
- */
- private String batchOpertId;
- /**
- * 파라미터
- */
- private String paramtr;
- /**
- * 상태
- */
- private String sttus;
- /**
- * 실행시작시각
- */
- private String executBeginTime;
- /**
- * 실행종료시각
- */
- private String executEndTime;
- /**
- * 최종수정자 아이디
- */
- private String mdfr;
- /**
- * 최종수정시점
- */
- private String mdfcnDt;
- /**
- * 최초등록자 아이디
- */
- private String rgtr;
- /**
- * 최초등록시점
- */
- private String regDt;
- /**
- * 에러정보
- */
- private String errorInfo;
-
- /**
- * 배치작업명
- */
- private String batchOpertNm;
- /**
- * 배치프로그램
- */
- private String batchProgrm;
- /**
- * 상태명
- */
- private String sttusNm;
-
- /**
- * @return the batchResultId
- */
- public String getBatchResultId() {
- return batchResultId;
- }
-
- /**
- * @return the batchOpertId
- */
- public String getBatchOpertId() {
- return batchOpertId;
- }
-
- /**
- * @return the paramtr
- */
- public String getParamtr() {
- return paramtr;
- }
-
- /**
- * @return the sttus
- */
- public String getSttus() {
- return sttus;
- }
-
- /**
- * @return the executBeginTime
- */
- public String getExecutBeginTime() {
- return executBeginTime;
- }
-
- /**
- * @return the executEndTime
- */
- public String getExecutEndTime() {
- return executEndTime;
- }
-
- /**
- * @return the mdfr
- */
- public String getMdfr() {
- return mdfr;
- }
-
- /**
- * @return the mdfcnDt
- */
- public String getMdfcnDt() {
- return mdfcnDt;
- }
-
- /**
- * @return the rgtr
- */
- public String getRgtr() {
- return rgtr;
- }
-
- /**
- * @return the regDt
- */
- public String getRegDt() {
- return regDt;
- }
-
- /**
- * @return the errorInfo
- */
- public String getErrorInfo() {
- return errorInfo;
- }
-
- /**
- * @return the batchOpertNm
- */
- public String getBatchOpertNm() {
- return batchOpertNm;
- }
-
- /**
- * @return the batchProgrm
- */
- public String getBatchProgrm() {
- return batchProgrm;
- }
-
- /**
- * @return the sttusNm
- */
- public String getSttusNm() {
- return sttusNm;
- }
-
- /**
- * @param batchResultId the batchResultId to set
- */
- public void setBatchResultId(String batchResultId) {
- this.batchResultId = batchResultId;
- }
-
- /**
- * @param batchOpertId the batchOpertId to set
- */
- public void setBatchOpertId(String batchOpertId) {
- this.batchOpertId = batchOpertId;
- }
-
- /**
- * @param paramtr the paramtr to set
- */
- public void setParamtr(String paramtr) {
- this.paramtr = paramtr;
- }
-
- /**
- * @param sttus the sttus to set
- */
- public void setSttus(String sttus) {
- this.sttus = sttus;
- }
-
- /**
- * @param executBeginTime the executBeginTime to set
- */
- public void setExecutBeginTime(String executBeginTime) {
- this.executBeginTime = executBeginTime;
- }
-
- /**
- * @param executEndTime the executEndTime to set
- */
- public void setExecutEndTime(String executEndTime) {
- this.executEndTime = executEndTime;
- }
-
- /**
- * @param mdfr the mdfr to set
- */
- public void setMdfr(String mdfr) {
- this.mdfr = mdfr;
- }
-
- /**
- * @param mdfcnDt the mdfcnDt to set
- */
- public void setMdfcnDt(String mdfcnDt) {
- this.mdfcnDt = mdfcnDt;
- }
-
- /**
- * @param rgtr the rgtr to set
- */
- public void setRgtr(String rgtr) {
- this.rgtr = rgtr;
- }
-
- /**
- * @param regDt the regDt to set
- */
- public void setRegDt(String regDt) {
- this.regDt = regDt;
- }
-
- /**
- * @param errorInfo the errorInfo to set
- */
- public void setErrorInfo(String errorInfo) {
- this.errorInfo = errorInfo;
- }
-
- /**
- * @param batchOpertNm the batchOpertNm to set
- */
- public void setBatchOpertNm(String batchOpertNm) {
- this.batchOpertNm = batchOpertNm;
- }
-
- /**
- * @param batchProgrm the batchProgrm to set
- */
- public void setBatchProgrm(String batchProgrm) {
- this.batchProgrm = batchProgrm;
- }
-
- /**
- * @param sttusNm the sttusNm to set
- */
- public void setSttusNm(String sttusNm) {
- this.sttusNm = sttusNm;
- }
-
- /**
- * @return the batchSchdulId
- */
- public String getBatchSchdulId() {
- return batchSchdulId;
- }
-
- /**
- * @param batchSchdulId the batchSchdulId to set
- */
- public void setBatchSchdulId(String batchSchdulId) {
- this.batchSchdulId = batchSchdulId;
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchScheduleDayOfWeekVO.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchScheduleDayOfWeekVO.java
deleted file mode 100644
index 881148e3..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchScheduleDayOfWeekVO.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch;
-
-import cokr.xit.fims.framework.core.BaseVO;
-
-/**
- *
- * @업무그룹명: 배치작업스케줄요일 VO
- * @설명:
- * @최초작성일: 2020. 7. 14. 오후 4:08:55
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-public class XitBatchScheduleDayOfWeekVO extends BaseVO {
-
-
- /**
- * serialVersionUID
- */
- private static final long serialVersionUID = 393393635146750800L;
-
- /**
- * 배치스케줄ID
- */
- private String batchSchdulId;
-
- /**
- * 실행스케줄요일
- */
- private String executSchdulDfkSe;
-
- /**
- * 실행스케줄요일명
- */
- private String executSchdulDfkSeNm;
-
-
- /**
- * @return the batchSchdulId
- */
- public String getBatchSchdulId() {
- return batchSchdulId;
- }
- /**
- * @return the executSchdulDfkSe
- */
- public String getExecutSchdulDfkSe() {
- return executSchdulDfkSe;
- }
- /**
- * @param batchSchdulId the batchSchdulId to set
- */
- public void setBatchSchdulId(String batchSchdulId) {
- this.batchSchdulId = batchSchdulId;
- }
- /**
- * @param executSchdulDfkSe the executSchdulDfkSe to set
- */
- public void setExecutSchdulDfkSe(String executSchdulDfkSe) {
- this.executSchdulDfkSe = executSchdulDfkSe;
- }
- /**
- * @return the executSchdulDfkSeNm
- */
- public String getExecutSchdulDfkSeNm() {
- return executSchdulDfkSeNm;
- }
- /**
- * @param executSchdulDfkSeNm the executSchdulDfkSeNm to set
- */
- public void setExecutSchdulDfkSeNm(String executSchdulDfkSeNm) {
- this.executSchdulDfkSeNm = executSchdulDfkSeNm;
- }
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchScheduleMngSearchVO.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchScheduleMngSearchVO.java
deleted file mode 100644
index 3d9887c5..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchScheduleMngSearchVO.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch;
-
-import cokr.xit.fims.framework.core.XitBaseSearchVO;
-
-/**
- *
- * @업무그룹명: 배치스케줄관리 SearchVO
- * @설명:
- * @최초작성일: 2020. 7. 13. 오후 4:52:45
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-public class XitBatchScheduleMngSearchVO extends XitBaseSearchVO{
-
- /**
- * serialVersionUID
- */
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchScheduleMngVO.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchScheduleMngVO.java
deleted file mode 100644
index 2ec852fe..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/XitBatchScheduleMngVO.java
+++ /dev/null
@@ -1,468 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch;
-
-import cokr.xit.fims.framework.core.BaseVO;
-
-import java.util.List;
-
-/**
- *
- * @업무그룹명: 배치스케줄관리 VO
- * @설명:
- * @최초작성일: 2020. 7. 13. 오후 4:53:11
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-public class XitBatchScheduleMngVO extends BaseVO {
-
- /**
- * serialVersionUID
- */
- private static final long serialVersionUID = 1L;
-
-
-
-
- /**
- * 배치스케줄ID
- */
- private String batchSchdulId;
-
- /**
- * 배치작업ID
- */
- private String batchOpertId;
-
- /**
- * 실행주기
- */
- private String executCycle;
- /**
- * 실행스케줄일자
- */
- private String executSchdulDe;
- /**
- * 실행스케줄시
- */
- private String executSchdulHour;
- /**
- * 실행스케줄분
- */
- private String executSchdulMnt;
- /**
- * 실행스케줄초
- */
- private String executSchdulSecnd;
- /**
- * 실행스케줄요일
- */
- private String[] executSchdulDfkSes;
-
- /**
- * 최종수정자 아이디
- */
- private String mdfr;
- /**
- * 최종수정시점
- */
- private String mdfcnDt;
- /**
- * 최초등록자 아이디
- */
- private String rgtr;
- /**
- * 최초등록시점
- */
- private String regDt;
-
- /**
- * 배치작업명
- */
- private String batchOpertNm;
- /**
- * 배치프로그램
- */
- private String batchProgrm;
- /**
- * 파라미터
- */
- private String paramtr;
- /**
- * 실행주기명
- */
- private String executCycleNm;
- /**
- * 실행스케줄
- */
- private String executSchdul;
-
- /**
- * @return the batchSchdulId
- */
- public String getBatchSchdulId() {
- return batchSchdulId;
- }
-
- /**
- * @return the batchOpertId
- */
- public String getBatchOpertId() {
- return batchOpertId;
- }
-
- /**
- * @return the executCycle
- */
- public String getExecutCycle() {
- return executCycle;
- }
-
- /**
- * @return the executSchdulDe
- */
- public String getExecutSchdulDe() {
- return executSchdulDe;
- }
-
- /**
- * @return the executSchdulHour
- */
- public String getExecutSchdulHour() {
- return executSchdulHour;
- }
-
- /**
- * @return the executSchdulMnt
- */
- public String getExecutSchdulMnt() {
- return executSchdulMnt;
- }
-
- /**
- * @return the executSchdulSecnd
- */
- public String getExecutSchdulSecnd() {
- return executSchdulSecnd;
- }
-
- /**
- * @return the executSchdulDfkSes
- */
- public String[] getExecutSchdulDfkSes() {
- //return executSchdulDfkSes;
- String[] ret = null;
- if (this.executSchdulDfkSes != null) {
- ret = new String[executSchdulDfkSes.length];
- for (int i = 0; i < executSchdulDfkSes.length; i++) {
- ret[i] = this.executSchdulDfkSes[i];
- }
- }
-
- return ret;
- }
-
- /**
- * @return the mdfr
- */
- public String getMdfr() {
- return mdfr;
- }
-
- /**
- * @return the mdfcnDt
- */
- public String getMdfcnDt() {
- return mdfcnDt;
- }
-
- /**
- * @return the rgtr
- */
- public String getRgtr() {
- return rgtr;
- }
-
- /**
- * @return the regDt
- */
- public String getRegDt() {
- return regDt;
- }
-
- /**
- * @return the batchOpertNm
- */
- public String getBatchOpertNm() {
- return batchOpertNm;
- }
-
- /**
- * @return the batchProgrm
- */
- public String getBatchProgrm() {
- return batchProgrm;
- }
-
- /**
- * @return the executCycleNm
- */
- public String getExecutCycleNm() {
- return executCycleNm;
- }
-
- /**
- * @param batchSchdulId the batchSchdulId to set
- */
- public void setBatchSchdulId(String batchSchdulId) {
- this.batchSchdulId = batchSchdulId;
- }
-
- /**
- * @param batchOpertId the batchOpertId to set
- */
- public void setBatchOpertId(String batchOpertId) {
- this.batchOpertId = batchOpertId;
- }
-
- /**
- * @param executCycle the executCycle to set
- */
- public void setExecutCycle(String executCycle) {
- this.executCycle = executCycle;
- }
-
- /**
- * @param executSchdulDe the executSchdulDe to set
- */
- public void setExecutSchdulDe(String executSchdulDe) {
- this.executSchdulDe = executSchdulDe;
- }
-
- /**
- * @param executSchdulHour the executSchdulHour to set
- */
- public void setExecutSchdulHour(String executSchdulHour) {
- this.executSchdulHour = executSchdulHour;
- }
-
- /**
- * @param executSchdulMnt the executSchdulMnt to set
- */
- public void setExecutSchdulMnt(String executSchdulMnt) {
- this.executSchdulMnt = executSchdulMnt;
- }
-
- /**
- * @param executSchdulSecnd the executSchdulSecnd to set
- */
- public void setExecutSchdulSecnd(String executSchdulSecnd) {
- this.executSchdulSecnd = executSchdulSecnd;
- }
-
- /**
- * @param executSchdulDfkSes the executSchdulDfkSes to set
- */
- public void setExecutSchdulDfkSes(String[] executSchdulDfkSes) {
- //this.executSchdulDfkSes = executSchdulDfkSes;
- this.executSchdulDfkSes = new String[executSchdulDfkSes.length];
- for (int i = 0; i < executSchdulDfkSes.length; ++i) {
- this.executSchdulDfkSes[i] = executSchdulDfkSes[i];
- }
- }
-
- /**
- * @param mdfr the mdfr to set
- */
- public void setMdfr(String mdfr) {
- this.mdfr = mdfr;
- }
-
- /**
- * @param mdfcnDt the mdfcnDt to set
- */
- public void setMdfcnDt(String mdfcnDt) {
- this.mdfcnDt = mdfcnDt;
- }
-
- /**
- * @param rgtr the rgtr to set
- */
- public void setRgtr(String rgtr) {
- this.rgtr = rgtr;
- }
-
- /**
- * @param regDt the regDt to set
- */
- public void setRegDt(String regDt) {
- this.regDt = regDt;
- }
-
- /**
- * @param batchOpertNm the batchOpertNm to set
- */
- public void setBatchOpertNm(String batchOpertNm) {
- this.batchOpertNm = batchOpertNm;
- }
-
- /**
- * @param batchProgrm the batchProgrm to set
- */
- public void setBatchProgrm(String batchProgrm) {
- this.batchProgrm = batchProgrm;
- }
-
- /**
- * @param executCycleNm the executCycleNm to set
- */
- public void setExecutCycleNm(String executCycleNm) {
- this.executCycleNm = executCycleNm;
- }
-
- /**
- * @return the executSchdul
- */
- public String getExecutSchdul() {
- return executSchdul;
- }
-
- /**
- * @param executSchdul the executSchdul to set
- */
- public void setExecutSchdul(String executSchdul) {
- this.executSchdul = executSchdul;
- }
-
- /**
- * 리스트, 상세화면 화면표시용 실행스케줄속성을 만들어 executSchdul 필드에 저장한다.
- *
- * @param dfkSeList List형의 요일구분코드정보리스트
- */
- public void makeExecutSchdul(List dfkSeList) {
- String executSchdul = "";
- String executSchdulDeNm = "";
-
- // 날짜 출력
- if (this.executCycle.equals("02") || this.executCycle.equals("01")) {
- // 매주, 매일인 경우는 스케줄일자를 사용하지 않는다.
- executSchdulDeNm = "";
- } else if (this.executCycle.equals("03")) {
- // 매월 처리
- if (!"".equals(this.executSchdulDe)) {
- executSchdulDeNm = executSchdulDeNm + this.executSchdulDe.substring(6, 8) + "일 ";
- }
- } else if (this.executCycle.equals("04")) {
- // 매년의경우 처리
- if (!"".equals(this.executSchdulDe)) {
- executSchdulDeNm = executSchdulDeNm + this.executSchdulDe.substring(4, 6) + "-" + this.executSchdulDe.substring(6, 8) + " ";
- }
- } else {
- // 이외의경우 처리
- if (!"".equals(this.executSchdulDe)) {
- executSchdulDeNm = executSchdulDeNm + this.executSchdulDe.substring(0, 4) + "-" + this.executSchdulDe.substring(4, 6) + "-" + this.executSchdulDe.substring(6, 8)
- + " ";
- }
- }
-
- // 날짜 출력
- executSchdul = executSchdul + executSchdulDeNm;
-
- // 요일출력
- if (this.executCycle.equals("02")) {
- // 실행주기가 매주인 경우에만 출력한다.
- if (dfkSeList.size() != 0) {
- for (int i = 0; i < dfkSeList.size(); i++) {
- if (i != 0) {
- executSchdul = executSchdul + ",";
- }
- executSchdul = executSchdul + dfkSeList.get(i).getExecutSchdulDfkSeNm();
- }
- executSchdul = executSchdul + " ";
- }
- }
-
- // 시, 분, 초 출력
- // 시분초는 항상출력한다.
- executSchdul = executSchdul + this.executSchdulHour + ":" + this.executSchdulMnt + ":" + this.executSchdulSecnd;
-
- // 값지정.
- this.executSchdul = executSchdul;
-
- }
-
- /**
- * 실행스케줄을 CronExpression으로 바꿔서 리턴한다.
- **/
- public String toCronExpression() {
- String cronExpression = "";
-
- // 초변환
- cronExpression = cronExpression + this.executSchdulSecnd;
-
- // 분변환
- cronExpression = cronExpression + " " + this.executSchdulMnt;
-
- // 시변환
- cronExpression = cronExpression + " " + this.executSchdulHour;
-
- // 일변환
- if (this.executCycle.equals("01")) {
- // 매일인경우 "*" 출력
- cronExpression = cronExpression + " " + "*";
- } else if (this.executCycle.equals("02")) {
- // 매주인 경우 "?" 출력
- cronExpression = cronExpression + " " + "?";
- } else {
- // 이외의 경우 그대로 출력
- cronExpression = cronExpression + " " + this.executSchdulDe.substring(6, 8);
- }
-
- // 월변환
- if (this.executCycle.equals("01") || this.executCycle.equals("02") || this.executCycle.equals("03")) {
- // 매일,매월,매주인경우 "*" 출력
- cronExpression = cronExpression + " " + "*";
- } else {
- // 이외의 경우 그대로 출력
- cronExpression = cronExpression + " " + this.executSchdulDe.substring(4, 6);
- }
-
- // 주 변환
- if (this.executCycle.equals("02")) {
- // 매주인경우 day of week를 출력
- String dayOfWeek = "";
- for (int i = 0; i < this.executSchdulDfkSes.length; i++) {
- if (i != 0) {
- dayOfWeek = dayOfWeek + ",";
- }
- dayOfWeek = dayOfWeek + this.executSchdulDfkSes[i];
- }
- cronExpression = cronExpression + " " + dayOfWeek;
- } else {
- // 이외의 경우 "?" 출력
- cronExpression = cronExpression + " " + "?";
- }
-
- // 년변환
- if (this.executCycle.equals("05")) {
- // 한번만인경우 년도 출력
- cronExpression = cronExpression + " " + this.executSchdulDe.substring(0, 4);
- }
- return cronExpression;
-
- }
-
- /**
- * @return the paramtr
- */
- public String getParamtr() {
- return paramtr;
- }
-
- /**
- * @param paramtr the paramtr to set
- */
- public void setParamtr(String paramtr) {
- this.paramtr = paramtr;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/dao/XitBatchRegMngMapper.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/dao/XitBatchRegMngMapper.java
deleted file mode 100644
index b87cf65f..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/dao/XitBatchRegMngMapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.dao;
-
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchRegMngSearchVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchRegMngVO;
-import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
-
-import java.sql.SQLException;
-import java.util.List;
-
-/**
- *
- * @업무그룹명: 배치작업관리 Mapper
- * @설명:
- * @최초작성일: 2020. 7. 13. 오후 5:03:39
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-@Mapper
-public interface XitBatchRegMngMapper {
-
-
- /**
- * 메소드 설명: 배치작업관리 목록 조회
- * @param searchVO
- * @return List 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 4. 16.
- */
- public List findList(XitBatchRegMngSearchVO searchVO) throws SQLException;
-
- /**
- * 메소드 설명: 배치작업관리 목록 총건수 조회
- * @param searchVO
- * @return int 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 4. 16.
- */
- public int findListTotCnt(XitBatchRegMngSearchVO searchVO) throws SQLException;
-
- /**
- * 메소드 설명: 배치작업관리 상세정보 조회
- * @param vo
- * @return XitBatchRegMngVO 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 4. 16.
- */
- public XitBatchRegMngVO findView(XitBatchRegMngVO vo) throws SQLException;
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/dao/XitBatchResultMngMapper.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/dao/XitBatchResultMngMapper.java
deleted file mode 100644
index a25e693b..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/dao/XitBatchResultMngMapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.dao;
-
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchResultMngSearchVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchResultMngVO;
-import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
-
-import java.sql.SQLException;
-import java.util.List;
-
-/**
- *
- * @업무그룹명: 배치결과관리 Mapper
- * @설명:
- * @최초작성일: 2020. 7. 13. 오후 5:04:40
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-@Mapper
-public interface XitBatchResultMngMapper {
-
-
- /**
- * 메소드 설명: 배치결과관리 목록 조회
- * @param searchVO
- * @return List 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 4. 16.
- */
- public List findList(XitBatchResultMngSearchVO searchVO) throws SQLException;
-
- /**
- * 메소드 설명: 배치결과관리 목록 총건수 조회
- * @param searchVO
- * @return int 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 4. 16.
- */
- public int findListTotCnt(XitBatchResultMngSearchVO searchVO) throws SQLException;
-
- /**
- * 메소드 설명: 배치결과관리 상세정보 조회
- * @param vo
- * @return XitBatchResultMngVO 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 4. 16.
- */
- public XitBatchResultMngVO findView(XitBatchResultMngVO vo) throws SQLException;
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/dao/XitBatchScheduleMngMapper.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/dao/XitBatchScheduleMngMapper.java
deleted file mode 100644
index ca29a44b..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/dao/XitBatchScheduleMngMapper.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.dao;
-
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchScheduleDayOfWeekVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchScheduleMngSearchVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchScheduleMngVO;
-import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
-
-import java.sql.SQLException;
-import java.util.List;
-
-/**
- *
- * @업무그룹명: 배치스케줄관리 Mapper
- * @설명:
- * @최초작성일: 2020. 7. 13. 오후 5:05:26
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-@Mapper
-public interface XitBatchScheduleMngMapper {
-
-
- /**
- * 메소드 설명: 배치스케줄관리 목록 조회
- * @param searchVO
- * @return List 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 4. 16.
- */
- public List findList(XitBatchScheduleMngSearchVO searchVO) throws SQLException;
-
- /**
- * 메소드 설명: 배치스케줄관리 목록 총건수 조회
- * @param searchVO
- * @return int 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 4. 16.
- */
- public int findListTotCnt(XitBatchScheduleMngSearchVO searchVO) throws SQLException;
-
- /**
- * 메소드 설명: 배치스케줄관리 상세정보 조회
- * @param vo
- * @return XitBatchScheduleMngVO 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 4. 16.
- */
- public XitBatchScheduleMngVO findView(XitBatchScheduleMngVO vo) throws SQLException;
-
- /**
- * 메소드 설명: 배치스케줄 요일 목록 조회
- * @param vo
- * @return List<XitBatchScheduleDayOfWeekVO>
- * @author: 박민규
- * @date: 2020. 4. 16.
- */
- public List findsBatchSchedule(XitBatchScheduleMngVO vo);
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/BatchJobListener.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/BatchJobListener.java
deleted file mode 100644
index e396e94a..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/BatchJobListener.java
+++ /dev/null
@@ -1,228 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.service;
-
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchResultMngVO;
-import org.egovframe.rte.fdl.cmmn.exception.FdlException;
-import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
-import org.quartz.JobDataMap;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.quartz.JobListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-
-/**
- * 배치작업의 실행시작, 완료를 저장하는 Quartz JobListener 클래스를 정의한다.
- *
- * @author 김진만
- * @see
- *
- * == 개정이력(Modification Information) ==
- *
- * 수정일 수정자 수정내용
- * ------- -------- ---------------------------
- * 2010-08-30 김진만 최초 생성
- * 2017-02-06 이정은 시큐어코딩(ES) - 시큐어코딩 부적절한 예외 처리[CWE-253, CWE-440, CWE-756]
- *
- */
-
-public class BatchJobListener implements JobListener {
-
- /** egovBatchSchdulService */
- private XitBatchScheduleMngService xitBatchScheduleMngService;
-
- /** ID Generation */
- private EgovIdGnrService idgenService;
-
- /** logger */
- private static final Logger LOGGER = LoggerFactory.getLogger(BatchJobListener.class);
-
- /**
- * 배치스케줄 서비스를 설정한다.
- *
- * @param egovBatchSchdulService the egovBatchSchdulService to set
- */
- public void setXitBatchScheduleMngService(XitBatchScheduleMngService egovBatchSchdulService) {
- this.xitBatchScheduleMngService = egovBatchSchdulService;
- }
-
- /**
- * 배치결과ID 생성서비스
- * @param idgenService the idgenService to set
- */
- public void setIdgenService(EgovIdGnrService idgenService) {
- this.idgenService = idgenService;
- }
-
- /**
- * Job Listener 이름을 리턴한다.
- * @see JobListener#getName()
- */
- @Override
- public String getName() {
- return this.getClass().getName();
- }
-
- /**
- * Batch 작업을 실행하기전에 Batch결과 '수행중'상태로 저장한다.
- *
- * @param jobContext JobExecutionContext
- * @see JobListener#jobToBeExecuted(JobExecutionContext jobContext)
- */
- @Override
- public void jobToBeExecuted(JobExecutionContext jobContext) {
- LOGGER.debug("job[{}] jobToBeExecuted ", jobContext.getJobDetail().getKey().getName());
- XitBatchResultMngVO batchResult = new XitBatchResultMngVO();
- JobDataMap dataMap = jobContext.getJobDetail().getJobDataMap();
- try {
- // 결과 값 세팅.
- batchResult.setBatchResultId(idgenService.getNextStringId());
- batchResult.setBatchSchdulId(dataMap.getString("batchSchdulId"));
- batchResult.setBatchOpertId(dataMap.getString("batchOpertId"));
- batchResult.setParamtr(dataMap.getString("paramtr"));
- batchResult.setSttus("03"); // 상태는 수행중
- batchResult.setErrorInfo("");
-
- String executBeginTimeStr = null;
- Date executBeginTime = new Date();
- SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault());
- executBeginTimeStr = formatter.format(executBeginTime);
- batchResult.setExecutBeginTime(executBeginTimeStr);
-
- batchResult.setMdfr("SYSTEM");
- batchResult.setRgtr("SYSTEM");
-
- xitBatchScheduleMngService.addBatchResult(batchResult);
-
- // 저장이 이상없이 완료되면 datamap에 배치결과ID를 저장한다.
- dataMap.put("batchResultId", batchResult.getBatchResultId());
- //2017.02.06 이정은 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
- } catch (FdlException e) {
- LOGGER.error("[FdlException] 배치스케줄ID : {}, 배치작업ID : {}, 배치결과저장(insert) 에러 : {}", batchResult.getBatchSchdulId(), batchResult.getBatchOpertId(), e.getMessage());
- } catch (Exception e) {
- LOGGER.error("(Ko) 배치스케줄ID : {}, 배치작업ID : {}, 배치결과저장(insert) 에러 : {}", batchResult.getBatchSchdulId(), batchResult.getBatchOpertId(), e.getMessage());
- LOGGER.error("(En) [" + e.getClass() + "] BatchScheduleID : {}, BatchJobID : {}, BatchResult(insert) Error : {}", batchResult.getBatchSchdulId(), batchResult.getBatchOpertId(), e.getMessage());
- }
-
- }
-
- /**
- * Batch 작업을 완료한후 Batch결과 '완료'상태로 저장한다.
- *
- * @param jobContext JobExecutionContext
- * @see JobListener#jobWasExecuted(JobExecutionContext jobContext)
- */
- @Override
- public void jobWasExecuted(JobExecutionContext jobContext, JobExecutionException jee) {
- LOGGER.debug("job[{}] jobWasExecuted", jobContext.getJobDetail().getKey().getName());
- LOGGER.debug("job[{}] 수행시간 : {}, {}", jobContext.getJobDetail().getKey().getName(), jobContext.getFireTime(), jobContext.getJobRunTime());
-
- int jobResult = 99;
- XitBatchResultMngVO batchResult = new XitBatchResultMngVO();
- JobDataMap dataMap = jobContext.getJobDetail().getJobDataMap();
- try {
- // 결과 값 세팅.
- batchResult.setBatchResultId(dataMap.getString("batchResultId"));
- batchResult.setBatchSchdulId(dataMap.getString("batchSchdulId"));
- batchResult.setBatchOpertId(dataMap.getString("batchOpertId"));
- batchResult.setParamtr(dataMap.getString("paramtr"));
- if (jobContext.getResult() != null) {
- jobResult = (Integer) jobContext.getResult();
- }
- if (jobResult == 0) {
- // 배치작업 성공.
- batchResult.setSttus("01");
- batchResult.setErrorInfo("");
- } else {
- // 배치작업이 0이 아닌값을 리턴하면 에러 상황임.
- batchResult.setSttus("02");
- batchResult.setErrorInfo("배치작업이 결과값 [" + jobResult + "]를 리턴했습니다. \n" + "배치프로그램 [" + dataMap.getString("batchProgrm") + "]의 로그를 확인하세요");
- }
- // 수행중 exception이 발생한 경우
- if (jee != null) {
- LOGGER.error("JobExecutionException 발생 : {}", jee);
- batchResult.setSttus("02");
- String errorInfo = batchResult.getErrorInfo();
- batchResult.setErrorInfo(errorInfo + "\n" + "JobExecutionException 발생 : " + jee);
- }
-
- String executEndTimeStr = null;
- Date executEndTime = new Date();
- SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault());
- executEndTimeStr = formatter.format(executEndTime);
- batchResult.setExecutEndTime(executEndTimeStr);
-
- batchResult.setMdfr("SYSTEM");
-
- xitBatchScheduleMngService.modifyBatchResult(batchResult);
-
- // 저장이 이상없이 완료되면 datamap에 배치결과ID를 저장한다.
- dataMap.put("batchResultId", batchResult.getBatchResultId());
- } catch (ClassCastException e) {//KISA 보안약점 조치 (2018-10-29, 윤창원)
- LOGGER.error("[ClassCastException] 배치결과ID : {}, 배치스케줄ID : {}, 배치작업ID : {}, 배치결과저장(update) 에러 : {}", batchResult.getBatchResultId(), batchResult.getBatchSchdulId(),
- batchResult.getBatchOpertId(), e.getMessage());
- LOGGER.error("[ClassCastException] ["+ e.getClass() + "] BatchResultID : {}, BatchScheduleID : {}, BatchJobID : {}, BatchResult(update) Error : {}", batchResult.getBatchResultId(), batchResult.getBatchSchdulId(),
- batchResult.getBatchOpertId(), e.getMessage());
- } catch (Exception e) {
- //2017.02.06 이정은 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
- LOGGER.error("(Ko) 배치결과ID : {}, 배치스케줄ID : {}, 배치작업ID : {}, 배치결과저장(update) 에러 : {}", batchResult.getBatchResultId(), batchResult.getBatchSchdulId(),
- batchResult.getBatchOpertId(), e.getMessage());
- LOGGER.error("(En) ["+ e.getClass() + "] BatchResultID : {}, BatchScheduleID : {}, BatchJobID : {}, BatchResult(update) Error : {}", batchResult.getBatchResultId(), batchResult.getBatchSchdulId(),
- batchResult.getBatchOpertId(), e.getMessage());
- }
- }
-
- /**
- * Batch 작업을 실행한 후에 Batch결과 '에러'상태로 저장한다.
- *
- * @param jobContext JobExecutionContext
- *
- * @see JobListener#jobExecutionVetoed(JobExecutionContext jobContext)
- */
- @Override
- public void jobExecutionVetoed(JobExecutionContext jobContext) {
- LOGGER.debug("job[{}] jobExecutionVetoed", jobContext.getJobDetail().getKey().getName());
-
- XitBatchResultMngVO batchResult = new XitBatchResultMngVO();
- JobDataMap dataMap = jobContext.getJobDetail().getJobDataMap();
- try {
- // 결과 값 세팅.
- batchResult.setBatchResultId(dataMap.getString("batchResultId"));
- batchResult.setBatchSchdulId(dataMap.getString("batchSchdulId"));
- batchResult.setBatchOpertId(dataMap.getString("batchOpertId"));
- batchResult.setParamtr(dataMap.getString("paramtr"));
- // 스케줄러가 배치작업을 실행하지 않음.
- batchResult.setSttus("02");
- batchResult.setErrorInfo("스케줄러가 배치작업을 실행하지 않았습니다(jobExecutionVetoed 이벤트). 스케줄러 로그를 확인하세요");
-
- String executEndTimeStr = null;
- Date executEndTime = new Date();
- SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault());
- executEndTimeStr = formatter.format(executEndTime);
- batchResult.setExecutEndTime(executEndTimeStr);
-
- batchResult.setMdfr("SYSTEM");
-
- xitBatchScheduleMngService.modifyBatchResult(batchResult);
-
- // 저장이 이상없이 완료되면 datamap에 배치결과ID를 저장한다.
- dataMap.put("batchResultId", batchResult.getBatchResultId());
- } catch (ClassCastException e) {//KISA 보안약점 조치 (2018-10-29, 윤창원)
- LOGGER.error("[ClassCastException] 배치결과ID : {}, 배치스케줄ID : {}, 배치작업ID : {}, 배치결과저장(update) 에러 : {}", batchResult.getBatchResultId(), batchResult.getBatchSchdulId(),
- batchResult.getBatchOpertId(), e.getMessage());
- LOGGER.error("[ClassCastException] ["+ e.getClass() + "] BatchResultID : {}, BatchScheduleID : {}, BatchJobID : {}, BatchResult(update) Error : {}", batchResult.getBatchResultId(), batchResult.getBatchSchdulId(),
- batchResult.getBatchOpertId(), e.getMessage());
- } catch (Exception e) {
- //2017.02.06 이정은 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
- LOGGER.error("(Ko) 배치결과ID : {}, 배치스케줄ID : {}, 배치작업ID : {}, 배치결과저장(update) 에러 : {}", batchResult.getBatchResultId(), batchResult.getBatchSchdulId(),
- batchResult.getBatchOpertId(), e.getMessage());
- LOGGER.error("(En) ["+ e.getClass() +"] BachResultID : {}, BatchScheduleID : {}, 배치작업ID : {}, 배치결과저장(update) 에러 : {}", batchResult.getBatchResultId(), batchResult.getBatchSchdulId(),
- batchResult.getBatchOpertId(), e.getMessage());
- }
-
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/BatchMethodExecuteJob.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/BatchMethodExecuteJob.java
deleted file mode 100644
index 38c7159b..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/BatchMethodExecuteJob.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.service;
-
-import org.quartz.Job;
-import org.quartz.JobDataMap;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-/**
- * 배치서비스메소드를 실행하는 Quartz Job 클래스를 정의한다.
- *
- * @author 박민규
- * @see
- *
- * == 개정이력(Modification Information) ==
- *
- * 수정일 수정자 수정내용
- * ------- -------- ---------------------------
- * 2021.10.07 박민규 최초 생성
- *
- */
-
-public class BatchMethodExecuteJob implements Job {
-
- /** logger */
- private static final Logger LOGGER = LoggerFactory.getLogger(BatchMethodExecuteJob.class);
-
- /**
- * (non-Javadoc)
- * @see Job#execute(JobExecutionContext)
- */
- public void execute(JobExecutionContext jobContext) throws JobExecutionException {
-
- JobDataMap dataMap = jobContext.getJobDetail().getJobDataMap();
-
- LOGGER.debug("job[{}] Trigger이름 : ", jobContext.getJobDetail().getKey().getName(), jobContext.getTrigger().getKey().getName());
- LOGGER.debug("job[{}] BatchOpert이름 : ", jobContext.getJobDetail().getKey().getName(), dataMap.getString("batchOpertId"));
- LOGGER.debug("job[{}] BatchProgram이름 : ", jobContext.getJobDetail().getKey().getName(), dataMap.getString("batchProgrm"));
- LOGGER.debug("job[{}] Parameter이름 : ", jobContext.getJobDetail().getKey().getName(), dataMap.getString("paramtr"));
-
- int result = executeProgram(dataMap.getString("batchProgrm"), dataMap.getString("paramtr"));
-
- // jobContext에 결과값을 저장한다.
- jobContext.setResult(result);
- }
-
- /**
- * 시스템에서 특정 배치서비스메소드를 실행한다.
- * @param batchProgrm 배치서비스메소드 경로(ex. [패키지].[클래스].[메소드] )
- * @param paramtr 배치실행화일에 전달될 파라미터
- * @return 배치실행화일리턴값(integer)
- * @exception Exception
- */
- @SuppressWarnings({ "unchecked", "rawtypes" })
- private int executeProgram(String batchProgrm, String paramtr) {
-
- int result = 0;
-
- String clzName = null;
- String mthName = null;
- try {
- String cmdStr = batchProgrm + " " + paramtr;
-
- int lastIdx = batchProgrm.lastIndexOf(".");
- clzName = batchProgrm.substring(0, lastIdx);
- mthName = batchProgrm.substring(lastIdx+1);
-
- Class cls = Class.forName(clzName);
- Object obj = cls.newInstance();
- Method method = null;
- if(paramtr == null || "".equals(paramtr)) {
- method = cls.getDeclaredMethod(mthName, null);
- method.invoke(obj);
- } else {
- method = cls.getDeclaredMethod(mthName, String.class);
- method.invoke(obj, paramtr);
- }
-
- LOGGER.debug("배치서비스메소드 - {} 실행완료, 결과값: {}", cmdStr, result);
-
- } catch (ClassNotFoundException e) {
- result = 1;
- LOGGER.error("배치서비스클래스 notfound 에러 : {}", e.getMessage());
- LOGGER.debug(e.getMessage(), e);
- } catch (InstantiationException | IllegalAccessException e) {
- result = 1;
- LOGGER.error("배치서비스클래스 인스턴스 에러 : {}", e.getMessage());
- LOGGER.debug(e.getMessage(), e);
- } catch (NoSuchMethodException e) {
- result = 1;
- LOGGER.error("배치서비스메소드 notfound 에러 : {}", e.getMessage());
- LOGGER.debug(e.getMessage(), e);
- } catch (IllegalArgumentException e) {
- result = 1;
- LOGGER.error("배치서비스메소드 실행 에러 : {}", e.getMessage());
- LOGGER.debug(e.getMessage(), e);
- } catch (InvocationTargetException e) {
- result = 1;
- LOGGER.error("배치서비스메소드 실행 에러 : {}", e.getMessage());
- LOGGER.debug(e.getMessage(), e);
- }
-
- return result;
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/BatchScheduler.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/BatchScheduler.java
deleted file mode 100644
index 5d06c4d1..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/BatchScheduler.java
+++ /dev/null
@@ -1,269 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.service;
-
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchRegMngVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchScheduleMngSearchVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchScheduleMngVO;
-import cokr.xit.fims.framework.biz.mng.batch.validator.BatchOpertSe;
-import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
-import org.quartz.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-import static org.quartz.CronScheduleBuilder.cronSchedule;
-import static org.quartz.JobBuilder.newJob;
-import static org.quartz.TriggerBuilder.newTrigger;
-
-/**
- * Quartz Scheduler를 실행하는 스케줄러 클래스를 정의한다.
- *
- * @author 김진만
- * @see
- *
- * == 개정이력(Modification Information) ==
- *
- * 수정일 수정자 수정내용
- * ------- -------- ---------------------------
- * 2010.08.30 김진만 최초 생성
- *
- */
-
-public class BatchScheduler {
-
- private XitBatchScheduleMngService xitBatchScheduleMngService;
- private XitBatchRegMngService xitBatchRegMngService;
-
- /** ID Generation */
- private EgovIdGnrService idgenService;
-
- /** Quartz 스케줄러 */
- private Scheduler sched;
-
- private static final Logger LOGGER = LoggerFactory.getLogger(BatchScheduler.class);
-
- // 실행 대상을 읽기위한 페이지 크기
- private static final int RECORD_COUNT_PER_PAGE = 10000;
-
- /**
- * 배치스케줄러에 batchSchdul 파라미터를 이용하여 Job , Trigger를 Add 한다.
- *
- * @param batchSchdul 배치스케줄러에 등록할 스케줄정보
- * @exception Exception Exception
- */
- @SuppressWarnings("unchecked")
- public void insertBatchSchdul(XitBatchScheduleMngVO batchSchdul) throws Exception {
- // Job 만들기
-// JobDetail jobDetail = newJob(BatchShellScriptJob.class).withIdentity(batchSchdul.getBatchSchdulId()).build();
- JobDetail jobDetail = newJob(getJobClass(batchSchdul.getBatchOpertId())).withIdentity(batchSchdul.getBatchSchdulId()).build();
-
- // Trigger 만들기
- CronTrigger trigger = newTrigger().withIdentity(batchSchdul.getBatchSchdulId()).withSchedule(cronSchedule(batchSchdul.toCronExpression())).forJob(jobDetail.getKey().getName()).build();
-
- LOGGER.debug("배치스케줄을 등록합니다. 배치스케줄ID : {}", batchSchdul.getBatchSchdulId());
- LOGGER.debug("{} - cronexpression : {}", batchSchdul.getBatchSchdulId(), trigger.getCronExpression());
- BatchJobListener listener = new BatchJobListener();
-
- listener.setXitBatchScheduleMngService(xitBatchScheduleMngService);
- listener.setIdgenService(idgenService);
-
- sched.getListenerManager().addJobListener(listener);
-
- // 데이터 전달
- jobDetail.getJobDataMap().put("batchOpertId", batchSchdul.getBatchOpertId());
- jobDetail.getJobDataMap().put("batchSchdulId", batchSchdul.getBatchSchdulId());
- jobDetail.getJobDataMap().put("batchProgrm", batchSchdul.getBatchProgrm());
- jobDetail.getJobDataMap().put("paramtr", batchSchdul.getParamtr());
-
- try {
- // 스케줄러에 추가하기
- sched.scheduleJob(jobDetail, trigger);
- } catch (SchedulerException e) {
- // SchedulerException 이 발생하면 로그를 출력하고 다음 배치작업으로 넘어간다.
- // 트리거의 실행시각이 현재 시각보다 이전이면 SchedulerException이 발생한다.
- LOGGER.error("스케줄러에 배치작업추가할때 에러가 발생했습니다. 배치스케줄ID : {}, 배치작업ID : {}", batchSchdul.getBatchSchdulId(), batchSchdul.getBatchOpertId());
- LOGGER.error("에러내용 : {}", e.getMessage());
- LOGGER.debug(e.getMessage(), e);
- }
- }
-
- /**
- * 배치스케줄러에 batchSchdul 파라미터를 이용하여 Job , Trigger를 갱신 한다.
- *
- * @param batchSchdul 배치스케줄러에 갱신할 스케줄정보
- * @exception Exception Exception
- */
- @SuppressWarnings("unchecked")
- public void updateBatchSchdul(XitBatchScheduleMngVO batchSchdul) throws Exception {
- // Job 만들기
-// JobDetail jobDetail = newJob(BatchShellScriptJob.class)
- JobDetail jobDetail = newJob(getJobClass(batchSchdul.getBatchOpertId()))
- .withIdentity(batchSchdul.getBatchSchdulId())
- .build();
- // Trigger 만들기
- CronTrigger trigger = newTrigger()
- .withIdentity(batchSchdul.getBatchSchdulId())
- .withSchedule(cronSchedule(batchSchdul.toCronExpression()))
- .forJob(jobDetail.getKey().getName())
- .build();
-
- LOGGER.debug("배치스케줄을 갱신합니다. 배치스케줄ID : {}", batchSchdul.getBatchSchdulId());
- LOGGER.debug("{} - cronexpression : {}", batchSchdul.getBatchSchdulId(), trigger.getCronExpression());
-
- BatchJobListener listener = new BatchJobListener();
-
- listener.setXitBatchScheduleMngService(xitBatchScheduleMngService);
- listener.setIdgenService(idgenService);
-
- sched.getListenerManager().addJobListener(listener);
-
- // 데이터 전달
- jobDetail.getJobDataMap().put("batchOpertId", batchSchdul.getBatchOpertId());
- jobDetail.getJobDataMap().put("batchSchdulId", batchSchdul.getBatchSchdulId());
- jobDetail.getJobDataMap().put("batchProgrm", batchSchdul.getBatchProgrm());
- jobDetail.getJobDataMap().put("paramtr", batchSchdul.getParamtr());
-
- try {
- // 스케줄러에서 기존Job, Trigger 삭제하기
- sched.deleteJob(JobKey.jobKey(batchSchdul.getBatchSchdulId()));
- // 스케줄러에 추가하기
- sched.scheduleJob(jobDetail, trigger);
- } catch (SchedulerException e) {
- // SchedulerException 이 발생하면 로그를 출력하고 다음 배치작업으로 넘어간다.
- // 트리거의 실행시각이 현재 시각보다 이전이면 SchedulerException이 발생한다.
- LOGGER.error("스케줄러에 배치작업갱신할때 에러가 발생했습니다. 배치스케줄ID : {}, 배치작업ID : {}", batchSchdul.getBatchSchdulId(), batchSchdul.getBatchOpertId());
- LOGGER.error("에러내용 : {}", e.getMessage());
- LOGGER.debug(e.getMessage(), e);
- }
- }
-
- /**
- * 배치스케줄러에 batchSchdul 파라미터를 이용하여 Job , Trigger를 삭제한다.
- *
- * @param batchSchdul 배치스케줄러에 삭제할 스케줄정보
- * @exception Exception Exception
- */
- public void deleteBatchSchdul(XitBatchScheduleMngVO batchSchdul) throws Exception {
-
- try {
- // 스케줄러에서 기존Job, Trigger 삭제하기
- LOGGER.debug("배치스케줄을 삭제합니다. 배치스케줄ID : {}", batchSchdul.getBatchSchdulId());
- sched.deleteJob(JobKey.jobKey(batchSchdul.getBatchSchdulId()));
- } catch (SchedulerException e) {
- // SchedulerException 이 발생하면 로그를 출력하고 다음 배치작업으로 넘어간다.
- // 트리거의 실행시각이 현재 시각보다 이전이면 SchedulerException이 발생한다.
- LOGGER.error("스케줄러에 배치작업을 삭제할때 에러가 발생했습니다. 배치스케줄ID : {}, 배치작업ID : ", batchSchdul.getBatchSchdulId(), batchSchdul.getBatchOpertId());
- LOGGER.error("에러내용 : {}", e.getMessage());
- LOGGER.debug(e.getMessage(), e);
- }
- }
-
- /**
- * 클래스 초기화메소드.
- * 배치스케줄테이블을 읽어서 Quartz 스케줄러를 초기화한다.
- *
- */
- @SuppressWarnings("unchecked")
- public void init() throws Exception {
- // 모니터링 대상 정보 읽어들이기~~~
- List targetList = null;
- XitBatchScheduleMngSearchVO searchVO = new XitBatchScheduleMngSearchVO();
- // 모니터링 대상 검색 조건 초기화
- searchVO.setPageIndex(1);
- searchVO.setFirstIndex(0);
- searchVO.setRecordCountPerPage(RECORD_COUNT_PER_PAGE);
- targetList = (List) xitBatchScheduleMngService.findList(searchVO);
- LOGGER.debug("조회조건 {}", searchVO);
- LOGGER.debug("Result 건수 : {}", targetList.size());
-
- // 스케줄러 생성하기
- SchedulerFactory schedFact = new org.quartz.impl.StdSchedulerFactory();
- sched = schedFact.getScheduler();
-
- // Set up the listener
- BatchJobListener listener = new BatchJobListener();
-
- listener.setXitBatchScheduleMngService(xitBatchScheduleMngService);
- listener.setIdgenService(idgenService);
-
- //sched.addGlobalJobListener(listener);
- sched.getListenerManager().addJobListener(listener);
-
- // 스케줄러에 Job, Trigger 등록하기
- XitBatchScheduleMngVO target = null;
- for (int i = 0; i < targetList.size(); i++) {
- target = targetList.get(i);
- LOGGER.debug("Data : {}", target);
-
- insertBatchSchdul(target);
- }
-
- sched.start();
- }
-
- /**
- * 클래스 destroy메소드.
- * Quartz 스케줄러를 shutdown한다.
- *
- */
- public void destroy() throws Exception {
- sched.shutdown();
- }
-
- /**
- * 배치스케줄 서비스 리턴
- * @return the egovBatchSchdulService
- */
- public XitBatchScheduleMngService getXitBatchScheduleMngService() {
- return xitBatchScheduleMngService;
- }
-
- /**
- * 배치스케줄 서비스 저장.
- * @param egovBatchSchdulService the egovBatchSchdulService to set
- */
- public void setXitBatchScheduleMngService(XitBatchScheduleMngService egovBatchSchdulService) {
- this.xitBatchScheduleMngService = egovBatchSchdulService;
- }
-
- public XitBatchRegMngService getXitBatchRegMngService() {
- return xitBatchRegMngService;
- }
-
- public void setXitBatchRegMngService(XitBatchRegMngService xitBatchRegMngService) {
- this.xitBatchRegMngService = xitBatchRegMngService;
- }
-
- /**
- * 배치결과ID 생성서비스 리턴
- * @return the idgenService
- */
- public EgovIdGnrService getIdgenService() {
- return idgenService;
- }
-
- /**
- * 배치결과ID 생성서비스 저장.
- * @param idgenService the idgenService to set
- */
- public void setIdgenService(EgovIdGnrService idgenService) {
- this.idgenService = idgenService;
- }
-
- @SuppressWarnings("rawtypes")
- private Class getJobClass(String batchOpertId) {
- XitBatchRegMngVO vo = new XitBatchRegMngVO();
- vo.setBatchOpertId(batchOpertId);
- vo = xitBatchRegMngService.findView(vo);
-
- switch (BatchOpertSe.valueOf(vo.getBatchOpertSe())) {
- case prm:
- return BatchMethodExecuteJob.class;
- case mtd:
- return BatchMethodExecuteJob.class;
- default:
- throw new RuntimeException(String.format("유효하지 않은 코드구분(%s) 입니다.", vo.getBatchOpertSe()));
- }
-
- }
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/BatchShellScriptJob.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/BatchShellScriptJob.java
deleted file mode 100644
index 8afdaa78..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/BatchShellScriptJob.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.service;
-
-import org.quartz.Job;
-import org.quartz.JobDataMap;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-
-/**
- * 배치쉘스크립트를 실행하는 Quartz Job 클래스를 정의한다.
- *
- * @author 김진만
- * @see
- *
- * == 개정이력(Modification Information) ==
- *
- * 수정일 수정자 수정내용
- * ------- -------- ---------------------------
- * 2010.08.30 김진만 최초 생성
- *
- */
-
-public class BatchShellScriptJob implements Job {
-
- /** logger */
- private static final Logger LOGGER = LoggerFactory.getLogger(BatchShellScriptJob.class);
-
- /**
- * (non-Javadoc)
- * @see Job#execute(JobExecutionContext)
- */
- public void execute(JobExecutionContext jobContext) throws JobExecutionException {
-
- JobDataMap dataMap = jobContext.getJobDetail().getJobDataMap();
-
- LOGGER.debug("job[{}] Trigger이름 : ", jobContext.getJobDetail().getKey().getName(), jobContext.getTrigger().getKey().getName());
- LOGGER.debug("job[{}] BatchOpert이름 : ", jobContext.getJobDetail().getKey().getName(), dataMap.getString("batchOpertId"));
- LOGGER.debug("job[{}] BatchProgram이름 : ", jobContext.getJobDetail().getKey().getName(), dataMap.getString("batchProgrm"));
- LOGGER.debug("job[{}] Parameter이름 : ", jobContext.getJobDetail().getKey().getName(), dataMap.getString("paramtr"));
-
- int result = executeProgram(dataMap.getString("batchProgrm"), dataMap.getString("paramtr"));
-
- // jobContext에 결과값을 저장한다.
- jobContext.setResult(result);
- }
-
- /**
- * 시스템에서 특정 쉘프로그램을 실행한다.
- * @param batchProgrm 배치실행화일
- * @param paramtr 배치실행화일에 전달될 파라미터
- * @return 배치실행화일리턴값(integer)
- * @exception Exception
- */
- private int executeProgram(String batchProgrm, String paramtr) {
-
- int result = 0;
- try {
- Process p = null;
- String cmdStr = batchProgrm + " " + paramtr;
- p = Runtime.getRuntime().exec(cmdStr);
- p.waitFor();
- result = p.exitValue();
- LOGGER.debug("배치실행화일 - {} 실행완료, 결과값: {}", cmdStr, result);
-
- } catch (IOException e) {
- LOGGER.error("배치스크립트 실행 에러 : {}", e.getMessage());
- LOGGER.debug(e.getMessage(), e);
- } catch (InterruptedException e) {
- LOGGER.error("배치스크립트 실행 에러 : {}", e.getMessage());
- LOGGER.debug(e.getMessage(), e);
- }
-
- return result;
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/XitBatchRegMngService.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/XitBatchRegMngService.java
deleted file mode 100644
index a1cc6e6f..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/XitBatchRegMngService.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.service;
-
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchRegMngSearchVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchRegMngVO;
-
-import java.util.List;
-
-/**
- *
- * @업무그룹명: 배치작업관리 Service
- * @설명:
- * @최초작성일: 2020. 7. 13. 오후 5:03:22
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-public interface XitBatchRegMngService {
-
-
- /**
- * 메소드 설명: 배치작업관리 목록 조회
- * @param searchVO
- * @return List 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public List findList(XitBatchRegMngSearchVO searchVO);
-
- /**
- * 메소드 설명: 배치작업관리 목록 총건수 조회
- * @param searchVO
- * @return int 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public int findListTotCnt(XitBatchRegMngSearchVO searchVO);
-
- /**
- * 메소드 설명: 배치작업관리 상세정보 조회
- * @param vo
- * @return XitBatchRegMngVO 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public XitBatchRegMngVO findView(XitBatchRegMngVO vo);
-
- /**
- * 메소드 설명: 배치작업관리 등록
- * @param vo void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void addProc(XitBatchRegMngVO vo);
-
- /**
- * 메소드 설명: 배치작업관리 수정
- * @param vo void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void modifyProc(XitBatchRegMngVO vo);
-
- /**
- * 메소드 설명: 배치작업관리 삭제
- * @param vo void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void removeProc(XitBatchRegMngVO vo);
-
- /**
- * 메소드 설명: 배치작업관리 다건 삭제
- * @param ids void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void removesProc(String ids);
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/XitBatchResultMngService.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/XitBatchResultMngService.java
deleted file mode 100644
index b1da4dee..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/XitBatchResultMngService.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.service;
-
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchResultMngSearchVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchResultMngVO;
-
-import java.util.List;
-
-/**
- *
- * @업무그룹명: 배치결과관리 Service
- * @설명:
- * @최초작성일: 2020. 7. 13. 오후 5:04:26
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-public interface XitBatchResultMngService {
-
-
- /**
- * 메소드 설명: 배치결과관리 목록 조회
- * @param searchVO
- * @return List 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public List findList(XitBatchResultMngSearchVO searchVO);
-
- /**
- * 메소드 설명: 배치결과관리 목록 총건수 조회
- * @param searchVO
- * @return int 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public int findListTotCnt(XitBatchResultMngSearchVO searchVO);
-
- /**
- * 메소드 설명: 배치결과관리 상세정보 조회
- * @param vo
- * @return XitBatchResultMngVO 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public XitBatchResultMngVO findView(XitBatchResultMngVO vo);
-
- /**
- * 메소드 설명: 배치결과관리 등록
- * @param vo void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void addProc(XitBatchResultMngVO vo);
-
- /**
- * 메소드 설명: 배치결과관리 수정
- * @param vo void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void modifyProc(XitBatchResultMngVO vo);
-
- /**
- * 메소드 설명: 배치결과관리 삭제
- * @param vo void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void removeProc(XitBatchResultMngVO vo);
-
- /**
- * 메소드 설명: 배치결과관리 다건 삭제
- * @param ids void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void removesProc(String ids);
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/XitBatchScheduleMngService.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/XitBatchScheduleMngService.java
deleted file mode 100644
index db995a96..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/XitBatchScheduleMngService.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.service;
-
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchResultMngVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchScheduleMngSearchVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchScheduleMngVO;
-
-import java.util.List;
-
-/**
- *
- * @업무그룹명: 배치스케줄관리 Service
- * @설명:
- * @최초작성일: 2020. 7. 13. 오후 5:05:14
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-public interface XitBatchScheduleMngService {
-
-
- /**
- * 메소드 설명: 배치스케줄관리 목록 조회
- * @param searchVO
- * @return List 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public List findList(XitBatchScheduleMngSearchVO searchVO);
-
- /**
- * 메소드 설명: 배치스케줄관리 목록 총건수 조회
- * @param searchVO
- * @return int 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public int findListTotCnt(XitBatchScheduleMngSearchVO searchVO);
-
- /**
- * 메소드 설명: 배치스케줄관리 상세정보 조회
- * @param vo
- * @return XitBatchScheduleMngVO 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public XitBatchScheduleMngVO findView(XitBatchScheduleMngVO vo);
-
- /**
- * 메소드 설명: 배치스케줄관리 등록
- * @param vo void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void addProc(XitBatchScheduleMngVO vo);
-
- /**
- * 메소드 설명: 배치스케줄관리 수정
- * @param vo void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void modifyProc(XitBatchScheduleMngVO vo);
-
- /**
- * 메소드 설명: 배치스케줄관리 삭제
- * @param vo void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void removeProc(XitBatchScheduleMngVO vo);
-
- /**
- * 메소드 설명: 배치스케줄관리 다건 삭제
- * @param ids void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void removesProc(String ids);
-
-
-
-
-
- /**
- * 메소드 설명: 배치결과 등록
- * @param ids void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void addBatchResult(XitBatchResultMngVO vo);
- /**
- * 메소드 설명: 배치결과 수정
- * @param ids void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- public void modifyBatchResult(XitBatchResultMngVO vo);
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/bean/XitBatchRegMngServiceBean.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/bean/XitBatchRegMngServiceBean.java
deleted file mode 100644
index a7f75c46..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/bean/XitBatchRegMngServiceBean.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.service.bean;
-
-import cokr.xit.foundation.component.AbstractServiceBean;
-import cokr.xit.fims.framework.biz.cmm.XitComtnbatchopertVO;
-import cokr.xit.fims.framework.biz.cmm.service.XitFrameCrudService;
-import cokr.xit.fims.framework.biz.mng.batch.dao.XitBatchRegMngMapper;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchRegMngSearchVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchRegMngVO;
-import cokr.xit.fims.framework.biz.mng.batch.service.XitBatchRegMngService;
-import cokr.xit.fims.framework.core.message.XitMessageSource;
-import org.egovframe.rte.fdl.cmmn.exception.FdlException;
-import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.sql.SQLException;
-import java.util.List;
-
-@Service
-public class XitBatchRegMngServiceBean extends AbstractServiceBean implements XitBatchRegMngService {
-
- @Resource
- private XitBatchRegMngMapper xitBatchRegMngMapper;
- @Resource
- private XitFrameCrudService xitFrameCrudService;
- @Autowired
- @Qualifier("xitBatchOpertIdGnrService")
- private EgovIdGnrService xitBatchOpertIdGnrService;
- @Resource
- private XitMessageSource xitMessageSource;
-
- @Override
- public List findList(XitBatchRegMngSearchVO searchVO) {
- List result = null;
- try {
- result = xitBatchRegMngMapper.findList(searchVO);
- } catch (SQLException e) {
- throw new RuntimeException("배치작업관리 목록 조회 FAIL::", e);
- }
- return result;
- }
-
- @Override
- public int findListTotCnt(XitBatchRegMngSearchVO searchVO) {
- int result = 0;
- try {
- result = xitBatchRegMngMapper.findListTotCnt(searchVO);
- } catch (SQLException e) {
- throw new RuntimeException("배치작업관리 목록 총건수 조회 FAIL::", e);
- }
- return result;
- }
-
- @Override
- public XitBatchRegMngVO findView(XitBatchRegMngVO vo) {
- XitBatchRegMngVO result = null;
- try {
- result = xitBatchRegMngMapper.findView(vo);
- } catch (SQLException e) {
- throw new RuntimeException("배치작업관리 상세정보 조회 FAIL::", e);
- }
- return result;
- }
-
- @Override
- public void addProc(XitBatchRegMngVO vo) {
- /**
- * 필수값 설정
- */
- try {
- vo.setBatchOpertId(xitBatchOpertIdGnrService.getNextStringId());
- } catch (FdlException e) {
- throw new RuntimeException(String.format("%s %s", xitMessageSource.getMessage("fail.common.insert"), e.getMessage()));
- }
- XitComtnbatchopertVO crudVO = convertToCrudVO(vo);
- crudVO.setUseYn("Y");
- crudVO.setRgtr (vo.getRgtr());
- crudVO.setMdfr (vo.getMdfr());
-
-
- /**
- * 처리
- */
- xitFrameCrudService.addComtnbatchopert(crudVO);
- }
-
- @Override
- public void modifyProc(XitBatchRegMngVO vo) {
- /**
- * 필수값 설정
- */
- XitComtnbatchopertVO crudVO = convertToCrudVO(vo);
- crudVO.setMdfr (vo.getMdfr());
-
-
- /**
- * 처리
- */
- xitFrameCrudService.modifyComtnbatchopert(crudVO);
-
- }
-
- @Override
- public void removeProc(XitBatchRegMngVO vo) {
- /**
- * 필수값 설정
- */
- XitComtnbatchopertVO crudVO = convertToCrudVO(vo);
- crudVO.setMdfr (vo.getMdfr());
- crudVO.setUseYn("N");
-
- /**
- * 처리
- */
- xitFrameCrudService.modifyComtnbatchopert(crudVO);
- }
-
- @Override
- public void removesProc(String ids) {
- /**
- * 처리
- */
- String [] primaryKey = ids.split(";");
- for(int i=0; i
- * 메소드 설명: 메뉴VO를 CRUD Service의 VO로 변환 한다.
- *
- *
- * @return XitComtnbatchopertVO 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- private XitComtnbatchopertVO convertToCrudVO(XitBatchRegMngVO vo) {
- XitComtnbatchopertVO crudVO = new XitComtnbatchopertVO();
- crudVO.setBatchOpertId (vo.getBatchOpertId()); //배치작업ID
- crudVO.setBatchOpertNm (vo.getBatchOpertNm()); //배치작업명
- crudVO.setBatchOpertSe (vo.getBatchOpertSe()); //배치작업유형
- crudVO.setBatchProgrm (vo.getBatchProgrm()); //배치프로그램
- crudVO.setParamtr (vo.getParamtr()); //파라미터
-// crudVO.setUseYn (vo.getUseYn()); //사용여부
-// crudVO.setRgtr (vo.getRgtr());//최초등록자ID
-// crudVO.setReg_dt(); //최초등록시점
-// crudVO.setMdfr (vo.getMdfr()); //최종수정자ID
-// crudVO.setMdfcn_dt (); //최종수정시점
-
- return crudVO;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/bean/XitBatchResultMngServiceBean.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/bean/XitBatchResultMngServiceBean.java
deleted file mode 100644
index b9512f78..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/bean/XitBatchResultMngServiceBean.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.service.bean;
-
-import cokr.xit.foundation.component.AbstractServiceBean;
-import cokr.xit.fims.framework.biz.cmm.XitComtnbatchresultVO;
-import cokr.xit.fims.framework.biz.cmm.service.XitFrameCrudService;
-import cokr.xit.fims.framework.biz.mng.batch.dao.XitBatchResultMngMapper;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchResultMngSearchVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchResultMngVO;
-import cokr.xit.fims.framework.biz.mng.batch.service.XitBatchResultMngService;
-import cokr.xit.fims.framework.core.message.XitMessageSource;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.sql.SQLException;
-import java.util.List;
-
-@Service
-public class XitBatchResultMngServiceBean extends AbstractServiceBean implements XitBatchResultMngService{
-
- @Resource
- private XitBatchResultMngMapper xitBatchResultMngMapper;
- @Resource
- private XitFrameCrudService xitFrameCrudService;
- @Resource
- private XitMessageSource xitMessageSource;
-
- @Override
- public List findList(XitBatchResultMngSearchVO searchVO) {
- List result = null;
- try {
- result = xitBatchResultMngMapper.findList(searchVO);
- } catch (SQLException e) {
- throw new RuntimeException("배치결과관리 목록 조회 FAIL::", e);
- }
- return result;
- }
-
- @Override
- public int findListTotCnt(XitBatchResultMngSearchVO searchVO) {
- int result = 0;
- try {
- result = xitBatchResultMngMapper.findListTotCnt(searchVO);
- } catch (SQLException e) {
- throw new RuntimeException("배치결과관리 목록 총건수 조회 FAIL::", e);
- }
- return result;
- }
-
- @Override
- public XitBatchResultMngVO findView(XitBatchResultMngVO vo) {
- XitBatchResultMngVO result = null;
- try {
- result = xitBatchResultMngMapper.findView(vo);
- } catch (SQLException e) {
- throw new RuntimeException("배치결과관리 상세정보 조회 FAIL::", e);
- }
- return result;
- }
-
- @Override
- public void addProc(XitBatchResultMngVO vo) {
- /**
- * 필수값 설정
- */
- XitComtnbatchresultVO crudVO = convertToCrudVO(vo);
- crudVO.setRgtr (vo.getRgtr());
- crudVO.setMdfr (vo.getMdfr());
-
-
- /**
- * 처리
- */
- xitFrameCrudService.addComtnbatchresult(crudVO);
- }
-
- @Override
- public void modifyProc(XitBatchResultMngVO vo) {
- /**
- * 필수값 설정
- */
- XitComtnbatchresultVO crudVO = convertToCrudVO(vo);
- crudVO.setMdfr (vo.getMdfr());
-
-
- /**
- * 처리
- */
- xitFrameCrudService.modifyComtnbatchresult(crudVO);
-
- }
-
- @Override
- public void removeProc(XitBatchResultMngVO vo) {
- /**
- * 필수값 설정
- */
- XitComtnbatchresultVO crudVO = convertToCrudVO(vo);
-
- /**
- * 처리
- */
- xitFrameCrudService.removeComtnbatchresult(crudVO);
- }
-
- @Override
- public void removesProc(String ids) {
- /**
- * 처리
- */
- String [] primaryKey = ids.split(";");
- for(int i=0; i
- * 메소드 설명: 메뉴VO를 CRUD Service의 VO로 변환 한다.
- *
- *
- * @return XitComtnbatchresultVO 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- private XitComtnbatchresultVO convertToCrudVO(XitBatchResultMngVO vo) {
- XitComtnbatchresultVO crudVO = new XitComtnbatchresultVO();
- crudVO.setBatchResultId (vo.getBatchResultId()); //배치결과ID
- crudVO.setBatchSchdulId (vo.getBatchSchdulId()); //배치일정ID
- crudVO.setBatchOpertId (vo.getBatchOpertId()); //배치작업ID
- crudVO.setParamtr (vo.getParamtr()); //파라미터
- crudVO.setSttus (vo.getSttus()); //상태
- crudVO.setErrorInfo (vo.getErrorInfo()); //오류정보
- crudVO.setExecutBeginTm (vo.getExecutBeginTime()); //실행시작시각
- crudVO.setExecutEndTm (vo.getExecutEndTime()); //실행종료시각
-// crudVO.setMdfcn_dt (vo.get); //최종수정시점
-// crudVO.setMdfr (vo.get); //최종수정자ID
-// crudVO.setReg_dt(vo.get); //최초등록시점
-// crudVO.setRgtr (vo.get); //최초등록ID
-
- return crudVO;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/bean/XitBatchScheduleMngServiceBean.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/bean/XitBatchScheduleMngServiceBean.java
deleted file mode 100644
index 48f79a27..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/service/bean/XitBatchScheduleMngServiceBean.java
+++ /dev/null
@@ -1,228 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.service.bean;
-
-import cokr.xit.foundation.component.AbstractServiceBean;
-import cokr.xit.fims.framework.biz.cmm.XitComtnbatchschdulVO;
-import cokr.xit.fims.framework.biz.cmm.XitComtnbatchschduldfkVO;
-import cokr.xit.fims.framework.biz.cmm.service.XitFrameCrudService;
-import cokr.xit.fims.framework.biz.mng.batch.dao.XitBatchScheduleMngMapper;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchResultMngVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchScheduleDayOfWeekVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchScheduleMngSearchVO;
-import cokr.xit.fims.framework.biz.mng.batch.XitBatchScheduleMngVO;
-import cokr.xit.fims.framework.biz.mng.batch.service.XitBatchResultMngService;
-import cokr.xit.fims.framework.biz.mng.batch.service.XitBatchScheduleMngService;
-import cokr.xit.fims.framework.core.message.XitMessageSource;
-import org.egovframe.rte.fdl.cmmn.exception.FdlException;
-import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.sql.SQLException;
-import java.util.List;
-
-@Service
-public class XitBatchScheduleMngServiceBean extends AbstractServiceBean implements XitBatchScheduleMngService {
-
- @Resource
- private XitBatchScheduleMngMapper xitBatchScheduleMngMapper;
- @Resource
- private XitFrameCrudService xitFrameCrudService;
- @Autowired
- @Qualifier("xitBatchSchdulIdGnrService")
- private EgovIdGnrService xitBatchSchdulIdGnrService;
- @Resource
- private XitMessageSource xitMessageSource;
- @Resource
- private XitBatchResultMngService xitBatchResultMngService;
-
- @Override
- public List findList(XitBatchScheduleMngSearchVO searchVO) {
- List result = null;
- try {
- result = xitBatchScheduleMngMapper.findList(searchVO);
- } catch (SQLException e) {
- throw new RuntimeException("배치스케줄관리 목록 조회 FAIL::", e);
- }
- for (int i = 0; i < result.size(); i++) {
- XitBatchScheduleMngVO vo = result.get(i);
- // 스케줄요일정보를 가져온다.
- List dfkSeList = xitBatchScheduleMngMapper.findsBatchSchedule(vo);
- String [] dfkSes = new String [dfkSeList.size()];
- for (int j = 0; j < dfkSeList.size(); j++) {
- dfkSes[j] = (String) dfkSeList.get(j).getExecutSchdulDfkSe();
- }
- vo.setExecutSchdulDfkSes(dfkSes);
- // 화면표시용 실행스케줄 속성을 만든다.
- vo.makeExecutSchdul(dfkSeList);
- }
-
-
- return result;
- }
-
- @Override
- public int findListTotCnt(XitBatchScheduleMngSearchVO searchVO) {
- int result = 0;
- try {
- result = xitBatchScheduleMngMapper.findListTotCnt(searchVO);
- } catch (SQLException e) {
- throw new RuntimeException("배치스케줄관리 목록 총건수 조회 FAIL::", e);
- }
- return result;
- }
-
- @Override
- public XitBatchScheduleMngVO findView(XitBatchScheduleMngVO vo) {
- XitBatchScheduleMngVO result = null;
- try {
- result = xitBatchScheduleMngMapper.findView(vo);
-
- // 스케줄요일정보를 가져온다.
- List dfkSeList = xitBatchScheduleMngMapper.findsBatchSchedule(result);
- String [] dfkSes = new String [dfkSeList.size()];
- for (int j = 0; j < dfkSeList.size(); j++) {
- dfkSes[j] = (String) dfkSeList.get(j).getExecutSchdulDfkSe();
- }
- result.setExecutSchdulDfkSes(dfkSes);
- // 화면표시용 실행스케줄 속성을 만든다.
- result.makeExecutSchdul(dfkSeList);
- } catch (SQLException e) {
- throw new RuntimeException("배치스케줄관리 상세정보 조회 FAIL::", e);
- }
- return result;
- }
-
- @Override
- public void addProc(XitBatchScheduleMngVO vo) {
- /**
- * 필수값 설정
- */
- try {
- vo.setBatchSchdulId(xitBatchSchdulIdGnrService.getNextStringId());
- } catch (FdlException e) {
- throw new RuntimeException(String.format("%s %s", xitMessageSource.getMessage("fail.common.insert"), e.getMessage()));
- }
- XitComtnbatchschdulVO crudVO = convertToCrudVO(vo);
- crudVO.setRgtr (vo.getRgtr());
- crudVO.setMdfr (vo.getMdfr());
-
-
- /**
- * 처리
- */
- //master 테이블 insert
- xitFrameCrudService.addComtnbatchschdul(crudVO);
- //slave 테이블 insert
- if (vo.getExecutSchdulDfkSes() != null && vo.getExecutSchdulDfkSes().length != 0) {
- String batchSchdulId = vo.getBatchSchdulId();
- String [] dfkSes = vo.getExecutSchdulDfkSes();
- for (int i = 0; i < dfkSes.length; i++) {
- XitComtnbatchschduldfkVO slaveVO = new XitComtnbatchschduldfkVO();
- slaveVO.setBatchSchdulId(batchSchdulId);
- slaveVO.setExecutSchdulDfkSe(dfkSes[i]);
- xitFrameCrudService.addComtnbatchschduldfk(slaveVO);
- }
- }
- }
-
- @Override
- public void modifyProc(XitBatchScheduleMngVO vo) {
- /**
- * 필수값 설정
- */
- XitComtnbatchschdulVO crudVO = convertToCrudVO(vo);
- crudVO.setMdfr (vo.getMdfr());
-
-
- /**
- * 처리
- */
- //master 테이블 update
- xitFrameCrudService.modifyComtnbatchschdul(crudVO);
- // slave 테이블 삭제
- XitComtnbatchschduldfkVO slaveVO = new XitComtnbatchschduldfkVO();
- slaveVO.setBatchSchdulId(vo.getBatchSchdulId());
- xitFrameCrudService.removesComtnbatchschduldfk(slaveVO);
- // slave 테이블 인서트
- if (vo.getExecutSchdulDfkSes() != null && vo.getExecutSchdulDfkSes().length != 0) {
- String batchSchdulId = vo.getBatchSchdulId();
- String [] dfkSes = vo.getExecutSchdulDfkSes();
- for (int i = 0; i < dfkSes.length; i++) {
- slaveVO = new XitComtnbatchschduldfkVO();
- slaveVO.setBatchSchdulId(batchSchdulId);
- slaveVO.setExecutSchdulDfkSe(dfkSes[i]);
- xitFrameCrudService.addComtnbatchschduldfk(slaveVO);
- }
- }
-
- }
-
- @Override
- public void removeProc(XitBatchScheduleMngVO vo) {
- /**
- * 필수값 설정
- */
- XitComtnbatchschdulVO crudVO = convertToCrudVO(vo);
-
- /**
- * 처리
- */
- // slave 테이블 삭제
- XitComtnbatchschduldfkVO slaveVO = new XitComtnbatchschduldfkVO();
- slaveVO.setBatchSchdulId(vo.getBatchSchdulId());
- xitFrameCrudService.removesComtnbatchschduldfk(slaveVO);
- // master 테이블 delete
- xitFrameCrudService.removesComtnbatchschdul(crudVO);
- }
-
- @Override
- public void removesProc(String ids) {
- /**
- * 처리
- */
- String [] primaryKey = ids.split(";");
- for(int i=0; i
- * 메소드 설명: 메뉴VO를 CRUD Service의 VO로 변환 한다.
- *
- *
- * @return XitComtnbatchschdulVO 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 7. 13.
- */
- private XitComtnbatchschdulVO convertToCrudVO(XitBatchScheduleMngVO vo) {
- XitComtnbatchschdulVO crudVO = new XitComtnbatchschdulVO();
- crudVO.setBatchSchdulId (vo.getBatchSchdulId()); //배치일정ID
- crudVO.setBatchOpertId (vo.getBatchOpertId()); //배치작업ID
- crudVO.setExecutCycle (vo.getExecutCycle()); //실행주기
- crudVO.setExecutSchdulDe (vo.getExecutSchdulDe()); //실행일정 일
- crudVO.setExecutSchdulHour (vo.getExecutSchdulHour()); //실행일정 시
- crudVO.setExecutSchdulMnt (vo.getExecutSchdulMnt()); //실행일정 분
- crudVO.setExecutSchdulSecnd(vo.getExecutSchdulSecnd()); //실행일정 초
-// crudVO.setRgtr (vo.getRgtr()); //최초등록자ID
-// crudVO.setReg_dt (vo.get); //최초등록시점
-// crudVO.setMdfr (vo.getMdfr()); //최종수정자ID
-// crudVO.setMdfcn_dt (vo.get); //최종수정시점
-
- return crudVO;
- }
-
- @Override
- public void addBatchResult(XitBatchResultMngVO vo) {
- xitBatchResultMngService.addProc(vo);
- }
-
- @Override
- public void modifyBatchResult(XitBatchResultMngVO vo) {
- xitBatchResultMngService.modifyProc(vo);
- }
-}
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/validator/BatchOpertSe.java b/src/main/java/cokr/xit/fims/framework/biz/mng/batch/validator/BatchOpertSe.java
deleted file mode 100644
index b2f77e2d..00000000
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/batch/validator/BatchOpertSe.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package cokr.xit.fims.framework.biz.mng.batch.validator;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- *
- *
- * - 업무 그룹명: 배치운영구분
- * - 설 명: 배치프로그램 종류를 기술 한다.
- * - 작성일: 2021. 10. 7. 오후 5:16:43
- *
- *
- * @author 박민규
- *
- */
-public enum BatchOpertSe {
-
- prm("프로그램")
- ,mtd("메소드")
- ;
- private String code;
- private String codeVal;
- BatchOpertSe(String codeVal){
- this.code = this.name();
- this.codeVal = codeVal;
- }
- public String getCode() {
- return this.code;
- }
- public String getCodeVal() {
- return this.codeVal;
- }
- public static List