이지우 - 관리자 > 성인찾교 > 신청,배치 목록 엑셀다운로드 항목 추가
This commit is contained in:
parent
f3142d00ce
commit
04e46b65d3
@ -101,8 +101,8 @@ public class ExcelUtil {
|
||||
for (Method method : methods) { // vo 내부 메소드 반복
|
||||
|
||||
// System.out.println("i :: "+ i + "methods : "+ methods);
|
||||
System.out.println("voList.method()");
|
||||
System.out.println(method.getName());
|
||||
/*System.out.println("voList.method()");
|
||||
System.out.println(method.getName());*/
|
||||
|
||||
if (method.getName().equals("get" + (order[i] == null ? "" : order[i]))) { // vo메소드 이름과 order의 이름 비교
|
||||
// getter 호출 준비
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
package kcc.kccadr.cmm;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.DayOfWeek;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
@ -110,5 +112,35 @@ public class CmmUtil {
|
||||
|
||||
return result;
|
||||
}
|
||||
//YYYY.MM.DD 타입 월, 일 return
|
||||
public static String getMonth(String source) {
|
||||
String result = "";
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd");
|
||||
|
||||
try {
|
||||
Date date = dateFormat.parse(source);
|
||||
|
||||
SimpleDateFormat monthFormat = new SimpleDateFormat("MM");
|
||||
result = monthFormat.format(date);
|
||||
}catch (Exception ex) {
|
||||
System.out.println("month: " + ex.getMessage());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
public static String getDay(String source) {
|
||||
String result = "";
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd");
|
||||
|
||||
try {
|
||||
Date date = dateFormat.parse(source);
|
||||
|
||||
SimpleDateFormat dayFormat = new SimpleDateFormat("dd");
|
||||
result = dayFormat .format(date);
|
||||
}catch (Exception ex) {
|
||||
System.out.println("day: " + ex.getMessage());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -445,6 +445,12 @@ public class VEEduAplctVO extends ComDefaultVO implements Serializable {
|
||||
public String eduMdCd; //교육매체 코드
|
||||
public String feeInsttCd; //강사료지급기관코드
|
||||
|
||||
private String eduHopeMonth; //희망일자(월)
|
||||
private String eduHopeDay; //희망일자(일)
|
||||
private String instrEmail; //강사이메일
|
||||
private String apptDiv; //강사구분
|
||||
|
||||
|
||||
|
||||
public String getSpecialWorkAllow() {
|
||||
return specialWorkAllow;
|
||||
@ -1959,6 +1965,30 @@ public class VEEduAplctVO extends ComDefaultVO implements Serializable {
|
||||
public void setFeeInsttCd(String feeInsttCd) {
|
||||
this.feeInsttCd = feeInsttCd;
|
||||
}
|
||||
public String getEduHopeMonth() {
|
||||
return eduHopeMonth;
|
||||
}
|
||||
public void setEduHopeMonth(String eduHopeMonth) {
|
||||
this.eduHopeMonth = eduHopeMonth;
|
||||
}
|
||||
public String getEduHopeDay() {
|
||||
return eduHopeDay;
|
||||
}
|
||||
public void setEduHopeDay(String eduHopeDay) {
|
||||
this.eduHopeDay = eduHopeDay;
|
||||
}
|
||||
public String getInstrEmail() {
|
||||
return instrEmail;
|
||||
}
|
||||
public void setInstrEmail(String instrEmail) {
|
||||
this.instrEmail = instrEmail;
|
||||
}
|
||||
public String getApptDiv() {
|
||||
return apptDiv;
|
||||
}
|
||||
public void setApptDiv(String apptDiv) {
|
||||
this.apptDiv = apptDiv;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -441,6 +441,7 @@ public class EduAplctMngAdultController {
|
||||
vEEduAplctVO.setMode(VeConstants.MODE_EXCEL);
|
||||
List<VEEduAplctVO> list = vEEduMIXService.selectPagingList(vEEduAplctVO);
|
||||
list = egovCryptoUtil.decryptVEEduAplctVOList(list);
|
||||
int[] rowNo = {1};
|
||||
list.forEach( vo -> {
|
||||
ComDefaultCodeVO codeParam = new ComDefaultCodeVO();
|
||||
codeParam.setCodeId("VE0008");
|
||||
@ -463,26 +464,54 @@ public class EduAplctMngAdultController {
|
||||
codeParam.setCode(vo.getInsttDivCd());
|
||||
vo.setInsttDivCd(egovCmmUseService.selectCmmCodeDetailCodeValue(codeParam));
|
||||
|
||||
codeParam.setCodeId("VEA015");
|
||||
codeParam.setCode(vo.getEduMdCd());
|
||||
if("99".equals(vo.getEduMdCd())) {
|
||||
vo.setEduMdCd(vo.getEduMd());
|
||||
}else {
|
||||
vo.setEduMdCd(egovCmmUseService.selectCmmCodeDetailCodeValue(codeParam));
|
||||
}
|
||||
|
||||
vo.setEduHopeDt(CmmUtil.getStrDateFormat(vo.getEduHopeDt()));
|
||||
vo.setEduHopeMonth(CmmUtil.getMonth(vo.getEduHopeDt()));
|
||||
vo.setEduHopeDay(CmmUtil.getDay(vo.getEduHopeDt()));
|
||||
vo.setEduHopeDtDayOfWeek(CmmUtil.getStrDayOfWeek(vo.getEduHopeDt()));
|
||||
|
||||
if(vo.getAddr() == null) {
|
||||
vo.setAddr("");
|
||||
}
|
||||
if(vo.getAddrDetail() == null) {
|
||||
vo.setAddrDetail("");
|
||||
}
|
||||
vo.setAddr(vo.getAddr() + " " + vo.getAddrDetail());
|
||||
|
||||
vo.setStrtTm(vo.getStrtTm()+ " ~ " + vo.getEndTm());
|
||||
|
||||
vo.setEduAplctOrd(String.valueOf(rowNo[0]++));
|
||||
});
|
||||
List<Object> excelData = new ArrayList<>();
|
||||
excelData.addAll(list);
|
||||
// 세팅값
|
||||
String title = "성인 찾아가는 저작권 교육 - 교육신청 목록";
|
||||
String title = "성인대상 찾아가는 저작권 교육 관리 대장 - 신청목록";
|
||||
int[] width = {
|
||||
4000, 4000, 4000, 4000, 4000
|
||||
, 4000, 4000, 4000, 4000, 4000, 4000
|
||||
, 4000, 4000, 4000, 4000, 4000, 4000, 4000
|
||||
, 4000, 4000, 4000, 4000, 4000, 4000, 4000
|
||||
, 4000, 4000
|
||||
}; // 너비
|
||||
|
||||
String[] header = {
|
||||
"교육일자", "신청일자", "신청유형", "기관(단체)명", "기관구분"
|
||||
, "신청자", "연락처", "휴대전화", "E-mail", "주소", "신청상태"
|
||||
"STAGE", "NO", "월", "일", "요일"
|
||||
, "날짜", "지역", "신청기관", "온/오프라인", "교육수단", "교육대상"
|
||||
, "교육시간", "분", "총인원", "교육내용", "담당자", "연락처1", "연락처2"
|
||||
, "E-mail", "교육장소"
|
||||
};
|
||||
|
||||
String[] order = {
|
||||
"EduHopeDt", "SbmtPnttm", "EduSlctCd", "InsttNm", "InsttDivCd"
|
||||
, "ChrgNm", "Phone", "Clphone", "Email", "Addr", "AprvlCd"
|
||||
"InsttDivCd", "EduAplctOrd", "EduHopeMonth", "EduHopeDay", "EduHopeDtDayOfWeek"
|
||||
, "EduHopeDt", "EduSlctAreaCd", "InsttNm", "EduSlctCd", "EduMdCd", "EduTrgt"
|
||||
, "StrtTm", "LrnTm", "EduPrsnl", "HopeSbjct", "ChrgNm", "Phone", "Clphone"
|
||||
, "Email", "Addr"
|
||||
};
|
||||
|
||||
// 호출
|
||||
|
||||
@ -804,7 +804,7 @@ public class EduCnfrmMngAdultController {
|
||||
list.get(i).setUserId(vVo.getUserId());
|
||||
list.get(i).setChrgNm(vVo.getChrgNm());
|
||||
}
|
||||
|
||||
int[] rowNo = {1};
|
||||
list.forEach( vo -> {
|
||||
ComDefaultCodeVO codeParam = new ComDefaultCodeVO();
|
||||
|
||||
@ -843,31 +843,82 @@ public class EduCnfrmMngAdultController {
|
||||
codeParam.setCode(vo.getAsgnmAprvlCd());
|
||||
vo.setAsgnmAprvlCd(cmmUseService.selectCmmCodeDetailCodeValue(codeParam));
|
||||
|
||||
//강의구분
|
||||
codeParam.setCodeId("VE0012");
|
||||
codeParam.setCode(vo.getInsttDivCd());
|
||||
vo.setInsttDivCd(cmmUseService.selectCmmCodeDetailCodeValue(codeParam));
|
||||
|
||||
//강사구분
|
||||
codeParam.setCodeId("VE0018");
|
||||
codeParam.setCode(vo.getApptDiv());
|
||||
vo.setApptDiv(cmmUseService.selectCmmCodeDetailCodeValue(codeParam));
|
||||
|
||||
codeParam.setCodeId("VEA015");
|
||||
codeParam.setCode(vo.getEduMdCd());
|
||||
if("99".equals(vo.getEduMdCd())) {
|
||||
vo.setEduMdCd(vo.getEduMd());
|
||||
}else {
|
||||
vo.setEduMdCd(cmmUseService.selectCmmCodeDetailCodeValue(codeParam));
|
||||
}
|
||||
|
||||
vo.setEduHopeMonth(CmmUtil.getMonth(vo.getEduHopeDt()));
|
||||
vo.setEduHopeDay(CmmUtil.getDay(vo.getEduHopeDt()));
|
||||
vo.setEduHopeDtDayOfWeek(CmmUtil.getStrDayOfWeek(vo.getEduHopeDt()));
|
||||
|
||||
if(vo.getAddr() == null) {
|
||||
vo.setAddr("");
|
||||
}
|
||||
if(vo.getAddrDetail() == null) {
|
||||
vo.setAddrDetail("");
|
||||
}
|
||||
vo.setAddr(vo.getAddr() + " " + vo.getAddrDetail());
|
||||
|
||||
vo.setStrtTm(vo.getStrtTm()+ " ~ " + vo.getEndTm());
|
||||
|
||||
vo.setEduAplctOrd(String.valueOf(rowNo[0]++));
|
||||
|
||||
|
||||
if(Integer.parseInt(vo.getQustnrRsltCnt()) > 0) {
|
||||
vo.setQustnrRsltCnt("제출");
|
||||
}else {
|
||||
vo.setQustnrRsltCnt("미제출");
|
||||
}
|
||||
});
|
||||
|
||||
List<Object> excelData = new ArrayList<>();
|
||||
excelData.addAll(list);
|
||||
// 세팅값
|
||||
String title = "교육배치 목록";
|
||||
String title = "성인대상 찾아가는 저작권 교육 관리 대장 - 배치목록";
|
||||
|
||||
// 너비
|
||||
int[] width = {
|
||||
4000, 3000, 3000, 4000, 4000
|
||||
, 8000, 4000, 4000, 4000
|
||||
4000, 4000, 4000, 4000, 4000
|
||||
, 4000, 4000, 4000, 4000, 4000, 4000, 4000
|
||||
, 4000, 4000, 4000, 4000, 4000, 4000, 4000
|
||||
, 4000, 4000, 4000 , 4000 , 4000, 4000 , 4000
|
||||
};
|
||||
|
||||
// 헤더
|
||||
|
||||
String[] header = {
|
||||
"교육희망일자", "요일", "시간", "온·오프라인", "지역"
|
||||
, "기관(학교)명", "교육대상", "강사명", "확정여부"
|
||||
"STAGE", "NO", "월", "일", "요일"
|
||||
, "날짜", "지역", "신청기관", "온/오프라인", "교육수단", "교육대상"
|
||||
, "교육시간", "분", "총인원", "교육내용", "담당자", "연락처1", "연락처2"
|
||||
, "E-mail", "교육장소", "강사", "구분", "E-mail", "연락처", "만족도"
|
||||
};
|
||||
|
||||
// 컬럼명
|
||||
String[] order = {
|
||||
/* String[] order = {
|
||||
"EduHopeDt", "EduHopeDtDayOfWeek", "Chasi", "EduSlctCd", "EduSlctAreaCd"
|
||||
, "InsttNm", "Trgt", "InstrNm", "AsgnmAprvlCd"
|
||||
};*/
|
||||
String[] order = {
|
||||
"InsttDivCd", "EduAplctOrd", "EduHopeMonth", "EduHopeDay", "EduHopeDtDayOfWeek"
|
||||
, "EduHopeDt", "EduSlctAreaCd", "InsttNm", "EduSlctCd", "EduMdCd", "EduTrgt"
|
||||
, "StrtTm", "LrnTm", "EduPrsnl", "HopeSbjct", "ChrgNm", "Phone", "Clphone"
|
||||
, "Email", "Addr", "InstrNm", "ApptDiv", "InstrEmail", "InstrPhone", "QustnrRsltCnt"
|
||||
};
|
||||
|
||||
|
||||
// 호출
|
||||
SXSSFWorkbook workbook = ExcelUtil.makeSimpleFruitExcelWorkbook(excelData , header, order, width, title);
|
||||
model.addAttribute("locale", Locale.KOREA);
|
||||
|
||||
@ -387,6 +387,7 @@
|
||||
, A.phone AS phone
|
||||
, A.Email AS email
|
||||
, A.Addr AS addr
|
||||
, A.Addr_Detail AS addrDetail
|
||||
, A.IS_WAIT AS isWait
|
||||
, A.CORPS_EDU AS corpsEdu
|
||||
, A.BROADROOM_EDU AS broadroomEdu
|
||||
@ -410,6 +411,8 @@
|
||||
, A.INSTT_DIV_CD AS insttDivCd
|
||||
, A.FRST_REGISTER_ID AS frstRegisterId
|
||||
, TO_CHAR(A.FRST_REGIST_PNTTM, 'YYYY.MM.DD') AS frstRegistPnttm
|
||||
, A.EDU_MD_CD AS eduMdCd
|
||||
, A.EDU_MD AS eduMd
|
||||
, A0.CNT-1 AS cnt
|
||||
, A0.PRCS_ORD AS prcsOrd
|
||||
, A0.PRCS_NM AS prcsNm
|
||||
@ -2364,6 +2367,10 @@
|
||||
a.edu_trgt AS eduTrgt ,
|
||||
a.clphone AS clphone ,
|
||||
a.email AS email ,
|
||||
a.hope_sbjct AS hopeSbjct,
|
||||
a.phone AS phone,
|
||||
a.edu_md AS eduMd,
|
||||
a.edu_md_cd AS eduMdCd,
|
||||
b.edu_chasi_ord AS eduChasiOrd ,
|
||||
b.lrn_tm AS lrnTm ,
|
||||
b.edu_hope_dt AS eduHopeDt ,
|
||||
@ -2378,6 +2385,9 @@
|
||||
d.user_id AS userId ,
|
||||
d.asgnm_aprvl_cd AS asgnmAprvlCd,
|
||||
e.instr_nm AS instrNm,
|
||||
e.phone AS instrPhone,
|
||||
e.email AS instrEmail,
|
||||
e.appt_div AS apptDiv,
|
||||
g.atch_file_id AS atchFileId,
|
||||
g.APRVL_CD AS acmdtAprvlCd,
|
||||
d.rmrks AS rmrks,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user