2022-12-19 15:36 단권화 파일 명 수정

This commit is contained in:
myname 2022-12-19 15:37:10 +09:00
parent e57cf1dc13
commit 95fdd23018
14 changed files with 1854 additions and 17 deletions

View File

@ -3,7 +3,9 @@ package kcc.com.cmm.web;
import java.time.LocalDateTime;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.json.simple.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
@ -18,14 +20,19 @@ import com.mashape.unirest.http.HttpResponse;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import kcc.com.cmm.LoginVO;
import kcc.com.cmm.service.AdrInnorixFileVO;
import kcc.com.cmm.service.EgovFileMngService;
import kcc.com.cmm.service.InnorixFileService;
import kcc.com.cmm.util.StreamDocsUtil;
import kcc.com.utl.fcc.service.EgovStringUtil;
import kcc.kccadr.accdnt.ans.service.AnsVO;
import kcc.kccadr.adjPgrMgr.cmm.service.PgrCmmService;
import kcc.kccadr.adjPgrMgr.cmm.service.PgrCmmVO;
import kcc.kccadr.adjst.service.AdjstReqService;
import kcc.kccadr.cmm.KccadrPdfConversion;
import kcc.kccadr.cmm.RestResponse;
import kcc.kccadr.cmm.service.PdfConversionService;
import kcc.kccadr.cmm.service.PdfConversionVO;
import kcc.kccadr.ozSchd.web.OzSchdExportUtil;
import kcc.let.utl.fcc.service.EgovCryptoUtil;
/**
*
@ -54,6 +61,22 @@ public class StreamDocsController {
@Resource(name = "InnorixFileService")
protected InnorixFileService innorixService;
//사건 정보
@Resource(name = "pgrCmmService")
private PgrCmmService cmmService;
@Resource(name = "egovCryptoUtil")
EgovCryptoUtil egovCryptoUtil;
// 조정신청 서비스단(대국민)
@Resource(name = "AdjstReqService")
private AdjstReqService adjstReqService;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileService;
private static String pdfMakepathOut; //c:/usr/local/tomcat/file/sht/out
@Value("#{globalSettings['Globals.pdf.makepath.out']}")
public void setPdfMakepathOut(String path) { pdfMakepathOut = path; }
@ -62,6 +85,41 @@ public class StreamDocsController {
@Value("#{globalSettings['Globals.Streamdocs.Url']}")
public String streamdocsURL;
// 실서버 개발서버 구분
private static String islocal; // /pdf/out/
@Value("#{globalSettings['Globals.prod.islocal']}")
public void setIslocal(String path) { islocal = path; }
//개발, local oz 서버 IP + port
@Value("#{globalSettings['Globals.oz.devServerIp']}")
private String ozDevServerIp;
//개발, local oz 스케쥴러 서버 IP + port
@Value("#{globalSettings['Globals.oz.devSchedulerIp']}")
private String ozDevSchedulerIp;
//개발, local oz to pdf 저장 경로
@Value("#{globalSettings['Globals.oz.devPdfSavePath']}")
private String ozDevPdfSavePath;
//개발, local oz to pdf 저장 경로
@Value("#{globalSettings['Globals.oz.devServerCheckString']}")
private String devServerCheckString;
//real oz 서버 IP + port
@Value("#{globalSettings['Globals.oz.realServerIp']}")
private String ozRealServerIp;
//real oz 스케쥴러 서버 IP + port
@Value("#{globalSettings['Globals.oz.realSchedulerIp']}")
private String ozRealSchedulerIp;
//real oz to pdf 저장 경로
@Value("#{globalSettings['Globals.oz.realPdfSavePath']}")
private String ozRealPdfSavePath;
/**
* @methodName : regStreamDocsAjax
* @author : 이호영
@ -95,5 +153,156 @@ public class StreamDocsController {
return ResponseEntity.ok(new RestResponse(HttpStatus.BAD_REQUEST, "pdf 로드에 실패하였습니다.", LocalDateTime.now()));
}
/**
* @methodName : remakePdfDocsAjax
* @author : 이호영
* @date : 2022.12.12
* @description : 재단권화 controller
* @param pdfConversionVO
* @return
* @throws Exception
*/
@RequestMapping(value = {"/kccadr/common/remakeStreamDocAjax.do"}, method = RequestMethod.POST)
public ResponseEntity<RestResponse> remakeStreamDocAjax(
@RequestBody PdfConversionVO pdfConversionVO
) throws Exception {
//step1.해당 사건이 종료되었는가?
// 조정사건일반
PgrCmmVO info = new PgrCmmVO();
info.setAdrSeq(pdfConversionVO.getAdrSeq());
info = cmmService.selectPgrCmm(info);
if (!"400000".equals(info.getStatCd())) { //종료인 경우
System.out.println("종료된 경우OOOOOOOOOOOOOO");
//RestResponse rr = new RestResponse(null, "", null);
//return new ResponseEntity<RestResponse>("success", HttpStatus.OK);
//return ResponseEntity.ok(new RestResponse(HttpStatus.OK, "등록 되었습니다."));
//HttpResponse<String> responseInfo = StreamDocsUtil.regPdfDoc(filePath, streamdocsURL);
//return new ResponseEntity.ok(new RestResponse(HttpStatus.OK, "등록 되었습니다.", responseInfo.getBody(), LocalDateTime.now()));
return ResponseEntity.ok(new RestResponse(HttpStatus.OK, "등록 되었습니다.", LocalDateTime.now()));
}else {
System.out.println("종료가 안된 경우XXXXXXXXXXXXXXX");
//return ResponseEntity.ok(new RestResponse(HttpStatus.OK, "등록 되었습니다.", LocalDateTime.now()));
return ResponseEntity.ok(new RestResponse(HttpStatus.BAD_REQUEST, "오류 되었습니다.", LocalDateTime.now()));
}
//PdfConversionVO tmpPdfConversionVO = pdfConversionService.selectConversionPdf(pdfConversionVO);
//step2.종료된 사건이면 개별 파일을 만든다.0~9
//step3.개별 파일이 완료되었으면 단권화를 시작한다.
/*
PdfConversionVO tmpPdfConversionVO = pdfConversionService.selectConversionPdf(pdfConversionVO);
try {
// make 파일 경로
String filePath = pdfMakepathOut + tmpPdfConversionVO.getAdrSeq() +"/result/bookmark.pdf";
// pdf 파일 등록
HttpResponse<String> responseInfo = StreamDocsUtil.regPdfDoc(filePath, streamdocsURL);
// 성공 return value
return ResponseEntity.ok(new RestResponse(HttpStatus.OK, "등록 되었습니다.", responseInfo.getBody(), LocalDateTime.now()));
} catch (Exception e) {
e.printStackTrace();
}
*/
// 실패 return value
//return ResponseEntity.ok(new RestResponse(HttpStatus.BAD_REQUEST, "pdf 로드에 실패하였습니다.", LocalDateTime.now()));
}
/**
* @methodName : remakePdfDocsAjax
* @author : 이호영
* @date : 2022.12.12
* @description : 재단권화 controller
* @param pdfConversionVO
* @return
* @throws Exception
*/
@RequestMapping(value = {"/kccadr/common/remakeStreamDocPdfAjax.do"}, method = RequestMethod.POST)
public ResponseEntity<RestResponse> remakeStreamDocPdfAjax(
@RequestBody PdfConversionVO pdfConversionVO
) throws Exception {
KccadrPdfConversion kpc = new KccadrPdfConversion();
kpc.newPdfConversionPrcs(pdfConversionVO.getAdrSeq());
return ResponseEntity.ok(new RestResponse(HttpStatus.OK, "등록 되었습니다.", LocalDateTime.now()));
}
/**
* @methodName : remakePdfDocsAjax - 201050
* @author : 이호영
* @date : 2022.12.12
* @description : 재단권화 controller
* @param pdfConversionVO
* @return
* @throws Exception
*/
@RequestMapping(value = {"/kccadr/common/remakeStreamDoc201050Ajax.do"}, method = RequestMethod.POST)
public ResponseEntity<RestResponse> remakeStreamDoc201050Ajax(
@RequestBody PdfConversionVO pdfConversionVO
, HttpServletRequest request
) throws Exception {
//step2.종료된 사건이면 개별 파일을 만든다.0~9
//0-201050
try {
String auth = EgovUserDetailsHelper.isAuthenticated() ? null : EgovUserDetailsHelper.getAuthenticatedUser().toString();
LoginVO loginVO = "anonymousUser".equals(auth) ? null : (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
String serverName = request.getServerName();
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId());
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
JSONObject jsObjData = ozSchd.makeReqReport(
userId
, pdfConversionVO.getAdrSeq()
, adjstReqService
, fileService
, egovCryptoUtil
);
ozSchd.checkOzEnvNMakePDF(
islocal
, pdfConversionVO.getAdrSeq()
, "adjReqReport.ozr" //oz template file
, ozDevPdfSavePath
, ozRealPdfSavePath
, jsObjData.toJSONString()
, serverName
//, "adjReqReport.pdf" //oz to pdf save file name
, "201050.pdf"
, ozDevServerIp
, ozDevSchedulerIp
, ozRealServerIp
, ozRealSchedulerIp
, devServerCheckString
);
// 성공 return value
return ResponseEntity.ok(new RestResponse(HttpStatus.OK, "조정신청서 생성되었습니다.", LocalDateTime.now()));
} catch (Exception e) {
e.printStackTrace();
}
return ResponseEntity.ok(new RestResponse(HttpStatus.BAD_REQUEST, "조정신청서 생성시 오류가 발생되었습니다.", LocalDateTime.now()));
}
}

