외주요청파일 다운로드 이력 추가

main
이범준 7 months ago
parent 4973573616
commit 9455c48e64

@ -10,6 +10,7 @@ import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@ -38,6 +39,34 @@ public class OutsourcingFileMaker {
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() {
Map<String, Object> result = new HashMap<>();
@ -225,7 +254,8 @@ public class OutsourcingFileMaker {
resultZipFilePath = zipFilePath;
result.put("download", this.getDownloadable().setFilename(zipFileName));
result.put("downloadData", data);
result.put("dataNames", this.filterDownloadDataNames());
} catch (IOException e) {
throw new RuntimeException("외주파일생성 중 오류가 발생하였습니다.");
}
@ -250,4 +280,37 @@ public class OutsourcingFileMaker {
.setContentType("application/zip")
.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;
}
}

@ -10,7 +10,17 @@ public class PredefinedSet {
public PredefinedSet(String artclNm, String artclDscrp) {
this.artclNm = artclNm;
this.artclDscrp = artclDscrp;
this.downloadData = true;
}
protected String artclNm;
protected String artclDscrp;
protected boolean downloadData; //다운로드 이력 기재 항목 여부
/**
* .
*/
public PredefinedSet offLog() {
this.downloadData = false;
return this;
}
private String artclNm;
private String artclDscrp;
}

@ -30,7 +30,7 @@ public class DefaultOtptArtclStng extends PredefinedSet {
this.forPost = false;
this.unique = false;
this.downloadData = true;
}
/**
@ -59,9 +59,7 @@ public class DefaultOtptArtclStng extends PredefinedSet {
return this;
}
/**
* .
*/
@Override
public DefaultOtptArtclStng offLog() {
this.downloadData = false;
return this;
@ -129,7 +127,7 @@ public class DefaultOtptArtclStng extends PredefinedSet {
private String otptBscVl; //기본값
private boolean unique; //출력물 내 유일 요소 여부
private boolean forPost; //우편물 관련 요소 여부
private boolean downloadData; //다운로드 이력 기재 항목 여부
private Pstn a4; //A4 위치값
private Pstn letter; //레터 위치값

@ -42,6 +42,7 @@ public abstract class PDFPrintFormat {
protected List<DataObject> otptArtclStngList;
protected String paperSeCd;
protected float[] paperMilimeter = new float[2];
protected List<DefaultOtptArtclStng> prototypeStngs = new ArrayList<DefaultOtptArtclStng>();
public abstract void initDefaultStng();
@ -89,8 +90,6 @@ public abstract class PDFPrintFormat {
};
protected List<DefaultOtptArtclStng> prototypeStngs = new ArrayList<DefaultOtptArtclStng>();
/**
* .
*/

@ -11,6 +11,7 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.fims.cmmn.OutsourcingArtclStng;
import cokr.xit.fims.cmmn.OutsourcingFileMaker;
import cokr.xit.fims.cmmn.OutsourcingForm;
import cokr.xit.fims.cmmn.OutsourcingStngQuery;
import cokr.xit.fims.cmmn.PredefinedSet;
@ -33,36 +34,8 @@ public class OutsourcingStngBean extends AbstractComponent {
public Map<String, Object> getArtclStngMap(OutsourcingStngQuery query) {
Map<String,Object> outsourcingStngMap = new HashMap<String,Object>();
List<PredefinedSet> predefinedSetList = new ArrayList<>();
predefinedSetList.add(new PredefinedSet("SNDNG_DTL_ID", "발송상세아이디"));
predefinedSetList.add(new PredefinedSet("VLTN_LAW_NM", "위반법명"));
predefinedSetList.add(new PredefinedSet("BARCODE", "바코드"));
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"));
predefinedSetList.add(new PredefinedSet("OCR0_1", "OCR0_1"));
predefinedSetList.add(new PredefinedSet("OCR0_2", "OCR0_2"));
predefinedSetList.add(new PredefinedSet("OCR_BAND1", "OCR_BAND1"));
predefinedSetList.add(new PredefinedSet("OCR_BAND2", "OCR_BAND2"));
predefinedSetList.add(new PredefinedSet("BANK_NM", "가상계좌은행명"));
predefinedSetList.add(new PredefinedSet("VR_ACTNO", "가상계좌"));
predefinedSetList.add(new PredefinedSet("EPAYNO", "전자납부번호"));
predefinedSetList.add(new PredefinedSet("EMPTY", "공백"));
outsourcingStngMap.put("predefinedSetList", predefinedSetList);
List<PredefinedSet> predefinedSetList = OutsourcingFileMaker.predifinedSetForOutsourcing();
outsourcingStngMap.put("predefinedSetList", OutsourcingFileMaker.predifinedSetForOutsourcing());
//
List<DataObject> outsourcingArtclStngList = outsourcingStngMapper.selectArtclStngList(query);

Loading…
Cancel
Save