<%@ page import="java.sql.*" contentType="text/html;charset=UTF-8"%> <%! /** * @File Name : traniomap_depth_demo.jsp * @Description : xFrame TranIOMap Depth 검색 서비스 JSP * @Modification Information * @ * @ 수정일 수정내용 * @ --------- --------- ------------------------------- * @ 2018.09.03 최초생성 * @ 2020.10.06 수정배포 * * @author 소프트베이스 솔루션 개발팀 * @since 2018. 09. 03 * @version 1.0 * @see * * Copyright (C) by Softbase All right reserved. */ %> <%! //Dev@Studio에서 데이터 처리 시 사용하는 구분자 final String FIELD_DEL = String.valueOf((char)0x01); // 필드 final String RECORD_DEL = String.valueOf((char)0x02); // 레코드 final String STARTEND_DEL = String.valueOf((char)0x03); // 데이터 시작, 끝 // 결과 리턴 코드 final String RESULT_SUCCESS = "1"; final String RESULT_FAIL = "0"; public String getDepthOneInfo(String id, String desc) { return id + FIELD_DEL + desc + FIELD_DEL + RECORD_DEL; } public String getDepthTwoInfo(String id, String desc) { return id + FIELD_DEL + desc + FIELD_DEL + RECORD_DEL; } public String getDepthThreeInfo(String id, String desc) { return id + FIELD_DEL + desc + FIELD_DEL + RECORD_DEL; } %> <% // 검색 조건 데이터 String depthType = request.getParameter("depth_type") == null ? "" : request.getParameter("depth_type"); // value: "1", "2", "3" String depthOneValue = request.getParameter("depth_one") == null ? "" : request.getParameter("depth_one"); String depthTwoValue = request.getParameter("depth_two") == null ? "" : request.getParameter("depth_two"); try { StringBuffer resultStr = new StringBuffer(); boolean bReturn = false; // 검색 결과 처리 시작 bReturn = true; // DEMO에서는 성공으로 처리한다. // 데이터 시작 구분값 설정 resultStr.append(STARTEND_DEL); // 성공 코드 설정 resultStr.append(RESULT_SUCCESS); // 데이터 설정 if(depthType.equalsIgnoreCase("1")) { resultStr.append(getDepthOneInfo("CA", "콜센터상담[CA])")); resultStr.append(getDepthOneInfo("MB", "경영관리시스템(IFRS)[MB]")); } else if(depthType.equalsIgnoreCase("2")) { if(depthOneValue.equalsIgnoreCase("CA")) { resultStr.append(getDepthTwoInfo("CAH", "콜센터폰뱅킹[CAH]")); resultStr.append(getDepthTwoInfo("CAN", "스마트브랜치[CAN]")); } else if(depthOneValue.equalsIgnoreCase("MB")) { resultStr.append(getDepthTwoInfo("MBL", "IB통합관리[MBL]")); resultStr.append(getDepthTwoInfo("MBM", "IB자산관리[MBM]")); } else { bReturn = false; } } else if(depthType.equalsIgnoreCase("3")) { if(depthTwoValue.equalsIgnoreCase("CAH")) { resultStr.append(getDepthThreeInfo("FDTERCAH12001S0_I", "고객기본정보 조회 입력 데이터")); resultStr.append(getDepthThreeInfo("FDTERCAH12001S0_CAH12001000", "고객기본정보 화면 출력 데이터")); } else if(depthTwoValue.equalsIgnoreCase("CAN")) { bReturn = false; } else if(depthTwoValue.equalsIgnoreCase("MBL")) { resultStr.append(getDepthThreeInfo("FDTERMBL13001S0_I", "고객이체정보 조회 입력 데이터")); resultStr.append(getDepthThreeInfo("FDTERMBL13001S0_MBL12001000", "고객이체정보 화면 출력 데이터")); resultStr.append(getDepthThreeInfo("FDTERMBL13001S0_MBL12001002", "고객이체정보 전표 출력")); } else if(depthTwoValue.equalsIgnoreCase("MBM")) { bReturn = false; } } else { // depthType이 1,2,3 이 아닐경우 에러 처리 out.print(STARTEND_DEL + RESULT_FAIL + "INVALID DEPTH_TYPE" + FIELD_DEL + RECORD_DEL + STARTEND_DEL); return; } // 데이터 종료 구분값 설정 resultStr.append(STARTEND_DEL); // 리턴 데이터 전송 if(bReturn == true) { out.print(resultStr); } else { // 검색 결과 없을경우 처리 out.print(STARTEND_DEL + RESULT_FAIL + "조회 데이터가 없습니다" + FIELD_DEL + RECORD_DEL + STARTEND_DEL); } } catch(Exception e) { // 에러 발생 시 처리 out.println(STARTEND_DEL + RESULT_FAIL + e.getMessage() + FIELD_DEL + RECORD_DEL + STARTEND_DEL); } %>