|
|
@ -10,6 +10,7 @@ import java.io.OutputStream;
|
|
|
|
import java.nio.file.Files;
|
|
|
|
import java.nio.file.Files;
|
|
|
|
import java.nio.file.StandardCopyOption;
|
|
|
|
import java.nio.file.StandardCopyOption;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
@ -38,6 +39,34 @@ public class OutsourcingFileMaker {
|
|
|
|
this.printStngItems = printStngItems;
|
|
|
|
this.printStngItems = printStngItems;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 서식에서 사용하는 출력항목 중 사용하는 항목만 추출한다.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public List<PredefinedSet> filterUsedArtcls() {
|
|
|
|
|
|
|
|
List<String> otptArtclNmList = this.printStngItems.stream().map((item) -> { return item.string("ARTCL_NM"); }).toList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<PredefinedSet> result = OutsourcingFileMaker.predifinedSetForOutsourcing().stream()
|
|
|
|
|
|
|
|
.filter((item) -> {
|
|
|
|
|
|
|
|
return otptArtclNmList.contains(item.getArtclNm());
|
|
|
|
|
|
|
|
}).toList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 다운로드 이력에 남길 항목명을 추출한다.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public List<String> filterDownloadDataNames() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> result = this.filterUsedArtcls().stream()
|
|
|
|
|
|
|
|
.filter((item) -> {
|
|
|
|
|
|
|
|
return item.isDownloadData();
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.map(PredefinedSet::getArtclDscrp).toList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Map<String, Object> makeFile() {
|
|
|
|
public Map<String, Object> makeFile() {
|
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
@ -225,7 +254,8 @@ public class OutsourcingFileMaker {
|
|
|
|
|
|
|
|
|
|
|
|
resultZipFilePath = zipFilePath;
|
|
|
|
resultZipFilePath = zipFilePath;
|
|
|
|
result.put("download", this.getDownloadable().setFilename(zipFileName));
|
|
|
|
result.put("download", this.getDownloadable().setFilename(zipFileName));
|
|
|
|
|
|
|
|
result.put("downloadData", data);
|
|
|
|
|
|
|
|
result.put("dataNames", this.filterDownloadDataNames());
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
throw new RuntimeException("외주파일생성 중 오류가 발생하였습니다.");
|
|
|
|
throw new RuntimeException("외주파일생성 중 오류가 발생하였습니다.");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -250,4 +280,37 @@ public class OutsourcingFileMaker {
|
|
|
|
.setContentType("application/zip")
|
|
|
|
.setContentType("application/zip")
|
|
|
|
.setWriter(this::write);
|
|
|
|
.setWriter(this::write);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static List<PredefinedSet> predifinedSetForOutsourcing() {
|
|
|
|
|
|
|
|
List<PredefinedSet> predefinedSetList = new ArrayList<>();
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("SNDNG_DTL_ID", "발송상세아이디").offLog());
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("VLTN_LAW_NM", "위반법명"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("BARCODE", "바코드").offLog());
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("CRDN_DT", "단속일시"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("DUDT_YMD", "납부기한"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("VHRNO", "차량번호"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("FFNLG_CARMDL_NM", "과태료차종명"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("VHCL_NM", "차량명"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("CRDN_PLC", "단속장소"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("RTPYR_ADDR", "납부자기본주소"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("RTPYR_DTL_ADDR", "납부자상세주소"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("RTPYR_ZIP", "납부자우편번호"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("RTPYR_NM", "납부자명"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("OPNN_RANGE", "의견진술기간"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("CRDN_SE_NM", "단속구분명"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("ATCH_FILE_CNT", "첨부파일갯수"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("FFNLG_CRDN_AMT", "과태료단속금액"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("SUM_AMT", "합계금액"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("RG_NO", "등기번호"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("OCR0", "OCR0").offLog());
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("OCR0_1", "OCR0_1").offLog());
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("OCR0_2", "OCR0_2").offLog());
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("OCR_BAND1", "OCR_BAND1").offLog());
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("OCR_BAND2", "OCR_BAND2").offLog());
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("BANK_NM", "가상계좌은행명"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("VR_ACTNO", "가상계좌"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("EPAYNO", "전자납부번호"));
|
|
|
|
|
|
|
|
predefinedSetList.add(new PredefinedSet("EMPTY", "공백").offLog());
|
|
|
|
|
|
|
|
return predefinedSetList;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|