통합조회 수정

main
이범준 1 year ago
parent 11c996c45d
commit dca160048a

@ -73,6 +73,7 @@ public class Sprt01Controller extends ApplicationController {
mav.addObject("fastSearch", "null"); mav.addObject("fastSearch", "null");
} }
mav.addObject("module", "type='module'");
return mav; return mav;
} }
@ -96,7 +97,11 @@ public class Sprt01Controller extends ApplicationController {
List<DataObject> list = null; List<DataObject> list = null;
list = sprt01Service.getIntegrationDataList(query); list = sprt01Service.getIntegrationDataList(query);
mav = setCollectionInfo(mav, list, "integrationData"); List<DataObject> upList = list.stream().filter(item -> item.string("RCVMT_YN").equals("N")).toList();
List<DataObject> downList = list.stream().filter(item -> item.string("RCVMT_YN").equals("Y")).toList();
mav.addObject("upList", upList);
mav.addObject("downList", downList);
return mav; return mav;
} }

@ -1,4 +1,5 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="prefixName" scope="request">통합조회</c:set> <c:set var="prefixName" scope="request">통합조회</c:set>
@ -11,13 +12,16 @@
</div> </div>
</div> </div>
<jsp:include page="/WEB-INF/jsp/include/bottom.jsp" /> <jsp:include page="/WEB-INF/jsp/include/bottom.jsp" />
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
<jsp:include page="/WEB-INF/jsp/fims/sprt/sprt01050-info.jsp" /> <jsp:include page="/WEB-INF/jsp/fims/sprt/sprt01050-info.jsp" />
<jsp:include page="/WEB-INF/jsp/fims/sprt/sprt01060-info.jsp" /> <jsp:include page="/WEB-INF/jsp/fims/sprt/sprt01060-info.jsp" />
<script> <script type="module"
src="<c:url value='/resources/js/fims/sprt/integrationSearch.js?${ver}'/>"></script>
<script ${module}>
import { IntegrationSearchControl } from "<c:url value='/resources/js/fims/sprt/integrationSearch.js?${ver}'/>";
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -29,16 +33,15 @@ var FIM054 = new CommonCodes(${FIM054}, true);
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
**************************************************************************/ **************************************************************************/
var integrationSearchControl = new DatasetControl({ var integrationSearchControl = new IntegrationSearchControl({
prefix : "integrationSearch", prefixName : "통합조회" prefix : "integrationSearch", prefixName : "통합조회"
, infoSize : "lg" , infoSize : "lg"
, appendData : false , appendData : false
, keymapper : info => info ? info.CRDN_ID : "" , keymapper : data => data ? data.CRDN_ID : ""
, dataGetter : obj => obj.integrationDataList , dataGetter : obj => Array.isArray(obj) ? obj : []
, urls : { , urls : {
load : wctx.url("/sprt/sprt01/010/list.do"), // 검색 load : wctx.url("/sprt/sprt01/010/list.do") // 검색
getInfo : wctx.url("/sprt/sprt02/010/main.do") // 개별총정보 }
}
, formats : { , formats : {
LEVY_EXCL_YMD : dateFormat LEVY_EXCL_YMD : dateFormat
, CRDN_YMD_TM : datetimeFormat , CRDN_YMD_TM : datetimeFormat
@ -54,129 +57,96 @@ var integrationSearchControl = new DatasetControl({
* DatasetControl 이벤트 * DatasetControl 이벤트
**************************************************************************/ **************************************************************************/
// Dataset 변경 이벤트 // Dataset 변경 이벤트
integrationSearchControl.onDatasetChange = (obj) => { integrationSearchControl.updataset.onDatasetChange = (obj) => {
var upActiveTab = $("#upGridTabs--${pageName}").find("button.active").text().trim(); var upActiveTab = $("#upGridTabs--${pageName}").find("button.active").text().trim();
integrationSearch.renderList("up", upActiveTab); integrationSearch.renderList("up", upActiveTab);
};
integrationSearchControl.downdataset.onDatasetChange = (obj) => {
var downActiveTab = $("#downGridTabs--${pageName}").find("button.active").text().trim(); var downActiveTab = $("#downGridTabs--${pageName}").find("button.active").text().trim();
integrationSearch.renderList("down", downActiveTab); integrationSearch.renderList("down", downActiveTab);
}; };
// 현재 선택 자료 변경 이벤트 // 현재 선택 자료 변경 이벤트
integrationSearchControl.onCurrentChange = (item) => { integrationSearchControl.updataset.onCurrentChange = (item) => {
if (!item) return; if (!item) return;
var key = item.data.CRDN_ID; var key = item.data.CRDN_ID;
$("#upTbody--${pageName}").setCurrentRow(key); $("#upTbody--${pageName}").setCurrentRow(key);
};
integrationSearchControl.downdataset.onCurrentChange = (item) => {
if (!item) return;
var key = item.data.CRDN_ID;
$("#downTbody--${pageName}").setCurrentRow(key); $("#downTbody--${pageName}").setCurrentRow(key);
}; };
// 선택(체크) 변경 이벤트 // 선택(체크) 변경 이벤트
integrationSearchControl.onSelectionChange = selected => { integrationSearchControl.updataset.onSelectionChange = (selected) => {
var ds = integrationSearchControl.dataset; var ds = integrationSearchControl.updataset;
var keys = selected.map(e => ds.getKey(e)); var keys = selected.map(e => ds.getKey(e));
$("#upTbody--${pageName},#downTbody--${pageName}").find("input[type='checkbox']").each(function() { $("#upTbody--${pageName}").find("input[type='checkbox']").each(function() {
var checkbox = $(this); var checkbox = $(this);
checkbox.prop("checked", keys.includes(checkbox.val())); checkbox.prop("checked", keys.includes(checkbox.val()));
}); });
}; };
// 개별총정보 dialog integrationSearchControl.downdataset.onSelectionChange = (selected) => {
integrationSearchControl.getInfo = (crdnId) => {
if (crdnId == undefined || crdnId == null || crdnId == "") {
return;
}
var params = { var ds = integrationSearchControl.downdataset;
callControlName : "integrationSearchControl" var keys = selected.map(e => ds.getKey(e));
, crdnId : crdnId
}
ajax.get({ $("#downTbody--${pageName}").find("input[type='checkbox']").each(function() {
url : integrationSearchControl.urls.getInfo var checkbox = $(this);
, data : params || {} checkbox.prop("checked", keys.includes(checkbox.val()));
, success : resp => {
dialog.open({
id : "totalInfoMainDialog"
, title : "개별총정보"
, content : resp
, size : "xxl"
, init : () => { }
, onClose : () => { }
});
}
}); });
}
// 삭제 callback
integrationSearchControl.onRemove = (selected, resp) => {
var btnTitle = $("#btnRemove--${pageName}").attr("title");
var showMessage = resp.retMessage.replace(/[S]|[F]/g, btnTitle);
dialog.alert(showMessage); };
if (resp.saved) {
integrationSearchControl._load();
}
}
// 삭제
integrationSearchControl.remove = (params) => {
var selected = integrationSearchControl.dataset.getKeys("selected");
if (selected.length < 1) return;
if (!params) {
params = {};
params[integrationSearchControl.prefixed("IDs")] = selected.join(",");
}
ajax.post({
url : integrationSearchControl.urls.remove
, data : params
, success : resp => integrationSearchControl.onRemove(selected, resp)
});
}
/************************************************************************** /**************************************************************************
* *
**************************************************************************/ **************************************************************************/
var integrationSearch = {}; var integrationSearch = {};
integrationSearch.renderList = (updown, tabGroup) => {
integrationSearch.renderList = (updown, tabGroup) => {
var tbody = updown == "up" ? "upTbody--${pageName}" : "downTbody--${pageName}"; var tbody = updown == "up" ? "upTbody--${pageName}" : "downTbody--${pageName}";
var trs = ""; var trs = "";
var notFound = [document.getElementById("notFound--${pageName}").innerHTML]; var notFound = [document.getElementById("notFound--${pageName}").innerHTML];
var found = document.getElementById("row--${pageName}").innerHTML; var found = document.getElementById("row--${pageName}").innerHTML;
var ds = integrationSearchControl.dataset; var ds;
var replacer = (str, dataItem) => str if(updown == "up"){
.replace(/{onclick}/gi, "integrationSearchControl.setCurrent('" + dataItem.getValue("CRDN_ID") + "');") ds = integrationSearchControl.updataset;
.replace(/{ondblclick}/gi, "integrationSearchControl.getInfo('" + dataItem.getValue("CRDN_ID") + "');") } else {
ds = integrationSearchControl.downdataset;
}
var replacer;
if(updown == "up"){
replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "integrationSearchControl.updataset.setCurrent('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "integrationSearch.getInfo('"+ dataItem.getValue("TASK_SE_CD") +"','" + dataItem.getValue("CRDN_ID") + "');")
} else {
replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "integrationSearchControl.downdataset.setCurrent('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "integrationSearch.getInfo('"+ dataItem.getValue("TASK_SE_CD") +"','" + dataItem.getValue("CRDN_ID") + "');")
}
var empty = ds.empty; var empty = ds.empty;
if(empty){ if(empty){
trs = notFound; trs = notFound;
} else if(tabGroup == "전체"){
trs = ds.inStrings(found, replacer);
} else { } else {
var temp = ds._items; var temp = ds._items;
var filtered = []; var filtered = [];
if(tabGroup == null || tabGroup == "" || tabGroup == "전체"){
if(updown == "up"){
filtered = temp.filter(item => item.data.RCVMT_YN == "N");
} else {
filtered = temp.filter(item => item.data.RCVMT_YN == "Y");
}
} else {
filtered = temp.filter(item => item.data.TAB_GROUP == tabGroup);
}
filtered = temp.filter(item => item.data.TAB_GROUP == tabGroup);
if(filtered.lenth < 1){ if(filtered.lenth < 1){
trs = notFound; trs = notFound;
@ -195,6 +165,9 @@ var integrationSearch = {};
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));
} }
integrationSearch.setCurrent = () => {
console.log(1);
}
// 검색 조건 파라미터 가져오기 // 검색 조건 파라미터 가져오기
integrationSearch.getParams = () => { integrationSearch.getParams = () => {
@ -204,73 +177,12 @@ integrationSearch.getParams = () => {
return formData; return formData;
} }
// 수정 dialog -> callback 추가
integrationSearch.fnInfo = (params) => {
ajax.get({
url : wctx.url("/sprt/sprt02/010/info.do?openerPageName=${pageName}")
, data : params || {}
, success : resp => {
dialog.open({
id : integrationSearchControl.prefixed("Dialog")
, title : integrationSearchControl.prefixName + " 정보"
, content : resp
, size : integrationSearchControl.infoSize
, init : () => { }
, onClose : () => { integrationSearchControl.load(integrationSearchControl.query.pageNum); } // callback
});
}
});
}
/**************************************************************************
* 초기 셋팅
**************************************************************************/
// 이벤트
integrationSearch.setEvent = () => {
// 달력 초기화
initDatepicker("frmSearch--${pageName}");
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmSearch--${pageName}").find(".form-date").each(function() {
$(this).on("input", function() {
var value = this.value.replaceAll("-", "");
if (value.length > 7) {
this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
} else if(value.length > 5) {
this.value = value.substring(0, 4) + "-" + value.substring(4);
}
});
});
$("#frmSearch--${pageName}").find(".form-time").each(function(){
$(this).on("input",function(){
var value = this.value.replaceAll(":","");
if(value.length > 5){
this.value = value.substring(0,2)+":"+value.substring(2,4)+":"+value.substring(4);
} else if(value.length > 3){
this.value = value.substring(0,2)+":"+value.substring(2);
}
});
});
// DataTables width 변경 조정
$("#upTable--${pageName}").find("th").resizable( {handles : "e"} );
$("#downTable--${pageName}").find("th").resizable( {handles : "e"} );
}
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
// 초기화 // 초기화
integrationSearch.fnReset = () => { integrationSearch.fnReset = () => {
integrationSearchControl.dataset.clear(); integrationSearchControl.updataset.clear();
integrationSearchControl.downdataset.clear();
} }
@ -308,7 +220,8 @@ integrationSearch.fnSearchList = () => {
$("#upGridTabs--${pageName}").find("button").eq(0).addClass("active"); $("#upGridTabs--${pageName}").find("button").eq(0).addClass("active");
$("#downGridTabs--${pageName}").find("button").not(":eq(0)").removeClass("active"); $("#downGridTabs--${pageName}").find("button").not(":eq(0)").removeClass("active");
$("#downGridTabs--${pageName}").find("button").eq(0).addClass("active"); $("#downGridTabs--${pageName}").find("button").eq(0).addClass("active");
integrationSearchControl.dataset.clear(); integrationSearchControl.updataset.clear();
integrationSearchControl.downdataset.clear();
integrationSearchControl.load(); integrationSearchControl.load();
} }
@ -318,23 +231,92 @@ integrationSearch.fnExcel = () => {
} }
// 수정 //개별총정보 dialog
integrationSearch.fnUpdate = () => { integrationSearch.getInfo = (taskSeCd, crdnId) => {
if (crdnId == undefined || crdnId == null || crdnId == "") {
return;
}
var params = { var params = {
callPurpose : "update" callControlName : "integrationSearchControl"
, sggCd : integrationSearchControl.dataset.getValue("SGG_CD") // 시군구 코드 , crdnId : crdnId
, taskSeCd : integrationSearchControl.dataset.getValue("TASK_SE_CD") // 업무 구분 코드 }
, crdnId : integrationSearchControl.dataset.getValue("CRDN_ID")
}; var url = wctx.url("/"+taskSeCd+"/sprt/sprt02/010/main.do");
integrationSearch.fnInfo(params); ajax.get({
url : url
, data : params
, success : resp => {
dialog.open({
id : "totalInfoMainDialog"
, title : "개별총정보"
, size : "xxl"
, content : resp
, init : () => { }
, onClose : () => { }
});
}
});
} }
/**************************************************************************
* Event
**************************************************************************/
//이벤트
integrationSearch.setEvent = () => {
$("#btnReset--${pageName}").on("click", function(){ integrationSearch.fnReset(); });
$("#btnSearch--${pageName}").on("click", function(){ integrationSearch.fnSearchList(); });
$("#btnUpExcel--${pageName}").on("click", function(){ integrationSearch.fnExcel(); });
$("#btnDownExcel--${pageName}").on("click", function(){ integrationSearch.fnExcel(); });
//$("#btn").on("click", function(){ });
// 달력 초기화
initDatepicker("frmSearch--${pageName}");
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmSearch--${pageName}").find(".form-date").each(function() {
$(this).on("input", function() {
var value = this.value.replaceAll("-", "");
if (value.length > 7) {
this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
} else if(value.length > 5) {
this.value = value.substring(0, 4) + "-" + value.substring(4);
}
});
});
$("#frmSearch--${pageName}").find(".form-time").each(function(){
$(this).on("input",function(){
var value = this.value.replaceAll(":","");
if(value.length > 5){
this.value = value.substring(0,2)+":"+value.substring(2,4)+":"+value.substring(4);
} else if(value.length > 3){
this.value = value.substring(0,2)+":"+value.substring(2);
}
});
});
// DataTables width 변경 조정
$("#upTable--${pageName}").find("th").resizable( {handles : "e"} );
$("#downTable--${pageName}").find("th").resizable( {handles : "e"} );
}
window.integrationSearchControl = integrationSearchControl;
window.integrationSearch = integrationSearch;
/************************************************************************** /**************************************************************************
* script 진입 * script 진입
**************************************************************************/ **************************************************************************/
$(document).ready(function() { $(document).ready(function() {
$("#upTheadTr--${pageName}").html(document.getElementById("cols--${pageName}").innerHTML); $("#upTheadTr--${pageName}").html(document.getElementById("cols--${pageName}").innerHTML);
$("#downTheadTr--${pageName}").html(document.getElementById("cols--${pageName}").innerHTML); $("#downTheadTr--${pageName}").html(document.getElementById("cols--${pageName}").innerHTML);

@ -6,7 +6,7 @@
<!-- 상단 버튼 --> <!-- 상단 버튼 -->
<div class="container-page-btn"> <div class="container-page-btn">
<button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark" <button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark"
title="초기화" onclick="integrationSearch.fnReset();"> title="초기화">
초기화 초기화
</button> </button>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
@ -39,7 +39,7 @@
온라인입금관리대장 온라인입금관리대장
</button> </button>
<button type="button" id="btnSearch--${pageName}" class="btn btn-search w-px-120" <button type="button" id="btnSearch--${pageName}" class="btn btn-search w-px-120"
title="검색" onclick="integrationSearch.fnSearchList();"> title="검색">
검색 검색
</button> </button>

@ -30,47 +30,47 @@
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<!-- 업무 버튼 --> <!-- 업무 버튼 -->
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="특기사항관리" onclick=""> title="특기사항관리">
특기사항관리 특기사항관리
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="가상계좌개별생성" onclick=""> title="가상계좌개별생성">
가상계좌개별생성 가상계좌개별생성
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="주민번호복사" onclick=""> title="주민번호복사">
주민번호복사 주민번호복사
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="압류상태로변경" onclick=""> title="압류상태로변경">
압류상태로변경 압류상태로변경
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="위택스자료전송" onclick=""> title="위택스자료전송">
위택스자료전송 위택스자료전송
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="특기사항입력-일괄" onclick=""> title="특기사항입력-일괄">
특기사항입력-일괄 특기사항입력-일괄
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="대체압류변경-일괄" onclick=""> title="대체압류변경-일괄">
대체압류변경-일괄 대체압류변경-일괄
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="압류취소-일괄" onclick=""> title="압류취소-일괄">
압류취소-일괄 압류취소-일괄
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="압류예정일자-일괄" onclick=""> title="압류예정일자-일괄">
압류예정일자-일괄 압류예정일자-일괄
</button> </button>
<button type="button" id="btnExcel--${pageName}" class="btn btn-excel" <button type="button" id="btnUpExcel--${pageName}" class="btn btn-excel"
title="엑셀 저장" onclick="integrationSearch.fnExcel();"> title="엑셀 저장">
엑셀 엑셀
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="사전통지서출력" onclick=""> title="사전통지서출력">
사전통지서출력 사전통지서출력
</button> </button>
</span> </span>

@ -38,43 +38,43 @@
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<!-- 업무 버튼 --> <!-- 업무 버튼 -->
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="특기사항관리" onclick=""> title="특기사항관리">
특기사항관리 특기사항관리
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="주민번호복사" onclick=""> title="주민번호복사">
주민번호복사 주민번호복사
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="압류상태로변경" onclick=""> title="압류상태로변경">
압류상태로변경 압류상태로변경
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="위택스전송_대납" onclick=""> title="위택스전송_대납">
위택스전송_대납 위택스전송_대납
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="특기사항입력-일괄" onclick=""> title="특기사항입력-일괄">
특기사항입력-일괄 특기사항입력-일괄
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="대체압류변경-일괄" onclick=""> title="대체압류변경-일괄">
대체압류변경-일괄 대체압류변경-일괄
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="결손취소-일괄" onclick=""> title="결손취소-일괄">
결손취소-일괄 결손취소-일괄
</button> </button>
<button type="button" id="btnExcel--${pageName}" class="btn btn-excel" <button type="button" id="btnDownExcel--${pageName}" class="btn btn-excel"
title="엑셀 저장" onclick="integrationSearch.fnExcel();"> title="엑셀 저장">
엑셀 엑셀
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="대납고지서출력" onclick=""> title="대납고지서출력">
대납고지서출력 대납고지서출력
</button> </button>
<button type="button" id="" class="btn btn-primary" <button type="button" id="" class="btn btn-primary"
title="납부확인서출력" onclick=""> title="납부확인서출력">
납부확인서출력 납부확인서출력
</button> </button>
</span> </span>

@ -0,0 +1,32 @@
export class IntegrationSearchControl extends DatasetControl {
constructor(conf) {
super(conf);
this.updataset = new Dataset(conf);
this.downdataset = new Dataset(conf);
}
load(pageNum) {
this.query.pageNum = pageNum;
this._load();
}
_load() {
if (!this.query.pageNum)
this.query.pageNum = 1;
ajax.get({
url:this.urls.load,
data:this.query,
success:resp => {
this.setData(resp);
}
});
}
setData(obj) {
this.updataset.setData(obj.upList);
this.downdataset.setData(obj.downList);
}
}
Loading…
Cancel
Save