|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
package cokr.xit.fims.sprt.web;
|
|
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.Enumeration;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
@ -46,6 +48,9 @@ import cokr.xit.fims.crdn.CrdnQuery;
|
|
|
|
|
import cokr.xit.fims.crdn.dao.CrdnListMapper;
|
|
|
|
|
import cokr.xit.fims.mngt.service.bean.FactionBean;
|
|
|
|
|
import cokr.xit.fims.mngt.service.bean.TaskBean;
|
|
|
|
|
import cokr.xit.fims.sndb.SndbQuery;
|
|
|
|
|
import cokr.xit.fims.sndb.Sndng;
|
|
|
|
|
import cokr.xit.fims.sndb.service.bean.SndngBean;
|
|
|
|
|
import cokr.xit.fims.sprt.Keyword;
|
|
|
|
|
import cokr.xit.fims.sprt.SprtQuery;
|
|
|
|
|
import cokr.xit.fims.sprt.dao.IntegrationSearchMapper;
|
|
|
|
@ -112,6 +117,9 @@ public class Sprt01Controller extends ApplicationController {
|
|
|
|
|
@Resource(name = "fileBean")
|
|
|
|
|
private FileBean fileBean;
|
|
|
|
|
|
|
|
|
|
@Resource(name = "sndngBean")
|
|
|
|
|
private SndngBean sndngBean;
|
|
|
|
|
|
|
|
|
|
@Resource(name = "taskBean")
|
|
|
|
|
private TaskBean taskBean;
|
|
|
|
|
|
|
|
|
@ -673,16 +681,44 @@ public class Sprt01Controller extends ApplicationController {
|
|
|
|
|
/** 사전통지서를 PDF 파일로 작성한다.
|
|
|
|
|
* @return 사전통지서 PDF파일
|
|
|
|
|
*/
|
|
|
|
|
public ModelAndView makeAdvntcePdf(PrintOption printOption, String[] crdnIds) {
|
|
|
|
|
public ModelAndView makeAdvntcePdf(String[] crdnIds, Sndng sndng, PrintOption printOption) {
|
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
|
|
SprtQuery sprtQuery = new SprtQuery();
|
|
|
|
|
sprtQuery.setCrdnIds(crdnIds);
|
|
|
|
|
|
|
|
|
|
List<DataObject> dataObjectList = new ArrayList<DataObject>();
|
|
|
|
|
if(crdnIds.length == 1 && crdnIds[0].equals("sample")) {
|
|
|
|
|
DataObject sample = new Advntce().createSampleData();
|
|
|
|
|
dataObjectList.add(sample);
|
|
|
|
|
} else {
|
|
|
|
|
SprtQuery sprtQuery = new SprtQuery();
|
|
|
|
|
sprtQuery.setCrdnIds(crdnIds);
|
|
|
|
|
//발송 등록
|
|
|
|
|
List<DataObject> dataObjectList0 = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
|
|
|
|
|
SndbQuery sndbQuery = new SndbQuery();
|
|
|
|
|
sndbQuery.setCrdnIDs(crdnIds);
|
|
|
|
|
sndng.setSndngSeCd("02");
|
|
|
|
|
sndng.setTnocs(crdnIds.length);
|
|
|
|
|
sndng.setGramt(CmmnUtil.sumByKey(dataObjectList0, "FFNLG_AMT"));
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
|
|
|
String today = sdf.format(new Date());
|
|
|
|
|
sndng.setSndngYmd(today);
|
|
|
|
|
|
|
|
|
|
sndbQuery.setSggCd(sndng.getSggCd());
|
|
|
|
|
sndbQuery.setTaskSeCd(sndng.getTaskSeCd());
|
|
|
|
|
DataObject advntceYmdInfo = taskBean.getAdvntceYmdInfo(sndbQuery);
|
|
|
|
|
String sndngEndYmd = CmmnUtil.addDay(today, advntceYmdInfo.number("ADVNTCE_DAY_CNT").intValue());
|
|
|
|
|
sndng.setSndngEndYmd(sndngEndYmd);
|
|
|
|
|
|
|
|
|
|
DataObject first = dataObjectList0.get(0);
|
|
|
|
|
sndng.setTtlNm(first.string("TASK_SE_NM")+" "+first.string("VLTN_ARTCL")+" "+"사전통지서");
|
|
|
|
|
|
|
|
|
|
sndng.setResndYN("N");
|
|
|
|
|
String insertSndngResult = sndngBean.createAdvntceSndngList(sndbQuery, sndng);
|
|
|
|
|
if(insertSndngResult.contains("[F]")) {
|
|
|
|
|
throw new RuntimeException(insertSndngResult);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//발송 등록 후 출력대상조회
|
|
|
|
|
dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
|
|
|
|
|
|
|
|
|
|
for(int i=0; i < dataObjectList.size(); i++) {
|
|
|
|
@ -768,15 +804,41 @@ public class Sprt01Controller extends ApplicationController {
|
|
|
|
|
/** 사전통지 정보로 txt파일,이미지파일을 생성하고 압축파일로 반환한다.
|
|
|
|
|
* @return 사전통지서 압축파일
|
|
|
|
|
*/
|
|
|
|
|
public ModelAndView makeAdvntceOutsourcing(PrintOption printOption, String[] crdnIds) {
|
|
|
|
|
public ModelAndView makeAdvntceOutsourcing(String[] crdnIds, Sndng sndng, PrintOption printOption) {
|
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
|
|
|
|
|
|
|
String taskSeCd = "";
|
|
|
|
|
|
|
|
|
|
SprtQuery sprtQuery = new SprtQuery();
|
|
|
|
|
sprtQuery.setCrdnIds(crdnIds);
|
|
|
|
|
List<DataObject> dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
|
|
|
|
|
|
|
|
|
|
//발송 등록
|
|
|
|
|
List<DataObject> dataObjectList0 = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
|
|
|
|
|
SndbQuery sndbQuery = new SndbQuery();
|
|
|
|
|
sndbQuery.setCrdnIDs(crdnIds);
|
|
|
|
|
sndng.setSndngSeCd("02");
|
|
|
|
|
sndng.setTnocs(crdnIds.length);
|
|
|
|
|
sndng.setGramt(CmmnUtil.sumByKey(dataObjectList0, "FFNLG_AMT"));
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
|
|
|
String today = sdf.format(new Date());
|
|
|
|
|
sndng.setSndngYmd(today);
|
|
|
|
|
|
|
|
|
|
sndbQuery.setSggCd(sndng.getSggCd());
|
|
|
|
|
sndbQuery.setTaskSeCd(sndng.getTaskSeCd());
|
|
|
|
|
DataObject advntceYmdInfo = taskBean.getAdvntceYmdInfo(sndbQuery);
|
|
|
|
|
String sndngEndYmd = CmmnUtil.addDay(today, advntceYmdInfo.number("ADVNTCE_DAY_CNT").intValue());
|
|
|
|
|
sndng.setSndngEndYmd(sndngEndYmd);
|
|
|
|
|
|
|
|
|
|
DataObject first = dataObjectList0.get(0);
|
|
|
|
|
sndng.setTtlNm(first.string("TASK_SE_NM")+" "+first.string("VLTN_ARTCL")+" "+"사전통지서");
|
|
|
|
|
|
|
|
|
|
sndng.setResndYN("N");
|
|
|
|
|
String insertSndngResult = sndngBean.createAdvntceSndngList(sndbQuery, sndng);
|
|
|
|
|
if(insertSndngResult.contains("[F]")) {
|
|
|
|
|
throw new RuntimeException(insertSndngResult);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//발송 등록 후 출력대상조회
|
|
|
|
|
List<DataObject> dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
|
|
|
|
|
String taskSeCd = "";
|
|
|
|
|
for(int i=0; i < dataObjectList.size(); i++) {
|
|
|
|
|
DataObject sndngDtl = integrationSearchMapper.selectLatestSndngDtlInfo(dataObjectList.get(i).string("CRDN_ID"));
|
|
|
|
|
dataObjectList.get(i).set("RG_NO",sndngDtl.string("RG_NO"));
|
|
|
|
@ -848,16 +910,46 @@ public class Sprt01Controller extends ApplicationController {
|
|
|
|
|
/** 고지서를 PDF 파일로 작성한다.
|
|
|
|
|
* @return 고지서 PDF파일
|
|
|
|
|
*/
|
|
|
|
|
public ModelAndView makeNhtPdf(PrintOption printOption, String[] crdnIds) {
|
|
|
|
|
public ModelAndView makeNhtPdf(String[] crdnIds, Sndng sndng, PrintOption printOption) {
|
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
|
|
SprtQuery sprtQuery = new SprtQuery();
|
|
|
|
|
sprtQuery.setCrdnIds(crdnIds);
|
|
|
|
|
|
|
|
|
|
List<DataObject> dataObjectList = new ArrayList<DataObject>();
|
|
|
|
|
|
|
|
|
|
if(crdnIds.length == 1 && crdnIds[0].equals("sample")) {
|
|
|
|
|
DataObject sample = new Advntce().createSampleData();
|
|
|
|
|
dataObjectList.add(sample);
|
|
|
|
|
} else {
|
|
|
|
|
SprtQuery sprtQuery = new SprtQuery();
|
|
|
|
|
sprtQuery.setCrdnIds(crdnIds);
|
|
|
|
|
|
|
|
|
|
//발송 등록
|
|
|
|
|
List<DataObject> dataObjectList0 = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
|
|
|
|
|
SndbQuery sndbQuery = new SndbQuery();
|
|
|
|
|
sndbQuery.setCrdnIDs(crdnIds);
|
|
|
|
|
sndng.setSndngSeCd("03");
|
|
|
|
|
sndng.setTnocs(crdnIds.length);
|
|
|
|
|
sndng.setGramt(CmmnUtil.sumByKey(dataObjectList0, "FFNLG_AMT"));
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
|
|
|
String today = sdf.format(new Date());
|
|
|
|
|
sndng.setSndngYmd(today);
|
|
|
|
|
|
|
|
|
|
sndbQuery.setSggCd(sndng.getSggCd());
|
|
|
|
|
sndbQuery.setTaskSeCd(sndng.getTaskSeCd());
|
|
|
|
|
DataObject advntceYmdInfo = taskBean.getAdvntceYmdInfo(sndbQuery);
|
|
|
|
|
String sndngEndYmd = CmmnUtil.addDay(today, advntceYmdInfo.number("ADVNTCE_DAY_CNT").intValue());
|
|
|
|
|
sndng.setSndngEndYmd(sndngEndYmd);
|
|
|
|
|
|
|
|
|
|
DataObject first = dataObjectList0.get(0);
|
|
|
|
|
sndng.setTtlNm(first.string("TASK_SE_NM")+" "+first.string("VLTN_ARTCL")+" "+"고지서");
|
|
|
|
|
|
|
|
|
|
sndng.setResndYN("N");
|
|
|
|
|
String insertSndngResult = sndngBean.createAdvntceSndngList(sndbQuery, sndng);
|
|
|
|
|
if(insertSndngResult.contains("[F]")) {
|
|
|
|
|
throw new RuntimeException(insertSndngResult);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//발송 등록 후 출력대상조회
|
|
|
|
|
dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
|
|
|
|
|
|
|
|
|
|
for(int i=0; i < dataObjectList.size(); i++) {
|
|
|
|
@ -943,15 +1035,41 @@ public class Sprt01Controller extends ApplicationController {
|
|
|
|
|
/** 고지 정보로 txt파일,이미지파일을 생성하고 압축파일로 반환한다.
|
|
|
|
|
* @return 고지서 압축파일
|
|
|
|
|
*/
|
|
|
|
|
public ModelAndView makeNhtOutsourcing(PrintOption printOption, String[] crdnIds) {
|
|
|
|
|
public ModelAndView makeNhtOutsourcing(String[] crdnIds, Sndng sndng, PrintOption printOption) {
|
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
|
|
|
|
|
|
|
String taskSeCd = "";
|
|
|
|
|
|
|
|
|
|
SprtQuery sprtQuery = new SprtQuery();
|
|
|
|
|
sprtQuery.setCrdnIds(crdnIds);
|
|
|
|
|
List<DataObject> dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
|
|
|
|
|
|
|
|
|
|
//발송 등록
|
|
|
|
|
List<DataObject> dataObjectList0 = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
|
|
|
|
|
SndbQuery sndbQuery = new SndbQuery();
|
|
|
|
|
sndbQuery.setCrdnIDs(crdnIds);
|
|
|
|
|
sndng.setSndngSeCd("03");
|
|
|
|
|
sndng.setTnocs(crdnIds.length);
|
|
|
|
|
sndng.setGramt(CmmnUtil.sumByKey(dataObjectList0, "FFNLG_AMT"));
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
|
|
|
String today = sdf.format(new Date());
|
|
|
|
|
sndng.setSndngYmd(today);
|
|
|
|
|
|
|
|
|
|
sndbQuery.setSggCd(sndng.getSggCd());
|
|
|
|
|
sndbQuery.setTaskSeCd(sndng.getTaskSeCd());
|
|
|
|
|
DataObject advntceYmdInfo = taskBean.getAdvntceYmdInfo(sndbQuery);
|
|
|
|
|
String sndngEndYmd = CmmnUtil.addDay(today, advntceYmdInfo.number("ADVNTCE_DAY_CNT").intValue());
|
|
|
|
|
sndng.setSndngEndYmd(sndngEndYmd);
|
|
|
|
|
|
|
|
|
|
DataObject first = dataObjectList0.get(0);
|
|
|
|
|
sndng.setTtlNm(first.string("TASK_SE_NM")+" "+first.string("VLTN_ARTCL")+" "+"고지서");
|
|
|
|
|
|
|
|
|
|
sndng.setResndYN("N");
|
|
|
|
|
String insertSndngResult = sndngBean.createAdvntceSndngList(sndbQuery, sndng);
|
|
|
|
|
if(insertSndngResult.contains("[F]")) {
|
|
|
|
|
throw new RuntimeException(insertSndngResult);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//발송 등록 후 출력대상조회
|
|
|
|
|
List<DataObject> dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
|
|
|
|
|
String taskSeCd = "";
|
|
|
|
|
for(int i=0; i < dataObjectList.size(); i++) {
|
|
|
|
|
DataObject sndngDtl = integrationSearchMapper.selectLatestSndngDtlInfo(dataObjectList.get(i).string("CRDN_ID"));
|
|
|
|
|
dataObjectList.get(i).set("RG_NO",sndngDtl.string("RG_NO"));
|
|
|
|
|