|
|
|
@ -276,6 +276,26 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
|
|
|
|
|
if(formatName.equals("advntce")) {
|
|
|
|
|
pdfFormat = new Advntce();
|
|
|
|
|
}
|
|
|
|
|
String sndngSeCd = "";
|
|
|
|
|
if(formatName.equals("advntce")) {
|
|
|
|
|
sndngSeCd = "02";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String paperSeCd = printOption.getPaperSeCd();
|
|
|
|
|
String taskSeCd = printOption.getTaskSeCd();
|
|
|
|
|
|
|
|
|
|
DataObject userStngInfo = stngBean.getStng("user");
|
|
|
|
|
DataObject sggStngInfo = stngBean.getStng("sgg");
|
|
|
|
|
DataObject deptStngInfo = stngBean.getStng("dept");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PDFPrintUtil pdfPrintUtil = new PDFPrintUtil();
|
|
|
|
|
UserInfo userInfo = currentUser();
|
|
|
|
|
factionBean.initUserInfo(userInfo);
|
|
|
|
|
pdfPrintUtil.setPrintRequestUserInfo(userInfo);
|
|
|
|
|
String printUserSggCd = (String) pdfPrintUtil.getPrintRequestUserInfo().getInfo().get("sggCd");
|
|
|
|
|
pdfPrintUtil.setting(paperSeCd);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DataObject> dataObjectList = new ArrayList<DataObject>();
|
|
|
|
|
if(crdnIds.length == 1 && crdnIds[0].equals("sample")) {
|
|
|
|
@ -305,38 +325,8 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DataObject userStngInfo = stngBean.getStng("user");
|
|
|
|
|
DataObject sggStngInfo = stngBean.getStng("sgg");
|
|
|
|
|
DataObject deptStngInfo = stngBean.getStng("dept");
|
|
|
|
|
|
|
|
|
|
Map<String, String> globalVariable = printOption.getGlobalVariable();
|
|
|
|
|
if(globalVariable == null) {
|
|
|
|
|
globalVariable = new HashMap<String, String>();
|
|
|
|
|
}
|
|
|
|
|
globalVariable.put("offcsFilePath", sggStngInfo.string("OFFCS_FILE_PATH"));
|
|
|
|
|
globalVariable.put("logoFilePath", sggStngInfo.string("LOGO_FILE_PATH"));
|
|
|
|
|
globalVariable.put("instAddr", sggStngInfo.string("INST_ADDR"));
|
|
|
|
|
globalVariable.put("instDaddr", sggStngInfo.string("INST_DADDR"));
|
|
|
|
|
globalVariable.put("instZip", sggStngInfo.string("INST_ZIP"));
|
|
|
|
|
globalVariable.put("deptTelno", deptStngInfo.string("DEPT_TELNO"));
|
|
|
|
|
globalVariable.put("deptFxno", deptStngInfo.string("DEPT_FXNO"));
|
|
|
|
|
printOption.setGlobalVariable(globalVariable);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
String paperSeCd = printOption.getPaperSeCd();
|
|
|
|
|
PDFPrintUtil pdfPrintUtil = new PDFPrintUtil();
|
|
|
|
|
UserInfo userInfo = currentUser();
|
|
|
|
|
factionBean.initUserInfo(userInfo);
|
|
|
|
|
pdfPrintUtil.setPrintRequestUserInfo(userInfo);
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
pdfPrintUtil.setting(paperSeCd);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String resultFilePath = pdfPrintUtil.filePathForNewFile();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PDDocument doc = new PDDocument();//pdf문서 생성
|
|
|
|
|
|
|
|
|
|
//폰트 로드
|
|
|
|
@ -350,26 +340,38 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
|
|
|
|
|
paper = PDRectangle.LETTER;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//출력물 기본 설정
|
|
|
|
|
OtptStngQuery otptStngQuery = new OtptStngQuery();
|
|
|
|
|
otptStngQuery.setSggCd((String) pdfPrintUtil.getPrintRequestUserInfo().getInfo().get("sggCd"));
|
|
|
|
|
otptStngQuery.setTaskSeCd(printOption.getTaskSeCd());
|
|
|
|
|
|
|
|
|
|
String sndngSeCd = "";
|
|
|
|
|
if(formatName.equals("advntce")) {
|
|
|
|
|
sndngSeCd = "02";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<DefaultOtptArtclStng> prototypeStngList = pdfFormat.getPrototypeStngs();
|
|
|
|
|
|
|
|
|
|
otptStngQuery.setSggCd(printUserSggCd);
|
|
|
|
|
otptStngQuery.setTaskSeCd(taskSeCd);
|
|
|
|
|
otptStngQuery.setSndngSeCd(sndngSeCd);
|
|
|
|
|
otptStngQuery.setPaperSeCd(paperSeCd);
|
|
|
|
|
|
|
|
|
|
//출력물 기본 설정
|
|
|
|
|
DataObject otptBscStng = otptStngMapper.selectOtptBscStng(otptStngQuery);
|
|
|
|
|
if(otptBscStng == null) {
|
|
|
|
|
otptBscStng = new DataObject();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
Map<String, String> globalVariable = printOption.getGlobalVariable();
|
|
|
|
|
if(globalVariable == null) {
|
|
|
|
|
globalVariable = new HashMap<String, String>();
|
|
|
|
|
}
|
|
|
|
|
globalVariable.put("offcsFilePath", sggStngInfo.string("OFFCS_FILE_PATH"));
|
|
|
|
|
globalVariable.put("logoFilePath", sggStngInfo.string("LOGO_FILE_PATH"));
|
|
|
|
|
globalVariable.put("instAddr", sggStngInfo.string("INST_ADDR"));
|
|
|
|
|
globalVariable.put("instDaddr", sggStngInfo.string("INST_DADDR"));
|
|
|
|
|
globalVariable.put("instZip", sggStngInfo.string("INST_ZIP"));
|
|
|
|
|
globalVariable.put("deptTelno", deptStngInfo.string("DEPT_TELNO"));
|
|
|
|
|
globalVariable.put("deptFxno", deptStngInfo.string("DEPT_FXNO"));
|
|
|
|
|
if(!otptBscStng.string("BCRN_IMG_PATH").equals("")) {
|
|
|
|
|
globalVariable.put("bcrnImgPath", otptBscStng.string("BCRN_IMG_PATH"));
|
|
|
|
|
}
|
|
|
|
|
printOption.setGlobalVariable(globalVariable);
|
|
|
|
|
|
|
|
|
|
List<DefaultOtptArtclStng> prototypeStngList = pdfFormat.getPrototypeStngs();
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
//출력 요소별 설정
|
|
|
|
|
List<DataObject> otptArtclStngList = otptStngMapper.selectOtptArtclStngList(otptStngQuery);
|
|
|
|
|
//출력요소별 속성 정보 추가
|
|
|
|
|