시스템관리 수정(주소 수동 업로드, 메일 대체 기능)
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>
|
||||
@ -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);
|
||||
|
||||
}
|
||||
@ -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>
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue