우편통합 - 접수결과 수정.

main
jjh 11 months ago
parent 15fbac2e70
commit ebd6a40122

@ -34,7 +34,13 @@ public interface EpostRcptRsltMapper extends AbstractMapper {
* @param req
* @return
*/
List<EpostRcptRslt> selectEpostRcptRslts(EpostQuery req);
List<DataObject> selectEpostRcptRslts(EpostQuery req);
/** , .
* @param req
* @return ,
*/
List<DataObject> selectEpostRcptRsltSum(EpostQuery req);
/** .
* @param params

@ -29,7 +29,13 @@ public interface EpostRcptRsltService {
* @param req
* @return
*/
List<EpostRcptRslt> getEpostRcptRslts(EpostQuery req);
List<DataObject> getEpostRcptRslts(EpostQuery req);
/** , .
* @param req
* @return ,
*/
List<DataObject> getEpostRcptRsltSum(EpostQuery req);
/** .
* @param epostRcptRslt

@ -42,10 +42,18 @@ public class EpostRcptRsltBean extends AbstractComponent {
* @param req
* @return
*/
public List<EpostRcptRslt> getEpostRcptRslts(EpostQuery req) {
public List<DataObject> getEpostRcptRslts(EpostQuery req) {
return epostRcptRsltMapper.selectEpostRcptRslts(req);
}
/** , .
* @param req
* @return ,
*/
public List<DataObject> getEpostRcptRsltSum(EpostQuery req) {
return epostRcptRsltMapper.selectEpostRcptRsltSum(req);
}
/** .
* @param epostRcptRslt
* @return

@ -36,10 +36,15 @@ public class EpostRcptRsltServiceBean extends AbstractServiceBean implements Epo
}
@Override
public List<EpostRcptRslt> getEpostRcptRslts(EpostQuery req) {
public List<DataObject> getEpostRcptRslts(EpostQuery req) {
return epostRcptRsltBean.getEpostRcptRslts(req);
}
@Override
public List<DataObject> getEpostRcptRsltSum(EpostQuery req) {
return epostRcptRsltBean.getEpostRcptRsltSum(req);
}
@Override
public boolean create(EpostRcptRslt epostRcptRslt) {
return epostRcptRsltBean.create(epostRcptRslt);

@ -47,6 +47,7 @@ public class Epst02Controller extends ApplicationController {
, getEpostReceiptRegistrationInfo = "/040/info.do" // 전자우편 발송 상태 정보 조회
, epostReceiptResultMain = "/050/main.do" // 전자우편 접수 결과 메인
, getEpostReceiptResultList = "/050/list.do" // 전자우편 접수 결과 목록 조회
, getEpostReceiptResultSumAmount = "/050/sumAmt.do" // 전자우편 접수 결과 합계 금액 조회
;
}
@ -330,13 +331,16 @@ public class Epst02Controller extends ApplicationController {
addCodes(commonCodes, mav, "EGP002", "FIM054", "FIM082");
return mav.addObject("pageName", "epst02050") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
return mav
.addObject("pageName", "epst02050") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("infoPrefix", "epostRcptRslt") // prefix
.addObject("sggCd", managedUser.getOrgID()) // 시군구 코드(SGG_CD)
.addObject("EGP002List", commonCodes.get("EGP002")) // 취급 구분(DIV_KB)
.addObject("FIM054List", commonCodes.get("FIM054")) // 업무 구분 코드(TASK_SE_CD)
.addObject("FIM082List", commonCodes.get("FIM082")) // 작업 코드 3(JOB_CD)
.addObject("pageDataName2", "Dept") // dataset2 부서 정보
.addObject("deptInfo", json ? deptInfo : toJson(deptInfo)) // 부서 정보(TB_DEPT)
.addObject("pageDataName3", "SumAmt") // dataset3 합계 정보
;
}
@ -357,6 +361,22 @@ public class Epst02Controller extends ApplicationController {
return setCollectionInfo(new ModelAndView("jsonView"), result, "epostRcptRslt");
}
/** ID , .
* @param crdnId ID
* @return fims/sprt/sprt02020-main jsonView
* <pre><code> {
* "crdnPayer": {...}
* }</code></pre>
*/
public ModelAndView getEpostReceiptResultSumAmount(EpostQuery req) {
//
List<DataObject> sumAmt = epostRcptRsltService.getEpostRcptRsltSum(req);
return new ModelAndView("jsonView")
.addObject("sumAmt", sumAmt) // 합계 정보
;
}
/** .
* @param epostRcptRslt
* @return jsonView

@ -947,6 +947,12 @@ public class DpvController {
return super.getEpostReceiptResultList(req);
}
@Override
@RequestMapping(name="전자우편 접수 결과 합계 금액 조회", value=METHOD_URL.getEpostReceiptResultSumAmount)
public ModelAndView getEpostReceiptResultSumAmount(EpostQuery req) {
return super.getEpostReceiptResultSumAmount(req);
}
}
@Controller

@ -114,7 +114,7 @@
<when test="by == 'rceptAmt'"> ERR.RCEPT_AMT </when>
<when test="by == 'usefeeAmt'"> ERR.USEFEE_AMT </when>
<when test="by == 'totpostPrc'"> ERR.TOTPOST_PRC </when>
<when test="by == 'jobCd'"> SUBSTR(ERR.JOB_CD,3,1) </when>
<when test="by == 'jobCd'"> ERR.JOB_CD </when>
</choose>
<include refid="dynamicSearch.center" />#{term}<include refid="dynamicSearch.end" />
</when>
@ -145,6 +145,87 @@
<include refid="utility.orderBy" />
</select>
<select id="selectEpostRcptRsltSum" parameterType="map" resultType="dataobject">/* 전자우편 접수 결과 합계 조회(epostRcptRsltMapper.selectEpostRcptRsltSum) */
SELECT DIV_KB /* 취급 구분 */
, SUM(RCEPT_CNT) AS RCEPT_CNT /* 발송수량 */
, SUM(RCEPT_AMT) AS RCEPT_AMT /* 결제금액 */
, SUM(USEFEE_AMT) AS USEFEE_AMT /* 제작수수료 */
, SUM(TOTPOST_PRC) AS TOTPOST_PRC /* 우편요금 */
, (SELECT GET_CODE_NM('EGP002', DIV_KB) FROM DUAL) AS DIV_KB_NM /* 취급 구분 명 */
FROM TB_EPOST_RCPT_RSLT
WHERE CON_ORG = #{conOrg} /* 외부기관구분코드 */
AND RELORSECT_CD = #{relorsectCd} /* 결제부서코드 */
<if test="schExtriRegymdFrom != null">
AND EXTRI_REGYMD <![CDATA[>=]]> #{schExtriRegymdFrom} /* 기관발송일자 시작 */
</if>
<if test="schExtriRegymdTo != null">
AND EXTRI_REGYMD <![CDATA[<=]]> #{schExtriRegymdTo} /* 기관발송일자 종료 */
</if>
<if test="schRceptYmdFrom != null">
AND RCEPT_YMD <![CDATA[>=]]> #{schRceptYmdFrom} /* 접수 일자 시작 */
</if>
<if test="schRceptYmdTo != null">
AND RCEPT_YMD <![CDATA[<=]]> #{schRceptYmdTo} /* 접수 일자 종료 */
</if>
<choose>
<when test="schDetailRegDtOpt == 'regDt'">
<if test="schDetailRegDtFrom != null">
AND SUBSTR(REG_DT,1,8) <![CDATA[>=]]> #{schDetailRegDtFrom} /* 등록 일자 시작 */
</if>
<if test="schDetailRegDtTo != null">
AND SUBSTR(REG_DT,1,8) <![CDATA[<=]]> #{schDetailRegDtTo} /* 등록 일자 종료 */
</if>
</when>
<when test="schDetailRegDtOpt == 'mdfcnDt'">
<if test="schDetailRegDtFrom != null">
AND SUBSTR(MDFCN_DT,1,8) <![CDATA[>=]]> #{schDetailRegDtFrom} /* 수정 일자 시작 */
</if>
<if test="schDetailRegDtTo != null">
AND SUBSTR(MDFCN_DT,1,8) <![CDATA[<=]]> #{schDetailRegDtTo} /* 수정 일자 종료 */
</if>
</when>
<otherwise>
</otherwise>
</choose>
<choose>
<when test="schDetailRgtrOpt == 'rgtr'">
<if test="schDetailRgtrCd != null">
AND RGTR = #{schDetailRgtrCd} /* 등록자 코드 */
</if>
</when>
<when test="schDetailRgtrOpt == 'mdfr'">
<if test="schDetailRgtrCd != null">
AND MDFR = #{schDetailRgtrCd} /* 수정자 코드 */
</if>
</when>
<otherwise>
</otherwise>
</choose>
<if test="by != null and by != '' and term != null">
<choose>
<when test="mainOption == 'codeValue' or mainOption == 'match' or mainOption == 'ymd'">
<include refid="dynamicSearch.start" />
<choose>
<when test="by == 'reletcdata'"> RELETCDATA </when>
<when test="by == 'extriRegymd'"> EXTRI_REGYMD </when>
<when test="by == 'rceptYmd'"> RCEPT_YMD </when>
<when test="by == 'rceptId'"> RCEPT_ID </when>
<when test="by == 'divKb'"> DIV_KB </when>
<when test="by == 'rceptCnt'"> RCEPT_CNT </when>
<when test="by == 'rceptAmt'"> RCEPT_AMT </when>
<when test="by == 'usefeeAmt'"> USEFEE_AMT </when>
<when test="by == 'totpostPrc'"> TOTPOST_PRC </when>
<when test="by == 'jobCd'"> JOB_CD </when>
</choose>
<include refid="dynamicSearch.center" />#{term}<include refid="dynamicSearch.end" />
</when>
<otherwise>
</otherwise>
</choose>
</if>
GROUP BY DIV_KB
</select>
<insert id="insertEpostRcptRslt" parameterType="map">/* 전자우편 접수 결과 등록(epostRcptRsltMapper.insertEpostRcptRslt) */
INSERT
INTO TB_EPOST_RCPT_RSLT (

@ -142,7 +142,9 @@
data-by="by--${pageName}" data-by-output="byOutput--${pageName}" data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th class="cmn" style="width: 72px;">NO.</th>
<th class="cmn" style="width: 240px;" onclick="searchFromGridTitle('RELETCDATA', this.innerText, 'match', 'part');">발송자료키</th>
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('JOB_CD', this.innerText, 'codeValue', 'FIM082');">우편물종류</th>
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('JOB_CD', this.innerText, 'match', 'part');">우편물코드</th>
<!-- <th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('JOB_CD', this.innerText, 'codeValue', 'FIM082');">우편물종류</th> -->
<th class="cmn" style="width: 120px;">우편물종류</th>
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('EXTRI_REGYMD', this.innerText, 'ymd', '');">발송일자</th>
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('RCEPT_YMD', this.innerText, 'ymd', '');">접수일자</th>
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('DIV_KB', this.innerText, 'codeValue', 'EGP002');">취급구분</th>
@ -161,6 +163,7 @@
<tr data-key="{RCPT_RSLT_ID}">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RELETCDATA}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{JOB_CD}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{JOB_CD3_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{EXTRI_REGYMD}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RCEPT_YMD}</td>
@ -176,7 +179,47 @@
</template>
<template id="${infoPrefix}NotFound--${pageName}">
<tr class="odd">
<td valign="top" colspan="13" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
<td valign="top" colspan="14" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div>
<!-- / DataTables(그리드) -->
<p> </p>
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}${pageDataName3}">
<div class="table-responsive" id="table-responsive--${pageName}${pageDataName3}" style="overflow-x:scroll; height:160px; overflow-y:scroll;">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}${pageDataName3}" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr id="theadTr--${pageName}${pageDataName3}">
<th class="cmn" style="width: 120px;">취급구분</th>
<th class="cmn" style="width: 120px;">발송건수</th>
<th class="cmn" style="width: 200px;">결제금액</th>
<th class="cmn" style="width: 200px;">제작수수료</th>
<th class="cmn" style="width: 200px;">우편요금</th>
<th class="cmn dummy-th"></th>
</tr>
</thead>
<tbody id="tbody--${pageName}${pageDataName3}">
</tbody>
<template id="${infoPrefix}Row--${pageName}${pageDataName3}">
<tr data-key="{DIV_KB}">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DIV_KB_NM}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{RCEPT_CNT}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{RCEPT_AMT}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{USEFEE_AMT}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{TOTPOST_PRC}</td>
<td class="cmn dummy-td"></td>
</tr>
</template>
<template id="${infoPrefix}NotFound--${pageName}${pageDataName3}">
<tr class="odd">
<td valign="top" colspan="6" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
@ -228,8 +271,8 @@
}
});
// 부서 Dataset
var ${pageName}DeptInfoDataset = new Dataset({
// 부서 정보 Dataset
var ${pageName}${pageDataName2}Dataset = new Dataset({
prefix : "dept"
, prefixName : "부서"
, keymapper : info => info ? info.DEPT_CD : ""
@ -242,6 +285,30 @@
}
});
// 합계 금액 정보 Dataset
var ${pageName}${pageDataName3}Dataset = new Dataset({
prefix : "sumAmt"
, prefixName : "합계 금액"
, keymapper : info => info ? info.DIV_KB : ""
, dataGetter : obj => obj.sumAmtList
, formats : {
RCEPT_CNT : numberFormat
, RCEPT_AMT : numberFormat
, USEFEE_AMT : numberFormat
, TOTPOST_PRC : numberFormat
}
, onDatasetChange : obj => {
renderList${pageName}${pageDataName3}();
}
, onCurrentChange : item => {
if (!item) return;
let key = item.data.DIV_KB;
$("#tbody--${pageName}${pageDataName3}").setCurrentRow(key);
}
});
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
@ -284,7 +351,6 @@
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, "${pageName}Control.setCurrent('" + dataItem.getValue("RCPT_RSLT_ID") + "');")
.replace(/{ondblclick}/gi, "getTotalInfo${pageName}('" + dataItem.getValue("CRDN_ID") + "');")
);
let noMore = (totalSize == ${infoPrefix}List.length);
@ -312,9 +378,36 @@
${pageName}Control.load(${pageName}Control.query.pageNum + 1);
}
// DataTables에 click, dbclick 이벤트
renderList${pageName}${pageDataName3} = () => {
let ${infoPrefix}List = ${pageName}${pageDataName3}Dataset;
let empty = ${infoPrefix}List.empty;
let trs = empty ?
[document.getElementById("${infoPrefix}NotFound--${pageName}${pageDataName3}").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}${pageDataName3}").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, "${pageName}${pageDataName3}Dataset.setCurrent('" + dataItem.getValue("DIV_KB") + "');")
);
$("#tbody--${pageName}${pageDataName3}").html(trs.join());
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// 합계 금액 조회
getSumAmtInfo${pageName} = (query) => {
ajax.get({
url : wctx.url(query.taskSeCd + ${pageName}PrefixUrl + "/050/sumAmt.do")
, data : query
, success : resp => {
${pageName}${pageDataName3}Dataset.setData(resp.sumAmt);
}
});
}
// 검색 자료 재조회
refreshList${pageName} = () => {
${pageName}Control.untilPageNum = ${pageName}Control.query.pageNum;
@ -349,10 +442,13 @@
${pageName}Control.query = ${pageName}Fields.get();
${pageName}Control.query.fetchSize = ${pageName}Control.defaultFetchSize; // 한번에 조회되는 자료 건수 FETCH_XS = 30
${pageName}Control.query.conOrg = ${pageName}DeptInfoDataset.getValue("EGP_CON_ORG"); // 외부기관구분코드
${pageName}Control.query.relorsectCd = ${pageName}DeptInfoDataset.getValue("DEPT_CD"); // 결제부서코드(부서코드)
${pageName}Control.query.conOrg = ${pageName}${pageDataName2}Dataset.getValue("EGP_CON_ORG"); // 외부기관구분코드
${pageName}Control.query.relorsectCd = ${pageName}${pageDataName2}Dataset.getValue("DEPT_CD"); // 결제부서코드(부서코드)
${pageName}Control.load(1);
// 합계 금액 조회
getSumAmtInfo${pageName}(${pageName}Control.query);
}
// 엑셀 버튼 이벤트
@ -393,6 +489,8 @@
// DataTables width 변경 조정 업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고
$("#DataTables_Table_0--${pageName}").find("th").resizable( {handles : "e"} );
$("#DataTables_Table_0--${pageName}${pageDataName3}").find("th").resizable( {handles : "e"} );
// DataTables 스크롤 이벤트 생성
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], scrollDataList${pageName});
}
@ -444,7 +542,7 @@
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked", true);
// 부서 정보
${pageName}DeptInfoDataset.setData([${deptInfo}]);
${pageName}${pageDataName2}Dataset.setData([${deptInfo}]);
// 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));

Loading…
Cancel
Save