시스템관리 수정(주소 수동 업로드, 메일 대체 기능)

main
이범준 3 months ago
parent ca42e87b51
commit e51f97a2bf

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:w2="http://www.inswave.com/websquare" xmlns:xf="http://www.w3.org/2002/xforms">
<head>
<w2:type>DEFAULT</w2:type>
<w2:buildDate/>
<xf:model>
<xf:instance>
<data xmlns=""/>
</xf:instance>
<w2:dataCollection baseNode="map">
<w2:dataMap baseNode="map" id="searchParam">
<w2:keyInfo>
<w2:key id="sender" name="보낸이" dataType="text"></w2:key>
</w2:keyInfo>
</w2:dataMap>
<w2:dataList baseNode="list" repeatNode="map" id="searchResultList" saveRemovedData="true">
<w2:columnInfo>
<w2:column id="altMailSeq" name="메시지키" dataType="text"></w2:column>
<w2:column id="sender" name="보낸이" dataType="text"></w2:column>
<w2:column id="title" name="제목" dataType="text"></w2:column>
<w2:column id="sendDate" name="보낸날짜" dataType="text"></w2:column>
</w2:columnInfo>
</w2:dataList>
</w2:dataCollection>
<w2:workflowCollection>
</w2:workflowCollection>
<xf:submission id="sub_search"
ref='data:json,{"id":"searchParam","key":"param"}'
target='data:json,{"id":"searchResultList","key":"result"}'
action="/cfs/trsmrcv/findReceivedAltMailList.do"
method="post" mediatype="application/json" encoding="UTF-8" instance="" replace=""
errorHandler="" customHandler="" mode="asynchronous" processMsg="조회중입니다."
ev:submit=""
ev:submitdone=""
ev:submiterror="" abortTrigger="">
</xf:submission>
</xf:model>
<script type="text/javascript" lazy="false"><![CDATA[
scwin.onpageload = function() {
com.executeSubmission(sub_search);
};
scwin.onpageunload = function() {
};
scwin.btn_search_onclick = function(e) {
com.executeSubmission(sub_search);
};
scwin.btn_write_onclick = function(e) {
var data = {data : {}, callbackFn : "scwin.btn_search_onclick" };
var opt = {id : "ST004P01A",
popupName : "메시지 쓰기",
width : 650, height : 700};
var popupUrl = "/ui/cfs/system/ST004P01.xml";
com.openPopup(popupUrl, opt, data);
};
//그리드 더블클릭
scwin.gridView1_oncelldblclick = function(row, col){
var jsonData = searchResultList.getRowJSON( row );
var data = {data : jsonData, callbackFn : "" };
var opt = {id : "ST003P01A",
popupName : "메시지 상세",
width : 650, height : 700};
var popupUrl = "/ui/cfs/system/ST003P01.xml";
com.openPopup(popupUrl, opt, data);
};
]]></script>
</head>
<body ev:onpageload="scwin.onpageload" ev:onpageunload="scwin.onpageunload">
<xf:group class="contentWrap" id="" style="">
<w2:wframe id="" initScript="scwin.wfTitleFavInit();" src="/cm/common/wf_titleFav.xml" style=""></w2:wframe>
<xf:group class="tbl_search" id="grp_search" style="">
<xf:group adaptive="layout" adaptiveThreshold="700" class="w2tb tbl_sc" id="" style="" tagname="table">
<w2:attributes>
<w2:summary></w2:summary>
</w2:attributes>
<xf:group tagname="colgroup">
<xf:group style="width:*;" tagname="col"></xf:group>
<xf:group style="width:80px;" tagname="col"></xf:group>
<xf:group style="width:150px;" tagname="col"></xf:group>
<xf:group style="width:80px;" tagname="col"></xf:group>
</xf:group>
<xf:group adaptive="" adaptiveThreshold="" style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="td"></xf:group>
<xf:group class="w2tb_th" style="" tagname="th">보낸이</xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<xf:input adjustMaxLength="false" id="ibx_sender" ref="data:searchParam.sender"
style="width:130px;height: 21px;"
allowChar="" maxlength="20" ignoreChar="! " mandatory="">
</xf:input>
</xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<xf:group class="fr" id="">
<xf:trigger class="btn_sh" id="btn_search" style="" type="button"
ev:onclick="scwin.btn_search_onclick">
<xf:label><![CDATA[조회]]></xf:label>
</xf:trigger>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
<xf:group class="defaultbox" id="" style="">
<w2:textbox class="df_tt" id="" label="받은메시지" style="" tagname="h2"></w2:textbox>
<xf:group class="fr" id="" style="">
<xf:trigger class="btn_act send" id="btn_upload" style="1px black solid" type="button"
ev:onclick="scwin.btn_write_onclick">
<xf:label><![CDATA[메시지 쓰기]]></xf:label>
</xf:trigger>
</xf:group>
</xf:group>
<w2:gridView autoFit="allColumn" autoFitMinWidth="600" class="cm_grid" dataList="data:searchResultList"
fixedColumnWithHidden="true" focusMode="row" id="" ignoreCellClick="false" ignoreToggleOnDisabled="false" scrollByColumn="false"
scrollByColumnAdaptive="false" style="height: 54px;" summaryAuto="false" useShiftKey="true" visibleRowNum="all"
ev:oncelldblclick="scwin.gridView1_oncelldblclick"
readOnly="true">
<w2:caption style="" id="caption1" value="this is a grid caption."></w2:caption>
<w2:header style="" id="header1">
<w2:row style="" id="row1">
<w2:column removeBorderStyle="false" width="250" inputType="text" style=""
id="columnhSender" value="보낸이"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="1000" inputType="text" style=""
id="columnhTitle" value="제목"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="250" inputType="text" style=""
id="columnhSendDate" value="보낸날짜"
blockSelect="false" displayMode="label">
</w2:column>
</w2:row>
</w2:header>
<w2:gBody style="" id="gBody1">
<w2:row style="" id="row2">
<w2:column removeBorderStyle="false" width="250" inputType="text" style=""
id="sender" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="1000" inputType="text" style=""
id="title" value="" blockSelect="false"
displayMode="label" textAlign="left">
</w2:column>
<w2:column removeBorderStyle="false" width="250" inputType="text" style=""
id="sendDate" value="" blockSelect="false"
displayMode="label">
</w2:column>
</w2:row>
</w2:gBody>
</w2:gridView>
</xf:group>
</body>
</html>

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:w2="http://www.inswave.com/websquare" xmlns:xf="http://www.w3.org/2002/xforms">
<head>
<w2:type>DEFAULT</w2:type>
<w2:buildDate/>
<xf:model>
<xf:instance>
<data xmlns="" />
</xf:instance>
<w2:dataCollection baseNode="map">
<w2:dataMap baseNode="map" id="req">
<w2:keyInfo>
<w2:key id="altMailSeq" name="메시지키" dataType="text"></w2:key>
</w2:keyInfo>
</w2:dataMap>
<w2:dataMap baseNode="map" id="res">
<w2:keyInfo>
<w2:key id="altMailSeq" name="메시지키" dataType="text"></w2:key>
<w2:key id="sender" name="보낸이" dataType="text"></w2:key>
<w2:key id="receiver" name="받는이" dataType="text"></w2:key>
<w2:key id="sendDate" name="보낸날짜" dataType="text"></w2:key>
<w2:key id="title" name="제목" dataType="text"></w2:key>
<w2:key id="text" name="내용" dataType="text"></w2:key>
<w2:key id="attachFileName" name="첨부파일명" dataType="text"></w2:key>
</w2:keyInfo>
</w2:dataMap>
</w2:dataCollection>
<w2:workflowCollection></w2:workflowCollection>
<xf:submission id="sub_search"
ref='data:json,{"id":"req","key":"param"}'
target='data:json,{"id":"res","key":"result"}'
action="/cfs/trsmrcv/findAltMail.do"
method="post" mediatype="application/json" encoding="UTF-8"
instance="" replace="" errorHandler="" customHandler="" mode="asynchronous"
processMsg="" ev:submit=""
ev:submitdone="scwin.sub_search_submitdone" ev:submiterror="" abortTrigger="">
</xf:submission>
</xf:model>
<script type="text/javascript" lazy="false"><![CDATA[
scwin.onpageload = function() {
scwin.param = com.getParameter();
req.setJSON(scwin.param.data);
com.executeSubmission(sub_search);
};
scwin.sub_search_submitdone = function(){
var fileExist = res.get("attachFileName");
var altMailSeq = res.get("altMailSeq");
var downLink = document.getElementById(attach_file_link_td.id).children[0];
if(fileExist != null && fileExist != ""){
//첨부파일링크 제공
downLink.setAttribute("download","");
downLink.innerText = fileExist;
downLink.href = "/cfs/trsmrcv/downloadAltMailAttachFile.do?altMailSeq="+altMailSeq;
} else {
downLink.setAttribute("hidden","");
}
};
scwin.btn_close_onclick = function() {
com.closePopup();
};
]]></script>
</head>
<body ev:onpageload="scwin.onpageload" ev:onpageunload="scwin.onpageunload">
<xf:group class="pop" id="" style=""></xf:group>
<xf:group class="pop_con" id="" style="">
<xf:group class="cm_tbl" id="" style=""></xf:group>
<xf:group class="" id="grp_group2" style="margin-top: 10px;">
<xf:group class="w2tb tbl_sc" id="grp_group1" style="wid" tagname="table">
<w2:attributes>
<w2:summary></w2:summary>
</w2:attributes>
<xf:group tagname="caption"></xf:group>
<xf:group tagname="colgroup">
<xf:group style="width:100px;" tagname="col"></xf:group>
<xf:group style="width:1000px;" tagname="col"></xf:group>
</xf:group>
<xf:group style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="th">제목</xf:group>
<xf:group class="w2tb_th" style="" tagname="td">
<xf:input id="ibx_title" ref="data:res.title"
style="width:100%;background-color:#c1dbc1" readOnly="true"></xf:input>
</xf:group>
</xf:group>
<xf:group style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="th">보낸이</xf:group>
<xf:group class="w2tb_th" style="" tagname="td">
<xf:input id="ibx_sender" ref="data:res.sender"
style="width:100%;background-color:#c1dbc1" readOnly="true"></xf:input>
</xf:group>
</xf:group>
<xf:group style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="th">받는이</xf:group>
<xf:group class="w2tb_th" style="" tagname="td">
<xf:input id="ibx_receiver" ref="data:res.receiver"
style="width:100%;background-color:#c1dbc1" readOnly="true"></xf:input>
</xf:group>
</xf:group>
<xf:group style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="th">보낸날짜</xf:group>
<xf:group class="w2tb_th" style="" tagname="td">
<xf:input id="ibx_sendDate" ref="data:res.sendDate"
style="width:100%;background-color:#c1dbc1" readOnly="true"></xf:input>
</xf:group>
</xf:group>
<xf:group style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="td">
<w2:attributes>
<w2:colspan>2</w2:colspan>
<w2:rowspan>1</w2:rowspan>
</w2:attributes>
<xf:textarea id="txa_text" ref="data:res.text"
style="width:100%;height:300px;background-color:#c1dbc1"
readOnly="true"></xf:textarea>
</xf:group>
</xf:group>
<xf:group style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="th">첨부파일</xf:group>
<xf:group class="w2tb_th" style="text-align:left" tagname="td"
id="attach_file_link_td">
<a href=""></a>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
<xf:group class="tac" id="" style="">
<xf:trigger class="btn_act close" ev:onclick="scwin.btn_close_onclick" id="btn_close" style="" type="button">
<xf:label><![CDATA[닫기]]></xf:label>
</xf:trigger>
</xf:group>
</body>
</html>

