단속확인서 출력 추가

main
이범준 1 year ago
parent f7362cca9e
commit 061dc1cca6

@ -46,8 +46,12 @@ import kr.dogfoot.hwplib.tool.objectfinder.CellFinder;
public class InsertingImageCell {
public static void IMPL_InsertPicture(HWPFile hwpFile, String fieldName, String imgFilePath) throws IOException {
InsertingImageCell tii = new InsertingImageCell();
tii.insertShapeWithImage(hwpFile, fieldName, imgFilePath);
if(imgFilePath != null && !imgFilePath.equals("")) {
InsertingImageCell tii = new InsertingImageCell();
tii.insertShapeWithImage(hwpFile, fieldName, imgFilePath);
}
}
private final String imageFileExt = "jpg";

@ -111,6 +111,7 @@ public class PrintUtil {
switch (formatName) {
case "crdnList": {
this.recordPerPartFile = 6;
break;
}
}
@ -121,11 +122,13 @@ public class PrintUtil {
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;
}
}
@ -202,6 +205,9 @@ public class PrintUtil {
String instNm = (String) this.printRequestUserInfo.getInfo().get("instNm");
instNm = FactionUtil.getLastWord(instNm);
if(instNm.endsWith("구") || instNm.endsWith("군")) {
instNm += "청";
}
baseFileEditor.set("발신", instNm);
}
}
@ -248,8 +254,51 @@ public class PrintUtil {
} 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");
if(instNm.endsWith("구") || instNm.endsWith("군")) {
instNm += "청";
}
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"));
}
}
}
} catch(Exception e) {

@ -9,9 +9,12 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cokr.xit.base.file.service.FileQuery;
import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.fims.cmmn.hwp.AddUtil;
import cokr.xit.fims.cmmn.hwp.PrintUtil;
import cokr.xit.fims.cmmn.service.bean.FactionBean;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.CrdnListMapper;
import cokr.xit.fims.sprt.PrintOption;
@ -47,6 +50,9 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
@Resource(name="crdnListMapper")
protected CrdnListMapper crdnListMapper;
@Resource(name="fileBean")
protected FileBean fileBean;
@Override
public List<DataObject> getIntegrationDataList(SprtQuery query) {
return sprt01Bean.getIntegrationDataList(query);
@ -80,6 +86,26 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
CrdnQuery query = new CrdnQuery();
query.setCrdnIDs(crdnIds);
dataObjectList = crdnListMapper.selectCrackdownList(query);
for(int i=0; i < dataObjectList.size(); i++) {
DataObject dataObject = dataObjectList.get(i);
String crndId = dataObject.string("CRDN_ID");
FileQuery fileQuery = new FileQuery();
fileQuery.setInfoType(Crdn.INF_TYPE);
fileQuery.setInfoKeys(crndId);
List<DataObject> fileInfoList = fileBean.getFileList(fileQuery);
if(fileInfoList != null && fileInfoList.size() > 0) {
dataObject.set("PHOTO1", fileInfoList.get(0).string("URL"));
if(fileInfoList.size() >= 2)
dataObject.set("PHOTO2", fileInfoList.get(1).string("URL"));
if(fileInfoList.size() >= 3)
dataObject.set("PHOTO3", fileInfoList.get(2).string("URL"));
if(fileInfoList.size() >= 4)
dataObject.set("PHOTO4", fileInfoList.get(3).string("URL"));
}
}
}
int totalDataCount = dataObjectList.size();

@ -92,7 +92,8 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, LE.ETC_CN AS LEVY_EXCL_ETC_CN <!-- 부과 제외 기타 내용 -->
, P.RTPYR_NM <!-- 납부자명 -->
, P.RTPYR_NO <!-- 납부자번호 -->
, CONCAT(P.ADDR, ' ', P.DTL_ADDR) AS RTPYR_FULL_ADDR /* 납부자 전체 주소 */
, CONCAT(P.ADDR, ' ', P.DTL_ADDR) AS RTPYR_FULL_ADDR <!-- 납부자주소 -->
, P.ZIP AS RTPYR_ZIP <!-- 납부자우편번호 -->
, C.DEL_YN
, C.RGTR
, C.REG_DT

@ -10,7 +10,7 @@
<div class="float-start">
<button type="button" id="btnExcel--${pageName}" class="btn btn-excel">엑셀</button>
<button type="button" id="btnPrintCrdnList--${pageName}" class="btn btn-info">단속내역서출력</button>
<button type="button" id="btnPrintCrdnConfirm" class="btn btn-info">단속확인서출력</button>
<button type="button" id="btnPrintCrdnConfirm--${pageName}" class="btn btn-info">단속확인서출력</button>
<label>
<input type="checkbox" id="privateInfoYn--${pageName}" name="privateInfoYn" class="form-check-input"/>
개인정보 비공개(내역서)

Loading…
Cancel
Save