View File

@ -2561,6 +2561,85 @@ public class ApmController {
return modelAndView;
}
@SuppressWarnings("unchecked")
@RequestMapping(value = "corReportExportA250Ajax.do")
public ModelAndView crtReportExportA250Ajax(
@RequestBody CorReqVO corReqVO
, ModelMap model
, HttpServletRequest req) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
JSONArray jsApmCorrInfo = new JSONArray(); //경정신청서 정보
List<CorReqVO> list = corReqService.selectCorReqDetail(corReqVO);
for(CorReqVO result : list) {
JSONObject jsTempData = new JSONObject();
jsTempData = parseJsonData(result);
jsApmCorrInfo.add(jsTempData);
}
JSONObject jsObjData = new JSONObject();
jsObjData.put("jsApmCorrInfo", jsApmCorrInfo);
String repStr = StringUtil.getUrlString(jsObjData.toString());
//json 데이터 특수문자 치환_220215_이준호
JsonStringEncoder encoder = JsonStringEncoder.getInstance();
char[] escapedJson = encoder.quoteAsString(repStr);
System.out.println(escapedJson); // {\"type\":\"BIG\"}
String p_json;
p_json = new String(escapedJson);
p_json = p_json.replace("\\\\\\\\r\\\\\\\\n", "\\\\r\\\\n").replace("\'", "\\'");
model.addAttribute("jsObjData", p_json);
//오즈리포트 서버별 주소 셋팅해주기
String serverName = req.getServerName();
String ozServerNm = IpUtil.getOzServerName(serverName);
model.addAttribute("ozServerNm", ozServerNm);
/*
* 2022.01.06 우영두 추가
* 오즈 리포트 File Export 처리
*
* */
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
ozSchd.checkOzEnvNMakePDF(
islocal
, corReqVO.getAdrSeq()
, "admin/adrJjosuReport.ozr" //oz template file
, ozDevPdfSavePath
, ozRealPdfSavePath
, jsObjData.toJSONString()
, serverName
//, "adjReqReport.pdf" //oz to pdf save file name
, "A250.pdf"
, ozDevServerIp
, ozDevSchedulerIp
, ozRealServerIp
, ozRealSchedulerIp
, devServerCheckString
);
modelAndView.addObject("status", "OK");
return modelAndView;
}
/**
* 경정신청서 상세 TODO daenge 경정신청서 오즈리포팅 처리
*

View File

@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
@ -548,6 +549,82 @@ public class ArmController {
return modelAndView;
}
@SuppressWarnings("unchecked")
@RequestMapping(value = "armOzExport303050Ajax.do")
public ModelAndView armOzExport303050Ajax(
@RequestBody CloseVO closeVO
, ModelMap model
, HttpServletRequest req
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
JSONObject jsArmInfo = new JSONObject(); //조정권고안 정보
CloseVO result = cmmService.selectCloseDoc(closeVO);
if (result==null) {
modelAndView.addObject("status", "SKIP");
return modelAndView;
}
jsArmInfo = parseJsonData(result);
JSONObject jsObjData = new JSONObject();
jsObjData.put("jsArmInfo", jsArmInfo);
String repStr = StringUtil.getUrlString(jsObjData.toString());
//json 데이터 특수문자 치환_220215_이준호
JsonStringEncoder encoder = JsonStringEncoder.getInstance();
char[] escapedJson = encoder.quoteAsString(repStr);
System.out.println(escapedJson); // {\"type\":\"BIG\"}
String p_json;
p_json = new String(escapedJson);
p_json = p_json.replace("\\\\\\\\r\\\\\\\\n", "\\\\r\\\\n").replace("\'", "\\'");
model.addAttribute("jsObjData", p_json);
//오즈리포트 서버별 주소 셋팅해주기
String serverName = req.getServerName();
String ozServerNm = IpUtil.getOzServerName(serverName);
model.addAttribute("ozServerNm", ozServerNm);
/*
* 2022.01.06 우영두 추가
* 오즈 리포트 File Export 처리
*
* */
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
ozSchd.checkOzEnvNMakePDF(
islocal
, closeVO.getAdrSeq()
, "admin/adrKkaAgrReport.ozr" //oz template file
, ozDevPdfSavePath
, ozRealPdfSavePath
, jsObjData.toJSONString()
, serverName
//, "adjReqReport.pdf" //oz to pdf save file name
, "303050.pdf"
, ozDevServerIp
, ozDevSchedulerIp
, ozRealServerIp
, ozRealSchedulerIp
, devServerCheckString
);
modelAndView.addObject("status", "OK");
return modelAndView;
}
/**
* 등록자, 수정자 정보 세팅

View File

@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
@ -432,6 +433,97 @@ public class CfrmController {
}
@SuppressWarnings("unchecked")
@RequestMapping(value = "cfrmOzExportA500Ajax.do")
public ModelAndView cfrmOzExportA500Ajax(
@RequestBody PgrCmmVO cmmVO
//, DrtVO drtVO
, ModelMap model
, HttpServletRequest req
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
JSONObject jsCfrmInfo = new JSONObject(); //전체 정보
PgrCmmVO result = cmmService.selectPgrCmm(cmmVO); //조정사건 정보
//종결문서에서 확정증명서 불러오기
CloseVO closeVO = new CloseVO();
closeVO.setAdrSeq(cmmVO.getAdrSeq());
closeVO.setAdrSn(cmmVO.getAdrSn());
closeVO.setCloseDocTy(KccadrConstants.ADR_CLOSE_DOC_TY_80);
CloseVO resultDoc = cmmService.selectCloseDoc(closeVO);
System.out.println("resultDoc");
System.out.println(resultDoc);
if (resultDoc==null) {
modelAndView.addObject("status", "SKIP");
return modelAndView;
}
//확정증명원 Json 만들기
jsCfrmInfo = parseJsonData(result, resultDoc);
JSONObject jsObjData = new JSONObject();
jsObjData.put("jsCfrmInfo", jsCfrmInfo);
String repStr = jsObjData.toString();
repStr = StringUtil.getUrlString(jsObjData.toString());
//json 데이터 특수문자 치환_220215_이준호
JsonStringEncoder encoder = JsonStringEncoder.getInstance();
char[] escapedJson = encoder.quoteAsString(repStr);
System.out.println(escapedJson); // {\"type\":\"BIG\"}
String p_json;
p_json = new String(escapedJson);
p_json = p_json.replace("\\\\\\\\r\\\\\\\\n", "\\\\r\\\\n").replace("\'", "\\'");
model.addAttribute("jsObjData", p_json);
//오즈리포트 서버별 주소 셋팅해주기
String serverName = req.getServerName();
String ozServerNm = IpUtil.getOzServerName(serverName);
model.addAttribute("ozServerNm", ozServerNm);
/*
* 2022.01.06 우영두 추가
* 오즈 리포트 File Export 처리
*
* */
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
ozSchd.checkOzEnvNMakePDF(
islocal
, closeVO.getAdrSeq()
, "admin/adrHjwReport.ozr" //oz template file
, ozDevPdfSavePath
, ozRealPdfSavePath
, jsObjData.toJSONString()
, serverName
//, "adjReqReport.pdf" //oz to pdf save file name
, "A500.pdf"
, ozDevServerIp
, ozDevSchedulerIp
, ozRealServerIp
, ozRealSchedulerIp
, devServerCheckString
);
modelAndView.addObject("status", "OK");
return modelAndView;
}
/**
* 오즈 리포트 데이터 Json 생성하기
*

View File

@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
@ -471,6 +472,81 @@ public class CrtController {
return modelAndView;
}
@SuppressWarnings("unchecked")
@RequestMapping(value = "crtOzExport307050Ajax.do")
public ModelAndView crtOzExport307050Ajax(
@RequestBody CloseVO closeVO
, ModelMap model
, HttpServletRequest req) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
JSONObject jsCrtInfo = new JSONObject(); //불성립종결통보 정보
CloseVO result = cmmService.selectCloseDoc(closeVO);
if (result==null) {
modelAndView.addObject("status", "SKIP");
return modelAndView;
}
jsCrtInfo = parseJsonData(result);
JSONObject jsObjData = new JSONObject();
jsObjData.put("jsCrtInfo", jsCrtInfo);
String repStr = StringUtil.getUrlString(jsObjData.toString());
//json 데이터 특수문자 치환_220215_이준호
JsonStringEncoder encoder = JsonStringEncoder.getInstance();
char[] escapedJson = encoder.quoteAsString(repStr);
System.out.println(escapedJson); // {\"type\":\"BIG\"}
String p_json;
p_json = new String(escapedJson);
p_json = p_json.replace("\\\\\\\\r\\\\\\\\n", "\\\\r\\\\n").replace("\'", "\\'");
model.addAttribute("jsObjData", p_json);
//model.addAttribute("info", cmmService.selectCloseDoc(closeVO));
//오즈리포트 서버별 주소 셋팅해주기
String serverName = req.getServerName();
String ozServerNm = IpUtil.getOzServerName(serverName);
model.addAttribute("ozServerNm", ozServerNm);
/*
* 2022.01.06 우영두 추가
* 오즈 리포트 File Export 처리
*
* */
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
ozSchd.checkOzEnvNMakePDF(
islocal
, closeVO.getAdrSeq()
, "admin/adrBsrtbsApprReport.ozr" //oz template file
, ozDevPdfSavePath
, ozRealPdfSavePath
, jsObjData.toJSONString()
, serverName
//, "adjReqReport.pdf" //oz to pdf save file name
, "307050.pdf"
, ozDevServerIp
, ozDevSchedulerIp
, ozRealServerIp
, ozRealSchedulerIp
, devServerCheckString
);
modelAndView.addObject("status", "OK");
return modelAndView;
}
/**
* 등록자, 수정자 정보 세팅

View File

@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
@ -637,13 +638,17 @@ public class DntController {
*/
@SuppressWarnings("unchecked")
@RequestMapping(value = "dntOzExportAjax.do")
public ModelAndView dntOzExportAjax(PgrCmmVO cmmVO, HttpServletRequest req, ModelMap model) throws Exception {
public ModelAndView dntOzExportAjax(
PgrCmmVO cmmVO, HttpServletRequest req, ModelMap model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
JSONObject jsDntInfo = new JSONObject(); //조정권고안 정보
System.out.println("cmmVO.toString()");
System.out.println(cmmVO.getAdrSeq());
PgrCmmVO result = cmmService.selectPgrCmm(cmmVO);
jsDntInfo = parseJsonData(result);
@ -730,6 +735,73 @@ public class DntController {
return modelAndView;
}
@SuppressWarnings("unchecked")
@RequestMapping(value = "dntOzExport205050Ajax.do")
public ModelAndView dntOzExport205050Ajax(
@RequestBody PgrCmmVO cmmVO, HttpServletRequest req, ModelMap model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
JSONObject jsDntInfo = new JSONObject(); //조정권고안 정보
System.out.println("cmmVO.toString()");
System.out.println(cmmVO.getAdrSeq());
PgrCmmVO result = cmmService.selectPgrCmm(cmmVO);
jsDntInfo = parseJsonData(result);
JSONObject jsObjData = new JSONObject();
jsObjData.put("jsDntInfo", jsDntInfo);
String repStr = jsObjData.toString();
repStr = StringUtil.getUrlString(jsObjData.toString());
//json 데이터 특수문자 치환_220215_이준호
JsonStringEncoder encoder = JsonStringEncoder.getInstance();
char[] escapedJson = encoder.quoteAsString(repStr);
System.out.println(escapedJson); // {\"type\":\"BIG\"}
String p_json;
p_json = new String(escapedJson);
p_json = p_json.replace("\\\\\\\\r\\\\\\\\n", "\\\\r\\\\n").replace("\'", "\\'");
model.addAttribute("jsObjData", repStr);
/*
* 2022.01.06 우영두 추가
* 오즈 리포트 File Export 처리
*
* */
String serverName = req.getServerName();
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
ozSchd.checkOzEnvNMakePDF(
islocal
, cmmVO.getAdrSeq()
, "admin/adrAppSlctReport.ozr" //oz template file
, ozDevPdfSavePath
, ozRealPdfSavePath
, jsObjData.toJSONString()
, serverName
//, "adjReqReport.pdf" //oz to pdf save file name
, "205050.pdf"
, ozDevServerIp
, ozDevSchedulerIp
, ozRealServerIp
, ozRealSchedulerIp
, devServerCheckString
);
modelAndView.addObject("status", "OK");
return modelAndView;
}
/**
* 오즈 리포트 데이터 Json 생성하기
*

View File

@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
@ -776,6 +777,170 @@ public class DrtController {
}
@SuppressWarnings("unchecked")
@RequestMapping(value = "drtOzExport302050Ajax.do")
public ModelAndView drtOzExport302050Ajax(
@RequestBody PgrCmmVO cmmVO
, DrtVO drtVO
, ModelMap model
, HttpServletRequest req
) throws Exception {
System.out.println("-102303-");
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
JSONObject jsDrtInfo = new JSONObject(); //전체 정보
JSONArray jsReqInfo = new JSONArray(); //신청인 정보
JSONArray jsReqDepInfo = new JSONArray(); //대리인 정보
JSONArray jsRespInfo = new JSONArray(); //피신청인 정보
JSONArray jsJoMemInfo = new JSONArray(); //조정위원 정보
List<AssVO> assList = drtService.selectAssList(drtVO); //신청인, 대리인, 피신청인 정보
for(int i=0; i< assList.size(); i++) {
JSONObject oj = new JSONObject();
String usrTy = assList.get(i).getAssUsrTy(); //사용자 구분 : 신청인, 대리인, 피신청인
String addYn = assList.get(i).getAddYn() == null ? "N" : assList.get(i).getAddYn(); //공개여부 : Null 경우가 있어서 처리해줌
String addUsrNm = assList.get(i).getAddUsrNm() == null ? "" : assList.get(i).getAddUsrNm(); //사용자 이름 : Null 경우가 있어서 처리해줌
String addYnStr = "불출석";
if(addYn.equals("Y")) {
addYnStr = "출석";
}
if(usrTy.equals("30") || usrTy.equals("40")) { //대리인 피신청 대리인 정보 입력
oj.put("rpplNm", addUsrNm);
oj.put("addYnStr", addYnStr);
jsReqDepInfo.add(oj);
}
if(usrTy.equals("20")) { //피신청인 정보 입력
oj.put("rpplNm", addUsrNm);
oj.put("addYnStr", addYnStr);
jsRespInfo.add(oj);
}
if(usrTy.equals("10")) { //신청인 정보 입력
oj.put("rpplNm", addUsrNm);
oj.put("addYnStr", addYnStr);
jsReqInfo.add(oj);
}
}
PgrCmmVO result = cmmService.selectPgrCmm(cmmVO); //조정기일조서 정보
/*String[] strMemName = result.getMemNames().split(",");*/
String[] strMemName;
//조정부가 단독부 일경우 조정부장이 조정위원도 포함
if(StringUtil.isNotEmpty(result.getMemNames())) {
strMemName = result.getMemNames().split(",");
}else {
strMemName = result.getMemName().split(",");
}
//조정위원 리스트 처리
for(String name : strMemName) {
JSONObject ojs = new JSONObject();
ojs.put("memName", name);
jsJoMemInfo.add(ojs);
}
jsDrtInfo = parseJsonData(result);
JSONObject jsObjData = new JSONObject();
jsObjData.put("jsDrtInfo", jsDrtInfo);
jsObjData.put("jsReqInfo", jsReqInfo); //신청인 정보
jsObjData.put("jsReqDepInfo", jsReqDepInfo); //대리인 정보
jsObjData.put("jsRespInfo", jsRespInfo); //피신청인 정보
jsObjData.put("jsJoMemInfo", jsJoMemInfo); //조정위원 정보
String repStr = jsObjData.toString();
repStr = StringUtil.getUrlString(jsObjData.toString());
model.addAttribute("jsObjData", repStr);
//오즈리포트 서버별 주소 셋팅해주기
String serverName = req.getServerName();
String ozServerNm = IpUtil.getOzServerName(serverName);
model.addAttribute("ozServerNm", ozServerNm);
/*
* 2022.01.06 우영두 추가
* 오즈 리포트 File Export 처리
*
* */
//String serverName = req.getServerName();
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
ozSchd.checkOzEnvNMakePDF(
islocal
, cmmVO.getAdrSeq()
, "admin/adrAppSlctReport.ozr" //oz template file
, ozDevPdfSavePath
, ozRealPdfSavePath
, jsObjData.toJSONString()
, serverName
//, "adjReqReport.pdf" //oz to pdf save file name
, "302050.pdf"
, ozDevServerIp
, ozDevSchedulerIp
, ozRealServerIp
, ozRealSchedulerIp
, devServerCheckString
);
/*
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
//로컬, 개발 서버
if("local".equals(islocal)) {
String ozrFilePath = "/admin/adrKjosuReport.ozr";
String savePath = cmmVO.getAdrSeq() + "/ozFile/adrKjosuReport.pdf";
savePath = ozDevPath + cmmVO.getAdrSeq() + "/ozFile/adrKjosuReport.pdf";
String jsonData = repStr;
jsonData = jsonData.replace("\\\\r\\\\n", "\\r\\n"); //리포트 내용에 줄바꿈 문자 변환 - pdf에서는 \\r\\n으로 넘겨야 줄바꿈이 정상 처리됨
ozSchd.ozschdFileExport(ozrFilePath, jsonData, savePath, req);
}
//실서버
else{
String ozrFilePath = "/admin/adrKjosuReport.ozr";
//*String savePath = cmmVO.getAdrSeq() + "/ozFile/adrKjosuReport.pdf";*
String savePath = "\\\\192.168.39.125\\data3\\out\\" + cmmVO.getAdrSeq() + "\\ozFile\\adrKjosuReport.pdf";
String jsonData = repStr;
jsonData = jsonData.replace("\\\\r\\\\n", "\\r\\n"); //리포트 내용에 줄바꿈 문자 변환 - pdf에서는 \\r\\n으로 넘겨야 줄바꿈이 정상 처리됨
ozSchd.ozschdFileExport(ozrFilePath, jsonData, savePath, req);
}
*/
modelAndView.addObject("status", "OK");
return modelAndView;
}
/**
* 오즈 리포트 데이터 Json 생성하기
*

View File

@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
@ -819,6 +820,243 @@ public class DrtCtrController {
}
@SuppressWarnings("unchecked")
@RequestMapping(value = "drtCtrOzExport304050Ajax.do")
public ModelAndView drtCtrOzExport304050Ajax(
PgrCmmVO cmmVO
, @RequestBody DrtCtrVO drtCtrVO
, ModelMap model
, HttpServletRequest req) throws Exception {
System.out.println("-=-=-=-=");
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
JSONObject jsDrtCtrInfo = new JSONObject(); //전체 정보
JSONArray jsReqInfo = new JSONArray(); //신청인 정보
JSONArray jsReqDepInfo = new JSONArray(); //대리인 정보
JSONArray jsRespInfo = new JSONArray(); //피신청인 정보
JSONArray jsJoMemInfo = new JSONArray(); //조정위원 정보
List<AssCtrVO> assList = drtCtrService.selectAssList(drtCtrVO); //신청인, 대리인, 피신청인 정보
for(int i=0; i< assList.size(); i++) {
JSONObject oj = new JSONObject();
String usrTy = assList.get(i).getAssUsrTy(); //사용자 구분 : 신청인, 대리인, 피신청인
String addYn = assList.get(i).getAddYn() == null ? "N" : assList.get(i).getAddYn(); //공개여부 : Null 경우가 있어서 처리해줌
String addUsrNm = assList.get(i).getAddUsrNm() == null ? "" : assList.get(i).getAddUsrNm(); //사용자 이름 : Null 경우가 있어서 처리해줌
String addYnStr = "불출석";
String post = assList.get(i).getRpplPost() == null ? "" : assList.get(i).getRpplPost(); //사용자 우편번호 : Null 경우가 있어서 처리해줌
String addr = assList.get(i).getRpplAddr() == null ? "" : assList.get(i).getRpplAddr(); //사용자 주소 : Null 경우가 있어서 처리해줌
String addrDtl = assList.get(i).getRpplAddrDtl() == null ? "" : assList.get(i).getRpplAddrDtl(); //사용자 상세 주소 : Null 경우가 있어서 처리해줌
String fullAddr = "( " + post + " ) " + addr + " " + addrDtl;
if(addYn.equals("Y")) {
addYnStr = "출석";
}
if(usrTy.equals("30") || usrTy.equals("40")) { //대리인 피신청 대리인 정보 입력
oj.put("rpplNm", addUsrNm);
oj.put("addYnStr", addYnStr);
oj.put("addr", fullAddr);
jsReqDepInfo.add(oj);
}
if(usrTy.equals("20")) { //피신청인 정보 입력
oj.put("rpplNm", addUsrNm);
oj.put("addYnStr", addYnStr);
oj.put("addr", fullAddr);
jsRespInfo.add(oj);
}
if(usrTy.equals("10")) { //신청인 정보 입력
oj.put("rpplNm", addUsrNm);
oj.put("addYnStr", addYnStr);
oj.put("addr", fullAddr);
jsReqInfo.add(oj);
}
}
cmmVO.setAdrSeq(drtCtrVO.getAdrSeq());
cmmVO.setAdrSn(drtCtrVO.getAdrSn());
PgrCmmVO result = cmmService.selectPgrCmm(cmmVO); //조정조정조서 정보
//조정위원의 직인 이미지 불러오기
cmmVO.setMemGrade("02");
cmmVO.setMemDeptSeq(result.getMemDeptSeq());
List<PgrCmmVO> resultStampInfo = cmmService.selectAtchFileIdInfo(cmmVO);
String atchFileId = "";
int stmpCnt = resultStampInfo.size();
if(result.getMemNames() != null) {
//조정위원 리스트 처리
String[] strMemName = result.getMemNames().split(",");
for(String name : strMemName) {
JSONObject ojs = new JSONObject();
//조정위원 직인 이미지 경로 불러오기
for(int i=0; i<stmpCnt; i++) {
String memName = resultStampInfo.get(i).getMemName();
if(name.equals(memName)) {
if(StringUtil.isNotEmpty(resultStampInfo.get(i).getAtchFileId())) {
atchFileId = resultStampInfo.get(i).getAtchFileId();
}
}
}
String joStampPath = "";
String domain = "";
if(!atchFileId.equals("")) {
if ("real".equals(prodIsLocal)) {
domain = "hosts_real";
}else {
domain = "host_dev";
}
joStampPath = domain + "&url&" + atchFileId;
}
ojs.put("memName", name);
ojs.put("joStampPath", joStampPath);
jsJoMemInfo.add(ojs);
}
}else {
JSONObject ojs = new JSONObject();
ojs.put("memName", "");
ojs.put("joStampPath", "");
jsJoMemInfo.add(ojs);
}
DrtCtrVO resultDrtCtrVO = drtCtrService.selectDrtCtrReport(drtCtrVO);
String ctrCn = ""; //조정조항 내용
try {
ctrCn = resultDrtCtrVO.getCtrCn(); //조정조항 내용
}catch(Exception ex) {
//ex.printStackTrace();
}
jsDrtCtrInfo = parseJsonData(result, ctrCn);
JSONObject jsObjData = new JSONObject();
jsObjData.put("jsDrtCtrInfo", jsDrtCtrInfo);
jsObjData.put("jsReqInfo", jsReqInfo); //신청인 정보
jsObjData.put("jsReqDepInfo", jsReqDepInfo); //대리인 정보
jsObjData.put("jsRespInfo", jsRespInfo); //피신청인 정보
jsObjData.put("jsJoMemInfo", jsJoMemInfo); //조정위원 정보
String repStr = StringUtil.getUrlString(jsObjData.toString());
model.addAttribute("jsObjData", repStr);
//오즈리포트 서버별 주소 셋팅해주기
String serverName = req.getServerName();
String ozServerNm = IpUtil.getOzServerName(serverName);
model.addAttribute("ozServerNm", ozServerNm);
/*
* 2022.01.06 우영두 추가
* 오즈 리포트 File Export 처리
*
* */
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
ozSchd.checkOzEnvNMakePDF(
islocal
, cmmVO.getAdrSeq()
, "admin/adrJjosuReport.ozr" //oz template file
, ozDevPdfSavePath
, ozRealPdfSavePath
, jsObjData.toJSONString()
, serverName
//, "adjReqReport.pdf" //oz to pdf save file name
, "304050.pdf"
, ozDevServerIp
, ozDevSchedulerIp
, ozRealServerIp
, ozRealSchedulerIp
, devServerCheckString
);
/*
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
//로컬, 개발 서버
if("local".equals(islocal)) {
String ozrFilePath = "/admin/adrJjosuReport.ozr";
String savePath = cmmVO.getAdrSeq() + "/ozFile/adrJjosuReport.pdf";
savePath = ozDevPath + cmmVO.getAdrSeq() + "/ozFile/adrJjosuReport.pdf";
String jsonData = repStr;
jsonData = jsonData.replace("\\\\r\\\\n", "\\r\\n"); //리포트 내용에 줄바꿈 문자 변환 - pdf에서는 \\r\\n으로 넘겨야 줄바꿈이 정상 처리됨
ozSchd.ozschdFileExport(ozrFilePath, jsonData, savePath, req);
}
//실서버
else{
String ozrFilePath = "/admin/adrJjosuReport.ozr";
//*String savePath = cmmVO.getAdrSeq() + "/ozFile/adrJjosuReport.pdf";*
String savePath = "\\\\192.168.39.125\\data3\\out\\" + cmmVO.getAdrSeq() + "\\ozFile\\adrJjosuReport.pdf";
String jsonData = repStr;
jsonData = jsonData.replace("\\\\r\\\\n", "\\r\\n"); //리포트 내용에 줄바꿈 문자 변환 - pdf에서는 \\r\\n으로 넘겨야 줄바꿈이 정상 처리됨
ozSchd.ozschdFileExport(ozrFilePath, jsonData, savePath, req);
}
*/
//modelAndView.addObject("result", "SUCCESS");
modelAndView.addObject("status", "OK");
return modelAndView;
}
/**
* 오즈 리포트 데이터 Json 생성하기
*

View File

@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
@ -496,6 +497,87 @@ public class EntController {
return modelAndView;
}
@SuppressWarnings("unchecked")
@RequestMapping(value = "entOzExport305050Ajax.do")
public ModelAndView entOzExport305050Ajax(
@RequestBody CloseVO closeVO
, ModelMap model
, HttpServletRequest req) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
JSONObject jsEntInfo = new JSONObject();
JSONArray jsRespInfo = new JSONArray(); //피신청인 정보
CloseVO result = cmmService.selectCloseDoc(closeVO); //취하종결통보서 정보
if (result==null) {
modelAndView.addObject("status", "SKIP");
return modelAndView;
}
//피신청인 처리
String[] arrResp = result.getResPonDentNm().split(",");
for(String respName : arrResp) {
JSONObject oj = new JSONObject();
oj.put("rpplNm", respName);
jsRespInfo.add(oj);
}
jsEntInfo = parseJsonData(result);
JSONObject jsObjData = new JSONObject();
jsObjData.put("jsEntInfo", jsEntInfo);
jsObjData.put("jsRespInfo", jsRespInfo);
String repStr = StringUtil.getUrlString(jsObjData.toString());
model.addAttribute("jsObjData", repStr);
//오즈리포트 서버별 주소 셋팅해주기
String serverName = req.getServerName();
String ozServerNm = IpUtil.getOzServerName(serverName);
model.addAttribute("ozServerNm", ozServerNm);
/*
* 2022.01.06 우영두 추가
* 오즈 리포트 File Export 처리
*
* */
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
ozSchd.checkOzEnvNMakePDF(
islocal
, closeVO.getAdrSeq()
, "admin/adrCncltbsReport.ozr" //oz template file
, ozDevPdfSavePath
, ozRealPdfSavePath
, jsObjData.toJSONString()
, serverName
//, "adjReqReport.pdf" //oz to pdf save file name
, "305050.pdf"
, ozDevServerIp
, ozDevSchedulerIp
, ozRealServerIp
, ozRealSchedulerIp
, devServerCheckString
);
modelAndView.addObject("status", "OK");
return modelAndView;
}
/**
* 등록자, 수정자 정보 세팅

View File

@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
@ -563,6 +564,181 @@ public class OadController {
return modelAndView;
}
@SuppressWarnings("unchecked")
@RequestMapping(value = "oadOzExport306050Ajax.do")
public ModelAndView oadOzExport306050Ajax(
@RequestBody CloseVO closeVO
, ModelMap model
, HttpServletRequest req
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
JSONObject jsOadInfo = new JSONObject();
JSONArray jsRespInfo = new JSONArray(); //피신청인 정보
JSONArray jsJoMemInfo = new JSONArray(); //조정위원 정보
CloseVO result = cmmService.selectCloseDoc(closeVO); //취하종결통보서 정보
if (result==null) {
modelAndView.addObject("status", "SKIP");
return modelAndView;
}
//조정위원의 직인 이미지 불러오기
closeVO.setMemGrade("02");
closeVO.setMemDeptSeq(result.getMemDeptSeq());
List<PgrCmmVO> resultStampInfo = cmmService.selectAtchFileIdInfo(closeVO);
String atchFileId = "";
int stmpCnt = resultStampInfo.size();
//피신청인 리스트 처리
String[] arrResp = result.getResPonDentNm().split(",");
for(String respName : arrResp) {
JSONObject oj = new JSONObject();
oj.put("rpplNm", respName);
jsRespInfo.add(oj);
}
if(result.getMemNames() != null) {
//조정위원 리스트 처리
String[] strMemName = result.getMemNames().split(",");
for(String name : strMemName) {
JSONObject ojs = new JSONObject();
//조정위원 직인 이미지 경로 불러오기
for(int i=0; i<stmpCnt; i++) {
String memName = resultStampInfo.get(i).getMemName();
if(name.equals(memName)) {
if(StringUtil.isNotEmpty(resultStampInfo.get(i).getAtchFileId())) {
atchFileId = resultStampInfo.get(i).getAtchFileId();
}
}
}
String joStampPath = "";
String domain = "";
if(!atchFileId.equals("")) {
if ("real".equals(prodIsLocal)) {
domain = "hosts_real";
}else {
domain = "host_dev";
}
joStampPath = domain + "&url&" + atchFileId;
}
ojs.put("memName", name);
ojs.put("joStampPath", joStampPath);
jsJoMemInfo.add(ojs);
}
}else {
JSONObject ojs = new JSONObject();
ojs.put("memName", "");
jsJoMemInfo.add(ojs);
}
jsOadInfo = parseJsonData(result);
JSONObject jsObjData = new JSONObject();
jsObjData.put("jsOadInfo", jsOadInfo); //직권조정 정보
jsObjData.put("jsRespInfo", jsRespInfo); //피신청인 정보
jsObjData.put("jsJoMemInfo", jsJoMemInfo); //조정위원 정보
String repStr = StringUtil.getUrlString(jsObjData.toString());
model.addAttribute("jsObjData", repStr);
//오즈리포트 서버별 주소 셋팅해주기
String serverName = req.getServerName();
String ozServerNm = IpUtil.getOzServerName(serverName);
model.addAttribute("ozServerNm", ozServerNm);
/*
* 2022.01.06 우영두 추가
* 오즈 리포트 File Export 처리
*
* */
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
ozSchd.checkOzEnvNMakePDF(
islocal
, closeVO.getAdrSeq()
, "admin/adrJkkjsReport.ozr" //oz template file
, ozDevPdfSavePath
, ozRealPdfSavePath
, jsObjData.toJSONString()
, serverName
//, "adjReqReport.pdf" //oz to pdf save file name
, "306050.pdf"
, ozDevServerIp
, ozDevSchedulerIp
, ozRealServerIp
, ozRealSchedulerIp
, devServerCheckString
);
/*
OzSchdExportUtil ozSchd = new OzSchdExportUtil();
//로컬, 개발 서버
if("local".equals(islocal)) {
String ozrFilePath = "/admin/adrJkkjsReport.ozr";
String savePath = closeVO.getAdrSeq() + "/ozFile/adrJkkjsReport.pdf";
savePath = ozDevPath + closeVO.getAdrSeq() + "/ozFile/adrJkkjsReport.pdf";
String jsonData = repStr;
jsonData = jsonData.replace("\\\\r\\\\n", "\\r\\n"); //리포트 내용에 줄바꿈 문자 변환 - pdf에서는 \\r\\n으로 넘겨야 줄바꿈이 정상 처리됨
ozSchd.ozschdFileExport(ozrFilePath, jsonData, savePath, req);
}
//실서버
else{
String ozrFilePath = "/admin/adrJkkjsReport.ozr";
*String savePath = closeVO.getAdrSeq() + "/ozFile/adrJkkjsReport.pdf";*
String savePath = "\\\\192.168.39.125\\data3\\out\\" + closeVO.getAdrSeq() + "\\ozFile\\adrJkkjsReport.pdf";
String jsonData = repStr;
jsonData = jsonData.replace("\\\\r\\\\n", "\\r\\n"); //리포트 내용에 줄바꿈 문자 변환 - pdf에서는 \\r\\n으로 넘겨야 줄바꿈이 정상 처리됨
ozSchd.ozschdFileExport(ozrFilePath, jsonData, savePath, req);
}
*/
modelAndView.addObject("status", "OK");
return modelAndView;
}
/**
* 직권조정결정서 수정 TODO daenge 직권조정결정서 오즈리포트
*

View File

@ -204,6 +204,17 @@ public class KccadrPdfConversion extends EgovAbstractServiceImpl {
}
}
public void newPdfConversionPrcs(
String p_adrSeq
) {
try {
this.newPdfTranCall(p_adrSeq);
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
@SuppressWarnings("unused")
public String pdfTranCall(String adrSeq)
throws UnirestException, ParseException, InterruptedException {
@ -214,15 +225,15 @@ public class KccadrPdfConversion extends EgovAbstractServiceImpl {
/*adrSeq = "test1234";*/
try {
String pdfGatewayBuildUrl = "http://" + pdfServerUrl + ":8888/pdf-gateway/api/task/build"; // Pdf Gateway 변환 URL
String pdfGatewayStatusUrl = "http://" + pdfServerUrl + ":8888/pdf-gateway/api/task/status"; // Pdf Gateway 상태 URL
/*String bookmarkUri = "file:/c:/Temp/Result/Last/pdf200_Bookmark.pdf"; // 북마크 후 파일명 */
String bookmarkUri = pdfFilepathOut + adrSeq +"/result/bookmark.pdf"; // 북마크 파일명
String pdfGatewayBuildUrl = "http://" + pdfServerUrl + ":8888/pdf-gateway/api/task/build"; // Pdf Gateway 변환 URL
String pdfGatewayStatusUrl = "http://" + pdfServerUrl + ":8888/pdf-gateway/api/task/status"; // Pdf Gateway 상태 URL
/*String bookmarkUri = "file:/c:/Temp/Result/Last/pdf200_Bookmark.pdf"; // 북마크 후 파일명 */
String conversionBeforeUri = pdfMakepathOut + adrSeq + "/conversionbefore/"; //pdf 변환 작업 파일경로
String conversionPdfUri = pdfFilepathOut + adrSeq + "/conversionafter/"; // pdf 변환 작업 파일경로
String conversionBeforeUri = pdfMakepathOut + adrSeq + "/conversionbefore/"; //pdf 변환 작업 파일경로
String ozfileUri = pdfMakepathOut + adrSeq + "/ozFile/"; // oz파일 export uri
String ozfileUri = pdfMakepathOut + adrSeq + "/ozFile/"; // oz파일 export uri
String conversionPdfUri = pdfFilepathOut + adrSeq + "/conversionafter/"; // pdf 변환 작업 파일경로
String bookmarkUri = pdfFilepathOut + adrSeq +"/result/bookmark.pdf"; // 북마크 파일명
int conversionNo = 0; //pdf 변환 파일명 순번
@ -840,4 +851,98 @@ public class KccadrPdfConversion extends EgovAbstractServiceImpl {
}
//@SuppressWarnings("unused")
//개별 변경
/**
* 2022-12-16 고도화때 수정
* 이력테이블을 참고해서 실제로 프로세스에 사용된 파일만 가져오도록 수정 했음
* @param adrSeq
* @return
* @throws UnirestException
* @throws ParseException
* @throws InterruptedException
*/
private String newPdfTranCall(String adrSeq)
throws UnirestException, ParseException, InterruptedException {
boolean isSuccess = false; // 전체 성공여부
String result = "fail";
/*adrSeq = "test1234";*/
try {
String pdfGatewayBuildUrl = "http://" + pdfServerUrl + ":8888/pdf-gateway/api/task/build"; // Pdf Gateway 변환 URL
String pdfGatewayStatusUrl = "http://" + pdfServerUrl + ":8888/pdf-gateway/api/task/status"; // Pdf Gateway 상태 URL
/*String bookmarkUri = "file:/c:/Temp/Result/Last/pdf200_Bookmark.pdf"; // 북마크 후 파일명 */
String conversionBeforeUri = pdfMakepathOut + adrSeq + "/conversionbefore/"; //pdf 변환 작업 파일경로
String ozfileUri = pdfMakepathOut + adrSeq + "/ozFile/"; // oz파일 export uri
String conversionPdfUri = pdfFilepathOut + adrSeq + "/conversionafter/"; // pdf 변환 작업 파일경로
String bookmarkUri = pdfFilepathOut + adrSeq +"/result/bookmark.pdf"; // 북마크 파일명
int conversionNo = 0; //pdf 변환 파일명 순번
System.out.println("====newPdfTranCall====");
System.out.println("pdfGatewayBuildUrl");
System.out.println(pdfGatewayBuildUrl);
System.out.println("pdfGatewayStatusUrl");
System.out.println(pdfGatewayStatusUrl);
System.out.println("conversionBeforeUri");
System.out.println(conversionBeforeUri);
System.out.println("ozfileUri");
System.out.println(ozfileUri);
System.out.println("conversionPdfUri");
System.out.println(conversionPdfUri);
System.out.println("bookmarkUri");
System.out.println(bookmarkUri);
//오즈리포트 export된 파일 -> conversionbefore폴더로 이동
File ozFile = new File(ozfileUri);
//폴더가 없다면 생성
if(!ozFile.exists()) {
ozFile.mkdirs();
}
File[] ozFileList = ozFile.listFiles();
File destFile = new File(conversionBeforeUri);
//폴더가 없다면 생성
if(!destFile.exists()) {
destFile.mkdirs();
}
if(ozFileList.length > 0) {
for(File tmpFile : ozFileList) {
conversionNo++; //변환 파일명 순번
File fromFile = new File(ozfileUri + tmpFile.getName());
//restAPI 요청 파일명에 공백이 있으면 에러발생 이슈로 인해 파일명 변경
String fileNm = tmpFile.getName();
String fileExt = fileNm.substring(fileNm.lastIndexOf("."));
File toDestFile = new File(conversionBeforeUri + conversionNo + fileExt);
FileUtils.copyFile(fromFile, toDestFile);
//System.out.println();
}
}
}
catch (Exception ex) {
System.out.println(ex.getMessage());
result = "exceptionFail";
}
return result;
}
}