@ -0,0 +1,171 @@
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:w2="http://www.inswave.com/websquare" xmlns:xf="http://www.w3.org/2002/xforms">
<head>
<w2:type>DEFAULT</w2:type>
<w2:buildDate/>
<xf:model>
<xf:instance>
<data xmlns=""/>
</xf:instance>
<w2:dataCollection baseNode="map">
<w2:dataMap baseNode="map" id="searchParam">
<w2:keyInfo>
<w2:key id="receiver" name="받는이" dataType="text"></w2:key>
</w2:keyInfo>
</w2:dataMap>
<w2:dataList baseNode="list" repeatNode="map" id="searchResultList" saveRemovedData="true">
<w2:columnInfo>
<w2:column id="altMailSeq" name="메시지키" dataType="text"></w2:column>
<w2:column id="receiver" name="받는이" dataType="text"></w2:column>
<w2:column id="title" name="제목" dataType="text"></w2:column>
<w2:column id="sendDate" name="보낸날짜" dataType="text"></w2:column>
</w2:columnInfo>
</w2:dataList>
</w2:dataCollection>
<w2:workflowCollection>
</w2:workflowCollection>
<xf:submission id="sub_search"
ref='data:json,{"id":"searchParam","key":"param"}'
target='data:json,{"id":"searchResultList","key":"result"}'
action="/cfs/trsmrcv/findSentAltMailList.do"
method="post" mediatype="application/json" encoding="UTF-8" instance="" replace=""
errorHandler="" customHandler="" mode="asynchronous" processMsg="조회중입니다."
ev:submit=""
ev:submitdone=""
ev:submiterror="" abortTrigger="">
</xf:submission>
</xf:model>
<script type="text/javascript" lazy="false"><![CDATA[
scwin.onpageload = function() {
com.executeSubmission(sub_search);
};
scwin.onpageunload = function() {
};
scwin.btn_search_onclick = function(e) {
com.executeSubmission(sub_search);
};
scwin.btn_write_onclick = function(e) {
var data = {data : {}, callbackFn : "scwin.btn_search_onclick" };
var opt = {id : "ST004P01B",
popupName : "메시지 쓰기",
width : 650, height : 700};
var popupUrl = "/ui/cfs/system/ST004P01.xml";
com.openPopup(popupUrl, opt, data);
};
//그리드 더블클릭
scwin.gridView1_oncelldblclick = function(row, col){
var jsonData = searchResultList.getRowJSON( row );
var data = {data : jsonData, callbackFn : "" };
var opt = {id : "ST003P01B",
popupName : "메시지 상세",
width : 650, height : 250};
var popupUrl = "/ui/cfs/system/ST003P01.xml";
com.openPopup(popupUrl, opt, data);
};
]]></script>
</head>
<body ev:onpageload="scwin.onpageload" ev:onpageunload="scwin.onpageunload">
<xf:group class="contentWrap" id="" style="">
<w2:wframe id="" initScript="scwin.wfTitleFavInit();" src="/cm/common/wf_titleFav.xml" style=""></w2:wframe>
<xf:group class="tbl_search" id="grp_search" style="">
<xf:group adaptive="layout" adaptiveThreshold="700" class="w2tb tbl_sc" id="" style="" tagname="table">
<w2:attributes>
<w2:summary></w2:summary>
</w2:attributes>
<xf:group tagname="colgroup">
<xf:group style="width:*;" tagname="col"></xf:group>
<xf:group style="width:80px;" tagname="col"></xf:group>
<xf:group style="width:150px;" tagname="col"></xf:group>
<xf:group style="width:80px;" tagname="col"></xf:group>
</xf:group>
<xf:group adaptive="" adaptiveThreshold="" style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="td"></xf:group>
<xf:group class="w2tb_th" style="" tagname="th">받는이</xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<xf:input adjustMaxLength="false" id="ibx_sender" ref="data:searchParam.receiver"
style="width:130px;height: 21px;"
allowChar="" maxlength="20" ignoreChar="! " mandatory="">
</xf:input>
</xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<xf:group class="fr" id="">
<xf:trigger class="btn_sh" id="btn_search" style="" type="button"
ev:onclick="scwin.btn_search_onclick">
<xf:label><![CDATA[조회]]></xf:label>
</xf:trigger>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
<xf:group class="defaultbox" id="" style="">
<w2:textbox class="df_tt" id="" label="보낸메시지" style="" tagname="h2"></w2:textbox>
<xf:group class="fr" id="" style="">
<xf:trigger class="btn_act send" id="btn_upload" style="1px black solid" type="button"
ev:onclick="scwin.btn_write_onclick">
<xf:label><![CDATA[메시지 쓰기]]></xf:label>
</xf:trigger>
</xf:group>
</xf:group>
<w2:gridView autoFit="allColumn" autoFitMinWidth="600" class="cm_grid" dataList="data:searchResultList"
fixedColumnWithHidden="true" focusMode="row" id="" ignoreCellClick="false" ignoreToggleOnDisabled="false" scrollByColumn="false"
scrollByColumnAdaptive="false" style="height: 54px;" summaryAuto="false" useShiftKey="true" visibleRowNum="all"
ev:oncelldblclick="scwin.gridView1_oncelldblclick"
readOnly="true">
<w2:caption style="" id="caption1" value="this is a grid caption."></w2:caption>
<w2:header style="" id="header1">
<w2:row style="" id="row1">
<w2:column removeBorderStyle="false" width="250" inputType="text" style=""
id="columnhReceiver" value="받는이"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="1000" inputType="text" style=""
id="columnhTitle" value="제목"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="250" inputType="text" style=""
id="columnhSendDate" value="보낸날짜"
blockSelect="false" displayMode="label">
</w2:column>
</w2:row>
</w2:header>
<w2:gBody style="" id="gBody1">
<w2:row style="" id="row2">
<w2:column removeBorderStyle="false" width="250" inputType="text" style=""
id="receiver" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="1000" inputType="text" style=""
id="title" value="" blockSelect="false"
displayMode="label" textAlign="left">
</w2:column>
<w2:column removeBorderStyle="false" width="250" inputType="text" style=""
id="sendDate" value="" blockSelect="false"
displayMode="label">
</w2:column>
</w2:row>
</w2:gBody>
</w2:gridView>
</xf:group>
</body>
</html>

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:w2="http://www.inswave.com/websquare" xmlns:xf="http://www.w3.org/2002/xforms">
<head>
<w2:type>DEFAULT</w2:type>
<w2:buildDate/>
<xf:model>
<xf:instance>
<data xmlns="" />
</xf:instance>
<w2:dataCollection baseNode="map"></w2:dataCollection>
<w2:workflowCollection></w2:workflowCollection>
</xf:model>
<script type="text/javascript" lazy="false"><![CDATA[
scwin.onpageload = function() {
};
scwin.btn_write_onclick = function(e) {
var formData = new FormData();
var title = ibx_title.getValue();
if(title == null || title == ""){
com.alert("제목을 입력하세요.");
return;
}
formData.append("title", title);
var receiver = ibx_receiver.getValue();
if(receiver == null || receiver == ""){
com.alert("받는이를 입력하세요.");
return;
}
formData.append("receiver", receiver);
var text = txa_text.getValue();
if(text == null || text == ""){
com.alert("내용을 입력하세요.");
return;
}
formData.append("text", text);
var fileEl = document.getElementById(ifi_attachFile.id);
if(fileEl.value != null || fileEl.value != ""){
formData.append("attachFile", fileEl.files[0]);
}
var pureAjaxOpt = {
url : '/cfs/trsmrcv/insertAltMail.do'
, async : false
, processData : false
, contentType : false
, type: 'POST'
, data : formData
, success : function(data) {
if(data == null || data.result == null){
com.alert("등록 중 오류가 발생하였습니다.");
return;
}
if(data.result != "success"){
if(data.failResn != null && data.failResn != ""){
com.alert(data.failResn);
return;
} else {
com.alert("등록 중 오류가 발생하였습니다.");
return;
}
}
alert("등록 되었습니다.");
com.closePopup();
return;
}
, error : function(){
com.alert("등록 중 오류가 발생하였습니다.");
}
};
$.ajax( pureAjaxOpt );
};
scwin.btn_close_onclick = function() {
com.closePopup();
};
]]></script>
</head>
<body ev:onpageload="scwin.onpageload" ev:onpageunload="scwin.onpageunload">
<xf:group class="pop" id="" style=""></xf:group>
<xf:group class="pop_con" id="" style="">
<xf:group class="cm_tbl" id="" style=""></xf:group>
<xf:group class="" id="grp_group2" style="margin-top: 10px;">
<xf:group class="w2tb tbl_sc" id="grp_group1" style="wid" tagname="table">
<w2:attributes>
<w2:summary></w2:summary>
</w2:attributes>
<xf:group tagname="caption"></xf:group>
<xf:group tagname="colgroup">
<xf:group style="width:100px;" tagname="col"></xf:group>
<xf:group style="width:1000px;" tagname="col"></xf:group>
</xf:group>
<xf:group style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="th">제목</xf:group>
<xf:group class="w2tb_th" style="" tagname="td">
<xf:input id="ibx_title" style="width:100%"></xf:input>
</xf:group>
</xf:group>
<xf:group style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="th">받는이</xf:group>
<xf:group class="w2tb_th" style="" tagname="td">
<xf:input id="ibx_receiver" style="width:100%"></xf:input>
</xf:group>
</xf:group>
<xf:group style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="td">
<w2:attributes>
<w2:colspan>2</w2:colspan>
<w2:rowspan>1</w2:rowspan>
</w2:attributes>
<xf:textarea id="txa_text"
style="width:100%;height:300px"
></xf:textarea>
</xf:group>
</xf:group>
<xf:group style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="th">첨부파일</xf:group>
<xf:group class="w2tb_th" style="" tagname="td">
<xf:input id="ifi_attachFile" type="file" style="width:100%"></xf:input>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
<xf:group class="tac" id="" style="">
<xf:trigger class="btn_act save" ev:onclick="scwin.btn_write_onclick"
id="btn_save" style="" type="button">
<xf:label><![CDATA[등록]]></xf:label>
</xf:trigger>
<xf:trigger class="btn_act close" ev:onclick="scwin.btn_close_onclick"
id="btn_close" style="" type="button">
<xf:label><![CDATA[닫기]]></xf:label>
</xf:trigger>
</xf:group>
</body>
</html>

