고지서 외주파일 설정 조회 추가

main
이범준 8 months ago
parent 2198376026
commit c41c401efc

@ -116,9 +116,31 @@ public class OutsourcingFileWriter {
}
String line = "";
for(DataObject printStngItem : printStngItems){
String colNm = printStngItem.string("COL_NM");
int byteCnt = printStngItem.number("BYTE_CNT").intValue();
line += hangul.rpadByte(dataObject.string(colNm), byteCnt, " ");
String artclNm = printStngItem.string("ARTCL_NM");
int byteCnt = printStngItem.number("ARTCL_SZ").intValue();
String artclValue = "";
if(artclNm.equals("OTPT_YMD") || artclNm.equals("OTPT_YEAR")
|| artclNm.equals("OTPT_MONTH") || artclNm.equals("OTPT_DAY")) {
switch(artclNm) {
case "OTPT_YMD" :
artclValue = yyyymmdd;
break;
case "OTPT_YEAR" :
artclValue = year;
break;
case "OTPT_MONTH" :
artclValue = month;
break;
case "OTPT_DAY" :
artclValue = day;
break;
}
} else {
artclValue = dataObject.string(artclNm);
}
line += hangul.rpadByte(artclValue, byteCnt, " ");
}
writer.write(line);
}

@ -0,0 +1,20 @@
package cokr.xit.fims.cmmn.dao;
import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.cmmn.OtptStngQuery;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
@Mapper("outsourcingStngMapper")
public interface OutsourcingStngMapper extends AbstractMapper {
/** .<br />
* @param query
* @return
*/
List<DataObject> selectArtclStngList(OtptStngQuery query);
}

@ -0,0 +1,24 @@
package cokr.xit.fims.cmmn.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.fims.cmmn.OtptStngQuery;
import cokr.xit.fims.cmmn.dao.OutsourcingStngMapper;
import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.data.DataObject;
@Component("outsourcingStngBean")
public class OutsourcingStngBean extends AbstractComponent {
@Resource(name = "outsourcingStngMapper")
private OutsourcingStngMapper outsourcingStngMapper;
public List<DataObject> getArtclStngList(OtptStngQuery query){
return outsourcingStngMapper.selectArtclStngList(query);
}
}