View File

@ -124,9 +124,10 @@
</div>
<div class="btn_wrap btn_layout01">
<div class="area_left" style="width: 350px;">
<button class="btnType04" onclick="fncGoList(); return false;">조정상세</button>
</div>
<div class="area_right">
<button class="btnType04" onclick="fncGoList(); return false;">목록</button>
<!-- <button class="btnType04" onclick="fncGoList(); return false;">목록</button> -->
</div>
</div>
</div>

View File

@ -183,6 +183,458 @@
};
/*
* Pdf 재 단권화
* */
function fn_remake_streamDocs(){
var data = {
"adrSeq": $('#adrSeq').val()
, "adrSn": $('#adrSn').val()
}
console.log('data :: ', data);
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/common/remakeStreamDocAjax.do' />",
data: JSON.stringify(data),
dataType:'json',
async: false,
processData: false,
contentType: "application/json",
cache: false,
success: function (returnData) {
console.log('returnData : ', returnData);
//alert(returnData.status);
if(returnData.status == "OK"){
// text => JSON
//alert(returnData.data+":OK");
fn_remake_streamDocs_STEP1_201050(data);
//var obj = JSON.parse(returnData.dataSub);
// window.open 호출
//fn_read_streamDocs(obj.alink);
}else{
alert(returnData.data);
return false;
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
};
/*
* Pdf 재 단권화 -201050
* */
function fn_remake_streamDocs_STEP1_201050(p_data){
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/common/remakeStreamDoc201050Ajax.do' />",
data: JSON.stringify(p_data),
dataType:'json',
async: false,
processData: false,
contentType: "application/json",
cache: false,
success: function (returnData) {
console.log('returnData : ', returnData);
if(returnData.status == "OK"){
//$("#remakeDocs div").html("<br/>step1.조정신청서 생성");
$("#remakeDocs div").html("<br/>step1.조정신청서 생성");
fn_remake_streamDocs_STEP2_205050(p_data);
}else{
alert(returnData.data);
return false;
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
};
/*
* Pdf 재 단권화 -205050
* */
function fn_remake_streamDocs_STEP2_205050(p_data){
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/adjPgrMgr/dnt/dntOzExport205050Ajax.do' />",
//url: "<c:url value='/kccadr/common/remakeStreamDoc205050Ajax.do' />",
data: JSON.stringify(p_data),
dataType:'json',
async: false,
processData: false,
contentType: "application/json",
cache: false,
success: function (returnData) {
console.log('returnData : ', returnData);
if(returnData.status == "OK"){
$("#remakeDocs div").append("<br/>step2.기일통지서 생성");
fn_remake_streamDocs_STEP3_302050(p_data);
}else{
alert(returnData.data);
return false;
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
};
/*
* Pdf 재 단권화 -302050
* */
function fn_remake_streamDocs_STEP3_302050(p_data){
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/adjPgrMgr/drt/drtOzExport302050Ajax.do' />",
//url: "<c:url value='/kccadr/common/remakeStreamDoc205050Ajax.do' />",
data: JSON.stringify(p_data),
dataType:'json',
async: false,
processData: false,
contentType: "application/json",
cache: false,
success: function (returnData) {
console.log('returnData : ', returnData);
if(returnData.status == "OK"){
$("#remakeDocs div").append("<br/>step3.기일조서 생성");
fn_remake_streamDocs_STEP4_304050(p_data);
}else{
alert(returnData.data);
return false;
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
};
/*
* Pdf 재 단권화 -304050
* */
function fn_remake_streamDocs_STEP4_304050(p_data){
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/adjPgrMgr/drtCtr/drtCtrOzExport304050Ajax.do' />",
//url: "<c:url value='/kccadr/common/remakeStreamDoc205050Ajax.do' />",
data: JSON.stringify(p_data),
dataType:'json',
async: false,
processData: false,
contentType: "application/json",
cache: false,
success: function (returnData) {
console.log('returnData : ', returnData);
if(returnData.status == "OK"){
$("#remakeDocs div").append("<br/>step4.조정조서 생성");
fn_remake_streamDocs_STEP5_307050(p_data);
}else{
alert(returnData.data);
return false;
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
};
/*
* Pdf 재 단권화 -307050
* */
function fn_remake_streamDocs_STEP5_307050(p_data){
var data = {
"adrSeq": $('#adrSeq').val()
, "adrSn": $('#adrSn').val()
, "closeDocTy": "70"
}
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/adjPgrMgr/crt/crtOzExport307050Ajax.do' />",
//url: "<c:url value='/kccadr/common/remakeStreamDoc205050Ajax.do' />",
data: JSON.stringify(data),
dataType:'json',
async: false,
processData: false,
contentType: "application/json",
cache: false,
success: function (returnData) {
console.log('returnData : ', returnData);
if(returnData.status == "OK"){
$("#remakeDocs div").append("<br/>step5.불성립 종결 통보서 생성");
fn_remake_streamDocs_STEP6_306050(p_data);
}else if(returnData.status == "SKIP"){
$("#remakeDocs div").append("<br/>step5.불성립 종결 통보서 SKIP");
fn_remake_streamDocs_STEP6_306050(p_data);
}else{
alert(returnData.data);
return false;
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
};
/*
* Pdf 재 단권화 -306050
* */
function fn_remake_streamDocs_STEP6_306050(p_data){
var data = {
"adrSeq": $('#adrSeq').val()
, "adrSn": $('#adrSn').val()
, "closeDocTy": "60"
}
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/adjPgrMgr/oad/oadOzExport306050Ajax.do' />",
//url: "<c:url value='/kccadr/common/remakeStreamDoc205050Ajax.do' />",
data: JSON.stringify(data),
dataType:'json',
async: false,
processData: false,
contentType: "application/json",
cache: false,
success: function (returnData) {
console.log('returnData : ', returnData);
if(returnData.status == "OK"){
$("#remakeDocs div").append("<br/>step6.직권조정결정서 생성");
fn_remake_streamDocs_STEP7_A500(p_data);
}else if(returnData.status == "SKIP"){
$("#remakeDocs div").append("<br/>step6.직권조정결정서 SKIP");
fn_remake_streamDocs_STEP7_A500(p_data);
}else{
alert(returnData.data);
return false;
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
};
/*
* Pdf 재 단권화 -A500
* */
function fn_remake_streamDocs_STEP7_A500(p_data){
var data = {
"adrSeq": $('#adrSeq').val()
, "adrSn": $('#adrSn').val()
}
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/adjPgrMgr/cfrm/cfrmOzExportA500Ajax.do' />",
//url: "<c:url value='/kccadr/common/remakeStreamDoc205050Ajax.do' />",
data: JSON.stringify(data),
dataType:'json',
async: false,
processData: false,
contentType: "application/json",
cache: false,
success: function (returnData) {
console.log('returnData : ', returnData);
if(returnData.status == "OK"){
$("#remakeDocs div").append("<br/>step7.확정증명원 생성");
fn_remake_streamDocs_STEP8_305050(p_data);
}else if(returnData.status == "SKIP"){
$("#remakeDocs div").append("<br/>step7.확정증명원 SKIP");
fn_remake_streamDocs_STEP8_305050(p_data);
}else{
alert(returnData.data);
return false;
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
};
/*
* Pdf 재 단권화 -305050
* */
function fn_remake_streamDocs_STEP8_305050(p_data){
var data = {
"adrSeq": $('#adrSeq').val()
, "adrSn": $('#adrSn').val()
, "closeDocTy": "50"
}
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/adjPgrMgr/ent/entOzExport305050Ajax.do' />",
//url: "<c:url value='/kccadr/common/remakeStreamDoc205050Ajax.do' />",
data: JSON.stringify(data),
dataType:'json',
async: false,
processData: false,
contentType: "application/json",
cache: false,
success: function (returnData) {
console.log('returnData : ', returnData);
if(returnData.status == "OK"){
$("#remakeDocs div").append("<br/>step8.취하종결통보서 생성");
fn_remake_streamDocs_STEP9_303050(p_data);
}else if(returnData.status == "SKIP"){
$("#remakeDocs div").append("<br/>step8.취하종결통보서 SKIP");
fn_remake_streamDocs_STEP9_303050(p_data);
}else{
alert(returnData.data);
return false;
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
};
/*
* Pdf 재 단권화 -303050
* */
function fn_remake_streamDocs_STEP9_303050(p_data){
var data = {
"adrSeq": $('#adrSeq').val()
, "adrSn": $('#adrSn').val()
, "closeDocTy": "30"
}
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/adjPgrMgr/arm/armOzExport303050Ajax.do' />",
//url: "<c:url value='/kccadr/common/remakeStreamDoc205050Ajax.do' />",
data: JSON.stringify(data),
dataType:'json',
async: false,
processData: false,
contentType: "application/json",
cache: false,
success: function (returnData) {
console.log('returnData : ', returnData);
if(returnData.status == "OK"){
$("#remakeDocs div").append("<br/>step9.조정권고안 생성");
fn_remake_streamDocs_STEP10_A250(p_data);
}else if(returnData.status == "SKIP"){
$("#remakeDocs div").append("<br/>step9.조정권고안 SKIP");
fn_remake_streamDocs_STEP10_A250(p_data);
}else{
alert(returnData.data);
return false;
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
};
/*
* Pdf 재 단권화 -A250-경정신청서
* */
function fn_remake_streamDocs_STEP10_A250(p_data){
var data = {
"adrSeq": $('#adrSeq').val()
, "adrSn": $('#adrSn').val()
, "closeDocTy": "30"
}
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/adjPgrMgr/apm/corReportExportA250Ajax.do' />",
//url: "<c:url value='/kccadr/common/remakeStreamDoc205050Ajax.do' />",
data: JSON.stringify(data),
dataType:'json',
async: false,
processData: false,
contentType: "application/json",
cache: false,
success: function (returnData) {
console.log('returnData : ', returnData);
if(returnData.status == "OK"){
$("#remakeDocs div").append("<br/>step10.경정신청서 생성");
fn_remake_streamDocs_MIX(p_data);
}else if(returnData.status == "SKIP"){
$("#remakeDocs div").append("<br/>step10.경정신청서 SKIP");
fn_remake_streamDocs_MIX(p_data);
//fn_remake_streamDocs_STEP10_A250(p_data);
}else{
alert(returnData.data);
return false;
}
//alert(returnData.data);
//alert("종결 문건 재단권화 처리 완료되었습니다.");
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
};
/*
* Pdf 재 단권화 -A250-경정신청서
* */
function fn_remake_streamDocs_MIX(p_data){
//alert("대상 파일 생성은 완료.\n단권화 처리 해야함.");
//return;
var data = {
"adrSeq": $('#adrSeq').val()
, "adrSn": $('#adrSn').val()
}
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/common/remakeStreamDocPdfAjax.do' />",
//url: "<c:url value='/kccadr/common/remakeStreamDoc205050Ajax.do' />",
data: JSON.stringify(data),
dataType:'json',
async: false,
processData: false,
contentType: "application/json",
cache: false,
success: function (returnData) {
console.log('returnData : ', returnData);
if(returnData.status == "OK"){
//$("#remakeDocs div").append("<br/>step10.경정신청서 생성");
//fn_remake_streamDocs_STEP10_A250(p_data);
alert("OK");
}else if(returnData.status == "SKIP"){
//$("#remakeDocs div").append("<br/>step10.경정신청서 SKIP");
//fn_remake_streamDocs_STEP10_A250(p_data);
alert("SKIP");
}else{
//alert(returnData.data);
//return false;
alert("ELSE");
}
//alert(returnData.data);
alert("종결 문건 재단권화 처리 완료되었습니다.");
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
};
/*
* pdf Stream road
*/
@ -401,14 +853,27 @@
<button type="button" class="btnType02" onclick="fnc_view_download_step_1(); return false;">선택다운로드</button>
<%-- <button type="button" class="btnType02" onclick="fncDocRegPopup(); return false;">답변서 등록</button> --%>
<button type="button" class="btnType02" onclick="fncDocRegPopup(); return false;">문서 등록</button>
<button type="button" class="btnType02" onclick="fn_reg_streamDocs(); return false;">종결 문건 단권화파일 다운로드</button>
<button type="button" class="btnType02" onclick="fn_reg_streamDocs(); return false;">종결 문건 단권화파일 다운로드</button>
<!-- <button type="button" class="btnType02" onclick="fnc_is_prcs_finish(); return false;">종결 문건 단권화파일 다운로드</button> -->
</div>
<!-- <div class="area_right">
<button type="button" class="btnType02" onclick="fnc_is_prcs_finish(); return false;">종결 문건 단권화파일 다운로드</button>
</div> -->
<div class="area_right">
<!-- <button type="button" class="btnType02" onclick="fnc_is_prcs_finish(); return false;">종결 문건 단권화파일 다운로드</button> -->
<!-- <button type="button" class="btnType02" onclick="fn_remake_streamDocs(); return false;">종결 문건 재단권화</button> -->
</div>
</div>
</div>
<div class="btn_wrap btn_layout01" style="width:120%;">
<div class="area_right">
<!-- <button type="button" class="btnType02" onclick="fnc_is_prcs_finish(); return false;">종결 문건 단권화파일 다운로드</button> -->
<button type="button" class="btnType02" onclick="fn_remake_streamDocs(); return false;">종결 문건 재단권화</button>
</div>
</div>
<div class="btn_wrap btn_layout01" style="width:120%;" id="remakeDocs">
<div class="area_right">
</div>
</div>
</form:form>
</body>
<script type="text/javaScript" language="javascript">

View File

@ -256,11 +256,11 @@
<!-- //list_상세 -->
<div class="btn_wrap btn_layout01">
<div class="area_left">
<button type="button" class="btnType04" onclick="fncGoList()">조정상세</button>
<!-- <button type="button" class="btnType04" onclick="fncGoList()">조정상세</button> -->
</div>
<div class="area_right">
<button type="button" class="btnType06" onclick="fncReg()">등록</button>
<!-- <button type="button" class="btnType04" onclick="fncGoList()">취소</button> -->
<button type="button" class="btnType04" onclick="fncGoList()">취소</button>
</div>
</div>
</div>