외주요청파일 서식 설정 조회 추가

main
이범준 8 months ago
parent 6c2b8e99ae
commit ea9cd66eaa

@ -0,0 +1,19 @@
package cokr.xit.fims.cmmn;
public class OutsourcingStngQuery extends CmmnQuery {
private static final long serialVersionUID = 1L;
//발송구분코드
private String sndngSeCd;
public String getSndngSeCd() {
return ifEmpty(sndngSeCd, () -> null);
}
public <T extends OutsourcingStngQuery> T setSndngSeCd(String sndngSeCd) {
this.sndngSeCd = sndngSeCd;
return self();
}
}

@ -4,7 +4,7 @@ import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.cmmn.OtptStngQuery;
import cokr.xit.fims.cmmn.OutsourcingStngQuery;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
@ -15,6 +15,6 @@ public interface OutsourcingStngMapper extends AbstractMapper {
* @param query
* @return
*/
List<DataObject> selectArtclStngList(OtptStngQuery query);
List<DataObject> selectArtclStngList(OutsourcingStngQuery query);
}

@ -1,13 +1,18 @@
package cokr.xit.fims.cmmn.service.bean;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.fims.cmmn.OtptStngQuery;
import cokr.xit.fims.cmmn.OutsourcingStngQuery;
import cokr.xit.fims.cmmn.dao.OutsourcingStngMapper;
import cokr.xit.fims.cmmn.pdf.extraction.PredefinedSet;
import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.data.DataObject;
@ -18,7 +23,68 @@ public class OutsourcingStngBean extends AbstractComponent {
private OutsourcingStngMapper outsourcingStngMapper;
public List<DataObject> getArtclStngList(OtptStngQuery query){
public List<DataObject> getArtclStngList(OutsourcingStngQuery query){
return outsourcingStngMapper.selectArtclStngList(query);
}
public Map<String, Object> getArtclStngMap(OutsourcingStngQuery query) {
Map<String,Object> outsourcingStngMap = new HashMap<String,Object>();
List<PredefinedSet> predefinedSetList = new ArrayList<>();
predefinedSetList.add(new PredefinedSet("SNDNG_DTL_ID", "발송상세아이디"));
predefinedSetList.add(new PredefinedSet("VLTN_LAW_NM", "위반법명"));
predefinedSetList.add(new PredefinedSet("BARCODE", "바코드"));
predefinedSetList.add(new PredefinedSet("CRDN_DT", "단속일시"));
predefinedSetList.add(new PredefinedSet("DUDT_YMD", "납부기한"));
predefinedSetList.add(new PredefinedSet("VHRNO", "차량번호"));
predefinedSetList.add(new PredefinedSet("FFNLG_CARMDL_NM", "과태료차종명"));
predefinedSetList.add(new PredefinedSet("VHCL_NM", "차량명"));
predefinedSetList.add(new PredefinedSet("CRDN_PLC", "단속장소"));
predefinedSetList.add(new PredefinedSet("RTPYR_ADDR", "납부자기본주소"));
predefinedSetList.add(new PredefinedSet("RTPYR_DTL_ADDR", "납부자상세주소"));
predefinedSetList.add(new PredefinedSet("RTPYR_ZIP", "납부자우편번호"));
predefinedSetList.add(new PredefinedSet("RTPYR_NM", "납부자명"));
predefinedSetList.add(new PredefinedSet("CRDN_SE_NM", "단속구분명"));
predefinedSetList.add(new PredefinedSet("ATCH_FILE_CNT", "첨부파일갯수"));
predefinedSetList.add(new PredefinedSet("FFNLG_CRDN_AMT", "과태료단속금액"));
predefinedSetList.add(new PredefinedSet("SUM_AMT", "합계금액"));
predefinedSetList.add(new PredefinedSet("RG_NO", "등기번호"));
predefinedSetList.add(new PredefinedSet("OCR0", "OCR0"));
predefinedSetList.add(new PredefinedSet("OCR0_1", "OCR0_1"));
predefinedSetList.add(new PredefinedSet("OCR0_2", "OCR0_2"));
predefinedSetList.add(new PredefinedSet("OCR_BAND1", "OCR_BAND1"));
predefinedSetList.add(new PredefinedSet("OCR_BAND2", "OCR_BAND2"));
predefinedSetList.add(new PredefinedSet("BANK_NM", "가상계좌은행명"));
predefinedSetList.add(new PredefinedSet("VR_ACTNO", "가상계좌"));
predefinedSetList.add(new PredefinedSet("EPAYNO", "전자납부번호"));
predefinedSetList.add(new PredefinedSet("EMPTY", "공백"));
outsourcingStngMap.put("predefinedSetList", predefinedSetList);
//
List<DataObject> outsourcingArtclStngList = outsourcingStngMapper.selectArtclStngList(query);
if(outsourcingArtclStngList == null) {
outsourcingArtclStngList = new ArrayList<DataObject>();
}
for(DataObject outsourcingArtclStng : outsourcingArtclStngList) {
String outsourcingArtclNm = (String) outsourcingArtclStng.get("ARTCL_NM");
Optional<PredefinedSet> optional = predefinedSetList.stream()
.filter(item -> item.getExtrArtclNm().equals(outsourcingArtclNm)).findFirst();
if(optional.isEmpty()) {
outsourcingArtclStng.set("DSCRP", outsourcingArtclStng.get("ARTCL_NM"));
} else {
PredefinedSet predefinedSet = optional.get();
outsourcingArtclStng.set("DSCRP", predefinedSet.getExtrArtclDscrp());
}
}
outsourcingStngMap.put("dataList", outsourcingArtclStngList);
return outsourcingStngMap;
}
}

@ -18,9 +18,11 @@ import cokr.xit.fims.cmmn.ExtrForm;
import cokr.xit.fims.cmmn.ExtrStngQuery;
import cokr.xit.fims.cmmn.OtptForm;
import cokr.xit.fims.cmmn.OtptStngQuery;
import cokr.xit.fims.cmmn.OutsourcingStngQuery;
import cokr.xit.fims.cmmn.service.StngService;
import cokr.xit.fims.cmmn.service.bean.ExtrStngBean;
import cokr.xit.fims.cmmn.service.bean.OtptStngBean;
import cokr.xit.fims.cmmn.service.bean.OutsourcingStngBean;
import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.stat.dao.StatMapper;
import cokr.xit.foundation.data.DataObject;
@ -46,7 +48,8 @@ public class StngController extends ApplicationController {
extrStngMain = "/020/main.do",
getExtrStngInfo = "/020/info.do",
saveExtrStngInfo = "/020/save.do",
outsourcingStngMain = "/030/main.do"
outsourcingStngMain = "/030/main.do",
getOutsourcingStngInfo = "/030/info.do"
;
}
@ -59,6 +62,9 @@ public class StngController extends ApplicationController {
@Resource(name = "otptStngBean")
private OtptStngBean otptStngBean;
@Resource(name = "outsourcingStngBean")
private OutsourcingStngBean outsourcingStngBean;
@Resource(name = "extrStngBean")
private ExtrStngBean extrStngBean;
@ -275,4 +281,45 @@ public class StngController extends ApplicationController {
return mav;
}
/** .
* @return
*/
public ModelAndView getOutsourcingStngInfo(OutsourcingStngQuery outsourcingStngQuery) {
ModelAndView mav = new ModelAndView("jsonView");
//설정 제목
ManagedUser currentUser = (ManagedUser) currentUser().getUser();
String sggCd = currentUser.getOrgID();
DataObject sgg = statMapper.selectSggByCode(sggCd);
String sggNm = sgg.string("NAME");
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM054","FIM047","FIM078");
List<CommonCode> FIM047 = commonCodes.get("FIM047");
List<CommonCode> FIM054 = commonCodes.get("FIM054");
String taskSeNm = FIM054.stream().
filter(item -> item.getCode().equals(outsourcingStngQuery.getTaskSeCd())).findFirst().get().getValue();
String sndngSeNm = FIM047.stream().
filter(item -> item.getCode().equals(outsourcingStngQuery.getSndngSeCd())).findFirst().get().getValue();
String outsourcingStngTitle = "["+sggNm+", "+taskSeNm+"]"+" "+sndngSeNm;
mav.addObject("outsourcingStngTitle", outsourcingStngTitle);
//기본 설정
DataObject zipGlobalStng = new DataObject();
//zipGlobalStng = outsourcingStngBean.getBscStng();
zipGlobalStng.put("OUTSOURCING_BSC_ID","");
mav.addObject("zipGlobalStng", zipGlobalStng);
//요소별 설정
Map<String,Object> zipArtclStngMap = outsourcingStngBean.getArtclStngMap(outsourcingStngQuery);
mav.addObject("zipArtclStngMap", zipArtclStngMap);
return mav;
}
}

@ -25,6 +25,7 @@ import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.OtptStngQuery;
import cokr.xit.fims.cmmn.OutsourcingStngQuery;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.dao.OtptStngMapper;
@ -1808,7 +1809,7 @@ public class Sndb01Controller extends ApplicationController {
ManagedUser currentUser = (ManagedUser) currentUser().getUser();
String sggCd = currentUser.getOrgID();
OtptStngQuery stngQuery = new OtptStngQuery();
OutsourcingStngQuery stngQuery = new OutsourcingStngQuery();
stngQuery.setSggCd(sggCd);
stngQuery.setTaskSeCd(taskSeCd);
stngQuery.setSndngSeCd("02");

@ -30,6 +30,7 @@ import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.OtptStngQuery;
import cokr.xit.fims.cmmn.OutsourcingStngQuery;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.dao.OtptStngMapper;
@ -871,7 +872,7 @@ public class Sprt01Controller extends ApplicationController {
ManagedUser currentUser = (ManagedUser) currentUser().getUser();
String sggCd = currentUser.getOrgID();
OtptStngQuery stngQuery = new OtptStngQuery();
OutsourcingStngQuery stngQuery = new OutsourcingStngQuery();
stngQuery.setSggCd(sggCd);
stngQuery.setTaskSeCd(taskSeCd);
stngQuery.setSndngSeCd("02");
@ -1102,7 +1103,7 @@ public class Sprt01Controller extends ApplicationController {
ManagedUser currentUser = (ManagedUser) currentUser().getUser();
String sggCd = currentUser.getOrgID();
OtptStngQuery stngQuery = new OtptStngQuery();
OutsourcingStngQuery stngQuery = new OutsourcingStngQuery();
stngQuery.setSggCd(sggCd);
stngQuery.setTaskSeCd(taskSeCd);
stngQuery.setSndngSeCd("03");

@ -12,6 +12,7 @@ import cokr.xit.fims.cmmn.ExtrForm;
import cokr.xit.fims.cmmn.ExtrStngQuery;
import cokr.xit.fims.cmmn.OtptForm;
import cokr.xit.fims.cmmn.OtptStngQuery;
import cokr.xit.fims.cmmn.OutsourcingStngQuery;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.mngt.FimsDepartment;
@ -826,5 +827,11 @@ public class CmnController {
public ModelAndView outsourcingStngMain() {
return super.outsourcingStngMain();
}
@Override
@RequestMapping(name="외주요청파일 서식 설정 정보 조회", value=METHOD_URL.getOutsourcingStngInfo)
public ModelAndView getOutsourcingStngInfo(OutsourcingStngQuery outsourcingStngQuery) {
return super.getOutsourcingStngInfo(outsourcingStngQuery);
}
}
}

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.fims.cmmn.dao.OutsourcingStngMapper">
<select id="selectArtclStngList" parameterType="cokr.xit.fims.cmmn.OtptStngQuery" resultType="dataobject">
<select id="selectArtclStngList" parameterType="cokr.xit.fims.cmmn.OutsourcingStngQuery" resultType="dataobject">
/* 외주파일 항목 설정 조회(outsourcingStngMapper.selectArtclStngList) */
SELECT OUTSOURCING_FORM_ID
, SGG_CD
@ -11,6 +11,8 @@ SELECT OUTSOURCING_FORM_ID
, ARTCL_NM
, ARTCL_SZ
, ARTCL_ORDR
, PADDING_DIRECTION
, FORMATTING
FROM TB_OUTSOURCING_FORM_STNG
WHERE USE_YN = 'Y'
AND SGG_CD = #{sggCd}

@ -113,7 +113,7 @@
<template id="theadTr--${pageName}">
<tr>
<th style="width:130px">순서</th>
<th style="width:150px">순서</th>
<th style="width:40px"></th>
<th style="width:200px">출력항목명</th>
<th style="width:110px">유형</th>

@ -57,7 +57,7 @@
<div class="card-datatable text-nowrap mb-3">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="scroll--${pageName}" class="table-responsive"
style="overflow-x:scroll; height:300px; overflow-y:scroll;" >
style="overflow-x:scroll; height:600px; overflow-y:scroll;" >
<table
class="table-layout-fixed compress-cell dataTable table table-bordered"
id="table--${pageName}" aria-describedby="DataTables_Table_0_info">
@ -77,11 +77,12 @@
<template id="theadTr--${pageName}">
<tr>
<th style="width:130px">순서</th>
<th style="width:150px">순서</th>
<th style="width:40px"></th>
<th style="width:200px">항목명</th>
<th style="width:110px">바이트수</th>
<th style="width:140px">공백문자방향</th>
<th style="width:140px">포맷팅</th>
<th class="dummy-th"></th>
</tr>
</template>
@ -112,6 +113,9 @@
</select>
<button type="button" class="btn btn-xs btn-outline-dark h-px-25 px-1">▶</button>
</td>
<td data-col="formatting" class="text-center">
<input type="text" class="form-control w-px-100" />
</td>
<td class="dummy-td"></td>
</tr>
</template>
@ -171,7 +175,7 @@ $(document).ready(function(){
$P.zipArtclStngMap = resp.zipArtclStngMap;
$P.renderZipArtclStngGrid(
$P.zipArtclStngMap.prototypeList,
$P.zipArtclStngMap.predefinedSetList,
$P.zipArtclStngMap.dataList);
}
});
@ -190,13 +194,13 @@ $(document).ready(function(){
}
//요소 그리드 렌더링
$P.renderZipArtclStngGrid = (prototypeList, dataList) => {
$P.renderZipArtclStngGrid = (predefinedSetList, dataList) => {
var components = "<option value='' data-component-type=''>선택</option>";
var components = "<option value=''>선택</option>";
for(var i=0; i < prototypeList.length; i++){
var p = prototypeList[i];
components += "<option value='"+p.artclNm+"' >"+p.dscrp+"</option>";
for(var i=0; i < predefinedSetList.length; i++){
var p = predefinedSetList[i];
components += "<option value='"+p.extrArtclNm+"' >"+p.extrArtclDscrp+"</option>";
}
for(var i=0; i < dataList.length; i++){
@ -216,7 +220,7 @@ $(document).ready(function(){
.set(!isEmpty(data.ARTCL_SZ) ? data.ARTCL_SZ : 0);
$($P.fnGetElement(lastTr,"paddingDirection"))
.set(!isEmpty(data.TEXT_SORT) ? data.TEXT_SORT : "left");
.set(!isEmpty(data.PADDING_DIRECTION) ? data.PADDING_DIRECTION : "left");
}
@ -243,12 +247,12 @@ $(document).ready(function(){
//행 추가
$P.addRow = () => {
var prototypeList = $P.zipArtclStngMap.prototypeList;
var predefinedSetList = $P.zipArtclStngMap.predefinedSetList;
var components = "<option value='' data-component-type=''>선택</option>";
for(var i=0; i < prototypeList.length; i++){
var p = prototypeList[i];
components += "<option value='"+p.artclNm+"' >"+p.dscrp+"</option>";
for(var i=0; i < predefinedSetList.length; i++){
var p = predefinedSetList[i];
components += "<option value='"+p.predefinedArtclNm+"' >"+p.predefinedSetList+"</option>";
}
var template = document.getElementById("found--${pageName}").innerHTML;
template = template.replace(/{OUTSOURCING_FORM_ID}/gi, "");

Loading…
Cancel
Save