@ -29,6 +29,7 @@ import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.dao.OtptStngMapper;
import cokr.xit.fims.cmmn.pdf.print.format.Advntce;
import cokr.xit.fims.cmmn.service.bean.OutsourcingStngBean;
import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.mngt.service.bean.FactionBean;
@ -150,6 +151,9 @@ public class Sndb01Controller extends ApplicationController {
@Resource(name="otptStngMapper")
private OtptStngMapper otptStngMapper;
@Resource(name="outsourcingStngBean")
protected OutsourcingStngBean outsourcingStngBean;
@Resource(name="integrationSearchMapper")
private IntegrationSearchMapper integrationSearchMapper;
@ -1756,6 +1760,8 @@ public class Sndb01Controller extends ApplicationController {
public ModelAndView makeAdvntceOutsourcing(PrintOption printOption, SndbQuery req) {
ModelAndView mav = new ModelAndView("downloadView");
String taskSeCd = "";
List<DataObject> list = sndngDtlService.getSndngTrgtDtlIds(req);
String[] crdnIds = new String[list.size()];
@ -1769,6 +1775,10 @@ public class Sndb01Controller extends ApplicationController {
for(int i=0; i < dataObjectList.size(); i++) {
DataObject dataObject = dataObjectList.get(i);
if(taskSeCd.equals("")) {
taskSeCd = dataObject.string("TASK_SE_CD");
}
FileQuery fileQuery = new FileQuery();
fileQuery.setInfoType(Crdn.INF_TYPE);
fileQuery.setInfoKeys(dataObject.string("CRDN_ID"));
@ -1795,7 +1805,14 @@ public class Sndb01Controller extends ApplicationController {
}
List<DataObject> printStngItems = new ArrayList<DataObject>();
ManagedUser currentUser = (ManagedUser) currentUser().getUser();
String sggCd = currentUser.getOrgID();
OtptStngQuery stngQuery = new OtptStngQuery();
stngQuery.setSggCd(sggCd);
stngQuery.setTaskSeCd(taskSeCd);
stngQuery.setSndngSeCd("02");
List<DataObject> printStngItems = outsourcingStngBean.getArtclStngList(stngQuery);
OutsourcingFileWriter osWriter = new OutsourcingFileWriter();

@ -39,6 +39,7 @@ import cokr.xit.fims.cmmn.hwp.format.RequestForDelivery;
import cokr.xit.fims.cmmn.pdf.print.format.Advntce;
import cokr.xit.fims.cmmn.pdf.print.format.Nht;
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.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
@ -105,6 +106,9 @@ public class Sprt01Controller extends ApplicationController {
@Resource(name="otptStngBean")
protected OtptStngBean otptStngBean;
@Resource(name="outsourcingStngBean")
protected OutsourcingStngBean outsourcingStngBean;
@Resource(name = "fileBean")
private FileBean fileBean;
@ -767,12 +771,18 @@ public class Sprt01Controller extends ApplicationController {
public ModelAndView makeAdvntceOutsourcing(PrintOption printOption, String[] crdnIds) {
ModelAndView mav = new ModelAndView("downloadView");
String taskSeCd = "";
SprtQuery sprtQuery = new SprtQuery();
sprtQuery.setCrdnIds(crdnIds);
List<DataObject> dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
for(int i=0; i < dataObjectList.size(); i++) {
DataObject dataObject = dataObjectList.get(i);
if(taskSeCd.equals("")) {
taskSeCd = dataObject.string("TASK_SE_CD");
}
FileQuery fileQuery = new FileQuery();
fileQuery.setInfoType(Crdn.INF_TYPE);
fileQuery.setInfoKeys(dataObject.string("CRDN_ID"));
@ -799,7 +809,14 @@ public class Sprt01Controller extends ApplicationController {
}
List<DataObject> printStngItems = new ArrayList<DataObject>();
ManagedUser currentUser = (ManagedUser) currentUser().getUser();
String sggCd = currentUser.getOrgID();
OtptStngQuery stngQuery = new OtptStngQuery();
stngQuery.setSggCd(sggCd);
stngQuery.setTaskSeCd(taskSeCd);
stngQuery.setSndngSeCd("02");
List<DataObject> printStngItems = outsourcingStngBean.getArtclStngList(stngQuery);
OutsourcingFileWriter osWriter = new OutsourcingFileWriter();
@ -923,12 +940,18 @@ public class Sprt01Controller extends ApplicationController {
public ModelAndView makeNhtOutsourcing(PrintOption printOption, String[] crdnIds) {
ModelAndView mav = new ModelAndView("downloadView");
String taskSeCd = "";
SprtQuery sprtQuery = new SprtQuery();
sprtQuery.setCrdnIds(crdnIds);
List<DataObject> dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
for(int i=0; i < dataObjectList.size(); i++) {
DataObject dataObject = dataObjectList.get(i);
if(taskSeCd.equals("")) {
taskSeCd = dataObject.string("TASK_SE_CD");
}
FileQuery fileQuery = new FileQuery();
fileQuery.setInfoType(Crdn.INF_TYPE);
fileQuery.setInfoKeys(dataObject.string("CRDN_ID"));
@ -955,7 +978,14 @@ public class Sprt01Controller extends ApplicationController {
}
List<DataObject> printStngItems = new ArrayList<DataObject>();
ManagedUser currentUser = (ManagedUser) currentUser().getUser();
String sggCd = currentUser.getOrgID();
OtptStngQuery stngQuery = new OtptStngQuery();
stngQuery.setSggCd(sggCd);
stngQuery.setTaskSeCd(taskSeCd);
stngQuery.setSndngSeCd("03");
List<DataObject> printStngItems = outsourcingStngBean.getArtclStngList(stngQuery);
OutsourcingFileWriter osWriter = new OutsourcingFileWriter();

@ -0,0 +1,22 @@
<?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="cokr.xit.fims.cmmn.dao.OutsourcingStngMapper">
<select id="selectArtclStngList" parameterType="cokr.xit.fims.cmmn.OtptStngQuery" resultType="dataobject">
/* 외주파일 항목 설정 조회(outsourcingStngMapper.selectArtclStngList) */
SELECT OUTSOURCING_FORM_ID
, SGG_CD
, TASK_SE_CD
, SNDNG_SE_CD
, ARTCL_NM
, ARTCL_SZ
, ARTCL_ORDR
FROM TB_OUTSOURCING_FORM_STNG
WHERE USE_YN = 'Y'
AND SGG_CD = #{sggCd}
AND TASK_SE_CD = #{taskSeCd}
AND SNDNG_SE_CD = #{sndngSeCd}
ORDER BY ARTCL_ORDR
</select>
</mapper>

@ -28,6 +28,7 @@
, EI.CEL_NO_V /* 민원인 휴대폰 번호 */
, C.VHRNO /* 차량번호 */
, L.RPM_SZR_VHRNO /* 대체차량번호 */
, GET_CODE_NM('FIM009', C.FFNLG_CARMDL_CD) AS FFNLG_CARMDL_NM /* 차종 명 */
, C.ATCH_FILE_CNT /* 첨부 파일 수 */
, CA.PARKNG_PSBLTY_RSLT_CD /* 주차 가능 결과 코드 */
, (SELECT GET_CODE_NM('FIM034', CA.PARKNG_PSBLTY_RSLT_CD) FROM DUAL) AS PARKNG_PSBLTY_RSLT_NM/* 주차 가능 결과 명 */
@ -89,7 +90,7 @@
, L.INSPY_INT /* 분납 이자 */
, (L.LEVY_PCPTAX + L.LEVY_ADAMT + L.INSPY_INT) AS LEVY_AMT /* 부과금액 */
, L.PAY_MTHD_SE_CD /* 납부 방법 구분 코드 */
, (SELECT GET_CODE_NM('FIM045', L.PAY_MTHD_SE_CD) FROM DUAL) AS PAY_MTHD_SE_NM /* 납부 방법 구분 명 */
, (SELECT GET_CODE_NM('FIM045', L.PAY_MTHD_SE_CD) FROM DUAL) AS PAY_MTHD_SE_NM /* 납부 방법 구분 명 */
, L.RCVMT_YMD /* 수납 일자 */
, L.RCVMT_PCPTAX /* 수납 본세 */
, L.RCVMT_ADAMT /* 수납 가산금 */
@ -102,6 +103,7 @@
, L.DUDT_AFTR_YMD /* 납기후금액 */
, L.DUDT_AFTR_AMT /* 납기후일자 */
, L.EPAYNO /* 전자납부번호 */
, L.BANK_NM /* 은행명 */
, L.VR_ACTNO /* 가상계좌번호 */
, L.SZR_YMD /* 압류 일자 */
, L.SZR_RMV_YMD /* 압류 해제 일자 */

Loading…
Cancel
Save