|
|
|
@ -4,75 +4,98 @@ import java.io.File;
|
|
|
|
|
import java.io.InputStream;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import org.springframework.core.io.ClassPathResource;
|
|
|
|
|
|
|
|
|
|
import cokr.xit.fims.cmmn.CmmnUtil;
|
|
|
|
|
import cokr.xit.fims.cmmn.FactionUtil;
|
|
|
|
|
import cokr.xit.fims.sprt.PrintOption;
|
|
|
|
|
import cokr.xit.foundation.UserInfo;
|
|
|
|
|
import cokr.xit.foundation.data.DataFormat;
|
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
|
import cokr.xit.fims.cmmn.PrintUtil;
|
|
|
|
|
import kr.dogfoot.hwplib.object.HWPFile;
|
|
|
|
|
import kr.dogfoot.hwplib.reader.HWPReader;
|
|
|
|
|
import kr.dogfoot.hwplib.writer.HWPWriter;
|
|
|
|
|
|
|
|
|
|
public class HWPPrintUtil {
|
|
|
|
|
public class HWPPrintUtil extends PrintUtil {
|
|
|
|
|
|
|
|
|
|
private String formatType;
|
|
|
|
|
|
|
|
|
|
private String formatName;
|
|
|
|
|
|
|
|
|
|
private String formatKorName;
|
|
|
|
|
private String printRequestDt;
|
|
|
|
|
|
|
|
|
|
private int recordPerPartFile;
|
|
|
|
|
|
|
|
|
|
private String baseFormatFilePath;
|
|
|
|
|
private String attachFormatFilePath;
|
|
|
|
|
|
|
|
|
|
private UserInfo printRequestUserInfo;
|
|
|
|
|
private String attachFormatFilePath;
|
|
|
|
|
|
|
|
|
|
private int totalPartFileCount;
|
|
|
|
|
|
|
|
|
|
private int fileNameIndex;
|
|
|
|
|
|
|
|
|
|
public String getFormatType() {
|
|
|
|
|
return this.formatType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setFormatType(String formatType) {
|
|
|
|
|
this.formatType = formatType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getFormatName() {
|
|
|
|
|
return this.formatName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setFormatName(String formatName) {
|
|
|
|
|
this.formatName = formatName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getFormatKorName() {
|
|
|
|
|
return this.formatKorName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setFormatKorName(String formatKorName) {
|
|
|
|
|
this.formatKorName = formatKorName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getPrintRequestDt() {
|
|
|
|
|
return this.printRequestDt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public UserInfo getPrintRequestUserInfo() {
|
|
|
|
|
return this.printRequestUserInfo;
|
|
|
|
|
};
|
|
|
|
|
public void setPrintRequestDt(String printRequestDt) {
|
|
|
|
|
this.printRequestDt = printRequestDt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getRecordPerPartFile() {
|
|
|
|
|
return this.recordPerPartFile;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setRecordPerPartFile(int recordPerPartFile) {
|
|
|
|
|
this.recordPerPartFile = recordPerPartFile;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getTotalPartFileCount() {
|
|
|
|
|
return this.totalPartFileCount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setTotalPartFileCount(int totalPartFileCount) {
|
|
|
|
|
this.totalPartFileCount = totalPartFileCount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getBaseFormatFilePath() {
|
|
|
|
|
return this.baseFormatFilePath;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setBaseFormatFilePath(String baseFormatFilePath) {
|
|
|
|
|
this.baseFormatFilePath = baseFormatFilePath;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getAttachFormatFilePath() {
|
|
|
|
|
return this.attachFormatFilePath;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setAttachFormatFilePath(String attachFormatFilePath) {
|
|
|
|
|
this.attachFormatFilePath = attachFormatFilePath;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 신규로 생성될 한글 파일 건수를 계산한다.
|
|
|
|
|
* @param 총 데이터 건수
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public void calcTotalPartFileCount(int totalDataCount) {
|
|
|
|
|
|
|
|
|
|
if(this.formatType.equals("list")) {
|
|
|
|
@ -96,70 +119,6 @@ public class HWPPrintUtil {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setPrintRequestUserInfo(UserInfo printRequestUserInfo) {
|
|
|
|
|
this.printRequestUserInfo = printRequestUserInfo;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
public void setting(String formatType, String formatName) {
|
|
|
|
|
this.formatType = formatType;
|
|
|
|
|
this.formatName = formatName;
|
|
|
|
|
SimpleDateFormat ymdhmsFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
|
|
this.printRequestDt = ymdhmsFormat.format(new Date());
|
|
|
|
|
|
|
|
|
|
if(!formatType.equals("list")) {
|
|
|
|
|
this.recordPerPartFile = 1;
|
|
|
|
|
} else {
|
|
|
|
|
switch (formatName) {
|
|
|
|
|
case "crdnList": {
|
|
|
|
|
this.recordPerPartFile = 6;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "requestForDelivery": {
|
|
|
|
|
this.recordPerPartFile = 7;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "reportOnClaims": {
|
|
|
|
|
this.recordPerPartFile = 7;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch (formatName) {
|
|
|
|
|
case "crdnConfirm": {
|
|
|
|
|
this.formatKorName = "단속확인서";
|
|
|
|
|
this.baseFormatFilePath = "format/crdnConfirm.hwp";
|
|
|
|
|
this.attachFormatFilePath = "";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "crdnList": {
|
|
|
|
|
this.formatKorName = "단속내역서";
|
|
|
|
|
this.baseFormatFilePath = "format/crdnList_root.hwp";
|
|
|
|
|
this.attachFormatFilePath = "format/crdnList_inner.hwp";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "requestForDelivery": {
|
|
|
|
|
this.formatKorName = "교부청구서";
|
|
|
|
|
this.baseFormatFilePath = "format/requestForDelivery_root.hwp";
|
|
|
|
|
this.attachFormatFilePath = "format/requestForDelivery_inner.hwp";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "reportOnClaims": {
|
|
|
|
|
this.formatKorName = "채권신고서";
|
|
|
|
|
this.baseFormatFilePath = "format/reportOnClaims_root.hwp";
|
|
|
|
|
this.attachFormatFilePath = "format/reportOnClaims_inner.hwp";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "rcvmtConfirm": {
|
|
|
|
|
this.formatKorName = "납부확인서";
|
|
|
|
|
this.baseFormatFilePath = "format/rcvmtConfirm.hwp";
|
|
|
|
|
this.attachFormatFilePath = "";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**한글 포맷 파일을 복사하여 새 한글파일을 생성한다.
|
|
|
|
|
* @param formatFile 한글 포맷 파일
|
|
|
|
|
* @return 새 파일 경로
|
|
|
|
@ -194,259 +153,4 @@ public class HWPPrintUtil {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**한글 파일의 공통정보를 입력한다.
|
|
|
|
|
* @param dataObjectList 데이터목록, baseFile 한글파일
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public void setGlobalInfo(PrintOption printOption, List<DataObject> dataObjectList, HWPFile baseFile) {
|
|
|
|
|
int totalDataCount = dataObjectList.size();
|
|
|
|
|
|
|
|
|
|
boolean privateInfoYn = true;
|
|
|
|
|
if(printOption.getPrivateInfoYn() != null && printOption.getPrivateInfoYn().equals("N")) {
|
|
|
|
|
privateInfoYn = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, String> globalVariable = printOption.getGlobalVariable();
|
|
|
|
|
|
|
|
|
|
if(this.formatName.equals("crdnList")){
|
|
|
|
|
|
|
|
|
|
String globalRtpyrNm = dataObjectList.get(0).string("RTPYR_NM");
|
|
|
|
|
String globalRtpyrNo = dataObjectList.get(0).string("RTPYR_NO");
|
|
|
|
|
String globalRtpyrFullAddr = dataObjectList.get(0).string("RTPYR_FULL_ADDR");
|
|
|
|
|
int globalTotalAmount = dataObjectList.stream().mapToInt(i -> i.number("LEVY_AMT").intValue()).sum();
|
|
|
|
|
|
|
|
|
|
//상단
|
|
|
|
|
ClickHereEditor baseFileEditor = new ClickHereEditor(baseFile);
|
|
|
|
|
baseFileEditor.set("성명", globalRtpyrNm);
|
|
|
|
|
if(privateInfoYn) {
|
|
|
|
|
baseFileEditor.set("주민번호", globalRtpyrNo);
|
|
|
|
|
} else {
|
|
|
|
|
baseFileEditor.set("주민번호", "*************");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
baseFileEditor.set("주소", globalRtpyrFullAddr);
|
|
|
|
|
baseFileEditor.set("총건수", CmmnUtil.addCommaToNumber(totalDataCount));
|
|
|
|
|
baseFileEditor.set("총금액", CmmnUtil.addCommaToNumber(globalTotalAmount));
|
|
|
|
|
baseFileEditor.set("출력일시", CmmnUtil.yyyy_mm_dd_hh_mm_ss(this.printRequestDt));
|
|
|
|
|
|
|
|
|
|
String instNm = (String) this.printRequestUserInfo.getInfo().get("instNm");
|
|
|
|
|
instNm = FactionUtil.getLastWord(instNm);
|
|
|
|
|
instNm = FactionUtil.getInstituteLeader(instNm, false);
|
|
|
|
|
baseFileEditor.set("발신", instNm);
|
|
|
|
|
}
|
|
|
|
|
else if(this.formatName.equals("requestForDelivery")){
|
|
|
|
|
|
|
|
|
|
ClickHereEditor baseFileEditor = new ClickHereEditor(baseFile);
|
|
|
|
|
|
|
|
|
|
baseFileEditor.set("문서번호", globalVariable.get("docNo"));
|
|
|
|
|
baseFileEditor.set("사건번호", globalVariable.get("caseNo"));
|
|
|
|
|
baseFileEditor.set("수신", globalVariable.get("receiver"));
|
|
|
|
|
baseFileEditor.set("체납자성명", globalVariable.get("rtpyrNm"));
|
|
|
|
|
baseFileEditor.set("체납자번호", globalVariable.get("rtpyrNo"));
|
|
|
|
|
baseFileEditor.set("차량번호", globalVariable.get("vhrno"));
|
|
|
|
|
baseFileEditor.set("주소", globalVariable.get("rtpyrFullAddr"));
|
|
|
|
|
|
|
|
|
|
int sumOfList = dataObjectList.stream().mapToInt(item -> item.number("SUM_AMT").intValue()).sum();
|
|
|
|
|
|
|
|
|
|
baseFileEditor.set("합계금액", CmmnUtil.addCommaToNumber(sumOfList));
|
|
|
|
|
baseFileEditor.set("교부청구금액", CmmnUtil.addCommaToNumber(sumOfList));
|
|
|
|
|
baseFileEditor.set("교부청구금액한글", CmmnUtil.convertNumberToHangul(sumOfList));
|
|
|
|
|
|
|
|
|
|
baseFileEditor.set("개설은행", globalVariable.get("dtbnBankNm"));
|
|
|
|
|
baseFileEditor.set("계좌번호", globalVariable.get("dtbnActno"));
|
|
|
|
|
|
|
|
|
|
String instNm = (String) this.printRequestUserInfo.getInfo().get("instNm");
|
|
|
|
|
String deptNm = (String) this.printRequestUserInfo.getInfo().get("deptNm");
|
|
|
|
|
baseFileEditor.set("예금주", instNm + " " + deptNm);
|
|
|
|
|
|
|
|
|
|
String printRequestYmd = this.printRequestDt.substring(0, 8);
|
|
|
|
|
String yyyy = printRequestYmd.substring(0, 4);
|
|
|
|
|
String mm = printRequestYmd.substring(4, 6);
|
|
|
|
|
String dd = printRequestYmd.substring(6, 8);
|
|
|
|
|
String ymd = yyyy+"년 "+mm+"월 "+dd+"일";
|
|
|
|
|
baseFileEditor.set("연월일", ymd);
|
|
|
|
|
|
|
|
|
|
instNm = FactionUtil.getLastWord(instNm);
|
|
|
|
|
instNm = FactionUtil.getInstituteLeader(instNm, false);
|
|
|
|
|
baseFileEditor.set("발신", instNm);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
InsertingImageCell.IMPL_InsertPicture(baseFile, "직인", globalVariable.get("offcsFilePath"));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new RuntimeException("한글 파일 출력 중 오류가 발생하였습니다.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if(this.formatName.equals("reportOnClaims")){
|
|
|
|
|
|
|
|
|
|
ClickHereEditor baseFileEditor = new ClickHereEditor(baseFile);
|
|
|
|
|
|
|
|
|
|
baseFileEditor.set("주소", globalVariable.get("deptAddr"));
|
|
|
|
|
baseFileEditor.set("전화", globalVariable.get("deptTelno"));
|
|
|
|
|
baseFileEditor.set("팩스", globalVariable.get("deptFxno"));
|
|
|
|
|
baseFileEditor.set("담당자", this.printRequestUserInfo.getName());
|
|
|
|
|
|
|
|
|
|
baseFileEditor.set("사건번호", globalVariable.get("caseNo"));
|
|
|
|
|
baseFileEditor.set("체납자성명", globalVariable.get("rtpyrNm"));
|
|
|
|
|
baseFileEditor.set("체납자번호", globalVariable.get("rtpyrNo"));
|
|
|
|
|
baseFileEditor.set("체납자주소", globalVariable.get("rtpyrFullAddr"));
|
|
|
|
|
|
|
|
|
|
int sumOfList = dataObjectList.stream().mapToInt(item -> item.number("SUM_AMT").intValue()).sum();
|
|
|
|
|
|
|
|
|
|
baseFileEditor.set("채권청구액", CmmnUtil.addCommaToNumber(sumOfList));
|
|
|
|
|
baseFileEditor.set("합계금액", CmmnUtil.addCommaToNumber(sumOfList));
|
|
|
|
|
baseFileEditor.set("합계금액한글", CmmnUtil.convertNumberToHangul(sumOfList));
|
|
|
|
|
|
|
|
|
|
String printRequestYmd = this.printRequestDt.substring(0, 8);
|
|
|
|
|
String yyyy = printRequestYmd.substring(0, 4);
|
|
|
|
|
String mm = printRequestYmd.substring(4, 6);
|
|
|
|
|
String dd = printRequestYmd.substring(6, 8);
|
|
|
|
|
String ymd = yyyy+"년 "+mm+"월 "+dd+"일";
|
|
|
|
|
baseFileEditor.set("연월일", ymd);
|
|
|
|
|
|
|
|
|
|
String instNm = (String) this.printRequestUserInfo.getInfo().get("instNm");
|
|
|
|
|
instNm = FactionUtil.getLastWord(instNm);
|
|
|
|
|
instNm = FactionUtil.getInstituteLeader(instNm, false);
|
|
|
|
|
baseFileEditor.set("발신", instNm);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
InsertingImageCell.IMPL_InsertPicture(baseFile, "직인", globalVariable.get("offcsFilePath"));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
throw new RuntimeException("한글 파일 출력 중 오류가 발생하였습니다.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**한글파일 서식에 대해 데이터 건별로 처리한다.
|
|
|
|
|
* @param dataObject 데이터, baseFile 한글파일
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public void setBySingleData(PrintOption printOption, DataObject dataObject, HWPFile baseFile) {
|
|
|
|
|
try {
|
|
|
|
|
if(this.formatType.equals("list")) {
|
|
|
|
|
InputStream attachFormatIS = new ClassPathResource(this.getAttachFormatFilePath()).getInputStream();
|
|
|
|
|
HWPFile attachFormatFile = HWPReader.fromInputStream(attachFormatIS);
|
|
|
|
|
ClickHereEditor attachFileEditor = new ClickHereEditor(attachFormatFile);
|
|
|
|
|
|
|
|
|
|
if(this.formatName.equals("crdnList")){
|
|
|
|
|
|
|
|
|
|
attachFileEditor.set("과태료", dataObject.string("TASK_SE_NM"));
|
|
|
|
|
attachFileEditor.set("시군구명", dataObject.string("SGG_NM"));
|
|
|
|
|
String crdnYmdTm = dataObject.string("CRDN_YMD_TM");
|
|
|
|
|
crdnYmdTm = CmmnUtil.yyyy_mm_dd_hh_mm_ss(crdnYmdTm);
|
|
|
|
|
attachFileEditor.set("단속일시", crdnYmdTm);
|
|
|
|
|
attachFileEditor.set("단속장소", dataObject.string("CRDN_PLC"));
|
|
|
|
|
attachFileEditor.set("차량번호", dataObject.string("VHRNO"));
|
|
|
|
|
attachFileEditor.set("대체차량번호", dataObject.string("RPM_SZR_VHRNO"));
|
|
|
|
|
attachFileEditor.set("고지번호", dataObject.string("GOJI_NO"));
|
|
|
|
|
attachFileEditor.set("금액", CmmnUtil.addCommaToNumber(dataObject.string("LEVY_AMT")));
|
|
|
|
|
attachFileEditor.set("가상계좌번호", dataObject.string("VR_ACTNO"));
|
|
|
|
|
attachFileEditor.set("전자납부번호", dataObject.string("EPAYNO"));
|
|
|
|
|
attachFileEditor.set("처리상태", dataObject.string("CRDN_STTS_NM"));
|
|
|
|
|
String crdnSttsChgDt = dataObject.string("CRDN_STTS_CHG_DT");
|
|
|
|
|
crdnSttsChgDt = DataFormat.yyyy_mm_dd(crdnSttsChgDt.substring(0, 8));
|
|
|
|
|
attachFileEditor.set("처리일자", crdnSttsChgDt);
|
|
|
|
|
attachFileEditor.set("납부기한", DataFormat.yyyy_mm_dd(dataObject.string("DUDT_YMD")));
|
|
|
|
|
attachFileEditor.set("수납일자", DataFormat.yyyy_mm_dd(dataObject.string("RCVMT_YMD")));
|
|
|
|
|
}
|
|
|
|
|
else if(this.formatName.equals("requestForDelivery")){
|
|
|
|
|
|
|
|
|
|
attachFileEditor.set("징수과목", dataObject.string("TXITM_NM"));
|
|
|
|
|
attachFileEditor.set("고지번호", dataObject.string("GOJI_NO"));
|
|
|
|
|
attachFileEditor.set("과태료계", CmmnUtil.addCommaToNumber(dataObject.string("SUM_AMT")));
|
|
|
|
|
attachFileEditor.set("법정기일", DataFormat.yyyy_mm_dd(dataObject.string("DUDT_YMD")));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if(this.formatName.equals("reportOnClaims")){
|
|
|
|
|
|
|
|
|
|
attachFileEditor.set("년도", dataObject.string("FYR"));
|
|
|
|
|
attachFileEditor.set("과세번호", dataObject.string("GOJI_NO"));
|
|
|
|
|
attachFileEditor.set("법정기일", DataFormat.yyyy_mm_dd(dataObject.string("DUDT_YMD")));
|
|
|
|
|
attachFileEditor.set("세목", dataObject.string("TXITM_NM"));
|
|
|
|
|
attachFileEditor.set("세액", CmmnUtil.addCommaToNumber(dataObject.string("LEVY_PCPTAX")));
|
|
|
|
|
attachFileEditor.set("가산금", CmmnUtil.addCommaToNumber(dataObject.string("LEVY_ADAMT")));
|
|
|
|
|
attachFileEditor.set("합계", CmmnUtil.addCommaToNumber(dataObject.string("SUM_AMT")));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AddUtil.insertTableInCell(attachFormatFile, baseFile, "내부");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
ClickHereEditor baseFileEditor = new ClickHereEditor(baseFile);
|
|
|
|
|
|
|
|
|
|
if(this.formatName.equals("crdnConfirm")){
|
|
|
|
|
|
|
|
|
|
baseFileEditor.set("과태료", dataObject.string("TASK_SE_NM"));
|
|
|
|
|
baseFileEditor.set("차량번호", dataObject.string("VHRNO"));
|
|
|
|
|
String crdnYmdTm = dataObject.string("CRDN_YMD_TM");
|
|
|
|
|
crdnYmdTm = CmmnUtil.yyyy_mm_dd_hh_mm_ss(crdnYmdTm);
|
|
|
|
|
baseFileEditor.set("단속일시", crdnYmdTm);
|
|
|
|
|
|
|
|
|
|
baseFileEditor.set("위반내용", dataObject.string("VLTN_ARTCL"));
|
|
|
|
|
baseFileEditor.set("단속장소", dataObject.string("CRDN_PLC"));
|
|
|
|
|
baseFileEditor.set("단속동", dataObject.string("CRDN_STDG_NM"));
|
|
|
|
|
baseFileEditor.set("단속조", dataObject.string("TEAM_NM"));
|
|
|
|
|
baseFileEditor.set("소유자", dataObject.string("RTPYR_NM"));
|
|
|
|
|
baseFileEditor.set("주소", dataObject.string("RTPYR_FULL_ADDR"));
|
|
|
|
|
baseFileEditor.set("우편번호", dataObject.string("RTPYR_ZIP"));
|
|
|
|
|
|
|
|
|
|
String printRequestYmd = this.printRequestDt.substring(0, 8);
|
|
|
|
|
String yyyy = printRequestYmd.substring(0, 4);
|
|
|
|
|
String mm = printRequestYmd.substring(4, 6);
|
|
|
|
|
String dd = printRequestYmd.substring(6, 8);
|
|
|
|
|
String ymd = yyyy+"년 "+mm+"월 "+dd+"일";
|
|
|
|
|
baseFileEditor.set("연월일", ymd);
|
|
|
|
|
|
|
|
|
|
String instNm = (String) this.printRequestUserInfo.getInfo().get("instNm");
|
|
|
|
|
instNm = FactionUtil.getInstituteLeader(instNm, false);
|
|
|
|
|
baseFileEditor.set("발신", instNm);
|
|
|
|
|
|
|
|
|
|
if(!dataObject.string("PHOTO1").equals("")) {
|
|
|
|
|
InsertingImageCell.IMPL_InsertPicture(baseFile, "왼쪽위사진", dataObject.string("PHOTO1"));
|
|
|
|
|
}
|
|
|
|
|
if(!dataObject.string("PHOTO2").equals("")) {
|
|
|
|
|
InsertingImageCell.IMPL_InsertPicture(baseFile, "오른쪽위사진", dataObject.string("PHOTO2"));
|
|
|
|
|
}
|
|
|
|
|
if(!dataObject.string("PHOTO3").equals("")) {
|
|
|
|
|
InsertingImageCell.IMPL_InsertPicture(baseFile, "왼쪽아래사진", dataObject.string("PHOTO3"));
|
|
|
|
|
}
|
|
|
|
|
if(!dataObject.string("PHOTO4").equals("")) {
|
|
|
|
|
InsertingImageCell.IMPL_InsertPicture(baseFile, "오른쪽아래사진", dataObject.string("PHOTO4"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if(this.formatName.equals("rcvmtConfirm")) {
|
|
|
|
|
|
|
|
|
|
baseFileEditor.set("위반명1", dataObject.string("TASK_SE_NM"));
|
|
|
|
|
baseFileEditor.set("위반명2", dataObject.string("TASK_SE_NM"));
|
|
|
|
|
baseFileEditor.set("위반차량", dataObject.string("VHRNO"));
|
|
|
|
|
baseFileEditor.set("대체차량", dataObject.string("RPM_SZR_VHRNO"));
|
|
|
|
|
baseFileEditor.set("위반금액", CmmnUtil.addCommaToNumber(dataObject.string("FFNLG_AMT")));
|
|
|
|
|
baseFileEditor.set("단속일자", DataFormat.yyyy_mm_dd(dataObject.string("CRDN_YMD")));
|
|
|
|
|
baseFileEditor.set("단속장소", dataObject.string("CRDN_PLC"));
|
|
|
|
|
baseFileEditor.set("소유자", dataObject.string("RTPYR_NM"));
|
|
|
|
|
baseFileEditor.set("주민번호", dataObject.string("RTPYR_NO"));
|
|
|
|
|
baseFileEditor.set("주소", dataObject.string("RTPYR_FULL_ADDR"));
|
|
|
|
|
baseFileEditor.set("고지번호", dataObject.string("GOJI_NO"));
|
|
|
|
|
baseFileEditor.set("수납일자", DataFormat.yyyy_mm_dd(dataObject.string("RCVMT_YMD")));
|
|
|
|
|
baseFileEditor.set("수납금액", CmmnUtil.addCommaToNumber(dataObject.string("RCVMT_AMT")));
|
|
|
|
|
|
|
|
|
|
baseFileEditor.set("연월일시분초", CmmnUtil.yyyy_mm_dd_hh_mm_ss(this.printRequestDt));
|
|
|
|
|
baseFileEditor.set("확인자", this.printRequestUserInfo.getName());
|
|
|
|
|
|
|
|
|
|
String instNm = (String) this.printRequestUserInfo.getInfo().get("instNm");
|
|
|
|
|
instNm = FactionUtil.getInstituteLeader(instNm, false);
|
|
|
|
|
baseFileEditor.set("발신", instNm);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} catch(Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
throw new RuntimeException("한글 파일 출력 중 오류가 발생하였습니다.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|