|
|
|
|
@ -53,9 +53,6 @@ import cokr.xit.fims.sprt.dao.IntegrationSearchMapper;
|
|
|
|
|
import cokr.xit.fims.sprt.service.IntegrationSearchService;
|
|
|
|
|
import cokr.xit.fims.sprt.service.bean.MediaBean;
|
|
|
|
|
import cokr.xit.fims.task.Task;
|
|
|
|
|
import cokr.xit.fims.wpm.WoopyonMoaRequest;
|
|
|
|
|
import cokr.xit.fims.wpm.service.WoopyonMoaService;
|
|
|
|
|
import cokr.xit.foundation.Downloadable;
|
|
|
|
|
import cokr.xit.foundation.UserInfo;
|
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
|
|
|
|
|
|
@ -167,8 +164,6 @@ public class Sndb01Controller extends ApplicationController {
|
|
|
|
|
protected OutsourcingStngBean outsourcingStngBean;
|
|
|
|
|
@Resource(name="integrationSearchMapper")
|
|
|
|
|
private IntegrationSearchMapper integrationSearchMapper;
|
|
|
|
|
@Resource(name="woopyonMoaService")
|
|
|
|
|
private WoopyonMoaService woopyonMoaService;
|
|
|
|
|
|
|
|
|
|
/**계고장 발송 대상 자료 메인화면(sndb/sndb01/010-main)을 연다.
|
|
|
|
|
* @return /sndb/sndb01/010-main
|
|
|
|
|
@ -440,61 +435,47 @@ public class Sndb01Controller extends ApplicationController {
|
|
|
|
|
return setPagingInfo(new ModelAndView("jsonView"), result, "");
|
|
|
|
|
} else {
|
|
|
|
|
List<DataObject> list = sndngDtlService.getSndngDtlList(req.setFetchSize(0));
|
|
|
|
|
String template = req.getType();
|
|
|
|
|
if (isEmpty(template)) {
|
|
|
|
|
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType());
|
|
|
|
|
|
|
|
|
|
XLSWriter xlsx = new XLSWriter().worksheet(0);
|
|
|
|
|
Format format = new Format(xlsx);
|
|
|
|
|
CellStyle center = format.cellStyle(Style.CENTER);
|
|
|
|
|
CellStyle numeric = format.n_nn0();
|
|
|
|
|
CellStyle dateYMD = format.yyyy_mm_dd();
|
|
|
|
|
CellStyle dateDT = format.yyyy_mm_dd_hh_mm_ss();
|
|
|
|
|
|
|
|
|
|
Map<String,Object> valueMap = new HashMap<String,Object>();
|
|
|
|
|
valueMap.put("발송상태", format.of("SNDNG_DTL_STTS_NM").style(center));
|
|
|
|
|
valueMap.put("등기번호", format.of("RG_NO").style(center));
|
|
|
|
|
valueMap.put("발송일자", FormatMaker.yyyy_mm_dd(format, "SNDNG_YMD").style(dateYMD));
|
|
|
|
|
valueMap.put("납기일자", FormatMaker.yyyy_mm_dd(format, "SNDNG_END_YMD").style(dateYMD));
|
|
|
|
|
valueMap.put("성명", format.of("RCPN_NM"));
|
|
|
|
|
valueMap.put("우편번호", format.of("RCPN_ZIP").style(center));
|
|
|
|
|
valueMap.put("주소", format.of("RCPN_ADDR"));
|
|
|
|
|
valueMap.put("상세주소", format.of("RCPN_DTL_ADDR"));
|
|
|
|
|
valueMap.put("배달일자", FormatMaker.yyyy_mm_dd(format, "DLVR_YMD").style(dateYMD));
|
|
|
|
|
valueMap.put("배달시각", format.of("DLVR_TM").style(center));
|
|
|
|
|
valueMap.put("미배달사유", format.of("UNDLVR_RSN_NM"));
|
|
|
|
|
valueMap.put("수령인", format.of("ACTL_RCPN_NM"));
|
|
|
|
|
valueMap.put("수령인관계", format.of("RCPN_REL_NM"));
|
|
|
|
|
valueMap.put("단속일시", format.of("CRDN_DT").style(center));
|
|
|
|
|
valueMap.put("차량번호", format.of("VHRNO"));
|
|
|
|
|
valueMap.put("단속법정동", format.of("CRDN_STDG_NM"));
|
|
|
|
|
valueMap.put("단속장소", format.of("CRDN_PLC"));
|
|
|
|
|
valueMap.put("과태료금액", format.of("FFNLG_AMT").style(numeric));
|
|
|
|
|
valueMap.put("등록일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "REG_DT").style(dateDT));
|
|
|
|
|
valueMap.put("등록사용자", format.of("RGTR_NM").style(center));
|
|
|
|
|
valueMap.put("수정일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "MDFCN_DT").style(dateDT));
|
|
|
|
|
valueMap.put("수정사용자", format.of("MDFR_NM").style(center));
|
|
|
|
|
|
|
|
|
|
CellDef.setValues(cellDefs, valueMap);
|
|
|
|
|
|
|
|
|
|
xlsx.cell(0, 0).value("계고장 발송 상세").value(center).merge(0, cellDefs.size() - 1)
|
|
|
|
|
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx)))
|
|
|
|
|
.cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if (i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList()));
|
|
|
|
|
|
|
|
|
|
return new ModelAndView("downloadView")
|
|
|
|
|
.addObject("download", xlsx.getDownloadable().setFilename("계고장 발송상세" + "_목록_" + now() + ".xlsx"));
|
|
|
|
|
} else {
|
|
|
|
|
WoopyonMoaRequest wreq = new WoopyonMoaRequest()
|
|
|
|
|
.setTemplate(template)
|
|
|
|
|
.setSndngDtlList(list)
|
|
|
|
|
.setStandardYN("규격")
|
|
|
|
|
.setWeight(25)
|
|
|
|
|
.setPieceCount(1)
|
|
|
|
|
.setSndngId(req.getSndngId());
|
|
|
|
|
Downloadable downloadable = woopyonMoaService.downloadRequest(wreq);
|
|
|
|
|
return new ModelAndView("downloadView")
|
|
|
|
|
.addObject("download", downloadable.setFilename("우편등록_" + now() + ".xls"));
|
|
|
|
|
}
|
|
|
|
|
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType());
|
|
|
|
|
|
|
|
|
|
XLSWriter xlsx = new XLSWriter().worksheet(0);
|
|
|
|
|
Format format = new Format(xlsx);
|
|
|
|
|
CellStyle center = format.cellStyle(Style.CENTER);
|
|
|
|
|
CellStyle numeric = format.n_nn0();
|
|
|
|
|
CellStyle dateYMD = format.yyyy_mm_dd();
|
|
|
|
|
CellStyle dateDT = format.yyyy_mm_dd_hh_mm_ss();
|
|
|
|
|
|
|
|
|
|
Map<String,Object> valueMap = new HashMap<String,Object>();
|
|
|
|
|
valueMap.put("발송상태", format.of("SNDNG_DTL_STTS_NM").style(center));
|
|
|
|
|
valueMap.put("등기번호", format.of("RG_NO").style(center));
|
|
|
|
|
valueMap.put("발송일자", FormatMaker.yyyy_mm_dd(format, "SNDNG_YMD").style(dateYMD));
|
|
|
|
|
valueMap.put("납기일자", FormatMaker.yyyy_mm_dd(format, "SNDNG_END_YMD").style(dateYMD));
|
|
|
|
|
valueMap.put("성명", format.of("RCPN_NM"));
|
|
|
|
|
valueMap.put("우편번호", format.of("RCPN_ZIP").style(center));
|
|
|
|
|
valueMap.put("주소", format.of("RCPN_ADDR"));
|
|
|
|
|
valueMap.put("상세주소", format.of("RCPN_DTL_ADDR"));
|
|
|
|
|
valueMap.put("배달일자", FormatMaker.yyyy_mm_dd(format, "DLVR_YMD").style(dateYMD));
|
|
|
|
|
valueMap.put("배달시각", format.of("DLVR_TM").style(center));
|
|
|
|
|
valueMap.put("미배달사유", format.of("UNDLVR_RSN_NM"));
|
|
|
|
|
valueMap.put("수령인", format.of("ACTL_RCPN_NM"));
|
|
|
|
|
valueMap.put("수령인관계", format.of("RCPN_REL_NM"));
|
|
|
|
|
valueMap.put("단속일시", format.of("CRDN_DT").style(center));
|
|
|
|
|
valueMap.put("차량번호", format.of("VHRNO"));
|
|
|
|
|
valueMap.put("단속법정동", format.of("CRDN_STDG_NM"));
|
|
|
|
|
valueMap.put("단속장소", format.of("CRDN_PLC"));
|
|
|
|
|
valueMap.put("과태료금액", format.of("FFNLG_AMT").style(numeric));
|
|
|
|
|
valueMap.put("등록일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "REG_DT").style(dateDT));
|
|
|
|
|
valueMap.put("등록사용자", format.of("RGTR_NM").style(center));
|
|
|
|
|
valueMap.put("수정일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "MDFCN_DT").style(dateDT));
|
|
|
|
|
valueMap.put("수정사용자", format.of("MDFR_NM").style(center));
|
|
|
|
|
|
|
|
|
|
CellDef.setValues(cellDefs, valueMap);
|
|
|
|
|
|
|
|
|
|
xlsx.cell(0, 0).value("계고장 발송 상세").value(center).merge(0, cellDefs.size() - 1)
|
|
|
|
|
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx)))
|
|
|
|
|
.cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if (i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList()));
|
|
|
|
|
|
|
|
|
|
return new ModelAndView("downloadView")
|
|
|
|
|
.addObject("download", xlsx.getDownloadable().setFilename("계고장 발송상세" + "_목록_" + now() + ".xlsx"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|