의견제출심의결의서 포맷 class 추가

main
이범준 12 months ago
parent 5e40fc10d9
commit e5c8ded25c

@ -0,0 +1,66 @@
package cokr.xit.fims.cmmn.hwp.format;
import java.util.List;
import cokr.xit.fims.cmmn.hwp.ClickHereEditor;
import cokr.xit.fims.cmmn.hwp.HWPFormatWriter;
import cokr.xit.fims.cmmn.hwp.HWPPrintUtil;
import cokr.xit.fims.sprt.PrintOption;
import cokr.xit.foundation.data.DataObject;
import kr.dogfoot.hwplib.object.HWPFile;
public class DlbrDecsn implements HWPFormatWriter {
@Override
public void setting(HWPPrintUtil hwpPrintUtil) {
hwpPrintUtil.setFormatName("dlbrDecsn");
hwpPrintUtil.setFormatKorName("의견제출심의결의서");
hwpPrintUtil.setFormatType("info");
hwpPrintUtil.setRecordPerPartFile(1);
hwpPrintUtil.setBaseFormatFilePath("format/opnnDlbrDecsnForm.hwp");
hwpPrintUtil.setAttachFormatFilePath("");
}
@Override
public void writeGlobalInfo(HWPFile baseFile, List<DataObject> dataObjectList, PrintOption printOption,
HWPPrintUtil hwpPrintUtil) {
}
@Override
public void writeSingleDataInfo(HWPFile baseFile, HWPFile attachFile, DataObject dataObject,
HWPPrintUtil hwpPrintUtil) {
ClickHereEditor baseFileEditor = new ClickHereEditor(baseFile);
baseFileEditor.set("접수번호", dataObject.string("RCPT_NO"));
baseFileEditor.set("접수일자", dataObject.string("RCPT_YMD"));
baseFileEditor.set("위반정보", dataObject.string("TASK_SE_NM"));
baseFileEditor.set("진술자명", dataObject.string("STTR_NM"));
baseFileEditor.set("진술자생년월일", dataObject.string("STTR_BRDT"));
baseFileEditor.set("진술자연락처", dataObject.string("STTR_CTTPC"));
baseFileEditor.set("소유주관계", dataObject.string("OWNR_REL_NM"));
baseFileEditor.set("차량번호", dataObject.string("VHRNO"));
baseFileEditor.set("단속일시", dataObject.string("CRDN_YMD_TM_MASK"));
baseFileEditor.set("단속장소", dataObject.string("CRDN_PLC"));
baseFileEditor.set("의견제출내용", dataObject.string("OPNN_SBMSN_CN"));
baseFileEditor.set("심의회원직급1", dataObject.string("DLBR_MBR_JBGD1"));
baseFileEditor.set("심의회원명1", dataObject.string("DLBR_MBR_NM1"));
baseFileEditor.set("심의회원직급2", dataObject.string("DLBR_MBR_JBGD2"));
baseFileEditor.set("심의회원명2", dataObject.string("DLBR_MBR_NM2"));
baseFileEditor.set("심의회원직급3", dataObject.string("DLBR_MBR_JBGD3"));
baseFileEditor.set("심의회원명3", dataObject.string("DLBR_MBR_NM3"));
baseFileEditor.set("심의회원직급4", dataObject.string("DLBR_MBR_JBGD4"));
baseFileEditor.set("심의회원명4", dataObject.string("DLBR_MBR_NM4"));
baseFileEditor.set("심의회원직급5", dataObject.string("DLBR_MBR_JBGD5"));
baseFileEditor.set("심의회원명5", dataObject.string("DLBR_MBR_NM5"));
baseFileEditor.set("심의회원직급6", dataObject.string("DLBR_MBR_JBGD6"));
baseFileEditor.set("심의회원명6", dataObject.string("DLBR_MBR_NM6"));
baseFileEditor.set("심의회원직급7", dataObject.string("DLBR_MBR_JBGD7"));
baseFileEditor.set("심의회원명7", dataObject.string("DLBR_MBR_NM7"));
baseFileEditor.set("담당자검토의견", dataObject.string("PIC_RVW_OPNN"));
}
}

@ -10,11 +10,13 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cokr.xit.base.file.FileInfo;
import cokr.xit.fims.excl.OpnnSbmsn;
import cokr.xit.fims.cmmn.hwp.AddUtil;
import cokr.xit.fims.cmmn.hwp.HWPFormatWriter;
import cokr.xit.fims.cmmn.hwp.HWPPrintUtil;
import cokr.xit.fims.cmmn.hwp.format.DlbrDecsn;
import cokr.xit.fims.cmmn.service.bean.FactionBean;
import cokr.xit.fims.excl.LevyExclQuery;
import cokr.xit.fims.excl.OpnnSbmsn;
import cokr.xit.fims.excl.service.OpnnSbmsnService;
import cokr.xit.fims.sprt.PrintOption;
import cokr.xit.foundation.UserInfo;
@ -118,7 +120,8 @@ public class OpnnSbmsnServiceBean extends AbstractServiceBean implements OpnnSbm
Map<String, String> result = new HashMap<>();
HWPPrintUtil printUtil = new HWPPrintUtil();
printUtil.setting(formatType, formatName);
HWPFormatWriter hwpFormatWriter = new DlbrDecsn();
hwpFormatWriter.setting(printUtil);
UserInfo userInfo = currentUser();
factionBean.initUserInfo(userInfo);
@ -141,15 +144,14 @@ public class OpnnSbmsnServiceBean extends AbstractServiceBean implements OpnnSbm
HWPFile resultFile = HWPReader.fromFile(resultHwpPath);
// 공통사항 세팅
printUtil.setGlobalInfo(printOption, dataObjectList, resultFile);
hwpFormatWriter.writeGlobalInfo(resultFile, dataObjectList, printOption, printUtil);
HWPWriter.toFile(resultFile, resultHwpPath);
// 데이터 건별 처리
for (int recordIndex = 0; recordIndex < printUtil.getRecordPerPartFile(); recordIndex++) {
if (dataIndex < dataObjectList.size()) {
DataObject dataObject = dataObjectList.get(dataIndex);
printUtil.setBySingleData(printOption, dataObject, resultFile);
hwpFormatWriter.writeSingleDataInfo(resultFile, null, dataObject, printUtil);
}
if (formatType.equals("list")) {

@ -26,4 +26,6 @@ SELECT OTPT_FORM_ID
AND TASK_SE_CD = #{taskSeCd}
AND SNDNG_SE_CD = #{sndngSeCd}
AND OTPT_PAPER_SE_CD = #{otptPaperSeCd}
</select>
</mapper>
Loading…
Cancel
Save