한글파일 출력 수정

main
이범준 6 months ago
parent 479155f8ec
commit ec55c53c69

@ -185,6 +185,11 @@
<version>3.5.3</version>
</dependency>
<dependency>
<groupId>cokr.xit.app</groupId>
<artifactId>app-support</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>

@ -0,0 +1,16 @@
package cokr.xit.fims.cmmn;
import cokr.xit.applib.PrintOption;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class FimsPrintOption extends PrintOption {
/**
*
*/
private String taskSeCd;
}

@ -25,13 +25,13 @@ import cokr.xit.foundation.data.DataObject;
public class OutsourcingFileMaker {
protected String printKorName;
protected PrintOption printOption;
protected FimsPrintOption printOption;
protected List<DataObject> data;
protected List<DataObject> printStngItems;
protected String resultZipFilePath;
public OutsourcingFileMaker(String printKorName, PrintOption printOption, List<DataObject> printStngItems,
public OutsourcingFileMaker(String printKorName, FimsPrintOption printOption, List<DataObject> printStngItems,
List<DataObject> data){
this.printKorName = printKorName;
this.printOption = printOption;

@ -1,113 +0,0 @@
package cokr.xit.fims.cmmn;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import cokr.xit.foundation.UserInfo;
public class Print {
public Print(){
SimpleDateFormat ymdhmsFormat = new SimpleDateFormat("yyyyMMddHHmmss");
this.printRequestDt = ymdhmsFormat.format(new Date());
}
protected String printRequestDt;
protected UserInfo printRequestUserInfo;
protected int fileNameIndex = 0;
protected String extension;
protected String formatName;
protected String formatKorName;
public String setExtension(String extension) {
return this.extension = extension;
}
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 UserInfo getPrintRequestUserInfo() {
return this.printRequestUserInfo;
}
public void setPrintRequestUserInfo(UserInfo printRequestUserInfo) {
this.printRequestUserInfo = printRequestUserInfo;
}
public String getPrintRequestDt() {
return this.printRequestDt;
}
public void setPrintRequestDt(String printRequestDt) {
this.printRequestDt = printRequestDt;
}
public int getFileNameIndex() {
return this.fileNameIndex;
}
public int setFileNameIndex(int fileNameIndex) {
return this.fileNameIndex = fileNameIndex;
}
public boolean getPrivateInfoYn(PrintOption printOption) {
boolean privateInfoYn = true;
if(printOption != null && printOption.getPrivateInfoYn() != null && printOption.getPrivateInfoYn().equals("N")) {
privateInfoYn = false;
}
return privateInfoYn;
}
public Map<String,String> getGlobalVariable(PrintOption printOption) {
Map<String,String> map = new HashMap<String,String>();
if(printOption != null && printOption.getGlobalVariable() != null && !printOption.getGlobalVariable().isEmpty()) {
map = printOption.getGlobalVariable();
}
return map;
}
public String pathForNewFile(){
SimpleDateFormat ymdhmsFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String currentTime = ymdhmsFormat.format(new Date());
String year = currentTime.substring(0, 4);
String month = currentTime.substring(4, 6);
String day = currentTime.substring(6, 8);
String formatFileResultRootPath = "files" + File.separator + "temp" + File.separator + "print";
String formatFileResultFolderPath = formatFileResultRootPath
+ File.separator + year + File.separator + month + File.separator + day;
File formatFileResultFolder = new File(formatFileResultFolderPath);
if(!formatFileResultFolder.exists()) {
formatFileResultFolder.mkdirs();
}
String resultPath = formatFileResultFolderPath + File.separator + currentTime +"_"+ this.getFileNameIndex() + "."+this.extension;
this.setFileNameIndex(this.getFileNameIndex()+1);
return resultPath;
}
}

@ -1,32 +0,0 @@
package cokr.xit.fims.cmmn;
import java.util.Map;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class PrintOption {
/**
*
*/
private String privateInfoYn;
/**
*
*/
private String paperSeCd;
/**
*
*/
private String taskSeCd;
/**
*
*/
private Map<String,String> globalVariable;
}

@ -1,32 +0,0 @@
package cokr.xit.fims.cmmn.hwp;
import kr.dogfoot.hwplib.object.HWPFile;
import kr.dogfoot.hwplib.object.bodytext.ParagraphListInterface;
import kr.dogfoot.hwplib.object.bodytext.paragraph.Paragraph;
import kr.dogfoot.hwplib.tool.paragraphadder.ParagraphAdder;
public class HwpMerge {
/** .
* @param attachHWPFile , baseHWPFile
* @return
*/
public static void appendToLast(HWPFile attachHWPFile, HWPFile baseHWPFile) throws Exception {
if (attachHWPFile != null && baseHWPFile != null) {
Paragraph[] ps = attachHWPFile.getBodyText().getSectionList().get(0).getParagraphs();
ParagraphListInterface baseSection = baseHWPFile.getBodyText().getLastSection();
ParagraphAdder paraAdder = new ParagraphAdder(baseHWPFile, baseSection);
for(int i=0; i<ps.length; i++) {
Paragraph p = ps[i];
paraAdder.add(attachHWPFile, p);
}
}
}
}

@ -1,43 +0,0 @@
package cokr.xit.fims.cmmn.hwp;
import java.util.ArrayList;
import cokr.xit.base.docs.hwp.HWPWriter;
import kr.dogfoot.hwplib.object.bodytext.control.Control;
import kr.dogfoot.hwplib.object.bodytext.control.ControlTable;
import kr.dogfoot.hwplib.object.bodytext.control.ControlType;
import kr.dogfoot.hwplib.object.bodytext.control.table.Cell;
import kr.dogfoot.hwplib.object.bodytext.control.table.Row;
import kr.dogfoot.hwplib.tool.objectfinder.ControlFinder;
public class OffcsCellFinder {
public static Cell find(HWPWriter writer) {
ArrayList<Control> find = ControlFinder.find(writer.getFile(), (control, paragrpah, section) -> {
if(control.getType().equals(ControlType.Table)) {
ArrayList<Row> rl = ((ControlTable)control).getRowList();
if(rl.size() == 1) {
ArrayList<Cell> cl = rl.get(0).getCellList();
if(cl.size() == 1) {
String fn = cl.get(0).getListHeader().getFieldName();
if(fn != null && !fn.equals("")) {
if(fn.equals("직인")) {
return true;
}
}
}
}
}
return false;
});
if(find != null && !find.isEmpty()) {
ControlTable tableForOffcs = (ControlTable) find.get(0);
Cell cell = tableForOffcs.getRowList().get(0).getCellList().get(0);
return cell;
}
return null;
}
}

@ -2,8 +2,9 @@ package cokr.xit.fims.cmmn.hwp.format;
import java.util.List;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.applib.Print;
import cokr.xit.applib.hwp.format.HWPFormat;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.fims.mngt.FactionUtil;
import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject;
@ -13,7 +14,7 @@ import cokr.xit.foundation.data.DataObject;
*/
public class CrdnConfirm extends HWPFormat {
public CrdnConfirm(Print print, PrintOption printOption, List<DataObject> dataObjectList) {
public CrdnConfirm(Print print, FimsPrintOption printOption, List<DataObject> dataObjectList) {
super(print, printOption, dataObjectList);
this.maxRunCount = dataObjectList.size();
this.formatFilePath = "template/hwp/crdnConfirm.hwp";

@ -4,8 +4,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.stream.IntStream;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.applib.Print;
import cokr.xit.applib.hwp.format.HWPFormat;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.fims.mngt.FactionUtil;
import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject;
@ -15,7 +16,7 @@ import cokr.xit.foundation.data.DataObject;
*/
public class CrdnList extends HWPFormat {
public CrdnList(Print print, PrintOption printOption, List<DataObject> dataObjectList) {
public CrdnList(Print print, FimsPrintOption printOption, List<DataObject> dataObjectList) {
super(print, printOption, dataObjectList);
this.maxRunCount = 1;
this.formatFilePath = "template/hwp/crdnList.hwp";

@ -1,13 +1,13 @@
package cokr.xit.fims.cmmn.hwp.format;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import cokr.xit.applib.Print;
import cokr.xit.applib.hwp.format.HWPFormat;
import cokr.xit.base.docs.hwp.HWPWriter;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject;
import kr.dogfoot.hwplib.object.HWPFile;
@ -16,7 +16,7 @@ import kr.dogfoot.hwplib.object.HWPFile;
public class CvlcptOrgn extends HWPFormat {
private List<DataObject> data2 = null;
public CvlcptOrgn(Print print, PrintOption printOption, List<DataObject> dataObjectList) {
public CvlcptOrgn(Print print, FimsPrintOption printOption, List<DataObject> dataObjectList) {
super(print, printOption, dataObjectList);
this.maxRunCount = 1;
this.formatFilePath = "template/hwp/cvlcptOrgnl_text.hwp";
@ -52,7 +52,7 @@ public class CvlcptOrgn extends HWPFormat {
}
@Override
public HashMap<String, Object> makeFile(){
public HWPFormat makeFile(){
HWPFile hwpFile = HWPWriter.classpath(this.formatFilePath);
this.writer = new HWPWriter(hwpFile);
@ -82,7 +82,9 @@ public class CvlcptOrgn extends HWPFormat {
}
}
return getResult();
this.merge();
return this;
}
@ -92,7 +94,6 @@ public class CvlcptOrgn extends HWPFormat {
if(this.formatFilePath.equals("template/hwp/cvlcptOrgnl_text.hwp")) {
DataObject one = data.get(0);
writer.setValue("신청자", one.string("CVLCPT_APLCNT_NM"));

@ -3,13 +3,14 @@ package cokr.xit.fims.cmmn.hwp.format;
import java.util.ArrayList;
import java.util.List;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.applib.Print;
import cokr.xit.applib.hwp.format.HWPFormat;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.foundation.data.DataObject;
public class DlbrDecsnList extends HWPFormat {
public DlbrDecsnList(Print print, PrintOption printOption, List<DataObject> dataObjectList) {
public DlbrDecsnList(Print print, FimsPrintOption printOption, List<DataObject> dataObjectList) {
super(print, printOption, dataObjectList);
this.maxRunCount = dataObjectList.size();
this.formatFilePath = "template/hwp/opnnDlbrDecsnForm.hwp";

@ -1,105 +0,0 @@
package cokr.xit.fims.cmmn.hwp.format;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import cokr.xit.base.docs.hwp.HWPWriter;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.hwp.HwpMerge;
import cokr.xit.foundation.data.DataObject;
import kr.dogfoot.hwplib.object.HWPFile;
import kr.dogfoot.hwplib.reader.HWPReader;
public abstract class HWPFormat {
protected HWPWriter writer;
protected Print print;
protected PrintOption printOption;
protected List<DataObject> data;
protected String formatFilePath;
protected int currentRunCount;
protected int maxRunCount;
protected List<String> resultFilesPath;
public HWPFormat(Print print, PrintOption printOption, List<DataObject> dataObjectList) {
this.resultFilesPath = new ArrayList<String>();
this.currentRunCount = 0;
this.data = dataObjectList;
this.printOption = printOption;
this.print = print;
this.print.setExtension("hwp");
}
public HashMap<String, Object> makeFile(){
while(currentRunCount != maxRunCount) {
HWPFile hwpFile = HWPWriter.classpath(this.formatFilePath);
this.writer = new HWPWriter(hwpFile);
runAsWriter();
String tempPath = this.print.pathForNewFile();
writer.write(tempPath);
resultFilesPath.add(tempPath);
writer = null;
currentRunCount++;
}
return getResult();
};
protected abstract void runAsWriter();
protected HashMap<String, Object> getResult(){
HashMap<String,Object> result = new HashMap<String,Object>();
String downlaodFileName = this.print.getFormatKorName()+"_"+this.print.getPrintRequestDt()+".hwp";
if(resultFilesPath.size() >= 2) {
try {
String basePath = resultFilesPath.get(0);
HWPFile baseFile = HWPReader.fromFile(basePath);
for(int i=2; i <= resultFilesPath.size();i++) {
String attachPath = resultFilesPath.get(i-1);
HWPFile attachFile = HWPReader.fromFile(attachPath);
HwpMerge.appendToLast(attachFile, baseFile);
}
kr.dogfoot.hwplib.writer.HWPWriter.toFile(baseFile, basePath);
} catch (Exception e) {
throw new RuntimeException("한글 파일 출력 중 오류가 발생하였습니다.");
}
for(int i=2; i <= resultFilesPath.size();i++) {
if(!(new File(resultFilesPath.get(i-1))).delete()) {
throw new RuntimeException("한글 파일 출력 중 오류가 발생하였습니다.");
}
}
}
String resultFilePath = resultFilesPath.get(0);
HWPFile resultFile = HWPWriter.filepath(resultFilePath);
writer = new HWPWriter(resultFile);
result.put("download", writer.getDownloadable().setFilename(downlaodFileName));
result.put("downloadData", data);
result.put("dataNames", getDownloadDataNames());
new File(resultFilePath).delete();
return result;
};
public abstract List<String> getDownloadDataNames();
}

@ -3,8 +3,9 @@ package cokr.xit.fims.cmmn.hwp.format;
import java.util.ArrayList;
import java.util.List;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.applib.Print;
import cokr.xit.applib.hwp.format.HWPFormat;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.fims.mngt.FactionUtil;
import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject;
@ -14,7 +15,7 @@ import cokr.xit.foundation.data.DataObject;
*/
public class RcvmtConfirm extends HWPFormat {
public RcvmtConfirm(Print print, PrintOption printOption, List<DataObject> dataObjectList) {
public RcvmtConfirm(Print print, FimsPrintOption printOption, List<DataObject> dataObjectList) {
super(print, printOption, dataObjectList);
this.maxRunCount = dataObjectList.size();

@ -9,10 +9,11 @@ import java.util.stream.IntStream;
import org.egovframe.rte.fdl.string.EgovStringUtil;
import cokr.xit.applib.Print;
import cokr.xit.applib.hwp.OffcsCellFinder;
import cokr.xit.applib.hwp.format.HWPFormat;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.hwp.OffcsCellFinder;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.fims.mngt.FactionUtil;
import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject;
@ -24,7 +25,7 @@ import kr.dogfoot.hwplib.object.bodytext.paragraph.Paragraph;
*/
public class ReportOnClaims extends HWPFormat {
public ReportOnClaims(Print print, PrintOption printOption, List<DataObject> dataObjectList) {
public ReportOnClaims(Print print, FimsPrintOption printOption, List<DataObject> dataObjectList) {
super(print, printOption, dataObjectList);
this.maxRunCount = 1;
this.formatFilePath = "template/hwp/reportOnClaims.hwp";

@ -9,10 +9,11 @@ import java.util.stream.IntStream;
import org.egovframe.rte.fdl.string.EgovStringUtil;
import cokr.xit.applib.Print;
import cokr.xit.applib.hwp.OffcsCellFinder;
import cokr.xit.applib.hwp.format.HWPFormat;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.hwp.OffcsCellFinder;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.fims.mngt.FactionUtil;
import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject;
@ -24,7 +25,7 @@ import kr.dogfoot.hwplib.object.bodytext.paragraph.Paragraph;
*/
public class RequestForDelivery extends HWPFormat {
public RequestForDelivery(Print print, PrintOption printOption, List<DataObject> dataObjectList) {
public RequestForDelivery(Print print, FimsPrintOption printOption, List<DataObject> dataObjectList) {
super(print, printOption, dataObjectList);
this.maxRunCount = 1;
this.formatFilePath = "template/hwp/requestForDelivery.hwp";

@ -8,16 +8,17 @@ import java.util.stream.IntStream;
import org.egovframe.rte.fdl.string.EgovStringUtil;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.hwp.OffcsCellFinder;
import cokr.xit.applib.Print;
import cokr.xit.applib.hwp.OffcsCellFinder;
import cokr.xit.applib.hwp.format.HWPFormat;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.foundation.data.DataObject;
import kr.dogfoot.hwplib.object.bodytext.control.table.Cell;
import kr.dogfoot.hwplib.object.bodytext.paragraph.Paragraph;
public class SvbtcList extends HWPFormat {
public SvbtcList(Print print, PrintOption printOption, List<DataObject> dataObjectList) {
public SvbtcList(Print print, FimsPrintOption printOption, List<DataObject> dataObjectList) {
super(print, printOption, dataObjectList);
this.maxRunCount = 1;
this.formatFilePath = "template/hwp/svbtcList.hwp";

@ -4,8 +4,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.applib.Print;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.fims.mngt.FactionUtil;
import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject;
@ -84,7 +84,7 @@ public class Advntce extends PDFPrintFormat {
public Advntce() {
super();
}
public Advntce(Print print, PrintOption printOption,
public Advntce(Print print, FimsPrintOption printOption,
DataObject otptBscStng, List<DataObject> otptArtclStngList, String paperSeCd, List<DataObject> data){
super(print,printOption,otptBscStng,otptArtclStngList,paperSeCd, data);
this.print.setFormatKorName("사전통지서");
@ -95,7 +95,7 @@ public class Advntce extends PDFPrintFormat {
*/
@Override
public String getMappingValue(String otptArtclNm, String defaultValue, boolean forPost,
DataObject dataObject, PrintOption printOption, Print print) {
DataObject dataObject, FimsPrintOption printOption, Print print) {
String result = "";
if(forPost) {
@ -244,7 +244,7 @@ public class Advntce extends PDFPrintFormat {
*/
@Override
public String getValueForPost(String otptArtclNm, String defaultValue,
DataObject dataObject, PrintOption printOption, Print print) {
DataObject dataObject, FimsPrintOption printOption, Print print) {
String result = "";
switch(otptArtclNm) {
@ -292,7 +292,7 @@ public class Advntce extends PDFPrintFormat {
@Override
public List<String> getMappingValues(String otptArtclNm, String defaultValue, boolean forPost,
DataObject dataObject, PrintOption printOption, Print print) {
DataObject dataObject, FimsPrintOption printOption, Print print) {
List<String> result = new ArrayList<String>();
switch(otptArtclNm) {

@ -4,9 +4,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import cokr.xit.applib.Print;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.fims.mngt.FactionUtil;
import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject;
@ -94,7 +94,7 @@ public class Nht extends PDFPrintFormat {
super();
}
public Nht(Print print, PrintOption printOption,
public Nht(Print print, FimsPrintOption printOption,
DataObject otptBscStng, List<DataObject> otptArtclStngList, String paperSeCd, List<DataObject> data) {
super(print,printOption,otptBscStng,otptArtclStngList,paperSeCd, data);
this.print.setFormatKorName("고지서");
@ -107,7 +107,7 @@ public class Nht extends PDFPrintFormat {
*/
@Override
public String getMappingValue(String otptArtclNm, String defaultValue, boolean forPost,
DataObject dataObject, PrintOption printOption, Print print) {
DataObject dataObject, FimsPrintOption printOption, Print print) {
String result = "";
if(forPost) {
@ -319,7 +319,7 @@ public class Nht extends PDFPrintFormat {
*/
@Override
public String getValueForPost(String otptArtclNm, String defaultValue,
DataObject dataObject, PrintOption printOption, Print print) {
DataObject dataObject, FimsPrintOption printOption, Print print) {
String result = "";
switch(otptArtclNm) {
@ -366,7 +366,7 @@ public class Nht extends PDFPrintFormat {
@Override
public List<String> getMappingValues(String otptArtclNm, String defaultValue, boolean forPost,
DataObject dataObject, PrintOption printOption, Print print) {
DataObject dataObject, FimsPrintOption printOption, Print print) {
List<String> result = new ArrayList<String>();
switch(otptArtclNm) {

@ -18,9 +18,9 @@ import org.apache.pdfbox.pdmodel.graphics.state.RenderingMode;
import org.egovframe.rte.fdl.string.EgovStringUtil;
import org.springframework.core.io.ClassPathResource;
import cokr.xit.applib.Print;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.fims.cmmn.Pstn;
import cokr.xit.fims.cmmn.PstnAndSize;
import cokr.xit.fims.cmmn.Size;
@ -35,7 +35,7 @@ public abstract class PDFPrintFormat {
protected PDFWriter writer;
protected Print print;
protected PrintOption printOption;
protected FimsPrintOption printOption;
protected List<DataObject> data;
protected DataObject otptBscStng;
@ -50,7 +50,7 @@ public abstract class PDFPrintFormat {
initDefaultStng();
}
public PDFPrintFormat(Print print, PrintOption printOption,
public PDFPrintFormat(Print print, FimsPrintOption printOption,
DataObject otptBscStng, List<DataObject> otptArtclStngList, String paperSeCd, List<DataObject> data) {
initDefaultStng();
this.data = data;
@ -147,16 +147,16 @@ public abstract class PDFPrintFormat {
* .
*/
public abstract String getMappingValue(String otptArtclNm, String defaultValue, boolean forPost,
DataObject dataObject, PrintOption printOption, Print print);
DataObject dataObject, FimsPrintOption printOption, Print print);
public abstract List<String> getMappingValues(String otptArtclNm, String defaultValue, boolean forPost,
DataObject dataObject, PrintOption printOption, Print print);
DataObject dataObject, FimsPrintOption printOption, Print print);
/**
* .
*/
public abstract String getValueForPost(String otptArtclNm, String defaultValue,
DataObject dataObject, PrintOption printOption, Print print);
DataObject dataObject, FimsPrintOption printOption, Print print);
/**
* ( , , , , ) .

@ -14,6 +14,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.Print;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format;
@ -24,8 +25,7 @@ import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.fims.cmmn.hwp.format.CvlcptOrgn;
import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker;
@ -218,7 +218,7 @@ public class Cvlc01Controller extends ApplicationController {
@RequestMapping(name="민원내역 원본 한글 파일 생성", value=METHOD_URL.makeFileFromHwpFormat)
public ModelAndView makeFileFromHwpFormat(CrdnQuery query) {
PrintOption printOption = new PrintOption();
FimsPrintOption printOption = new FimsPrintOption();
UserInfo userInfo = currentUser();
factionBean.initUserInfo(userInfo);
@ -263,8 +263,7 @@ public class Cvlc01Controller extends ApplicationController {
}
CvlcptOrgn hwpFormat = new CvlcptOrgn(print, printOption, dataObjectList);
HashMap<String, Object> result = hwpFormat.makeFile();
HashMap<String, Object> result = hwpFormat.makeFile().andDownload();
ModelAndView mav = new ModelAndView("downloadView");
mav.addAllObjects(result);
return mav;

@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.Print;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format;
@ -24,8 +25,7 @@ import cokr.xit.base.file.service.FileService;
import cokr.xit.base.file.web.FileInfoFactory;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.fims.cmmn.hwp.format.DlbrDecsnList;
import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker;
@ -379,12 +379,12 @@ public class Excl02Controller extends ApplicationController {
Print print = new Print();
print.setPrintRequestUserInfo(userInfo);
PrintOption printOption = new PrintOption();
FimsPrintOption printOption = new FimsPrintOption();
List<DataObject> dataObjectList = opnnSbmsnService.getOpnnSbmsnDlbrDecsns(req);
DlbrDecsnList hwpFormat = new DlbrDecsnList(print, printOption, dataObjectList);
HashMap<String, Object> result = hwpFormat.makeFile();
HashMap<String, Object> result = hwpFormat.makeFile().andDownload();
ModelAndView mav = new ModelAndView("downloadView");
mav.addAllObjects(result);

@ -13,6 +13,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.Print;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format;
@ -26,8 +27,7 @@ import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.cmmn.OtptStngQuery;
import cokr.xit.fims.cmmn.OutsourcingFileMaker;
import cokr.xit.fims.cmmn.OutsourcingStngQuery;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.fims.cmmn.dao.OtptStngMapper;
import cokr.xit.fims.cmmn.hwp.format.SvbtcList;
import cokr.xit.fims.cmmn.pdf.print.format.Advntce;
@ -1661,7 +1661,7 @@ public class Sndb01Controller extends ApplicationController {
Print print = new Print();
print.setPrintRequestUserInfo(userInfo);
PrintOption printOption = new PrintOption();
FimsPrintOption printOption = new FimsPrintOption();
req.setSggCd((String)userInfo.getInfo().get("sggCd"));
req.setDeptCd((String)userInfo.getInfo().get("deptCd"));
@ -1669,7 +1669,7 @@ public class Sndb01Controller extends ApplicationController {
List<DataObject> dataObjectList = svbtcBean.getSvbtcPrint(req);
SvbtcList hwpFormat = new SvbtcList(print, printOption, dataObjectList);
HashMap<String, Object> result = hwpFormat.makeFile();
HashMap<String, Object> result = hwpFormat.makeFile().andDownload();
ModelAndView mav = new ModelAndView("downloadView");
mav.addAllObjects(result);
return mav;
@ -1816,7 +1816,7 @@ public class Sndb01Controller extends ApplicationController {
*/
@Task
@RequestMapping(name="사전통지발송 현황 사전통지서 pdf 파일 생성", value=METHOD_URL.makeAdvntcePdf)
public ModelAndView makeAdvntcePdf(PrintOption printOption, SndbQuery req) {
public ModelAndView makeAdvntcePdf(FimsPrintOption printOption, SndbQuery req) {
//
ModelAndView mav = new ModelAndView("downloadView");
@ -1917,7 +1917,7 @@ public class Sndb01Controller extends ApplicationController {
*/
@Task
@RequestMapping(name="사전통지발송 현황 사전통지서 외주 파일 생성", value=METHOD_URL.makeAdvntceOutsourcing)
public ModelAndView makeAdvntceOutsourcing(PrintOption printOption, SndbQuery req) {
public ModelAndView makeAdvntceOutsourcing(FimsPrintOption printOption, SndbQuery req) {
ModelAndView mav = new ModelAndView("downloadView");
String taskSeCd = "";

@ -16,6 +16,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.Print;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format;
@ -27,11 +28,10 @@ import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.FimsPrintOption;
import cokr.xit.fims.cmmn.OtptStngQuery;
import cokr.xit.fims.cmmn.OutsourcingFileMaker;
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;
import cokr.xit.fims.cmmn.hwp.format.CrdnConfirm;
import cokr.xit.fims.cmmn.hwp.format.CrdnList;
@ -454,7 +454,7 @@ public class Sprt01Controller extends ApplicationController {
@RequestMapping(name="단속 내역서 한글 파일 생성", value=METHOD_URL.makeCrdnListFileFromHwpFormat)
public ModelAndView makeCrdnListFileFromHwpFormat(String privateInfoYn, String... crdnIds) {
PrintOption printOption = new PrintOption();
FimsPrintOption printOption = new FimsPrintOption();
printOption.setPrivateInfoYn(privateInfoYn);
UserInfo userInfo = currentUser();
factionBean.initUserInfo(userInfo);
@ -467,7 +467,7 @@ public class Sprt01Controller extends ApplicationController {
CrdnList hwpFormat = new CrdnList(print, printOption, dataObjectList);
HashMap<String, Object> result = hwpFormat.makeFile();
HashMap<String, Object> result = hwpFormat.makeFile().andDownload();
ModelAndView mav = new ModelAndView("downloadView");
mav.addAllObjects(result);
@ -480,7 +480,7 @@ public class Sprt01Controller extends ApplicationController {
@RequestMapping(name="단속 확인서 한글 파일 생성", value=METHOD_URL.makeCrdnConfirmFileFromHwpFormat)
public ModelAndView makeCrdnConfirmFileFromHwpFormat(String... crdnIds) {
PrintOption printOption = new PrintOption();
FimsPrintOption printOption = new FimsPrintOption();
UserInfo userInfo = currentUser();
factionBean.initUserInfo(userInfo);
@ -512,8 +512,7 @@ public class Sprt01Controller extends ApplicationController {
}
CrdnConfirm hwpFormat = new CrdnConfirm(print, printOption, dataObjectList);
HashMap<String, Object> result = hwpFormat.makeFile();
HashMap<String, Object> result = hwpFormat.makeFile().andDownload();
ModelAndView mav = new ModelAndView("downloadView");
mav.addAllObjects(result);
@ -537,7 +536,7 @@ public class Sprt01Controller extends ApplicationController {
* @return hwp
*/
@RequestMapping(name="교부청구서 한글 파일 생성", value=METHOD_URL.makeRequestForDeliveryFileFromHwpFormat)
public ModelAndView makeRequestForDeliveryFileFromHwpFormat(PrintOption printOption, String globalVariableInfo, String... crdnIds) {
public ModelAndView makeRequestForDeliveryFileFromHwpFormat(FimsPrintOption printOption, String globalVariableInfo, String... crdnIds) {
DataObject sggStngInfo = stngBean.getStng("sgg");
DataObject deptStngInfo = stngBean.getStng("dept");
@ -569,7 +568,7 @@ public class Sprt01Controller extends ApplicationController {
RequestForDelivery hwpFormat = new RequestForDelivery(print, printOption, dataObjectList);
HashMap<String, Object> result = hwpFormat.makeFile();
HashMap<String, Object> result = hwpFormat.makeFile().andDownload();
ModelAndView mav = new ModelAndView("downloadView");
mav.addAllObjects(result);
@ -580,7 +579,7 @@ public class Sprt01Controller extends ApplicationController {
* @return hwp
*/
@RequestMapping(name="채권신고서 한글 파일 생성", value=METHOD_URL.makeReportOnClaimsFileFromHwpFormat)
public ModelAndView makeReportOnClaimsFileFromHwpFormat(PrintOption printOption, String globalVariableInfo, String... crdnIds) {
public ModelAndView makeReportOnClaimsFileFromHwpFormat(FimsPrintOption printOption, String globalVariableInfo, String... crdnIds) {
DataObject sggStngInfo = stngBean.getStng("sgg");
DataObject deptStngInfo = stngBean.getStng("dept");
@ -612,7 +611,7 @@ public class Sprt01Controller extends ApplicationController {
ReportOnClaims hwpFormat = new ReportOnClaims(print, printOption, dataObjectList);
HashMap<String, Object> result = hwpFormat.makeFile();
HashMap<String, Object> result = hwpFormat.makeFile().andDownload();
ModelAndView mav = new ModelAndView("downloadView");
mav.addAllObjects(result);
return mav;
@ -629,7 +628,7 @@ public class Sprt01Controller extends ApplicationController {
Print print = new Print();
print.setPrintRequestUserInfo(userInfo);
PrintOption printOption = new PrintOption();
FimsPrintOption printOption = new FimsPrintOption();
printOption.setGlobalVariable(new HashMap<String,String>());
SprtQuery sprtQuery = new SprtQuery();
@ -637,7 +636,7 @@ public class Sprt01Controller extends ApplicationController {
List<DataObject> dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
RcvmtConfirm hwpFormat = new RcvmtConfirm(print, printOption, dataObjectList);
HashMap<String, Object> result = hwpFormat.makeFile();
HashMap<String, Object> result = hwpFormat.makeFile().andDownload();
ModelAndView mav = new ModelAndView("downloadView");
mav.addAllObjects(result);
@ -661,7 +660,12 @@ public class Sprt01Controller extends ApplicationController {
* @return PDF
*/
@RequestMapping(name="사전통지서 pdf 파일 생성", value=METHOD_URL.makeAdvntcePdf)
public ModelAndView makeAdvntcePdf(String[] crdnIds, Sndng sndng, PrintOption printOption) {
public ModelAndView makeAdvntcePdf(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) {
UserInfo userInfo = currentUser();
factionBean.initUserInfo(userInfo);
sndng.setSggCd((String)userInfo.getInfo().get("sggCd"));
ModelAndView mav = new ModelAndView("downloadView");
SprtQuery sprtQuery = new SprtQuery();
sprtQuery.setCrdnIds(crdnIds);
@ -728,8 +732,6 @@ public class Sprt01Controller extends ApplicationController {
Print print = new Print();
UserInfo userInfo = currentUser();
factionBean.initUserInfo(userInfo);
print.setPrintRequestUserInfo(userInfo);
//출력물 기본 설정
@ -778,7 +780,12 @@ public class Sprt01Controller extends ApplicationController {
* @return
*/
@RequestMapping(name="사전통지서 외주 파일 생성", value=METHOD_URL.makeAdvntceOutsourcing)
public ModelAndView makeAdvntceOutsourcing(String[] crdnIds, Sndng sndng, PrintOption printOption) {
public ModelAndView makeAdvntceOutsourcing(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) {
UserInfo userInfo = currentUser();
factionBean.initUserInfo(userInfo);
sndng.setSggCd((String)userInfo.getInfo().get("sggCd"));
ModelAndView mav = new ModelAndView("downloadView");
SprtQuery sprtQuery = new SprtQuery();
sprtQuery.setCrdnIds(crdnIds);
@ -890,7 +897,13 @@ public class Sprt01Controller extends ApplicationController {
* @return PDF
*/
@RequestMapping(name="고지서 pdf 파일 생성", value=METHOD_URL.makeNhtPdf)
public ModelAndView makeNhtPdf(String[] crdnIds, Sndng sndng, PrintOption printOption) {
public ModelAndView makeNhtPdf(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) {
UserInfo userInfo = currentUser();
factionBean.initUserInfo(userInfo);
sndng.setSggCd((String)userInfo.getInfo().get("sggCd"));
ModelAndView mav = new ModelAndView("downloadView");
SprtQuery sprtQuery = new SprtQuery();
sprtQuery.setCrdnIds(crdnIds);
@ -960,8 +973,6 @@ public class Sprt01Controller extends ApplicationController {
Print print = new Print();
UserInfo userInfo = currentUser();
factionBean.initUserInfo(userInfo);
print.setPrintRequestUserInfo(userInfo);
//출력물 기본 설정
@ -1009,7 +1020,12 @@ public class Sprt01Controller extends ApplicationController {
* @return
*/
@RequestMapping(name="고지서 외주 파일 생성", value=METHOD_URL.makeNhtOutsourcing)
public ModelAndView makeNhtOutsourcing(String[] crdnIds, Sndng sndng, PrintOption printOption) {
public ModelAndView makeNhtOutsourcing(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) {
UserInfo userInfo = currentUser();
factionBean.initUserInfo(userInfo);
sndng.setSggCd((String)userInfo.getInfo().get("sggCd"));
ModelAndView mav = new ModelAndView("downloadView");
SprtQuery sprtQuery = new SprtQuery();
sprtQuery.setCrdnIds(crdnIds);

Loading…
Cancel
Save