@ -2,252 +2,275 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:w2="http://www.inswave.com/websquare" xmlns:xf="http://www.w3.org/2002/xforms">
<head>
<w2:type>DEFAULT</w2:type>
<w2:buildDate/>
<xf:model>
<xf:instance>
<data xmlns=""/>
</xf:instance>
<w2:dataCollection baseNode="map">
<w2:dataMap baseNode="map" id="searchParam">
<w2:keyInfo>
<w2:key id="fareOfficeId" name="요금소" dataType="text"></w2:key>
<w2:key id="boothId" name="차로" dataType="text"></w2:key>
<w2:key id="dateFrom" name="일자From" dataType="text"></w2:key>
<w2:key id="dateTo" name="일자To" dataType="text"></w2:key>
</w2:keyInfo>
</w2:dataMap>
<w2:dataList baseNode="list" repeatNode="map" id="searchResultList" saveRemovedData="true">
<w2:columnInfo>
<w2:column id="passDate" name="통행일자" dataType="text"></w2:column>
<w2:column id="booth01" name="1차로" dataType="number"></w2:column>
<w2:column id="booth02" name="2차로" dataType="number"></w2:column>
<w2:column id="booth03" name="3차로" dataType="number"></w2:column>
<w2:column id="booth04" name="4차로" dataType="number"></w2:column>
<w2:column id="booth05" name="5차로" dataType="number"></w2:column>
<w2:column id="booth06" name="6차로" dataType="number"></w2:column>
<w2:column id="booth07" name="7차로" dataType="number"></w2:column>
<w2:column id="booth08" name="8차로" dataType="number"></w2:column>
<w2:column id="booth09" name="9차로" dataType="number"></w2:column>
<w2:column id="booth10" name="10차로" dataType="number"></w2:column>
</w2:columnInfo>
</w2:dataList>
</w2:dataCollection>
<w2:workflowCollection>
</w2:workflowCollection>
</xf:model>
<script type="text/javascript" lazy="false"><![CDATA[
<head>
<w2:type>DEFAULT</w2:type>
<w2:buildDate/>
<xf:model>
<xf:instance>
<data xmlns=""/>
</xf:instance>
<w2:dataCollection baseNode="map">
<w2:dataMap baseNode="map" id="searchParam">
<w2:keyInfo>
<w2:key id="dataDateFrom" name="제공일자From" dataType="text"></w2:key>
<w2:key id="dataDateTo" name="제공일자To" dataType="text"></w2:key>
<w2:key id="actionDateFrom" name="갱신처리일자From" dataType="text"></w2:key>
<w2:key id="actionDateTo" name="갱신처리일자To" dataType="text"></w2:key>
</w2:keyInfo>
</w2:dataMap>
<w2:dataList baseNode="list" repeatNode="map" id="searchResultList" saveRemovedData="true">
<w2:columnInfo>
<w2:column id="dataDate" name="변동일" dataType="text"></w2:column>
<w2:column id="actionDate" name="갱신처리일" dataType="text"></w2:column>
<w2:column id="actionStartTime" name="갱신처리시작시간" dataType="text"></w2:column>
<w2:column id="actionEndTime" name="갱신처리종료시간" dataType="text"></w2:column>
<w2:column id="statCd" name="상태코드" dataType="text"></w2:column>
<w2:column id="statNm" name="상태" dataType="text"></w2:column>
<w2:column id="failRow" name="오류발생row" dataType="number"></w2:column>
</w2:columnInfo>
</w2:dataList>
</w2:dataCollection>
<w2:workflowCollection>
</w2:workflowCollection>
<xf:submission id="sub_search"
ref='data:json,{"id":"searchParam","key":"param"}'
target='data:json,{"id":"searchResultList","key":"result"}'
action="/cfs/trsmrcv/findBuildJusoHist.do"
method="post" mediatype="application/json" encoding="UTF-8" instance="" replace=""
errorHandler="" customHandler="" mode="asynchronous" processMsg="조회중입니다."
ev:submit=""
ev:submitdone=""
ev:submiterror="" abortTrigger="">
</xf:submission>
</xf:model>
<script type="text/javascript" lazy="false"><![CDATA[
scwin.onpageload = function() {
var sbxOptions = [{ code : "cfs01", compID : "sbx_fareOfficeId", option : sbx_fareOfficeId.getText() }];
com.setCfsCommonCode( sbxOptions, function() {
scwin.sbx_fareOfficeId_onchange();
});
//통행일자
var ymd = com.getToday();
ica_dateFrom.setValue( ymd );
ica_dateTo.setValue( ymd );
ica_dataDateFrom.setValue( '20250801' );
ica_actionDateFrom.setValue( ymd );
ica_dataDateTo.setValue( '20250903' );
ica_actionDateTo.setValue( ymd );
};
scwin.onpageunload = function() {
};
scwin.sbx_fareOfficeId_onchange = function() {
var vFareOfficeId = sbx_fareOfficeId.getValue();
var sbxOptions = [{ code : "booth"+vFareOfficeId, compID : "sbx_boothId", fareOfficeId : vFareOfficeId }];
com.setCfsCommonCode( sbxOptions );
};
scwin.btn_search_onclick = function(e) {
// 1. searchParam의 boothId에 따라 grid의 column을 show/hide
// 2. execute submission
document.getElementById(ifi_buildJusoFile.id).value = null;
com.executeSubmission(sub_search);
};
scwin.btn_upload_onclick = function(e) {
var fileEl = document.getElementById(ifi_buildJusoFile.id);
if(fileEl.value == null || fileEl.value == ""){
com.alert("첨부파일을 선택하세요.");
return;
}
var formData = new FormData();
formData.append("buildJusoFile", fileEl.files[0]);
var pureAjaxOpt = {
url : '/cfs/trsmrcv/uploadJuso.do'
, async : false
, processData : false
, contentType : false
, type: 'POST'
, data : formData
, success : function(data) {
if(data == null || data.result == null){
com.alert("업로드 중 오류가 발생하였습니다.");
return;
}
if(data.result == "success"){
com.alert("업로드 되었습니다.");
return;
} else {
if(data.failResn != null && data.failResn != ""){
com.alert(data.failResn);
return;
} else {
com.alert("업로드 중 오류가 발생하였습니다.");
return;
}
}
}
, error : function(){
com.alert("업로드 중 오류가 발생하였습니다.");
}
};
$.ajax( pureAjaxOpt );
};
]]></script>
</head>
<body ev:onpageload="scwin.onpageload" ev:onpageunload="scwin.onpageunload">
<xf:group class="contentWrap" id="" style="">
<w2:wframe id="" initScript="scwin.wfTitleFavInit();" src="/cm/common/wf_titleFav.xml" style=""></w2:wframe>
<xf:group class="tbl_search" id="grp_search" style="">
<xf:group adaptive="layout" adaptiveThreshold="700" class="w2tb tbl_sc" id="" style="" tagname="table">
<w2:attributes>
<w2:summary></w2:summary>
</w2:attributes>
<xf:group tagname="colgroup">
<xf:group style="width:70px;" tagname="col"></xf:group>
<xf:group style="width:130px;" tagname="col"></xf:group>
<xf:group style="width:70px;" tagname="col"></xf:group>
<xf:group style="width:130px;" tagname="col"></xf:group>
<xf:group style="width:70px;" tagname="col"></xf:group>
<xf:group style="width:340px;" tagname="col"></xf:group>
<xf:group style="width:*;" tagname="col"></xf:group>
</xf:group>
<xf:group adaptive="" adaptiveThreshold="" style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="th">요금소</xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<xf:select1 allOption="" appearance="minimal" chooseOption="true" direction="auto" disabled="false"
disabledClass="w2selectbox_disabled" displayMode="label" id="sbx_fareOfficeId" ref="data:searchParam.fareOfficeId"
style="width: 120px;" submenuSize="auto" ev:onchange="scwin.sbx_fareOfficeId_onchange" chooseOptionLabel="-전체-">
<xf:choices></xf:choices>
</xf:select1>
</xf:group>
<xf:group class="w2tb_th" tagname="th">차로<w2:attributes></w2:attributes></xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<xf:select1 allOption="" appearance="minimal" chooseOption="true" direction="auto" disabled="false"
disabledClass="w2selectbox_disabled" displayMode="label" id="sbx_boothId" ref="data:searchParam.boothId" style="width: 120px;"
submenuSize="auto" chooseOptionLabel="-전체-">
<xf:choices></xf:choices>
</xf:select1>
</xf:group>
<xf:group class="w2tb_th" style="" tagname="th">통행일자</xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<w2:inputCalendar calendarValueType="yearMonthDate" class="" dateValidCheck="" focusOnDateSelect="false"
footerDiv="false" id="ica_dateFrom" ref="data:searchParam.dateFrom" renderDiv="true" renderType="component" style="width: 110px;" weekStartsOn="0">
</w2:inputCalendar>
<w2:span id="spa_span1" label="~" style="padding-left: 5px;padding-right: 5px;"></w2:span>
<w2:inputCalendar calendarValueType="yearMonthDate" class="" dateValidCheck="" focusOnDateSelect="false"
footerDiv="false" id="ica_dateTo" ref="data:searchParam.dateTo" renderDiv="true" renderType="component" style="width: 110px;" weekStartsOn="0">
</w2:inputCalendar>
</xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<xf:group class="fr" id="">
<xf:trigger class="btn_sh" ev:onclick="scwin.btn_search_onclick" id="btn_search" style="" type="button">
<xf:label><![CDATA[조회]]></xf:label>
</xf:trigger>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
<xf:group class="defaultbox" id="" style="">
<w2:textbox class="df_tt" id="" label="축수조회" style="" tagname="h2"></w2:textbox>
<xf:group class="fr" id="" style="">
<xf:trigger class="btn_act print" id="btn_prt" style="" type="button">
<xf:label><![CDATA[인쇄]]></xf:label>
</xf:trigger>
<xf:trigger class="btn_act exceldown" id="btn_excel_down" style="" type="button">
<xf:label><![CDATA[엑셀다운로드]]></xf:label>
</xf:trigger>
</xf:group>
</xf:group>
<w2:gridView autoFit="allColumn" autoFitMinWidth="600" class="cm_grid" dataList="data:searchResultList"
fixedColumnWithHidden="true" focusMode="row" id="" ignoreCellClick="false" ignoreToggleOnDisabled="false" scrollByColumn="false"
scrollByColumnAdaptive="false" style="height: 54px;" summaryAuto="false" useShiftKey="true" visibleRowNum="all">
<w2:caption style="" id="caption1" value="this is a grid caption."></w2:caption>
<w2:header style="" id="header1">
<w2:row style="" id="row1">
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="column21" value="통행일자"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="column19" value="1차로"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="column17" value="2차로"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="column15" value="3차로"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="column13" value="4차로"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="column11" value="5차로"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="column9" value="6차로"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="column7" value="7차로"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="column5" value="8차로"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="column3" value="9차로"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="column1" value="10차로"
blockSelect="false" displayMode="label">
</w2:column>
</w2:row>
</w2:header>
<w2:gBody style="" id="gBody1">
<w2:row style="" id="row2">
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="passDate" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="booth01" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="booth02" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="booth03" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="booth04" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="booth05" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="booth06" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="booth07" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="booth08" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="booth09" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="booth10" value="" blockSelect="false"
displayMode="label">
</w2:column>
</w2:row>
</w2:gBody>
<w2:footer style="" id="footer1">
<w2:row style="" id="row3">
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="column33" value="Total" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="expression" style="" id="column32" value=""
blockSelect="false" displayMode="label" dataType="number" displayFormat="#,###" expression="SUM('booth01')">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="expression" style="" id="column31" value=""
blockSelect="false" displayMode="label" expression="SUM('booth02')" dataType="number" displayFormat="#,###">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="expression" style="" id="column30" value=""
blockSelect="false" displayMode="label" displayFormat="#,###" dataType="number" expression="SUM('booth03')">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="expression" style="" id="column29" value=""
blockSelect="false" displayMode="label" expression="SUM('booth04')" displayFormat="#,###" dataType="number">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="expression" style="" id="column28" value=""
blockSelect="false" displayMode="label" dataType="number" displayFormat="#,###" expression="SUM('booth05')">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="expression" style="" id="column27" value=""
blockSelect="false" displayMode="label" expression="SUM('booth06')" dataType="number" displayFormat="#,###">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="expression" style="" id="column26" value=""
blockSelect="false" displayMode="label" dataType="number" displayFormat="#,###" expression="SUM('booth07')">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="expression" style="" id="column25" value=""
blockSelect="false" displayMode="label" expression="SUM('booth08')" displayFormat="#,###" dataType="number">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="expression" style="" id="column24" value=""
blockSelect="false" displayMode="label" dataType="number" displayFormat="#,###" expression="SUM('booth09')">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="expression" style="" id="column23" value=""
blockSelect="false" displayMode="label" expression="SUM('booth10')" displayFormat="#,###" dataType="number">
</w2:column>
</w2:row>
</w2:footer>
</w2:gridView>
</xf:group>
</body>
</html>
</head>
<body ev:onpageload="scwin.onpageload" ev:onpageunload="scwin.onpageunload">
<xf:group class="contentWrap" id="" style="">
<w2:wframe id="" initScript="scwin.wfTitleFavInit();" src="/cm/common/wf_titleFav.xml" style=""></w2:wframe>
<xf:group class="tbl_search" id="grp_search" style="">
<xf:group adaptive="layout" adaptiveThreshold="700" class="w2tb tbl_sc" id="" style="" tagname="table">
<w2:attributes>
<w2:summary></w2:summary>
</w2:attributes>
<xf:group tagname="colgroup">
<xf:group style="width:70px;" tagname="col"></xf:group>
<xf:group style="width:300px;" tagname="col"></xf:group>
<xf:group style="width:70px;" tagname="col"></xf:group>
<xf:group style="width:300px;" tagname="col"></xf:group>
<xf:group style="width:70px;" tagname="col"></xf:group>
<xf:group style="width:*;" tagname="col"></xf:group>
<xf:group style="width:70px;" tagname="col"></xf:group>
<xf:group style="width:300px;" tagname="col"></xf:group>
<xf:group style="width:150px;" tagname="col"></xf:group>
</xf:group>
<xf:group adaptive="" adaptiveThreshold="" style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="th">변동일</xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<w2:inputCalendar calendarValueType="yearMonthDate" class=""
dateValidCheck="" focusOnDateSelect="false"
footerDiv="false"
id="ica_dataDateFrom"
ref="data:searchParam.dataDateFrom"
renderDiv="true" renderType="component" style="width: 110px;" weekStartsOn="0">
</w2:inputCalendar>
<w2:span id="spa_span1" label="~" style="padding-left: 5px;padding-right: 5px;">
</w2:span>
<w2:inputCalendar calendarValueType="yearMonthDate" class=""
dateValidCheck="" focusOnDateSelect="false"
footerDiv="false"
id="ica_dataDateTo"
ref="data:searchParam.dataDateTo"
renderDiv="true" renderType="component" style="width: 110px;" weekStartsOn="0">
</w2:inputCalendar>
</xf:group>
<xf:group class="w2tb_th" style="" tagname="th">갱신처리일</xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<w2:inputCalendar calendarValueType="yearMonthDate" class=""
dateValidCheck="" focusOnDateSelect="false"
footerDiv="false"
id="ica_actionDateFrom"
ref="data:searchParam.actionDateFrom"
renderDiv="true" renderType="component" style="width: 110px;" weekStartsOn="0">
</w2:inputCalendar>
<w2:span id="spa_span2" label="~" style="padding-left: 5px;padding-right: 5px;">
</w2:span>
<w2:inputCalendar calendarValueType="yearMonthDate" class=""
dateValidCheck="" focusOnDateSelect="false"
footerDiv="false"
id="ica_actionDateTo"
ref="data:searchParam.actionDateTo"
renderDiv="true" renderType="component" style="width: 110px;" weekStartsOn="0">
</w2:inputCalendar>
</xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<xf:group class="fr" id="">
<xf:trigger class="btn_sh" id="btn_search" style="" type="button"
ev:onclick="scwin.btn_search_onclick">
<xf:label><![CDATA[조회]]></xf:label>
</xf:trigger>
</xf:group>
</xf:group>
<xf:group class="w2tb_th" style="" tagname="td"></xf:group>
<xf:group class="w2tb_th" style="" tagname="th">변동자료</xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<xf:input type="file" name="buildJusoFile"
id="ifi_buildJusoFile" style="width:100%"></xf:input>
</xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<xf:group class="fr" id="">
<xf:trigger class="btn_act send" id="btn_upload" style="1px black solid" type="button"
ev:onclick="scwin.btn_upload_onclick">
<xf:label><![CDATA[변동자료업로드]]></xf:label>
</xf:trigger>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
<xf:group class="defaultbox" id="" style="">
<w2:textbox class="df_tt" id="" label="건물주소갱신이력" style="" tagname="h2"></w2:textbox>
<xf:group class="fr" id="" style=""></xf:group>
</xf:group>
<w2:gridView autoFit="allColumn" autoFitMinWidth="600" class="cm_grid" dataList="data:searchResultList"
fixedColumnWithHidden="true" focusMode="row" id="" ignoreCellClick="false" ignoreToggleOnDisabled="false" scrollByColumn="false"
scrollByColumnAdaptive="false" style="height: 54px;" summaryAuto="false" useShiftKey="true" visibleRowNum="all">
<w2:caption style="" id="caption1" value="this is a grid caption."></w2:caption>
<w2:header style="" id="header1">
<w2:row style="" id="row1">
<w2:column removeBorderStyle="false" width="70" inputType="text" style=""
id="columnhDataDate" value="변동일"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style=""
id="columnhActionDate" value="갱신처리일"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style=""
id="columnhActionStartTime" value="갱신처리시작시간"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style=""
id="columnhActionEndTime" value="갱신처리종료시간"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style=""
id="columnhStatNm" value="상태"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style=""
id="columnhFailCnt" value="오류 row"
blockSelect="false" displayMode="label">
</w2:column>
</w2:row>
</w2:header>
<w2:gBody style="" id="gBody1">
<w2:row style="" id="row2">
<w2:column removeBorderStyle="false" width="70" inputType="text" style=""
id="dataDate" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style=""
id="actionDate" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style=""
id="actionStartTime" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style=""
id="actionEndTime" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style=""
id="statNm" value="" blockSelect="false"
displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style=""
id="failRow" value="" blockSelect="false"
displayMode="label">
</w2:column>
</w2:row>
</w2:gBody>
</w2:gridView>
</xf:group>
</body>
</html>

@ -1,5 +1,7 @@
package cfs.common.util;
import java.util.Enumeration;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@ -36,4 +38,29 @@ public class HttpUtil {
return (String) session.getAttribute("EMP_NM");
}
public static String getUserId() {
HttpServletRequest curRequest = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();
HttpSession session = curRequest.getSession(true);
return (String) session.getAttribute("USER_ID");
}
public static String getAttributeNames() {
HttpServletRequest curRequest = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();
HttpSession session = curRequest.getSession(true);
Enumeration<String> enums = session.getAttributeNames();
String names = "";
while(enums.hasMoreElements()){
if(!names.equals("")){
names += ",";
}
names += enums.nextElement();
}
return names;
}
}

@ -7,41 +7,10 @@ import org.springframework.stereotype.Repository;
@Repository("commCollectServer3Dao")
public interface CommCollectServer3Dao {
public int insertDayCloseSendHistory(Map<String, String> param);
/* 교톻카드 매입자료 */
public List<Map<String, Object>> callSP_CRT_KSCC_SND(Map<String, Object> param);
public List<Map<String, Object>> selectDayCloseCount(Map<String, String> param);
public List<Map<String, Object>> selectDayClosePrepayCard(Map<String, String> param);
public List<Map<String, Object>> selectDayClosePrepayEBCard(Map<String, String> param);
public List<Map<String, Object>> selectDayClosePostpayCard(Map<String, String> param);
public int insertCloseSummaryPrepayCard(Map<String, String> param);
public List<Map<String, Object>> callSP_CARD_TRANS_SUNBUL(Map<String, String> param);
public List<Map<String, Object>> callSP_CARD_TRANS_SUNBUL_EB(Map<String, String> param);
public List<Map<String, Object>> callSP_CARD_TRANS_WHOBUL(Map<String, String> param);
public int updateTrafficCardDayClose(Map<String, String> param);
public int insertFileRecvTM(Map<String, String> param);
/* 일마감 반송 */
public int insertDayCloseReturnPrepay(Map<String, String> param);
public List<Map<String, Object>> callSP_CARD_BANSONG_SUNBUL(Map<String, String> param);
public int insertDayCloseReturnPrepayEB(Map<String, String> param);
public List<Map<String, Object>> callSP_CARD_BANSONG_SUNBUL_EB(Map<String, String> param);
public int insertDayCloseReturnPostpay(Map<String, String> param);
public List<Map<String, Object>> callSP_CARD_BANSONG_WHOBUL(Map<String, String> param);
public int insertEtaxDetail(Map<String, String> param);
public int insertEtaxSummary(Map<String, String> param);
public List<Map<String, Object>> selectEtaxDetail(Map<String, String> param);
public List<Map<String, Object>> selectEtgreenStateTargert(Map<String, Object> param);
@ -50,4 +19,7 @@ public interface CommCollectServer3Dao {
public int updatePenaltyEgreenState2(Map<String, Object> param);
}

@ -0,0 +1,41 @@
package cfs.trsmrcv.dao;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
@Repository("commWebServer4Dao")
public interface CommWebServer4Dao {
/* 교톻카드 매입자료 */
public List<Map<String, Object>> callSP_CRT_KSCC_SND(Map<String, Object> outMap);
public List<Map<String, Object>> selectDayCloseCount(Map<String, String> dummy);
public List<Map<String, Object>> selectDayClosePrepayCard(Map<String, String> startEnd);
public List<Map<String, Object>> selectDayClosePrepayEBCard(Map<String, String> startEnd);
public List<Map<String, Object>> selectDayClosePostpayCard(Map<String, String> startEnd);
public int insertDayCloseSendHistory(Map<String, String> param);
public List<Map<String, Object>> callSP_CARD_TRANS_SUNBUL(Map<String, String> dummy);
public List<Map<String, Object>> callSP_CARD_TRANS_SUNBUL_EB(Map<String, String> dummy);
public List<Map<String, Object>> callSP_CARD_TRANS_WHOBUL(Map<String, String> dummy);
public int updateTrafficCardDayClose(Map<String, String> param);
/* 일마감 반송 */
public int insertDayCloseReturnPrepay(Map<String, String> param);
public List<Map<String, Object>> callSP_CARD_BANSONG_SUNBUL(Map<String, String> dummy);
public int insertDayCloseReturnPrepayEB(Map<String, String> param);
public List<Map<String, Object>> callSP_CARD_BANSONG_SUNBUL_EB(Map<String, String> dummy);
public int insertDayCloseReturnPostpay(Map<String, String> param);
public List<Map<String, Object>> callSP_CARD_BANSONG_WHOBUL(Map<String, String> dummy);
public int insertFileRecvTM(Map<String, String> param);
}

@ -6,6 +6,8 @@ import java.util.Map;
import org.springframework.stereotype.Repository;
import cfs.input.vo.WorkerFareAdjustVO;
import cfs.trsmrcv.vo.AltMailVO;
import cfs.trsmrcv.vo.JusoUpdateResultVO;
@Repository("trsmrcvDao")
public interface TrsmrcvDao {
@ -83,4 +85,27 @@ public interface TrsmrcvDao {
public Map<String,String> selectSendMail(String commandSeq);
public List<JusoUpdateResultVO> findBuildJusoHist(Map<String,Object> searchMap);
public JusoUpdateResultVO findLastBuildJusoHist(String str);
public void insertJusoHist(String dataDate);
public void initJusoHist(String dataDate);
public void updateJusoSuccResult(String dataDate);
public void updateJusoFailResult(JusoUpdateResultVO vo);
public void mergeJuso(Map<String,String> map);
public List<AltMailVO> findReceivedAltMailList(Map<String, Object> searchMap);
public List<AltMailVO> findSentAltMailList(Map<String, Object> searchMap);
public AltMailVO findAltMail(String altMailSeq);
public AltMailVO findAltMailAttachFile(String altMailSeq);
public void insertAltMail(AltMailVO altMailVO);
}

@ -2,578 +2,13 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cfs.trsmrcv.dao.CommCollectServer3Dao">
<insert id="insertDayCloseSendHistory" parameterType="hashmap">
/* 매입자료 송수신이력 등록 */
INSERT INTO FILE_TRANS_HISTORY (
SEQ,
FILE_KIND_ID,
PASS_DATE,
FORMAT_DATE,
FARE_OFFICE_ID,
FILE_TRANS_KBN,
FILE_TRANS_YN,
DATA_PROCESS_KBN,
DIR_NAME,
FILE_NAME,
CREATER,
CREATE_DATE,
UPDATER,
UPDATE_DATE
)
VALUES(
FILE_TRANS_SEQ.NEXTVAL,
#{fileKindId, jdbcType=CHAR},
to_char(SYSDATE, 'YYYYMMDD'),
to_char(SYSDATE, 'YYYYMMDD'),
#{fareOfficeId, jdbcType=CHAR},
#{fileTransKbn, jdbcType=CHAR},
#{fileTransYn, jdbcType=CHAR},
#{dataProcessKbn, jdbcType=CHAR},
#{dirName, jdbcType=VARCHAR},
#{fileName, jdbcType=VARCHAR},
#{WORKER},
SYSDATE,
#{WORKER},
SYSDATE
)
</insert>
<select id="callSP_CRT_KSCC_SND" statementType="CALLABLE" parameterType="hashmap">
/* 매입 전처리 처리 프로시져 호출 */
call SP_CRT_KSCC_SND(
#{out_ret, mode=OUT, jdbcType=NUMERIC}
)
</select>
<select id="selectDayCloseCount" parameterType="hashmap" resultType="hashmap">
/* 매입자료 개수 조회 */
select
WEB_KIND,
count(WEB_KIND) as CNT
from RF_TERMINAL_INFO_WEB
group by WEB_KIND
order by WEB_KIND
</select>
<select id="selectDayClosePrepayCard" parameterType="hashmap" resultType="hashmap">
/* 선불 매입자료 대상자료 조회 */
SELECT SEQNO,
TRANSACTION_ID,
BRANCH_ID,
TERMINAL_ID,
SAM_ID,
SAM_SEQNO,
CARD_NO,
CARD_SEQNO,
BEFORE_AMOUNT,
LEVY_AMOUNT,
REMAIND_AMOUNT,
TRADE_TIME,
ALGORITHM_ID,
KEY_VERSION,
E_CASH_IDENTIFIER,
SAM_TOT_SEQNO,
SAM_COLLECT_CNT,
SAM_TOT_AMOUNT,
SIGN_VALUE,
CARD_KBN /* 이비카드 요청 고정값C */,
PERSON_CODE,
CAR_NO,
ALIAS_NO,
ZIPGE_ID,
ISSUE_ID,
USE_PLACE,
USE_PLACE_DETAIL,
ISSUE_ID2
FROM RF_TERMINAL_INFO_WEB
WHERE WEB_KIND = '0'
and hsm_status is null
AND SEQNO between #{startIndex} and #{endIndex}
</select>
<select id="selectDayClosePrepayEBCard" parameterType="hashmap" resultType="hashmap">
/* 선불EB 매입자료 대상자료 조회 */
SELECT SEQNO,
TRANSACTION_ID,
BRANCH_ID,
TERMINAL_ID,
SAM_ID,
SAM_SEQNO,
CARD_NO,
CARD_SEQNO,
BEFORE_AMOUNT,
LEVY_AMOUNT,
REMAIND_AMOUNT,
TRADE_TIME,
ALGORITHM_ID,
KEY_VERSION,
E_CASH_IDENTIFIER,
SAM_TOT_SEQNO,
SAM_COLLECT_CNT,
SAM_TOT_AMOUNT,
SIGN_VALUE,
CARD_KBN /* 이비카드 요청 고정값C */,
PERSON_CODE,
CAR_NO,
ALIAS_NO,
ZIPGE_ID,
ISSUE_ID,
USE_PLACE,
USE_PLACE_DETAIL,
SAM_TOT_CNT,
HSM_STATUS
FROM RF_TERMINAL_INFO_WEB
WHERE WEB_KIND = '1'
and hsm_status is null
AND SEQNO between #{startIndex} and #{endIndex}
</select>
<select id="selectDayClosePostpayCard" parameterType="hashmap" resultType="hashmap">
/* 후불 매입자료 대상자료 조회 */
SELECT SEQNO,
TRANSACTION_ID,
BRANCH_ID,
TERMINAL_ID,
SAM_ID,
SAM_SEQNO,
CARD_NO,
CARD_SEQNO,
BEFORE_AMOUNT,
LEVY_AMOUNT,
REMAIND_AMOUNT,
TRADE_TIME,
ALGORITHM_ID,
KEY_VERSION,
E_CASH_IDENTIFIER,
SAM_TOT_SEQNO,
SAM_COLLECT_CNT,
SAM_TOT_AMOUNT,
SIGN_VALUE,
CARD_KBN /* 이비카드 요청 고정값C */,
PERSON_CODE,
CAR_NO,
ALIAS_NO,
ZIPGE_ID,
ISSUE_ID,
USE_PLACE,
USE_PLACE_DETAIL
FROM RF_TERMINAL_INFO_WEB
WHERE WEB_KIND = '2'
and hsm_status is null
AND SEQNO between #{startIndex} and #{endIndex}
</select>
<select id="callSP_CARD_TRANS_SUNBUL" statementType="CALLABLE" parameterType="hashmap">
/* 선불 매입자료 처리 프로시져 호출 */
call SP_CARD_TRANS_SUNBUL()
</select>
<select id="callSP_CARD_TRANS_SUNBUL_EB" statementType="CALLABLE" parameterType="hashmap">
/* 선불EB 매입자료 처리 프로시져 호출 */
call SP_CARD_TRANS_SUNBUL_EB()
</select>
<select id="callSP_CARD_TRANS_WHOBUL" statementType="CALLABLE" parameterType="hashmap">
/* 후불 매입자료 처리 프로시져 호출 */
call SP_CARD_TRANS_WHOBUL()
</select>
<insert id="insertDayCloseReturnPrepay" parameterType="hashmap">
/* 선불 반송자료 등록 */
INSERT INTO CARD_TRANS_DETAIL_INFO (
WORKER_ID,
FARE_OFFICE_ID,
BOOTH_ID,
YEAR,
MONTH,
DAY,
WORK_TIMES,
SEQNO,
CARD_NO,
JOIN_CARD_NUMBER,
NOMAL_DATE,
REJECT_KBN,
REJECT_ID,
LEVY_AMOUNT,
CREATE_DATE,
CREATER,
UPDATE_DATE,
UPDATER
)
(
SELECT
rf.WORKER_ID,
rf.FARE_OFFICE_ID,
rf.BOOTH_ID,
rf.YEAR,
rf.MONTH,
rf.DAY,
rf.WORK_TIMES,
rf.SEQNO,
rf.CARD_NO,
joint.typical_id,
SYSDATE,
DECODE(rf.COLLECT_ID, '21', '1', '22', '2', '23', '1', '24', '2', '0'),
#{refuse},
rf.LEVY_AMOUNT,
SYSDATE,
#{WORKER},
SYSDATE,
#{WORKER}
FROM rf_terminal_info rf, join_card_info joint
WHERE rf.FARE_OFFICE_ID = joint.FARE_OFFICE_ID
AND rf.ISSUE_ID = joint.ISSUE_ID
AND rf.WORKER_ID = #{worker_id}
AND rf.FARE_OFFICE_ID = #{fare_id}
AND rf.BOOTH_ID = #{booth_id}
AND rf.YEAR = #{year}
AND rf.MONTH = #{month}
AND rf.DAY = #{day}
AND rf.WORK_TIMES = #{work_times}
)
</insert>
<update id="updateTrafficCardDayClose" parameterType="hashmap">
/* 파일 전송 결과 수정 */
update RF_TERMINAL_INFO_WEB
<set>
hsm_status = #{hsmStatus}
</set>
WHERE WEB_KIND = #{webKind}
and hsm_status is null
</update>
<select id="callSP_CARD_BANSONG_SUNBUL" statementType="CALLABLE" parameterType="hashmap">
/* 선불 반송자료 처리 프로시져 호출 */
call SP_CARD_BANSONG_SUNBUL()
</select>
<insert id="insertDayCloseReturnPrepayEB" parameterType="hashmap">
/* 선불EB 반송자료 등록 */
INSERT INTO CARD_TRANS_DETAIL_INFO (
WORKER_ID,
FARE_OFFICE_ID,
BOOTH_ID,
YEAR,
MONTH,
DAY,
WORK_TIMES,
SEQNO,
CARD_NO,
JOIN_CARD_NUMBER,
NOMAL_DATE,
REJECT_KBN,
REJECT_ID,
LEVY_AMOUNT,
CREATE_DATE,
CREATER,
UPDATE_DATE,
UPDATER
)
(
SELECT
rf.WORKER_ID,
rf.FARE_OFFICE_ID,
rf.BOOTH_ID,
rf.YEAR,
rf.MONTH,
rf.DAY,
rf.WORK_TIMES,
rf.SEQNO,
rf.CARD_NO,
joint.typical_id,
SYSDATE,
DECODE(rf.COLLECT_ID, '21', '1', '22', '2', '23', '1', '24', '2', '0'),
DECODE(#{refuse}, '111', '06', '203', '07', '99'),
rf.LEVY_AMOUNT,
SYSDATE,
#{WORKER},
SYSDATE,
#{WORKER}
FROM rf_terminal_info rf, join_card_info joint
WHERE rf.FARE_OFFICE_ID = joint.FARE_OFFICE_ID
AND rf.ISSUE_ID = joint.ISSUE_ID
AND rf.WORKER_ID = #{worker_id}
AND rf.FARE_OFFICE_ID = #{fare_id}
AND rf.BOOTH_ID = #{booth_id}
AND rf.YEAR = #{year}
AND rf.MONTH = #{month}
AND rf.DAY = #{day}
AND rf.WORK_TIMES = #{work_times}
)
</insert>
<select id="callSP_CARD_BANSONG_SUNBUL_EB" statementType="CALLABLE" parameterType="hashmap">
/* 선불EB 반송자료 처리 프로시져 호출 */
call SP_CARD_BANSONG_SUNBUL_EB()
</select>
<insert id="insertDayCloseReturnPostpay" parameterType="hashmap">
/* 후불 반송자료 등록 */
INSERT INTO CARD_TRANS_DETAIL_INFO (
WORKER_ID,
FARE_OFFICE_ID,
BOOTH_ID,
YEAR,
MONTH,
DAY,
WORK_TIMES,
SEQNO,
CARD_NO,
JOIN_CARD_NUMBER,
NOMAL_DATE,
REJECT_KBN,
REJECT_ID,
LEVY_AMOUNT,
CREATE_DATE,
CREATER,
UPDATE_DATE,
UPDATER
)
(
SELECT
rf.WORKER_ID,
rf.FARE_OFFICE_ID,
rf.BOOTH_ID,
rf.YEAR,
rf.MONTH,
rf.DAY,
rf.WORK_TIMES,
rf.SEQNO,
rf.CARD_NO,
joint.typical_id,
SYSDATE,
DECODE(rf.COLLECT_ID, '21', '1', '22', '2', '23', '1', '24', '2', '0'),
DECODE(rf.FARE_OFFICE_ID, '01', DECODE(#{refuse}, '07', '11', #{refuse}), #{refuse}),
rf.LEVY_AMOUNT,
SYSDATE,
#{WORKER},
SYSDATE,
#{WORKER}
FROM rf_terminal_info rf, join_card_info joint
WHERE rf.FARE_OFFICE_ID = joint.FARE_OFFICE_ID
AND rf.ISSUE_ID = joint.ISSUE_ID
AND rf.WORKER_ID = #{worker_id}
AND rf.FARE_OFFICE_ID = #{fare_id}
AND rf.BOOTH_ID = #{booth_id}
AND rf.YEAR = #{year}
AND rf.MONTH = #{month}
AND rf.DAY = #{day}
AND rf.WORK_TIMES = #{work_times}
)
</insert>
<select id="callSP_CARD_BANSONG_WHOBUL" statementType="CALLABLE" parameterType="hashmap">
/* 후불 반송자료 처리 프로시져 호출 */
call SP_CARD_BANSONG_WHOBUL();
</select>
<insert id="insertFileRecvTM" parameterType="hashmap">
/* BL PL 수신 등록 */
INSERT INTO CARD_TRANS_LOG_INFO (
D_ST_DATE,
D_ST_TIME,
D_ED_DATE,
D_ED_TIME,
T_FILE_NAME,
C_CARD_KBN,
FARE_OFFICE_ID,
BOOTH_ID,
T_MESSAGE,
ISSUE_OFFICE_ID,
C_STATUS
)
values
(
to_char(SYSDATE, 'YYYYMMDD'),
to_char(SYSDATE, 'HH24MISS'),
to_char(SYSDATE, 'YYYYMMDD'),
to_char(SYSDATE, 'HH24MISS'),
#{sRecvFileName, jdbcType=VARCHAR},
#{C_CARD_KBN, jdbcType=VARCHAR},
'03',
'01',
'수신완료',
'99',
'C'
)
</insert>
<insert id="insertEtaxDetail" parameterType="hashmap">
/* eTax뱅킹 명세 등록 */
INSERT INTO SEIPLINK.RERCP011TH@DEVETAX (
IST_CD,
WOFI_CD,
RCP_REQ_DT,
TMS_SQ,
SIGU_CD,
HDONG_CD,
ACC_CD,
SEMOK_CD,
YYYYMM_TAX,
TAX_GUBUN,
TAX_NO,
RCP_FLAG,
NAP_ID,
MUL_NM,
ACC_NM,
SEMOK_NM,
SISE_AMT,
SISE_AMT_JGK,
GIGUM_AMT,
GIGUM_AMT_JGK,
GUKSE_AMT,
GUKSE_AMT_JGK,
GUSE_AMT,
GUSE_AMT_JGK,
SEMOK5,
SEMOK5_AMT,
SEMOK5_AMT_JGK,
SUM_AMT,
PYACT_NO,
REQ_OP_DH,
RCP_RST_CD,
RCP_ERR_LOC,
RCP_ERR_MSG,
RCP_DT,
RCP_TM,
RCP_YN,
DB_CHG_TS,
PIDFR_NM,
SGLR_AM,
CAN_PRG_YN,
BR_PCDIS,
VRACT_NO
)
values
(
'006',
'000',
to_char(SYSDATE, 'YYYYMMDD')<!-- #{RCP_REQ_DT, jdbcType=VARCHAR} -->,
FUN_GET_ETAX_SEQ(to_char(SYSDATE, 'YYYYMMDD')) <!-- #{TMS_SQ, jdbcType=VARCHAR -->,
'000'<!-- #{SIGU_CD, jdbcType=VARCHAR} -->,
'047'<!-- #{HDONG_CD, jdbcType=VARCHAR} -->,
'34'<!-- #{ACC_CD, jdbcType=VARCHAR} -->,
'288001'<!-- #{SEMOK_CD, jdbcType=VARCHAR} -->,
to_char(SYSDATE, 'YYYYMM')<!-- #{YYYYMM_TAX, jdbcType=VARCHAR} -->,
'2'<!-- #{TAX_GUBUN, jdbcType=VARCHAR} 수시분-->,
#{TAX_NO, jdbcType=VARCHAR} <!-- NUM 형식으로 저장 (ex: 30 -> 000030) -->,
'1'<!-- #{RCP_FLAG, jdbcType=VARCHAR} 전체수납-->,
DAMO.ENC@DEVETAX(#{NAP_ID, jdbcType=VARCHAR}),
#{MUL_NM, jdbcType=VARCHAR} <!-- 차랑번호 -->,
'교통사업(혼잡통행료관리계정)'<!-- #{ACC_NM, jdbcType=VARCHAR} -->,
'과태료수입'<!-- #{SEMOK_NM, jdbcType=VARCHAR} -->,
#{SUM_AMT, jdbcType=VARCHAR}<!-- #{SISE_AMT, jdbcType=VARCHAR} -->,
0<!-- #{SISE_AMT_JGK, jdbcType=VARCHAR} -->,
0<!-- #{GIGUM_AMT, jdbcType=VARCHAR} -->,
0<!-- #{GIGUM_AMT_JGK, jdbcType=VARCHAR} -->,
0<!-- #{GUKSE_AMT, jdbcType=VARCHAR} -->,
0<!-- #{GUKSE_AMT_JGK, jdbcType=VARCHAR} -->,
0<!-- #{GUSE_AMT, jdbcType=VARCHAR} -->,
0<!-- #{GUSE_AMT_JGK, jdbcType=VARCHAR} -->,
0<!-- #{SEMOK5, jdbcType=VARCHAR} -->,
0<!-- #{SEMOK5_AMT, jdbcType=VARCHAR} -->,
0<!-- #{SEMOK5_AMT_JGK, jdbcType=VARCHAR} -->,
#{SUM_AMT, jdbcType=VARCHAR},
#{PYACT_NO, jdbcType=VARCHAR},
to_char(SYSDATE, 'YYYYMMDDHH24MISS')<!-- #{REQ_OP_DH, jdbcType=VARCHAR} -->,
#{RCP_RST_CD, jdbcType=VARCHAR},
#{RCP_ERR_LOC, jdbcType=VARCHAR},
#{RCP_ERR_MSG, jdbcType=VARCHAR},
#{RCP_DT, jdbcType=VARCHAR},
#{RCP_TM, jdbcType=VARCHAR},
'N'<!-- #{RCP_YN, jdbcType=VARCHAR} -->,
to_char(SYSDATE, 'YYYYMMDDHH24MISS')<!-- #{DB_CHG_TS, jdbcType=VARCHAR} -->,
#{PIDFR_NM, jdbcType=VARCHAR},
#{SGLR_AM, jdbcType=VARCHAR},
'0'<!-- #{CAN_PRG_YN, jdbcType=VARCHAR} -->,
'0'<!-- #{BR_PCDIS, jdbcType=VARCHAR} -->,
#{VRACT_NO, jdbcType=VARCHAR}
)
</insert>
<insert id="insertEtaxSummary" parameterType="hashmap">
/* eTax뱅킹 집계 등록 */
INSERT INTO SEIPLINK.RERCP001TM@DEVETAX (
TOUT_ORG_C,
SL_GMGO_GUCHUNG_C,
SUNP_RQST_DT,
PBSVT_SND_TRN,
DAENAP_SUNP_PROC_S_C,
DAENAP_SUNP_RQST_CNT,
DAENAP_SUNP_RQST_AMT,
RSA_USER_ID,
MNGR_SUNG_NM,
MNGR_TELNO,
RQST_OPRT_DTTM,
DB_CHG_DTTM
)
values
(
'006',
'000',
to_char(SYSDATE, 'YYYYMMDD')<!-- #{RCP_REQ_DT, jdbcType=VARCHAR} -->,
FUN_GET_ETAX_SEQ(to_char(SYSDATE, 'YYYYMMDD')) <!-- #{PBSVT_SND_TRN, jdbcType=VARCHAR -->,
'0'<!-- #{RCP_PRC_STCD, jdbcType=VARCHAR} -->,
#{RCP_REQ_CN, jdbcType=VARCHAR},
#{RCP_REQ_AM, jdbcType=VARCHAR},
#{USER_ID, jdbcType=VARCHAR},
#{TMS_CSVT_NM, jdbcType=VARCHAR},
#{TMS_CSVT_CTCAD, jdbcType=VARCHAR},
to_char(SYSDATE, 'YYYYMMDDHH24MISS')<!-- #{REQ_OP_DH, jdbcType=VARCHAR} -->,
to_char(SYSDATE, 'YYYYMMDDHH24MISS')<!-- #{DB_CHG_TS, jdbcType=VARCHAR} -->
)
</insert>
<select id="selectEtaxDetail" parameterType="hashmap" resultType="hashmap">
/* eTax뱅킹 수납상태 조회 */

@ -0,0 +1,347 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cfs.trsmrcv.dao.CommWebServer4Dao">
<select id="callSP_CRT_KSCC_SND" statementType="CALLABLE" parameterType="hashmap">
/* 매입 전처리 처리 프로시져 호출 */
call SP_CRT_KSCC_SND(#{out_ret, mode=OUT, jdbcType=NUMERIC})
</select>
<select id="selectDayCloseCount" parameterType="hashmap" resultType="hashmap">
/* 매입자료 개수 조회 */
SELECT WEB_KIND
, COUNT(WEB_KIND) AS CNT
FROM RF_TERMINAL_INFO_WEB
GROUP BY WEB_KIND
ORDER BY WEB_KIND
</select>
<select id="selectDayClosePrepayCard" parameterType="hashmap" resultType="hashmap">
/* 선불 매입자료 대상자료 조회 */
SELECT SEQNO
, TRANSACTION_ID
, BRANCH_ID
, TERMINAL_ID
, SAM_ID
, SAM_SEQNO
, CARD_NO
, CARD_SEQNO
, BEFORE_AMOUNT
, LEVY_AMOUNT
, REMAIND_AMOUNT
, TRADE_TIME
, ALGORITHM_ID
, KEY_VERSION
, E_CASH_IDENTIFIER
, SAM_TOT_SEQNO
, SAM_COLLECT_CNT
, SAM_TOT_AMOUNT
, SIGN_VALUE
, CARD_KBN /* 이비카드 요청 고정값C */
, PERSON_CODE
, CAR_NO
, ALIAS_NO
, ZIPGE_ID
, ISSUE_ID
, USE_PLACE
, USE_PLACE_DETAIL
, ISSUE_ID2
FROM RF_TERMINAL_INFO_WEB
WHERE WEB_KIND = '0'
AND hsm_status is null
AND SEQNO between #{startIndex} and #{endIndex}
</select>
<select id="selectDayClosePrepayEBCard" parameterType="hashmap" resultType="hashmap">
/* 선불EB 매입자료 대상자료 조회 */
SELECT SEQNO
, TRANSACTION_ID
, BRANCH_ID
, TERMINAL_ID
, SAM_ID
, SAM_SEQNO
, CARD_NO
, CARD_SEQNO
, BEFORE_AMOUNT
, LEVY_AMOUNT
, REMAIND_AMOUNT
, TRADE_TIME
, ALGORITHM_ID
, KEY_VERSION
, E_CASH_IDENTIFIER
, SAM_TOT_SEQNO
, SAM_COLLECT_CNT
, SAM_TOT_AMOUNT
, SIGN_VALUE
, CARD_KBN /* 이비카드 요청 고정값C */
, PERSON_CODE
, CAR_NO
, ALIAS_NO
, ZIPGE_ID
, ISSUE_ID
, USE_PLACE
, USE_PLACE_DETAIL
, SAM_TOT_CNT
, HSM_STATUS
FROM RF_TERMINAL_INFO_WEB
WHERE WEB_KIND = '1'
AND hsm_status is null
AND SEQNO between #{startIndex} and #{endIndex}
</select>
<select id="selectDayClosePostpayCard" parameterType="hashmap" resultType="hashmap">
/* 후불 매입자료 대상자료 조회 */
SELECT SEQNO
, TRANSACTION_ID
, BRANCH_ID
, TERMINAL_ID
, SAM_ID
, SAM_SEQNO
, CARD_NO
, CARD_SEQNO
, BEFORE_AMOUNT
, LEVY_AMOUNT
, REMAIND_AMOUNT
, TRADE_TIME
, ALGORITHM_ID
, KEY_VERSION
, E_CASH_IDENTIFIER
, SAM_TOT_SEQNO
, SAM_COLLECT_CNT
, SAM_TOT_AMOUNT
, SIGN_VALUE
, CARD_KBN /* 이비카드 요청 고정값C */
, PERSON_CODE
, CAR_NO
, ALIAS_NO
, ZIPGE_ID
, ISSUE_ID
, USE_PLACE
, USE_PLACE_DETAIL
FROM RF_TERMINAL_INFO_WEB
WHERE WEB_KIND = '2'
AND hsm_status is null
AND SEQNO between #{startIndex} and #{endIndex}
</select>
<insert id="insertDayCloseSendHistory" parameterType="hashmap">
/* 매입자료 송수신이력 등록 */
INSERT
INTO FILE_TRANS_HISTORY (
SEQ
, FILE_KIND_ID
, PASS_DATE
, FORMAT_DATE
, FARE_OFFICE_ID
, FILE_TRANS_KBN
, FILE_TRANS_YN
, DATA_PROCESS_KBN
, DIR_NAME
, FILE_NAME
, CREATER, CREATE_DATE, UPDATER, UPDATE_DATE
)
VALUES
(
FILE_TRANS_SEQ.NEXTVAL
, #{fileKindId, jdbcType=CHAR}
, to_char(SYSDATE, 'YYYYMMDD')
, to_char(SYSDATE, 'YYYYMMDD')
, #{fareOfficeId, jdbcType=CHAR}
, #{fileTransKbn, jdbcType=CHAR}
, #{fileTransYn, jdbcType=CHAR}
, #{dataProcessKbn, jdbcType=CHAR}
, #{dirName, jdbcType=VARCHAR}
, #{fileName, jdbcType=VARCHAR}
, #{WORKER}, SYSDATE, #{WORKER}, SYSDATE
)
</insert>
<select id="callSP_CARD_TRANS_SUNBUL" statementType="CALLABLE" parameterType="hashmap">
/* 선불 매입자료 처리 프로시져 호출 */
call SP_CARD_TRANS_SUNBUL()
</select>
<select id="callSP_CARD_TRANS_SUNBUL_EB" statementType="CALLABLE" parameterType="hashmap">
/* 선불EB 매입자료 처리 프로시져 호출 */
call SP_CARD_TRANS_SUNBUL_EB()
</select>
<select id="callSP_CARD_TRANS_WHOBUL" statementType="CALLABLE" parameterType="hashmap">
/* 후불 매입자료 처리 프로시져 호출 */
call SP_CARD_TRANS_WHOBUL()
</select>
<update id="updateTrafficCardDayClose" parameterType="hashmap">
/* 파일 전송 결과 수정 */
UPDATE RF_TERMINAL_INFO_WEB
SET hsm_status = #{hsmStatus}
WHERE WEB_KIND = #{webKind}
AND hsm_status is null
</update>
<insert id="insertDayCloseReturnPrepay" parameterType="hashmap">
/* 선불 반송자료 등록 */
INSERT
INTO CARD_TRANS_DETAIL_INFO (
WORKER_ID, FARE_OFFICE_ID, BOOTH_ID
, YEAR, MONTH, DAY, WORK_TIMES, SEQNO
, CARD_NO
, JOIN_CARD_NUMBER
, NOMAL_DATE
, REJECT_KBN
, REJECT_ID
, LEVY_AMOUNT
, CREATE_DATE, CREATER, UPDATE_DATE, UPDATER
)
(
SELECT rf.WORKER_ID, rf.FARE_OFFICE_ID, rf.BOOTH_ID
, rf.YEAR, rf.MONTH, rf.DAY, rf.WORK_TIMES, rf.SEQNO
, rf.CARD_NO
, joint.typical_id
, SYSDATE
, DECODE(rf.COLLECT_ID, '21', '1', '22', '2', '23', '1', '24', '2', '0')
, #{refuse}
, rf.LEVY_AMOUNT
, SYSDATE, #{WORKER}, SYSDATE, #{WORKER}
FROM rf_terminal_info rf
, join_card_info joint
WHERE rf.FARE_OFFICE_ID = joint.FARE_OFFICE_ID
AND rf.ISSUE_ID = joint.ISSUE_ID
AND rf.WORKER_ID = #{worker_id}
AND rf.FARE_OFFICE_ID = #{fare_id}
AND rf.BOOTH_ID = #{booth_id}
AND rf.YEAR = #{year}
AND rf.MONTH = #{month}
AND rf.DAY = #{day}
AND rf.WORK_TIMES = #{work_times}
)
</insert>
<select id="callSP_CARD_BANSONG_SUNBUL" statementType="CALLABLE" parameterType="hashmap">
/* 선불 반송자료 처리 프로시져 호출 */
call SP_CARD_BANSONG_SUNBUL()
</select>
<insert id="insertDayCloseReturnPrepayEB" parameterType="hashmap">
/* 선불EB 반송자료 등록 */
INSERT
INTO CARD_TRANS_DETAIL_INFO (
WORKER_ID, FARE_OFFICE_ID, BOOTH_ID
, YEAR, MONTH, DAY, WORK_TIMES, SEQNO
, CARD_NO
, JOIN_CARD_NUMBER
, NOMAL_DATE
, REJECT_KBN
, REJECT_ID
, LEVY_AMOUNT
, CREATE_DATE, CREATER, UPDATE_DATE, UPDATER
)
(
SELECT rf.WORKER_ID, rf.FARE_OFFICE_ID, rf.BOOTH_ID
, rf.YEAR, rf.MONTH, rf.DAY, rf.WORK_TIMES, rf.SEQNO
, rf.CARD_NO
, joint.typical_id
, SYSDATE
, DECODE(rf.COLLECT_ID, '21', '1', '22', '2', '23', '1', '24', '2', '0')
, DECODE(#{refuse}, '111', '06', '203', '07', '99')
, rf.LEVY_AMOUNT
, SYSDATE, #{WORKER}, SYSDATE, #{WORKER}
FROM rf_terminal_info rf
, join_card_info joint
WHERE rf.FARE_OFFICE_ID = joint.FARE_OFFICE_ID
AND rf.ISSUE_ID = joint.ISSUE_ID
AND rf.WORKER_ID = #{worker_id}
AND rf.FARE_OFFICE_ID = #{fare_id}
AND rf.BOOTH_ID = #{booth_id}
AND rf.YEAR = #{year}
AND rf.MONTH = #{month}
AND rf.DAY = #{day}
AND rf.WORK_TIMES = #{work_times}
)
</insert>
<select id="callSP_CARD_BANSONG_SUNBUL_EB" statementType="CALLABLE" parameterType="hashmap">
/* 선불EB 반송자료 처리 프로시져 호출 */
call SP_CARD_BANSONG_SUNBUL_EB()
</select>
<insert id="insertDayCloseReturnPostpay" parameterType="hashmap">
/* 후불 반송자료 등록 */
INSERT
INTO CARD_TRANS_DETAIL_INFO (
WORKER_ID, FARE_OFFICE_ID, BOOTH_ID
, YEAR, MONTH, DAY, WORK_TIMES, SEQNO
, CARD_NO
, JOIN_CARD_NUMBER
, NOMAL_DATE
, REJECT_KBN
, REJECT_ID
, LEVY_AMOUNT
, CREATE_DATE, CREATER, UPDATE_DATE, UPDATER
)
(
SELECT rf.WORKER_ID, rf.FARE_OFFICE_ID, rf.BOOTH_ID
, rf.YEAR, rf.MONTH, rf.DAY, rf.WORK_TIMES, rf.SEQNO
, rf.CARD_NO
, joint.typical_id
, SYSDATE
, DECODE(rf.COLLECT_ID, '21', '1', '22', '2', '23', '1', '24', '2', '0')
, DECODE(rf.FARE_OFFICE_ID, '01', DECODE(#{refuse}, '07', '11', #{refuse}), #{refuse})
, rf.LEVY_AMOUNT
, SYSDATE, #{WORKER}, SYSDATE, #{WORKER}
FROM rf_terminal_info rf
, join_card_info joint
WHERE rf.FARE_OFFICE_ID = joint.FARE_OFFICE_ID
AND rf.ISSUE_ID = joint.ISSUE_ID
AND rf.WORKER_ID = #{worker_id}
AND rf.FARE_OFFICE_ID = #{fare_id}
AND rf.BOOTH_ID = #{booth_id}
AND rf.YEAR = #{year}
AND rf.MONTH = #{month}
AND rf.DAY = #{day}
AND rf.WORK_TIMES = #{work_times}
)
</insert>
<select id="callSP_CARD_BANSONG_WHOBUL" statementType="CALLABLE" parameterType="hashmap">
/* 후불 반송자료 처리 프로시져 호출 */
call SP_CARD_BANSONG_WHOBUL();
</select>
<insert id="insertFileRecvTM" parameterType="hashmap">
/* BL PL 수신 등록 */
INSERT
INTO CARD_TRANS_LOG_INFO (
D_ST_DATE
, D_ST_TIME
, D_ED_DATE
, D_ED_TIME
, T_FILE_NAME
, C_CARD_KBN
, FARE_OFFICE_ID
, BOOTH_ID
, T_MESSAGE
, ISSUE_OFFICE_ID
, C_STATUS
)
values (
to_char(SYSDATE, 'YYYYMMDD')
, to_char(SYSDATE, 'HH24MISS')
, to_char(SYSDATE, 'YYYYMMDD')
, to_char(SYSDATE, 'HH24MISS')
, #{sRecvFileName, jdbcType=VARCHAR}
, #{C_CARD_KBN, jdbcType=VARCHAR}
, '03'
, '01'
, '수신완료'
, '99'
, 'C'
)
</insert>
</mapper>

@ -230,4 +230,295 @@
FROM TB_CFS_SEND_MAIL
WHERE COMMAND_SEQ = #{commandSeq}
</select>
<resultMap id="findBuildJusoHist-result" type="cfs.trsmrcv.vo.JusoUpdateResultVO">
<result property="dataDate" column="DATA_DATE"/>
<result property="actionDate" column="ACTION_DATE"/>
<result property="actionStartTime" column="ACTION_START_TIME"/>
<result property="actionEndTime" column="ACTION_END_TIME"/>
<result property="statCd" column="STAT_CD"/>
<result property="statNm" column="STAT_NM"/>
<result property="failRow" column="FAIL_ROW"/>
</resultMap>
<select id="findBuildJusoHist" parameterType="map" resultMap="findBuildJusoHist-result">
SELECT FUN_FMT_YMD(DATA_DATE) AS DATA_DATE
, FUN_FMT_YMD(ACTION_DATE) AS ACTION_DATE
, FUN_FMT_HMS(ACTION_START_TIME) AS ACTION_START_TIME
, FUN_FMT_HMS(ACTION_END_TIME) AS ACTION_END_TIME
, STAT_CD
, (CASE WHEN STAT_CD = '0' THEN '처리중' WHEN STAT_CD = '1' THEN '실패' ELSE '성공' END) AS STAT_NM
, FAIL_ROW
FROM TB_CFS_ADRES_BULD_INFO_HIST
WHERE 1 = 1
<if test="dataDateFrom != null and dataDateFrom != ''">
AND DATA_DATE <![CDATA[ >= ]]> REPLACE(#{dataDateFrom},'-','')
</if>
<if test="dataDateTo != null and dataDateTo != ''">
AND DATA_DATE <![CDATA[ <= ]]> REPLACE(#{dataDateTo},'-','')
</if>
<if test="actionDateFrom != null and actionDateFrom != ''">
AND ACTION_DATE <![CDATA[ >= ]]> REPLACE(#{actionDateFrom},'-','')
</if>
<if test="actionDateTo != null and actionDateTo != ''">
AND ACTION_DATE <![CDATA[ <= ]]> REPLACE(#{actionDateTo},'-','')
</if>
ORDER BY DATA_DATE DESC
</select>
<select id="findLastBuildJusoHist" parameterType="string" resultMap="findBuildJusoHist-result">
SELECT DATA_DATE
, ACTION_DATE
, ACTION_START_TIME
, ACTION_END_TIME
, STAT_CD
, FAIL_ROW
FROM (
SELECT ROWNUM AS RN
, DATA_DATE
, ACTION_DATE
, ACTION_START_TIME
, ACTION_END_TIME
, STAT_CD
, FAIL_ROW
FROM TB_CFS_ADRES_BULD_INFO_HIST
ORDER BY DATA_DATE DESC
)
WHERE ROWNUM = 1
</select>
<insert id="insertJusoHist" parameterType="string" >
INSERT
INTO TB_CFS_ADRES_BULD_INFO_HIST (
DATA_DATE
, ACTION_DATE
, ACTION_START_TIME
, STAT_CD
)
VALUES (
#{dataDate}
, TO_CHAR(SYSDATE,'YYYYMMDD')
, TO_CHAR(SYSDATE,'HH24MISS')
, '0'
)
</insert>
<update id="initJusoHist" parameterType="string">
UPDATE TB_CFS_ADRES_BULD_INFO_HIST
SET ACTION_DATE = TO_CHAR(SYSDATE,'YYYYMMDD')
, ACTION_START_TIME = TO_CHAR(SYSDATE,'HH24MISS')
, ACTION_END_TIME = ''
, STAT_CD = '0'
, FAIL_ROW = 0
WHERE DATA_DATE = #{dataDate}
</update>
<update id="updateJusoSuccResult" parameterType="string">
UPDATE TB_CFS_ADRES_BULD_INFO_HIST
SET ACTION_END_TIME = TO_CHAR(SYSDATE,'HH24MISS')
, STAT_CD = '2'
, FAIL_ROW = null
WHERE DATA_DATE = #{dataDate}
</update>
<update id="updateJusoFailResult" parameterType="cfs.trsmrcv.vo.JusoUpdateResultVO">
UPDATE TB_CFS_ADRES_BULD_INFO_HIST
SET ACTION_END_TIME = TO_CHAR(SYSDATE,'HH24MISS')
, STAT_CD = '1'
, FAIL_ROW = #{failRow}
WHERE DATA_DATE = #{dataDate}
</update>
<insert id="mergeJuso" parameterType="map">
MERGE INTO TB_CFS_ADRES_BULD_INFO
USING dual ON (BULD_MANAGE_NO = #{BULD_MANAGE_NO})
WHEN MATCHED THEN
UPDATE
SET LEGALDONG_CODE = #{LEGALDONG_CODE}
, CTPRVN_NM = #{CTPRVN_NM}
, SIGNGU_NM = #{SIGNGU_NM}
, LWCR_EMD_NM = #{LWCR_EMD_NM}
, LWCR_LI_NM = #{LWCR_LI_NM}
, MNTN_AT = #{MNTN_AT}
, LNM_MNNM = #{LNM_MNNM}
, LNM_SLNO = #{LNM_SLNO}
, RN_CODE = #{RN_CODE}
, RN = #{RN}
, UNDGRND_AT = #{UNDGRND_AT}
, BULD_MNNM = #{BULD_MNNM}
, BULD_SLNO = #{BULD_SLNO}
, BILD_REGSTR_BULD_NM = #{BILD_REGSTR_BULD_NM}
, DETAIL_BULD_NM = #{DETAIL_BULD_NM}
, EMD_SN = #{EMD_SN}
, ADSTRD_CODE = #{ADSTRD_CODE}
, ADSTRD_NM = #{ADSTRD_NM}
, ZIP = #{ZIP}
, POST_SEQ_NO = #{POST_SEQ_NO}
, MUCH_DLVROFFIC_NM = #{MUCH_DLVROFFIC_NM}
, MVMN_RESN_CODE = #{MVMN_RESN_CODE}
, BULD_INFO_NTFC_DE = #{BULD_INFO_NTFC_DE}
, CHANGE_BFE_RN_ADRES = #{CHANGE_BFE_RN_ADRES}
, SIGNGU_USE_BULD_NM = #{SIGNGU_USE_BULD_NM}
, COPERTN_HOUSE_AT = #{COPERTN_HOUSE_AT}
, BSIS_ZONE_NO = #{BSIS_ZONE_NO}
, DETAIL_ADRES_AT = #{DETAIL_ADRES_AT}
, BULD_INFO_RM_ONE = #{BULD_INFO_RM_ONE}
, BULD_INFO_RM_TWO = #{BULD_INFO_RM_TWO}
, CREAT_DT = SYSDATE
WHEN NOT MATCHED THEN
INSERT (
LEGALDONG_CODE
, CTPRVN_NM
, SIGNGU_NM
, LWCR_EMD_NM
, LWCR_LI_NM
, MNTN_AT
, LNM_MNNM
, LNM_SLNO
, RN_CODE
, RN
, UNDGRND_AT
, BULD_MNNM
, BULD_SLNO
, BILD_REGSTR_BULD_NM
, DETAIL_BULD_NM
, BULD_MANAGE_NO
, EMD_SN
, ADSTRD_CODE
, ADSTRD_NM
, ZIP
, POST_SEQ_NO
, MUCH_DLVROFFIC_NM
, MVMN_RESN_CODE
, BULD_INFO_NTFC_DE
, CHANGE_BFE_RN_ADRES
, SIGNGU_USE_BULD_NM
, COPERTN_HOUSE_AT
, BSIS_ZONE_NO
, DETAIL_ADRES_AT
, BULD_INFO_RM_ONE
, BULD_INFO_RM_TWO
, CREAT_DT
)
VALUES (
#{LEGALDONG_CODE}
, #{CTPRVN_NM}
, #{SIGNGU_NM}
, #{LWCR_EMD_NM}
, #{LWCR_LI_NM}
, #{MNTN_AT}
, #{LNM_MNNM}
, #{LNM_SLNO}
, #{RN_CODE}
, #{RN}
, #{UNDGRND_AT}
, #{BULD_MNNM}
, #{BULD_SLNO}
, #{BILD_REGSTR_BULD_NM}
, #{DETAIL_BULD_NM}
, #{BULD_MANAGE_NO}
, #{EMD_SN}
, #{ADSTRD_CODE}
, #{ADSTRD_NM}
, #{ZIP}
, #{POST_SEQ_NO}
, #{MUCH_DLVROFFIC_NM}
, #{MVMN_RESN_CODE}
, #{BULD_INFO_NTFC_DE}
, #{CHANGE_BFE_RN_ADRES}
, #{SIGNGU_USE_BULD_NM}
, #{COPERTN_HOUSE_AT}
, #{BSIS_ZONE_NO}
, #{DETAIL_ADRES_AT}
, #{BULD_INFO_RM_ONE}
, #{BULD_INFO_RM_TWO}
, SYSDATE
)
</insert>
<resultMap id="findAltMail-result" type="cfs.trsmrcv.vo.AltMailVO">
<result property="altMailSeq" column="ALT_MAIL_SEQ"/>
<result property="sender" column="SENDER"/>
<result property="receiver" column="RECEIVER"/>
<result property="sendDate" column="SEND_DATE"/>
<result property="title" column="TITLE"/>
<result property="text" column="TEXT"/>
<result property="attachFileName" column="ATTACH_FILE_NAME"/>
<result property="attachFileBlob" column="ATTACH_FILE_BLOB"/>
</resultMap>
<select id="findReceivedAltMailList" parameterType="map" resultMap="findAltMail-result">
SELECT ALT_MAIL_SEQ
, SENDER
, RECEIVER
, SEND_DATE
, TITLE
FROM TB_CFS_ALT_MAIL
WHERE RECEIVER = #{receiver}
<if test="sender != null and sender != ''">
AND SENDER = #{sender}
</if>
ORDER BY SEND_DATE DESC
</select>
<select id="findSentAltMailList" parameterType="map" resultMap="findAltMail-result">
SELECT ALT_MAIL_SEQ
, SENDER
, RECEIVER
, SEND_DATE
, TITLE
FROM TB_CFS_ALT_MAIL
WHERE SENDER = #{sender}
<if test="receiver != null and receiver != ''">
AND RECEIVER = #{receiver}
</if>
ORDER BY SEND_DATE DESC
</select>
<select id="findAltMail" parameterType="string" resultMap="findAltMail-result">
SELECT ALT_MAIL_SEQ
, SENDER
, RECEIVER
, SEND_DATE
, TITLE
, TEXT
, ATTACH_FILE_NAME
FROM TB_CFS_ALT_MAIL
WHERE ALT_MAIL_SEQ = #{altMailSeq}
</select>
<select id="findAltMailAttachFile" parameterType="string" resultMap="findAltMail-result">
SELECT ALT_MAIL_SEQ
, SENDER
, RECEIVER
, ATTACH_FILE_NAME
, ATTACH_FILE_BLOB
FROM TB_CFS_ALT_MAIL
WHERE ALT_MAIL_SEQ = #{altMailSeq}
</select>
<insert id="insertAltMail" parameterType="cfs.trsmrcv.vo.AltMailVO">
INSERT
INTO TB_CFS_ALT_MAIL (
ALT_MAIL_SEQ
, RECEIVER
, TITLE
, TEXT
, SENDER
, SEND_DATE
<if test="attachFileName != null and attachFileName != ''">
, ATTACH_FILE_NAME
, ATTACH_FILE_BLOB
</if>
)
VALUES (
LPAD(SEQ_ALT_MAIL.NEXTVAL,40,'0')
, #{receiver}
, #{title}
, #{text}
, #{sender}
, SYSDATE
<if test="attachFileName != null and attachFileName != ''">
, #{attachFileName}
, #{attachFileBlob}
</if>
)
</insert>
</mapper>

@ -44,36 +44,7 @@ public interface CommCollectServerService {
//dao3
public Map<String, Object> callTrafficCardDayCloseSummary(Map<String, String> param) throws Exception;
public Map<String, Object> selectDayClosePrepayCard(Map<String, String> param) throws Exception;
public Map<String, Object> selectDayClosePrepayEBCard(Map<String, String> param) throws Exception;
public Map<String, Object> selectDayClosePostpayCard(Map<String, String> param) throws Exception;
public Map<String, Object> insertDayCloseSendHistory(Map<String, String> param) throws Exception;
public int insertDayCloseReturnPrepay(Map<String, String> param) throws Exception;
public List<Map<String, Object>> callSP_CARD_BANSONG_SUNBUL(Map<String, String> param) throws Exception;
public int insertDayCloseReturnPrepayEB(Map<String, String> param) throws Exception;
public List<Map<String, Object>> callSP_CARD_BANSONG_SUNBUL_EB(Map<String, String> param) throws Exception;
public int insertDayCloseReturnPostpay(Map<String, String> param) throws Exception;
public List<Map<String, Object>> callSP_CARD_BANSONG_WHOBUL(Map<String, String> param) throws Exception;
public int updateTrafficCardDayClose(Map<String, String> param) throws Exception;
public int insertFileRecvTM(Map<String, String> param) throws Exception;
public int insertEtaxDetail(Map<String, String> param) throws Exception;
public int insertEtaxSummary(Map<String, String> param) throws Exception;
public List<Map<String, Object>> selectEtaxDetail(Map<String, String> param) throws Exception;

@ -0,0 +1,34 @@
package cfs.trsmrcv.service;
import java.util.List;
import java.util.Map;
public interface CommWebServer4Service {
public Map<String, Object> callTrafficCardDayCloseSummary() throws Exception;
public Map<String, Object> selectDayClosePrepayCard(Map<String, String> param) throws Exception;
public Map<String, Object> selectDayClosePrepayEBCard(Map<String, String> param) throws Exception;
public Map<String, Object> selectDayClosePostpayCard(Map<String, String> param) throws Exception;
public Map<String, Object> insertDayCloseSendHistory(Map<String, String> param) throws Exception;
public int insertDayCloseReturnPrepay(Map<String, String> param) throws Exception;
public List<Map<String, Object>> callSP_CARD_BANSONG_SUNBUL() throws Exception;
public int insertDayCloseReturnPrepayEB(Map<String, String> param) throws Exception;
public List<Map<String, Object>> callSP_CARD_BANSONG_SUNBUL_EB() throws Exception;
public int insertDayCloseReturnPostpay(Map<String, String> param) throws Exception;
public List<Map<String, Object>> callSP_CARD_BANSONG_WHOBUL() throws Exception;
public int updateTrafficCardDayClose(Map<String, String> param) throws Exception;
public int insertFileRecvTM(Map<String, String> param) throws Exception;
}

@ -59,10 +59,10 @@ public class CommCollectServerServiceImpl implements CommCollectServerService {
return dao.selectPreRegistCarInfoLive(param);
}
@Override
/**
*
*/
@Override
public int insertPreRegistInfoModi(Map<String, Object> param) throws Exception {
return dao.insertPreRegistInfoModi(param);
}
@ -108,6 +108,10 @@ public class CommCollectServerServiceImpl implements CommCollectServerService {
}
// 사전등록결제 일마감 집계 웹서비스 요청
@SuppressWarnings({ "unchecked", "unused" })
@Override
@ -247,197 +251,10 @@ public class CommCollectServerServiceImpl implements CommCollectServerService {
return dao_2.updateMstFlag(param);
}
// 교통카드 일마감 집계 웹서비스 요청
@Override
public Map<String, Object> callTrafficCardDayCloseSummary(Map<String, String> param) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
Map<String, Object> mapOrg = new HashMap<String, Object>();
List<Map<String, Object>> obj = null;
try {
mapOrg.put("out_ret", -1);
dao_3.callSP_CRT_KSCC_SND(mapOrg);
if(mapOrg.get("out_ret").toString().equals("-1") == true) {
result.setErrorMsg(ResultSmartPlatform.STATUS_ERROR_DEFAULT_DETAIL_CODE, null);
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
obj = dao_3.selectDayCloseCount(param);
if(obj == null) {
result.setErrorMsg(ResultSmartPlatform.STATUS_ERROR_DEFAULT_DETAIL_CODE, null);
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, obj);
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "정상적으로 처리되었습니다.");
}catch(RuntimeException e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
} catch (Exception e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
}
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
// 선불 일마감 집계 웹서비스 요청
@Override
public Map<String, Object> selectDayClosePrepayCard(Map<String, String> param) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
List<Map<String, Object>> obj = null;
try {
obj = dao_3.selectDayClosePrepayCard(param);
if(obj == null || obj.size() == 0) {
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "조회결과가 없습니다.");
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, obj);
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "정상적으로 처리되었습니다.");
}catch(RuntimeException e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
} catch (Exception e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
}
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
// 선불EB
@Override
public Map<String, Object> selectDayClosePrepayEBCard(Map<String, String> param) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
List<Map<String, Object>> obj = null;
try {
obj = dao_3.selectDayClosePrepayEBCard(param);
if(obj == null || obj.size() == 0) {
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "조회결과가 없습니다.");
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, obj);
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "정상적으로 처리되었습니다.");
}catch(RuntimeException e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
} catch (Exception e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
}
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
// 후불
@Override
public Map<String, Object> selectDayClosePostpayCard(Map<String, String> param) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
List<Map<String, Object>> obj = null;
try {
obj = dao_3.selectDayClosePostpayCard(param);
if(obj == null || obj.size() == 0) {
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "조회결과가 없습니다.");
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, obj);
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "정상적으로 처리되었습니다.");
}catch(RuntimeException e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
} catch (Exception e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
}
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
// 일마감 송신이력 저장
@Transactional
@Override
public Map<String, Object> insertDayCloseSendHistory(Map<String, String> param) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
List<Map<String, Object>> obj = null;
try {
param.put("WORKER", "admin");
if(dao_3.insertDayCloseSendHistory(param) < 0) {
result.setErrorMsg(null, null);
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
if(param.get("webKind").equals("0") == true && param.get("fileTransYn").equals("Y")) {
obj = dao_3.callSP_CARD_TRANS_SUNBUL(param);
}
else if(param.get("webKind").equals("1") == true && param.get("fileTransYn").equals("Y")) {
obj = dao_3.callSP_CARD_TRANS_SUNBUL_EB(param);
}
else if(param.get("webKind").equals("2") == true && param.get("fileTransYn").equals("Y")) {
obj = dao_3.callSP_CARD_TRANS_WHOBUL(param);
}
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, obj);
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "정상적으로 처리되었습니다.");
}catch(RuntimeException e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
} catch (Exception e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
}
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
@Override
public int insertDayCloseReturnPrepay(Map<String, String> param) throws Exception {
return dao_3.insertDayCloseReturnPrepay(param);
}
@Override
public List<Map<String, Object>> callSP_CARD_BANSONG_SUNBUL(Map<String, String> param) throws Exception {
return dao_3.callSP_CARD_BANSONG_SUNBUL(param);
}
@Override
public int insertDayCloseReturnPrepayEB(Map<String, String> param) throws Exception {
return dao_3.insertDayCloseReturnPrepayEB(param);
}
@Override
public List<Map<String, Object>> callSP_CARD_BANSONG_SUNBUL_EB(Map<String, String> param) throws Exception {
return dao_3.callSP_CARD_BANSONG_SUNBUL_EB(param);
}
@Override
public int insertDayCloseReturnPostpay(Map<String, String> param) throws Exception {
return dao_3.insertDayCloseReturnPostpay(param);
}
@Override
public List<Map<String, Object>> callSP_CARD_BANSONG_WHOBUL(Map<String, String> param) throws Exception {
return dao_3.callSP_CARD_BANSONG_WHOBUL(param);
}
private boolean isNumeric(String s) {
try {
@ -547,26 +364,12 @@ public class CommCollectServerServiceImpl implements CommCollectServerService {
}
@Override
public int updateTrafficCardDayClose(Map<String, String> param) throws Exception {
return dao_3.updateTrafficCardDayClose(param);
}
@Override
public int insertFileRecvTM(Map<String, String> param) throws Exception {
return dao_3.insertFileRecvTM(param);
}
@Override
public int insertEtaxDetail(Map<String, String> param) throws Exception {
return dao_3.insertEtaxDetail(param);
}
@Override
public int insertEtaxSummary(Map<String, String> param) throws Exception {
return dao_3.insertEtaxSummary(param);
}
@Override
public List<Map<String, Object>> selectEtaxDetail(Map<String, String> param) throws Exception {
return dao_3.selectEtaxDetail(param);

@ -0,0 +1,225 @@
package cfs.trsmrcv.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import cfs.common.util.Result;
import cfs.common.util.ResultSmartPlatform;
import cfs.trsmrcv.dao.CommWebServer4Dao;
import cfs.trsmrcv.service.CommWebServer4Service;
@Service("commWebServer4Service")
public class CommWebServer4ServiceImpl implements CommWebServer4Service {
protected Logger logger = LoggerFactory.getLogger(this.getClass());
@Resource(name="commWebServer4Dao")
private CommWebServer4Dao commWebServer4Dao;
// 교통카드 일마감 집계 웹서비스 요청
@Override
public Map<String, Object> callTrafficCardDayCloseSummary() throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
Map<String, Object> mapOrg = new HashMap<String, Object>();
List<Map<String, Object>> obj = null;
try {
mapOrg.put("out_ret", -1);
commWebServer4Dao.callSP_CRT_KSCC_SND(mapOrg);
if(mapOrg.get("out_ret").toString().equals("-1") == true) {
result.setErrorMsg(ResultSmartPlatform.STATUS_ERROR_DEFAULT_DETAIL_CODE, null);
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
obj = commWebServer4Dao.selectDayCloseCount(new HashMap<String, String>());
if(obj == null) {
result.setErrorMsg(ResultSmartPlatform.STATUS_ERROR_DEFAULT_DETAIL_CODE, null);
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, obj);
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "정상적으로 처리되었습니다.");
}catch(RuntimeException e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
} catch (Exception e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
}
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
// 선불 일마감 집계 웹서비스 요청
@Override
public Map<String, Object> selectDayClosePrepayCard(Map<String, String> param) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
List<Map<String, Object>> obj = null;
try {
obj = commWebServer4Dao.selectDayClosePrepayCard(param);
if(obj == null || obj.size() == 0) {
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "조회결과가 없습니다.");
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, obj);
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "정상적으로 처리되었습니다.");
}catch(RuntimeException e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
} catch (Exception e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
}
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
// 선불EB
@Override
public Map<String, Object> selectDayClosePrepayEBCard(Map<String, String> param) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
List<Map<String, Object>> obj = null;
try {
obj = commWebServer4Dao.selectDayClosePrepayEBCard(param);
if(obj == null || obj.size() == 0) {
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "조회결과가 없습니다.");
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, obj);
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "정상적으로 처리되었습니다.");
}catch(RuntimeException e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
} catch (Exception e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
}
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
// 후불
@Override
public Map<String, Object> selectDayClosePostpayCard(Map<String, String> param) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
List<Map<String, Object>> obj = null;
try {
obj = commWebServer4Dao.selectDayClosePostpayCard(param);
if(obj == null || obj.size() == 0) {
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "조회결과가 없습니다.");
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, obj);
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "정상적으로 처리되었습니다.");
}catch(RuntimeException e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
} catch (Exception e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
}
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
// 일마감 송신이력 저장
@Transactional
@Override
public Map<String, Object> insertDayCloseSendHistory(Map<String, String> param) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
List<Map<String, Object>> obj = null;
try {
param.put("WORKER", "admin");
if(commWebServer4Dao.insertDayCloseSendHistory(param) < 0) {
result.setErrorMsg(null, null);
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
if(param.get("webKind").equals("0") == true && param.get("fileTransYn").equals("Y")) {
obj = commWebServer4Dao.callSP_CARD_TRANS_SUNBUL(new HashMap<String,String>());
} else if(param.get("webKind").equals("1") == true && param.get("fileTransYn").equals("Y")) {
obj = commWebServer4Dao.callSP_CARD_TRANS_SUNBUL_EB(new HashMap<String,String>());
} else if(param.get("webKind").equals("2") == true && param.get("fileTransYn").equals("Y")) {
obj = commWebServer4Dao.callSP_CARD_TRANS_WHOBUL(new HashMap<String,String>());
}
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, obj);
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "정상적으로 처리되었습니다.");
}catch(RuntimeException e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
} catch (Exception e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
}
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
@Override
public int updateTrafficCardDayClose(Map<String, String> param) throws Exception {
return commWebServer4Dao.updateTrafficCardDayClose(param);
}
@Override
public int insertDayCloseReturnPrepay(Map<String, String> param) throws Exception {
return commWebServer4Dao.insertDayCloseReturnPrepay(param);
}
@Override
public List<Map<String, Object>> callSP_CARD_BANSONG_SUNBUL() throws Exception {
return commWebServer4Dao.callSP_CARD_BANSONG_SUNBUL(new HashMap<String, String>());
}
@Override
public int insertDayCloseReturnPrepayEB(Map<String, String> param) throws Exception {
return commWebServer4Dao.insertDayCloseReturnPrepayEB(param);
}
@Override
public List<Map<String, Object>> callSP_CARD_BANSONG_SUNBUL_EB() throws Exception {
return commWebServer4Dao.callSP_CARD_BANSONG_SUNBUL_EB(new HashMap<String, String>());
}
@Override
public int insertDayCloseReturnPostpay(Map<String, String> param) throws Exception {
return commWebServer4Dao.insertDayCloseReturnPostpay(param);
}
@Override
public List<Map<String, Object>> callSP_CARD_BANSONG_WHOBUL() throws Exception {
return commWebServer4Dao.callSP_CARD_BANSONG_WHOBUL(new HashMap<String, String>());
}
@Override
public int insertFileRecvTM(Map<String, String> param) throws Exception {
return commWebServer4Dao.insertFileRecvTM(param);
}
}

@ -0,0 +1,64 @@
package cfs.trsmrcv.vo;
public class AltMailVO {
private String altMailSeq;
private String sender;
private String sendDate;
private String receiver;
private String title;
private String text;
private String attachFileName;
private byte[] attachFileBlob;
public String getAltMailSeq() {
return altMailSeq;
}
public void setAltMailSeq(String altMailSeq) {
this.altMailSeq = altMailSeq;
}
public String getSender() {
return sender;
}
public void setSender(String sender) {
this.sender = sender;
}
public String getSendDate() {
return sendDate;
}
public void setSendDate(String sendDate) {
this.sendDate = sendDate;
}
public String getReceiver() {
return receiver;
}
public void setReceiver(String receiver) {
this.receiver = receiver;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public String getAttachFileName() {
return attachFileName;
}
public void setAttachFileName(String attachFileName) {
this.attachFileName = attachFileName;
}
public byte[] getAttachFileBlob() {
return attachFileBlob;
}
public void setAttachFileBlob(byte[] attachFileBlob) {
this.attachFileBlob = attachFileBlob;
}
}

@ -0,0 +1,57 @@
package cfs.trsmrcv.vo;
public class JusoUpdateResultVO {
private String dataDate;
private String actionDate;
private String actionStartTime;
private String actionEndTime;
private String statCd;
private String statNm;
private int failRow;
public String getDataDate() {
return dataDate;
}
public void setDataDate(String dataDate) {
this.dataDate = dataDate;
}
public String getActionDate() {
return actionDate;
}
public void setActionDate(String actionDate) {
this.actionDate = actionDate;
}
public String getActionStartTime() {
return actionStartTime;
}
public void setActionStartTime(String actionStartTime) {
this.actionStartTime = actionStartTime;
}
public String getActionEndTime() {
return actionEndTime;
}
public void setActionEndTime(String actionEndTime) {
this.actionEndTime = actionEndTime;
}
public String getStatCd() {
return statCd;
}
public void setStatCd(String statCd) {
this.statCd = statCd;
}
public String getStatNm() {
return statNm;
}
public void setStatNm(String statNm) {
this.statNm = statNm;
}
public int getFailRow() {
return failRow;
}
public void setFailRow(int failRow) {
this.failRow = failRow;
}
}

@ -2,16 +2,22 @@ package cfs.trsmrcv.web;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
@ -21,12 +27,19 @@ import org.json.simple.parser.JSONParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
import cfs.common.service.CfsCommonService;
import cfs.common.util.CallWebService;
import cfs.common.util.HttpUtil;
@ -42,6 +55,7 @@ import cfs.trsmrcv.service.MobilePenaltyDetailService;
import cfs.trsmrcv.service.TransManageService;
import cfs.trsmrcv.vo.CardTransLogInfoVO;
import cfs.trsmrcv.vo.ExtTransManageInfoVO;
import cfs.trsmrcv.vo.JusoUpdateResultVO;
import cfs.trsmrcv.vo.MobilePenaltyDetailVO;
import tcp.seoul.sms.SMSClient;
import tcp.seoul.sms.SMSClientVO;
@ -76,6 +90,11 @@ public class CommWebBrowserController {
@Autowired
private TransManageService transManageService;
private ApplicationContext getApplicationContext() {
return ContextLoader.getCurrentWebApplicationContext();
}
/**
*
* <pre></pre>
@ -1344,24 +1363,6 @@ public class CommWebBrowserController {
spResult.setMsg(ResultSmartPlatform.STATUS_SUCESS, "정상적으로 처리되었습니다.");
return spResult.getResult();
}
/**
*
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/getJusoLink.do", method=RequestMethod.POST)
public @ResponseBody Map<String, String> getJusoLink(@RequestBody Map<String, Object> param){
Map<String,String> result = new HashMap<String,String>();
Map<String,String> searchMap = new HashMap<String,String>();
searchMap.put("year", param.get("year").toString());
searchMap.put("month", param.get("month").toString());
String link = trsmrcvDao.getJusoDownLink(searchMap);
String[] link_split = link.split("\\?");
result.put("url", link_split[0]);
result.put("params", link_split[1]);
return result;
}
}

@ -0,0 +1,320 @@
package cfs.trsmrcv.web;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.apache.ibatis.annotations.Param;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import cfs.common.util.HttpUtil;
import cfs.common.util.Result;
import cfs.common.vo.ParamBean;
import cfs.trsmrcv.dao.TrsmrcvDao;
import cfs.trsmrcv.vo.AltMailVO;
import cfs.trsmrcv.vo.JusoUpdateResultVO;
@Controller
public class CommWebBrowserSystemManageController {
protected Logger logger = LoggerFactory.getLogger(this.getClass());
@Resource(name="trsmrcvDao")
private TrsmrcvDao trsmrcvDao;
/**
*
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/findBuildJusoHist.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> findBuildJusoHist(@RequestBody ParamBean<Map<String, Object>> param){
Map<String,Object> searchMap = param.getParam();
Result result = new Result();
List<JusoUpdateResultVO> buildJusoHistList = trsmrcvDao.findBuildJusoHist(searchMap);
result.setData("result", buildJusoHistList);
return result.getResult();
}
/**
*
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/uploadJuso.do", method=RequestMethod.POST)
public @ResponseBody Map<String, String> getJusoLink(
MultipartHttpServletRequest mreq){
Map<String,String> result = new HashMap<String,String>();
Enumeration<String> es = mreq.getParameterNames();
while (es.hasMoreElements()){
System.out.println(es.nextElement().toString());
}
MultipartFile mfile = mreq.getFile("buildJusoFile");
String ori = mfile.getOriginalFilename();
if(!ori.startsWith("AlterD.JUSUBM.") || !ori.endsWith(".TI_SPBD_BULD.TXT")){
result.put("result", "fail");
result.put("failResn", "건물주소 일변동 파일이 아닙니다.");
return result;
}
String[] ori2 = ori.split("\\.");
String dateOfFile = ori2[2];
String targetYmd = "";
JusoUpdateResultVO lastData = trsmrcvDao.findLastBuildJusoHist("");
boolean isNew = true;
if(lastData != null){
if(lastData.getStatCd().equals("0")){
result.put("result", "fail");
result.put("failResn", "주소 갱신이 처리중 입니다.");
return result;
}
if(lastData.getStatCd().equals("1")){
targetYmd = lastData.getDataDate().replace("-", "");
isNew = false;
}
if(lastData.getStatCd().equals("2")){
String lastDataDate = lastData.getDataDate().replace("-", "");
SimpleDateFormat formatDt = new SimpleDateFormat("yyyyMMdd");
Calendar cal = Calendar.getInstance();
Date date;
try {
date = formatDt.parse(lastDataDate);
} catch (ParseException e) {
result.put("result", "fail");
return result;
}
cal.setTime(date);
cal.add(Calendar.DATE, +1);
String nextDate = formatDt.format(cal.getTime());
targetYmd = nextDate;
}
} else {
targetYmd = "20250801";
}
if(!dateOfFile.equals(targetYmd)){
result.put("result", "fail");
result.put("failResn", "다음으로 처리해야할 일변동날짜는 "+targetYmd+"입니다."
+"<br />업로드한 파일은 "+dateOfFile+" 자료입니다.");
return result;
}
String workPath = "/gpta/source-app/cfs/jusoUploadData";
File workDir = new File(workPath);
if(!workDir.exists()){
workDir.mkdirs();
} else {
File[] fl = workDir.listFiles();
if(fl != null){
for(File f : fl){
f.delete();
}
}
}
String destPath = workPath+"/"+ori;
File destFile = new File(destPath);
try {
mfile.transferTo(destFile);
} catch (IllegalStateException e) {
result.put("result", "fail");
return result;
} catch (IOException e) {
result.put("result", "fail");
return result;
}
JusoThread jusoThread = new JusoThread(trsmrcvDao, targetYmd, isNew, destPath);
Thread newThread = new Thread(jusoThread);
newThread.setName("jusoThread #1");
newThread.start();
result.put("result", "success");
return result;
}
/**
*
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/findReceivedAltMailList.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> findReceivedAltMailList(
@RequestBody ParamBean<Map<String, Object>> param
){
String myId = HttpUtil.getUserId();
Map<String,Object> searchMap = param.getParam();
searchMap.put("receiver", myId);
Result result = new Result();
List<AltMailVO> receivedAltMailList = trsmrcvDao.findReceivedAltMailList(searchMap);
result.setData("result", receivedAltMailList);
return result.getResult();
}
/**
*
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/findSentAltMailList.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> findSentAltMailList(
@RequestBody ParamBean<Map<String, Object>> param
){
String myId = HttpUtil.getUserId();
Map<String,Object> searchMap = param.getParam();
searchMap.put("sender", myId);
Result result = new Result();
List<AltMailVO> sentAltMailList = trsmrcvDao.findSentAltMailList(searchMap);
result.setData("result", sentAltMailList);
return result.getResult();
}
/**
*
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/findAltMail.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> findAltMail(
@RequestBody ParamBean<Map<String, Object>> param
){
String altMailSeq = param.getParam().get("altMailSeq").toString();
String myId = HttpUtil.getUserId();
Result result = new Result();
AltMailVO altMailVO = trsmrcvDao.findAltMail(altMailSeq);
if(!altMailVO.getSender().equals(myId) && !altMailVO.getReceiver().equals(myId)){
altMailVO = new AltMailVO();
}
result.setData("result", altMailVO);
return result.getResult();
}
/**
*
* <pre></pre>
* @throws Exception
*/
@RequestMapping(value="/cfs/trsmrcv/downloadAltMailAttachFile.do", method=RequestMethod.GET)
public void downloadAltMailAttachFile(
@RequestParam String altMailSeq,
HttpServletResponse response
) throws Exception{
String myId = HttpUtil.getUserId();
AltMailVO altMailVO = trsmrcvDao.findAltMailAttachFile(altMailSeq);
if(!altMailVO.getSender().equals(myId) && !altMailVO.getReceiver().equals(myId)){
return ;
}
String fileName = altMailVO.getAttachFileName();
if(fileName == null || fileName.equals("")){
return ;
}
byte[] fileBlob = altMailVO.getAttachFileBlob();
int len = fileBlob.length;
// 응답 헤더 설정
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment; filename=\""
+ new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\"");
response.setHeader("Content-Transfer-Encoding", "binary");
response.setHeader("Content-Length", String.valueOf(len));
// 파일 내용 스트림으로 전송
OutputStream os = response.getOutputStream();
os.write(fileBlob, 0, len);
}
/**
*
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/insertAltMail.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> insertAltMail(
MultipartHttpServletRequest mreq
){
Result result = new Result();
AltMailVO altMailVO = new AltMailVO();
String myId = HttpUtil.getUserId();
MultipartFile mfile = mreq.getFile("attachFile");
try {
if(mfile != null){
altMailVO.setAttachFileName(mfile.getOriginalFilename());
altMailVO.setAttachFileBlob(mfile.getBytes());
}
} catch (IOException e) {
e.printStackTrace();
result.setData("result", "fail");
return result.getResult();
}
altMailVO.setSender(myId);
altMailVO.setReceiver(mreq.getParameter("receiver"));
altMailVO.setTitle(mreq.getParameter("title"));
altMailVO.setText(mreq.getParameter("text"));
trsmrcvDao.insertAltMail(altMailVO);
result.setData("result", "success");
return result.getResult();
}
}

@ -18,7 +18,7 @@ import cfs.common.service.CfsCommonService;
import cfs.common.util.Result;
import cfs.common.util.ResultSmartPlatform;
import cfs.trsmrcv.dao.TrsmrcvDao;
import cfs.trsmrcv.service.CommCollectServerService;
import cfs.trsmrcv.service.CommWebServer4Service;
@Controller
public class CommWebServer4Controller {
@ -31,8 +31,9 @@ public class CommWebServer4Controller {
@Resource(name = "cfsCommonService")
private CfsCommonService cfsCommonService;
@Resource(name="commCollectServerService")
private CommCollectServerService commCollectServerService;
@Resource(name="commWebServer4Service")
private CommWebServer4Service commWebServer4Service;
/**
*
@ -40,13 +41,9 @@ public class CommWebServer4Controller {
*/
@RequestMapping(value="/cfs/trsmrcv/callTrafficCardDayCloseSummary.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> callTrafficCardDayCloseSummary(
HttpServletRequest request) throws Exception {
// 로직은 ServiceImplement 로 이동
Map<String, String> param = new HashMap<String, String>();
logger.info("============== 11");
return commCollectServerService.callTrafficCardDayCloseSummary(param);
return commWebServer4Service.callTrafficCardDayCloseSummary();
}
/**
@ -54,9 +51,11 @@ public class CommWebServer4Controller {
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/selectDayClosePrepayCard.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> selectDayClosePrepayCard(@RequestBody Map<String, String> param, HttpServletRequest request) throws Exception {
// 로직은 ServiceImplement 로 이동
return commCollectServerService.selectDayClosePrepayCard(param);
public @ResponseBody Map<String, Object> selectDayClosePrepayCard(
@RequestBody Map<String, String> param,
HttpServletRequest request) throws Exception {
return commWebServer4Service.selectDayClosePrepayCard(param);
}
/**
@ -64,10 +63,10 @@ public class CommWebServer4Controller {
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/selectDayClosePrepayEBCard.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> selectDayClosePrepayEBCard(@RequestBody Map<String, String> param, HttpServletRequest request) throws Exception {
// 로직은 ServiceImplement 로 이동
return commCollectServerService.selectDayClosePrepayEBCard(param);
public @ResponseBody Map<String, Object> selectDayClosePrepayEBCard(
@RequestBody Map<String, String> param,
HttpServletRequest request) throws Exception {
return commWebServer4Service.selectDayClosePrepayEBCard(param);
}
//
/**
@ -75,10 +74,10 @@ public class CommWebServer4Controller {
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/selectDayClosePostpayCard.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> selectDayClosePostpayCard(@RequestBody Map<String, String> param, HttpServletRequest request) throws Exception {
// 로직은 ServiceImplement 로 이동
return commCollectServerService.selectDayClosePostpayCard(param);
public @ResponseBody Map<String, Object> selectDayClosePostpayCard(
@RequestBody Map<String, String> param,
HttpServletRequest request) throws Exception {
return commWebServer4Service.selectDayClosePostpayCard(param);
}
/**
@ -86,9 +85,11 @@ public class CommWebServer4Controller {
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/insertDayCloseSendHistory.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> insertDayCloseSendHistory(@RequestBody Map<String, String> param, HttpServletRequest request) throws Exception {
public @ResponseBody Map<String, Object> insertDayCloseSendHistory(
@RequestBody Map<String, String> param,
HttpServletRequest request) throws Exception {
return commCollectServerService.insertDayCloseSendHistory(param);
return commWebServer4Service.insertDayCloseSendHistory(param);
}
/**
@ -96,18 +97,17 @@ public class CommWebServer4Controller {
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/updateTrafficCardDayClose.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> updateTrafficCardDayClose(@RequestBody Map<String, String> param, HttpServletRequest request) throws Exception {
public @ResponseBody Map<String, Object> updateTrafficCardDayClose(
@RequestBody Map<String, String> param,
HttpServletRequest request) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
logger.info("==== " + param);
try {
// 배열 처리...
if(commCollectServerService.insertDayCloseReturnPrepay(param) < 0) {
result.setErrorMsg(null, null);
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
}
commCollectServerService.updateTrafficCardDayClose(param);
commWebServer4Service.updateTrafficCardDayClose(param);
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, "");
result.setMsg(ResultSmartPlatform.STATUS_SUCESS, "정상적으로 처리되었습니다.");
@ -127,17 +127,20 @@ public class CommWebServer4Controller {
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/insertDayCloseReturnPrepay.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> insertDayCloseReturnPrepay(@RequestBody Map<String, String> param, HttpServletRequest request) throws Exception {
public @ResponseBody Map<String, Object> insertDayCloseReturnPrepay(
@RequestBody Map<String, String> param,
HttpServletRequest request) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
try {
logger.info("==== insertDayCloseReturnPrepay.do");
logger.info("==== " + param.size());
logger.info("==== " + param);
// 배열 처리...
param.put("WORKER", "admin");
if(commCollectServerService.insertDayCloseReturnPrepay(param) < 0) {
if(commWebServer4Service.insertDayCloseReturnPrepay(param) < 0) {
result.setErrorMsg(null, null);
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
@ -160,14 +163,17 @@ public class CommWebServer4Controller {
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/callDayCloseReturnPrepay.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> callDayCloseReturnPrepay(@RequestBody Map<String, String> param, HttpServletRequest request) throws Exception {
public @ResponseBody Map<String, Object> callDayCloseReturnPrepay(
@RequestBody Map<String, String> param,
HttpServletRequest request) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
Map<String, String> mapOrg = new HashMap<String, String>();
try {
logger.info("==== callDayCloseReturnPrepay.do : 1");
commCollectServerService.callSP_CARD_BANSONG_SUNBUL(mapOrg);
commWebServer4Service.callSP_CARD_BANSONG_SUNBUL();
logger.info("==== callDayCloseReturnPrepay.do : 2");
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, "");
@ -187,17 +193,20 @@ public class CommWebServer4Controller {
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/insertDayCloseReturnPrepayEB.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> insertDayCloseReturnPrepayEB(@RequestBody Map<String, String> param, HttpServletRequest request) throws Exception {
public @ResponseBody Map<String, Object> insertDayCloseReturnPrepayEB(
@RequestBody Map<String, String> param,
HttpServletRequest request) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
try {
logger.info("==== insertDayCloseReturnPrepay.do");
logger.info("==== " + param.size());
logger.info("==== " + param);
// 배열 처리...
param.put("WORKER", "admin");
if(commCollectServerService.insertDayCloseReturnPrepayEB(param) < 0) {
if(commWebServer4Service.insertDayCloseReturnPrepayEB(param) < 0) {
result.setErrorMsg(null, null);
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
@ -220,14 +229,16 @@ public class CommWebServer4Controller {
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/callDayCloseReturnPrepayEB.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> callDayCloseReturnPrepayEB(@RequestBody Map<String, String> param, HttpServletRequest request) throws Exception {
public @ResponseBody Map<String, Object> callDayCloseReturnPrepayEB(
@RequestBody Map<String, String> param,
HttpServletRequest request) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
Map<String, String> mapOrg = new HashMap<String, String>();
try {
logger.info("==== callDayCloseReturnPrepayEB.do : 1");
commCollectServerService.callSP_CARD_BANSONG_SUNBUL_EB(mapOrg);
commWebServer4Service.callSP_CARD_BANSONG_SUNBUL_EB();
logger.info("==== callDayCloseReturnPrepayEB.do : 1");
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, "");
@ -247,17 +258,20 @@ public class CommWebServer4Controller {
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/insertDayCloseReturnPostpay.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> insertDayCloseReturnPostpay(@RequestBody Map<String, String> param, HttpServletRequest request) throws Exception {
public @ResponseBody Map<String, Object> insertDayCloseReturnPostpay(
@RequestBody Map<String, String> param,
HttpServletRequest request) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
try {
logger.info("==== insertDayCloseReturnPrepay.do");
logger.info("==== " + param.size());
logger.info("==== " + param);
// 배열 처리...
param.put("WORKER", "admin");
if(commCollectServerService.insertDayCloseReturnPostpay(param) < 0) {
if(commWebServer4Service.insertDayCloseReturnPostpay(param) < 0) {
result.setErrorMsg(null, null);
logger.info(result.getResult().get("resultMessage").toString());
return result.getResult();
@ -281,14 +295,17 @@ public class CommWebServer4Controller {
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/callDayCloseReturnPostpay.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> callDayCloseReturnPostpay(@RequestBody Map<String, String> param, HttpServletRequest request) throws Exception {
public @ResponseBody Map<String, Object> callDayCloseReturnPostpay(
@RequestBody Map<String, String> param,
HttpServletRequest request) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
Map<String, String> mapOrg = new HashMap<String, String>();
try {
logger.info("==== callDayCloseReturnPostpay.do : 1");
// 배열 처리...
commCollectServerService.callSP_CARD_BANSONG_WHOBUL(mapOrg);
commWebServer4Service.callSP_CARD_BANSONG_WHOBUL();
logger.info("==== callDayCloseReturnPostpay.do : 2");
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, "");
@ -308,8 +325,9 @@ public class CommWebServer4Controller {
* <pre></pre>
*/
@RequestMapping(value="/cfs/trsmrcv/insertFileRecvTM.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> insertFileRecvTM(@RequestBody Map<String, String> param, HttpServletRequest request) throws Exception {
public @ResponseBody Map<String, Object> insertFileRecvTM(
@RequestBody Map<String, String> param,
HttpServletRequest request) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
@ -318,18 +336,15 @@ public class CommWebServer4Controller {
if(param.get("fileType").toString().equals("WR") == true) {
param.put("C_CARD_KBN", "1");
}
else if(param.get("fileType").toString().equals("WS") == true) {
} else if(param.get("fileType").toString().equals("WS") == true) {
param.put("C_CARD_KBN", "3");
}
else if(param.get("fileType").toString().equals("WT") == true) {
} else if(param.get("fileType").toString().equals("WT") == true) {
param.put("C_CARD_KBN", "7");
}
else {
} else {
param.put("C_CARD_KBN", "0");
}
commCollectServerService.insertFileRecvTM(param);
commWebServer4Service.insertFileRecvTM(param);
logger.info("==== insertFileRecvTM.do : 2");
result.setData(ResultSmartPlatform.RESULT_KEY_DEFAULT, "");

@ -0,0 +1,137 @@
package cfs.trsmrcv.web;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import cfs.trsmrcv.dao.TrsmrcvDao;
import cfs.trsmrcv.vo.JusoUpdateResultVO;
public class JusoThread implements Runnable {
protected Logger logger = LoggerFactory.getLogger(this.getClass());
private TrsmrcvDao trsmrcvDao;
private String targetYmd;
private boolean isNew;
private String filePath;
public JusoThread(TrsmrcvDao dao, String ymd, boolean isNewFlag, String path) {
this.trsmrcvDao = dao;
this.targetYmd = ymd;
this.isNew = isNewFlag;
this.filePath = path;
}
public static final String[] JUSO_COLS = {
"LEGALDONG_CODE",
"CTPRVN_NM",
"SIGNGU_NM",
"LWCR_EMD_NM",
"LWCR_LI_NM",
"MNTN_AT",
"LNM_MNNM",
"LNM_SLNO",
"RN_CODE",
"RN",
"UNDGRND_AT",
"BULD_MNNM",
"BULD_SLNO",
"BILD_REGSTR_BULD_NM",
"DETAIL_BULD_NM",
"BULD_MANAGE_NO",
"EMD_SN",
"ADSTRD_CODE",
"ADSTRD_NM",
"ZIP",
"POST_SEQ_NO",
"MUCH_DLVROFFIC_NM",
"MVMN_RESN_CODE",
"BULD_INFO_NTFC_DE",
"CHANGE_BFE_RN_ADRES",
"SIGNGU_USE_BULD_NM",
"COPERTN_HOUSE_AT",
"BSIS_ZONE_NO",
"DETAIL_ADRES_AT",
"BULD_INFO_RM_ONE",
"BULD_INFO_RM_TWO"
};
@Override
public void run() {
JusoUpdateResultVO vo = new JusoUpdateResultVO();
vo.setDataDate(targetYmd);
vo.setFailRow(0);
try {
if(isNew){
trsmrcvDao.insertJusoHist(targetYmd);
} else {
trsmrcvDao.initJusoHist(targetYmd);
}
} catch (Exception e1) {
trsmrcvDao.updateJusoFailResult(vo);
return;
}
int failRow = 0;
int curRow = 0;
boolean succ = true;
BufferedReader reader = null;
try {
reader = new BufferedReader(new InputStreamReader(new FileInputStream(filePath),"MS949"));
} catch (Exception e1) {
trsmrcvDao.updateJusoFailResult(vo);
return;
}
try {
for(String line = reader.readLine(); line != null; line = reader.readLine()) {
curRow++;
if(!line.equals("")) {
String[] line_split = line.split(Pattern.quote("|"), -1);
Map<String,String> jusoTableMap = new HashMap<String,String>();
for(int i=0; i<JUSO_COLS.length ; i++){
jusoTableMap.put(JUSO_COLS[i], line_split[i]);
}
trsmrcvDao.mergeJuso(jusoTableMap);
}
}
reader.close();
} catch (Exception e) {
failRow = curRow;
succ = false;
} finally {
try {
reader.close();
} catch (Exception e) {
}
}
if(succ){
trsmrcvDao.updateJusoSuccResult(targetYmd);
} else {
vo.setFailRow(failRow);
trsmrcvDao.updateJusoFailResult(vo);
}
}
}

@ -116,8 +116,8 @@ public class TestController {
}
@RequestMapping(value="/rest/test/noting.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> noting(@RequestBody Map<String,Object> reqMap) throws Exception {
@RequestMapping(value="/rest/test/nothing.do", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> nothing(@RequestBody Map<String,Object> reqMap) throws Exception {
Map result = new HashMap();
String commandSeq = trsmrcvDao.getCommandSeq("");
@ -177,7 +177,7 @@ public class TestController {
private Map<String,Object> touchAndWait(String touchSys, String commandSeq) throws Exception {
Map<String,Object> commandResult = new HashMap<String,Object>();
this.shellCmd("/gpta/source-app/cfs/relay_jar/ssh_ssh_touch.sh " + touchSys);
this.shellCmd("/gpta/source-app/cfs/relay_jar/ssh_sh.sh " + touchSys);
int FIRST_SLEEP = 2000;
Thread.sleep(FIRST_SLEEP);

Loading…
Cancel
Save