2023-12-11 16:53 교육확정관리 작업

This commit is contained in:
myname 2023-12-11 16:53:14 +09:00
parent 1171584ce7
commit 882125af1f
14 changed files with 3900 additions and 2654 deletions

View File

@ -602,6 +602,7 @@ public class EgovCryptoUtil {
for(VEPrcsDetailVO vo : vEPrcsDetailVOList) {
vo.setInstrNm(this.decrypt(vo.getInstrNm()));
vo.setInstrPhone(this.decrypt(vo.getInstrPhone()));
}
// TODO Auto-generated method stub

View File

@ -176,7 +176,7 @@ public class VeInstrFeeMng {
return vEInstrFeeAcmdtVO;
}
//성인강사용 강사료 계산+기반+기소
//성인강사용 강사료 계산
public VEInstrFeeAcmdtVO VeInstrFeeMng4Adult(VEInstrFeeService vEInstrFeeService , String eduAplctOrd, String eduChasiOrd) throws Exception {
// 강사료
@ -384,6 +384,214 @@ public class VeInstrFeeMng {
// 세금 합계 -> 세금 제거 요청으로 제거
// int taxSum = Integer.parseInt(vEInstrFeeAcmdtVO.getIncomeTax())
// + Integer.parseInt(vEInstrFeeAcmdtVO.getLocalIncomeTax());
// vEInstrFeeAcmdtVO.setTaxSum(taxSum);
// 강사료 합계-세금 합계
// int totalSum = instrFeeSum - taxSum;
return vEInstrFeeAcmdtVO;
}
//기반, 기소유예 강사료 계산
public VEInstrFeeAcmdtVO VeInstrFeeMng4Fndth(VEInstrFeeService vEInstrFeeService , String eduAplctOrd, String eduChasiOrd) throws Exception {
// 강사료
VEInstrFeeAcmdtVO infoVO = new VEInstrFeeAcmdtVO();
infoVO.setEduAplctOrd(eduAplctOrd);
infoVO.setEduChasiOrd(eduChasiOrd);
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = vEInstrFeeService.selectDetail4Fndth(infoVO);
if(vEInstrFeeAcmdtVO.getInstrFeeOrd() == null) {
/*
* 강사료 계산 정리
* 강사료 계산 : 기본요금 * 차시 수량
* 도서벽지수당 : 오프라인 교육이며 AND 교육지역이 도서벽지에 해당이 되면 기본 15,000원 * 차시 수량
* 교통비 : 왕복 거리 * 160원
*
* */
// 강사료 계산 (강의차시 * 강사 기본값)
//성인은 구분에 따라 강사료가 다르다
String s_divCd = vEInstrFeeAcmdtVO.getDivCd();
//int i_lrnTm = Integer.parseInt(selectChasiList.get(0).getLrnTm());
int i_lrnTm = 0; //기소유예, 기반강화는 교육시간을 알수 없어서 추가 교육 시간 강사비용 계산이 안됨
System.out.println(" @@@@@@@@@@@@@@@@@@@@@@ divCd : "+s_divCd);
System.out.println(" @@@@@@@@@@@@@@@@@@@@@@ lrnTm : "+i_lrnTm);
/*
* (금액기준)
10,60)입문은 시간당 150,000원(최초3시간까지, 이후 시간당 75,000원) - 2급
20,50)전문은 시간당 200,000원(최초3시간까지, 이후 시간당 100,000원) - 1급
30)내부는 시간당 100,000원(최초3시간까지, 이후 시간당 50,000원)
50)1급은 전문과 동일
60)2급은 입문과 동일
40)청년은 청년강사만 해당
*/
int instrFee = 0;
if ("10".equals(s_divCd) || "60".equals(s_divCd)) {
instrFee = instrFee + Integer.parseInt(VeConstants.BASE_INSTR_FEE_A10);
}else if ("20".equals(s_divCd) || "50".equals(s_divCd)) {
instrFee = instrFee + Integer.parseInt(VeConstants.BASE_INSTR_FEE_A20);
}else { //maybe 30
instrFee = instrFee + Integer.parseInt(VeConstants.BASE_INSTR_FEE_A30);
}
i_lrnTm = i_lrnTm - 180; //기본 시간제외
//나머지 시간에 대한 강사 비용추가
while(i_lrnTm>0) { //비용 정산을 위한 시간이 남았음
//구분에 따라서 추가 비용 지급
if ("10".equals(s_divCd) || "60".equals(s_divCd)) {
instrFee = instrFee + Integer.parseInt(VeConstants.BASE_INSTR_FEE_A10_A);
}else if ("20".equals(s_divCd) || "50".equals(s_divCd)) {
instrFee = instrFee + Integer.parseInt(VeConstants.BASE_INSTR_FEE_A20_A);
}else { //maybe 30
instrFee = instrFee + Integer.parseInt(VeConstants.BASE_INSTR_FEE_A30_A);
}
i_lrnTm = i_lrnTm - 180; //기본 시간제외
}
//int instrFee = Integer.parseInt(vEInstrFeeAcmdtVO.getChasi()) * Integer.parseInt(VeConstants.BASE_INSTR_FEE);
System.out.println(" @@@@@@@@@@@@@@@@@@@@@@ instrFee : "+instrFee);
vEInstrFeeAcmdtVO.setInstrFee(Integer.toString(instrFee));
}
// 강사료 합계
int instrFeeSum = Integer.parseInt(vEInstrFeeAcmdtVO.getInstrFee())
+ Integer.parseInt(vEInstrFeeAcmdtVO.getSpecialWorkAllow())
+ Integer.parseInt(vEInstrFeeAcmdtVO.getDistanceAllow())
+ Integer.parseInt(vEInstrFeeAcmdtVO.getTrafficFee())
+ Integer.parseInt(vEInstrFeeAcmdtVO.getFoodExpenses())
// + Integer.parseInt(vEInstrFeeAcmdtVO.getAcmdtFee())
;
if ("Y".equals(vEInstrFeeAcmdtVO.getSbmtYn())) {
//vEInstrFeeAcmdtVO.setInstrFeeSum(instrFeeSum);
}
vEInstrFeeAcmdtVO.setInstrFeeSum(instrFeeSum);
// 세금 합계 -> 세금 제거 요청으로 제거
// int taxSum = Integer.parseInt(vEInstrFeeAcmdtVO.getIncomeTax())
// + Integer.parseInt(vEInstrFeeAcmdtVO.getLocalIncomeTax());
// vEInstrFeeAcmdtVO.setTaxSum(taxSum);
// 강사료 합계-세금 합계
// int totalSum = instrFeeSum - taxSum;
return vEInstrFeeAcmdtVO;
}
//기반, 기소유예 강사료 계산
public VEInstrFeeAcmdtVO VeInstrFeeMng4Fndth4Excel(VEInstrFeeService vEInstrFeeService , String eduAplctOrd, String eduChasiOrd) throws Exception {
// 강사료
VEInstrFeeAcmdtVO infoVO = new VEInstrFeeAcmdtVO();
infoVO.setEduAplctOrd(eduAplctOrd);
infoVO.setEduChasiOrd(eduChasiOrd);
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = vEInstrFeeService.selectDetail4Fndth(infoVO);
if(vEInstrFeeAcmdtVO.getInstrFeeOrd() == null) {
/*
* 강사료 계산 정리
* 강사료 계산 : 기본요금 * 차시 수량
* 도서벽지수당 : 오프라인 교육이며 AND 교육지역이 도서벽지에 해당이 되면 기본 15,000원 * 차시 수량
* 교통비 : 왕복 거리 * 160원
*
* */
// 강사료 계산 (강의차시 * 강사 기본값)
//성인은 구분에 따라 강사료가 다르다
String s_divCd = vEInstrFeeAcmdtVO.getDivCd();
//int i_lrnTm = Integer.parseInt(selectChasiList.get(0).getLrnTm());
int i_lrnTm = 0; //기소유예, 기반강화는 교육시간을 알수 없어서 추가 교육 시간 강사비용 계산이 안됨
System.out.println(" @@@@@@@@@@@@@@@@@@@@@@ divCd : "+s_divCd);
System.out.println(" @@@@@@@@@@@@@@@@@@@@@@ lrnTm : "+i_lrnTm);
/*
* (금액기준)
10,60)입문은 시간당 150,000원(최초3시간까지, 이후 시간당 75,000원) - 2급
20,50)전문은 시간당 200,000원(최초3시간까지, 이후 시간당 100,000원) - 1급
30)내부는 시간당 100,000원(최초3시간까지, 이후 시간당 50,000원)
50)1급은 전문과 동일
60)2급은 입문과 동일
40)청년은 청년강사만 해당
*/
int instrFee = 0;
if ("10".equals(s_divCd) || "60".equals(s_divCd)) {
instrFee = instrFee + Integer.parseInt(VeConstants.BASE_INSTR_FEE_A10);
}else if ("20".equals(s_divCd) || "50".equals(s_divCd)) {
instrFee = instrFee + Integer.parseInt(VeConstants.BASE_INSTR_FEE_A20);
}else { //maybe 30
instrFee = instrFee + Integer.parseInt(VeConstants.BASE_INSTR_FEE_A30);
}
i_lrnTm = i_lrnTm - 180; //기본 시간제외
//나머지 시간에 대한 강사 비용추가
while(i_lrnTm>0) { //비용 정산을 위한 시간이 남았음
//구분에 따라서 추가 비용 지급
if ("10".equals(s_divCd) || "60".equals(s_divCd)) {
instrFee = instrFee + Integer.parseInt(VeConstants.BASE_INSTR_FEE_A10_A);
}else if ("20".equals(s_divCd) || "50".equals(s_divCd)) {
instrFee = instrFee + Integer.parseInt(VeConstants.BASE_INSTR_FEE_A20_A);
}else { //maybe 30
instrFee = instrFee + Integer.parseInt(VeConstants.BASE_INSTR_FEE_A30_A);
}
i_lrnTm = i_lrnTm - 180; //기본 시간제외
}
//int instrFee = Integer.parseInt(vEInstrFeeAcmdtVO.getChasi()) * Integer.parseInt(VeConstants.BASE_INSTR_FEE);
System.out.println(" @@@@@@@@@@@@@@@@@@@@@@ instrFee : "+instrFee);
vEInstrFeeAcmdtVO.setInstrFee(Integer.toString(instrFee));
}
// 강사료 합계
int instrFeeSum = Integer.parseInt(vEInstrFeeAcmdtVO.getInstrFee())
+ Integer.parseInt(vEInstrFeeAcmdtVO.getSpecialWorkAllow())
+ Integer.parseInt(vEInstrFeeAcmdtVO.getDistanceAllow())
+ Integer.parseInt(vEInstrFeeAcmdtVO.getTrafficFee())
+ Integer.parseInt(vEInstrFeeAcmdtVO.getFoodExpenses())
// + Integer.parseInt(vEInstrFeeAcmdtVO.getAcmdtFee())
;
if ("Y".equals(vEInstrFeeAcmdtVO.getSbmtYn())) {
vEInstrFeeAcmdtVO.setInstrFeeSum(instrFeeSum);
}
//vEInstrFeeAcmdtVO.setInstrFeeSum(instrFeeSum);
// 세금 합계 -> 세금 제거 요청으로 제거
// int taxSum = Integer.parseInt(vEInstrFeeAcmdtVO.getIncomeTax())
// + Integer.parseInt(vEInstrFeeAcmdtVO.getLocalIncomeTax());
// vEInstrFeeAcmdtVO.setTaxSum(taxSum);
// 강사료 합계-세금 합계

View File

@ -10,6 +10,9 @@ public interface VEInstrFeeService {
//R
VEInstrFeeAcmdtVO selectDetail(VEInstrFeeAcmdtVO paramVO) throws Exception;
//기소, 기반 전용 강사료 계산
VEInstrFeeAcmdtVO selectDetail4Fndth(VEInstrFeeAcmdtVO paramVO) throws Exception;
//U
int update(VEInstrFeeAcmdtVO paramVO) throws Exception;

View File

@ -29,6 +29,11 @@ public class VEInstrFeeDAO extends EgovAbstractDAO {
return (VEInstrFeeAcmdtVO) select("VEInstrFeeDAO.selectDetail", paramVO);
}
public VEInstrFeeAcmdtVO selectDetail4Fndth(VEInstrFeeAcmdtVO paramVO) throws Exception {
return (VEInstrFeeAcmdtVO) select("VEInstrFeeDAO.selectDetail4Fndth", paramVO);
}
/**
* 수정 - U
* @param VEPrcsDetailVO

View File

@ -34,6 +34,10 @@ public class VEInstrFeeServiceImpl implements VEInstrFeeService {
return vEInstrFeeDAO.selectDetail(paramVO);
}
public VEInstrFeeAcmdtVO selectDetail4Fndth(VEInstrFeeAcmdtVO paramVO) throws Exception {
return vEInstrFeeDAO.selectDetail4Fndth(paramVO);
}
//U
public int update(VEInstrFeeAcmdtVO paramVO) throws Exception{
return vEInstrFeeDAO.update(paramVO);

View File

@ -1,22 +1,28 @@
package kcc.ve.oprtn.cndtnSspnIdtmt.web;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import kcc.com.cmm.ComDefaultCodeVO;
import kcc.com.cmm.service.EgovFileMngService;
import kcc.com.cmm.service.EgovFileMngUtil;
import kcc.com.cmm.service.impl.CmmUseDAO;
import kcc.com.cmm.spring.data.util.ExcelUtil;
import kcc.com.utl.user.service.CheckLoginUtil;
import kcc.let.utl.fcc.service.EgovCryptoUtil;
import kcc.ve.cmm.VeInstrFeeMng;
@ -257,7 +263,8 @@ public class CndtnInstrMngController {
//@RequestMapping("eduInstrFeeMngList.do")
@RequestMapping("/kccadr/oprtn/cndtnSspnIdtmt/eduInstrFeeMngList.do")
public String eduInstrFeeMngList(
@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO
//@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO
@ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO
, ModelMap model
) throws Exception {
@ -270,58 +277,95 @@ public class CndtnInstrMngController {
//로그인 처리====================================
try {
//담당자 검색 이름 암호화
if("2".equals(vEEduAplctVO.getSearchCondition())) {
vEEduAplctVO.setSearchKeyword(egovCryptoUtil.encrypt(vEEduAplctVO.getSearchKeyword()));
}
model.addAttribute("cryptoUtil", egovCryptoUtil);
//로그인 처리====================================
//로그인 정보 가져오기
String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model);
if (!"".equals(s_oprtnLoginCheckNInfo)) return s_oprtnLoginCheckNInfo;
//로그인 처리====================================
//1.pageing step1
PaginationInfo paginationInfo = this.setPagingStep1_vEEduAplctVO(vEEduAplctVO);
PaginationInfo paginationInfo = this.setPagingStep1(vEPrcsDetailVO);
//임시로 페이징 처리를 안하기 위해서 RecordCountPerPage 수를 10000 으로 셋팅함
//paginationInfo.setRecordCountPerPage(10000);
//2. pageing step2
vEEduAplctVO = this.setPagingStep2_vEEduAplctVO(vEEduAplctVO, paginationInfo);
//vEEduAplctVO.setLctrDivCd("30"); // 저작권 체험교실 코드
vEEduAplctVO.setInstrDiv("60"); // 10-청소년, 20-성인, 30-체험, 40-외부, 50-기반, 60-기소
vEEduAplctVO.setLctrDivCd("60"); // 10-청소년, 20-성인, 30-체험, 40-외부, 50-기반, 60-기소
vEEduAplctVO.setAprvlCd("60");
vEEduAplctVO.setAsgnmAprvlCd("30"); //강사배정 교육승인
// vEEduAplctVO.setSearchSubmitYn("Y"); //제출에 대한 강사료 확정 여부
vEEduAplctVO.setSearchAsgnmAprvlCd("30");
vEEduAplctVO.setSearchTableJoin("tngrResult");
vEPrcsDetailVO = this.setPagingStep2(vEPrcsDetailVO, paginationInfo);
System.out.println("11111111111111113");
vEEduAplctVO = egovCryptoUtil.encryptVEEduAplctVOInfo(vEEduAplctVO);
List<VEEduAplctVO> vEEduAplctVOList = vEEduMIXService.selectTngrFeePagingList(vEEduAplctVO);
VEEduAplctVO vo = new VEEduAplctVO();
for(int i=0; i < vEEduAplctVOList.size(); i++) {
vo = egovCryptoUtil.decryptVEEduAplctVOInfo(vEEduAplctVOList.get(i));
System.out.println(" @@@@@@@@@@@@@ "+vo.getChrgNm());
vEEduAplctVOList.get(i).setChrgNm(vo.getChrgNm());
// 강사료 계산
VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng();
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = veInstrFeeMng.VeInstrFeeMng4Adult(vEInstrFeeService, vEEduAplctVOList.get(i).getEduAplctOrd(), vEEduAplctVOList.get(i).getEduChasiOrd());
vEEduAplctVOList.get(i).setInstrFeeSum(Integer.toString(vEInstrFeeAcmdtVO.getInstrFeeSum()));
//기반강화 조회
vEPrcsDetailVO.setLctrDivCd("60"); //강의구분코드 VE0011 10-청소년강의, 20-성인강의, 30-체험, 50-기반강화, 60-조건부
//교육확정 목록 조회
vEPrcsDetailVO.setDdlnCd("20");
//정렬
System.out.println(vEPrcsDetailVO.getSearchSortCnd());
System.out.println(vEPrcsDetailVO.getSearchSortOrd());
if(!"".equals(vEPrcsDetailVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
vEPrcsDetailVO.setOrderByQuery(vEPrcsDetailVO.getSearchSortCnd() + " " +vEPrcsDetailVO.getSearchSortOrd());
}
System.out.println("11111111111111112");
//강사명 검색시 암호화
if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) {
vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.encrypt(vEPrcsDetailVO.getSrchKwd3_1()));
}
List<VEPrcsDetailVO> vEPrcsDetailVOList = vEPrcsMIXService.selectPagingList4FndthInstr(vEPrcsDetailVO);
//강사명 검색시 복호화
if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) {
vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.decrypt(vEPrcsDetailVO.getSrchKwd3_1()));
}
//3.pageing step3
paginationInfo = this.setPagingStep3_vEEduAplctVO(vEEduAplctVOList, paginationInfo);
paginationInfo = this.setPagingStep3(vEPrcsDetailVOList, paginationInfo);
model.addAttribute("paginationInfo", paginationInfo);
// 지정된 강사가 있는지 확인
vEPrcsDetailVOList.stream().forEach(t->{
List<VEAPrcsAplctPrdInstrAsgnmVO> vEAPrcsAplctPrdInstrAsgnmList = vEAPrcsAplctPrdInstrAsgnmService.findByPrcsAplctPrdOrd(t.getPrcsAplctPrdOrd());
if(vEAPrcsAplctPrdInstrAsgnmList.size() > 0) {
t.setInstrCnt(Integer.toString(vEAPrcsAplctPrdInstrAsgnmList.size()));
}
});
// 강사료 계산
//vEEduAplctVO = egovCryptoUtil.encryptVEEduAplctVOInfo(vEEduAplctVO);
//List<VEEduAplctVO> vEEduAplctVOList = vEEduMIXService.selectTngrFeePagingList(vEEduAplctVO);
VEEduAplctVO vo = new VEEduAplctVO();
for(int i=0; i < vEPrcsDetailVOList.size(); i++) {
//vo = egovCryptoUtil.decryptVEEduAplctVOInfo(vEEduAplctVOList.get(i));
//System.out.println(" @@@@@@@@@@@@@ "+vo.getChrgNm());
//vEEduAplctVOList.get(i).setChrgNm(vo.getChrgNm());
// 강사료 계산
VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng();
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = veInstrFeeMng.VeInstrFeeMng4Fndth(
vEInstrFeeService
, vEPrcsDetailVOList.get(i).getPrcsAplctPrdOrd()
, vEPrcsDetailVOList.get(i).getUserId()
);
vEPrcsDetailVOList.get(i).setInstrFeeSum(Integer.toString(vEInstrFeeAcmdtVO.getInstrFeeSum()));
System.out.println("vEPrcsDetailVOList.get(i).getInstrPhone()");
System.out.println(vEPrcsDetailVOList.get(i).getInstrPhone());
System.out.println(vEPrcsDetailVOList.get(i).getInstrPhone());
}
//대상 리스트, 페이징 정보 전달
model.addAttribute("list", vEEduAplctVOList);
System.out.println("1111111111111111");
//대상 리스트, 페이징 정보 전달
//model.addAttribute("resultList", vEEduAplctVOList);
vEPrcsDetailVOList = egovCryptoUtil.decryptvEPrcsDetailList(vEPrcsDetailVOList);
model.addAttribute("list", vEPrcsDetailVOList);
}catch(Exception ex) {
ex.printStackTrace();
}
@ -329,6 +373,130 @@ public class CndtnInstrMngController {
return "oprtn/cndtnSspnIdtmt/eduInstrFeeMngList";
}
/**
* 강사료 확정 처리 목록 Excel
* @param model
* @return
* @throws Exception
*/
@SuppressWarnings("rawtypes")
@RequestMapping(value = "/kccadr/oprtn/cndtnSspnIdtmt/eduInstrFeeExcelDownLoad.do")
public ModelAndView eduInstrFeeExcelDownLoad(
//@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO
@ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO
, ModelMap model) throws Exception {
//로그인 처리====================================
//로그인 정보 가져오기
//String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model);
//if (!"".equals(s_oprtnLoginCheckNInfo)) return s_oprtnLoginCheckNInfo;
//로그인 처리====================================
//1.pageing step1
PaginationInfo paginationInfo = this.setPagingStep1(vEPrcsDetailVO);
//임시로 페이징 처리를 안하기 위해서 RecordCountPerPage 수를 10000 으로 셋팅함
//paginationInfo.setRecordCountPerPage(10000);
//2. pageing step2
vEPrcsDetailVO = this.setPagingStep2(vEPrcsDetailVO, paginationInfo);
//기반강화 조회
vEPrcsDetailVO.setLctrDivCd("60"); //강의구분코드 VE0011 10-청소년강의, 20-성인강의, 30-체험, 50-기반강화, 60-조건부
//교육확정 목록 조회
vEPrcsDetailVO.setDdlnCd("20");
//정렬
System.out.println(vEPrcsDetailVO.getSearchSortCnd());
System.out.println(vEPrcsDetailVO.getSearchSortOrd());
if(!"".equals(vEPrcsDetailVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
vEPrcsDetailVO.setOrderByQuery(vEPrcsDetailVO.getSearchSortCnd() + " " +vEPrcsDetailVO.getSearchSortOrd());
}
//강사명 검색시 암호화
if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) {
vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.encrypt(vEPrcsDetailVO.getSrchKwd3_1()));
}
List<VEPrcsDetailVO> vEPrcsDetailVOList = vEPrcsMIXService.selectPagingList4FndthInstr(vEPrcsDetailVO);
//강사명 검색시 복호화
if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) {
vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.decrypt(vEPrcsDetailVO.getSrchKwd3_1()));
}
//3.pageing step3
paginationInfo = this.setPagingStep3(vEPrcsDetailVOList, paginationInfo);
model.addAttribute("paginationInfo", paginationInfo);
vEPrcsDetailVOList = egovCryptoUtil.decryptvEPrcsDetailList(vEPrcsDetailVOList);
VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng();
vEPrcsDetailVOList.forEach( vo -> {
ComDefaultCodeVO codeParam = new ComDefaultCodeVO();
try {
// 강사료 계산
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = veInstrFeeMng.VeInstrFeeMng4Fndth4Excel(vEInstrFeeService, vo.getPrcsAplctPrdOrd(), vo.getUserId());
vo.setInstrFeeSum(String.format("%,d", vEInstrFeeAcmdtVO.getInstrFeeSum()));
}
catch(Exception ex) {
System.out.println(ex.toString());
}
});
List<Object> excelData = new ArrayList<>();
excelData.addAll(vEPrcsDetailVOList);
// 세팅값
String title = "강사료 지급내역";
// 너비
int[] width = {
4000, 4000
, 4000, 4000, 4000
, 4000
};
// 헤더
String[] header = {
"교육일자", "과정명"
, "강사이름", "강사료", "교통비"
, "강사료 합계"
};
// 컬럼명
String[] order = {
"EduHopeDt", "PrcsNm"
, "InstrNm", "InstrFee", "TrafficFee"
, "InstrFeeSum"
};
// 호출
SXSSFWorkbook workbook = ExcelUtil.makeSimpleFruitExcelWorkbook(excelData , header, order, width, title);
model.addAttribute("locale", Locale.KOREA);
model.addAttribute("workbook", workbook);
model.addAttribute("workbookName", title);
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("excelDownloadView");
modelAndView.addObject(model);
return modelAndView;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//

View File

@ -1,25 +1,35 @@
package kcc.ve.oprtn.fndtnEnhanceTrn.prcsAplctPrdMng.web;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import kcc.com.cmm.ComDefaultCodeVO;
import kcc.com.cmm.LoginVO;
import kcc.com.cmm.service.EgovCmmUseService;
import kcc.com.cmm.service.EgovFileMngService;
import kcc.com.cmm.service.EgovFileMngUtil;
import kcc.com.cmm.service.impl.CmmUseDAO;
import kcc.com.cmm.spring.data.util.ExcelUtil;
import kcc.com.utl.user.service.CheckLoginUtil;
import kcc.let.utl.fcc.service.EgovCryptoUtil;
import kcc.ve.cmm.VeInstrFeeMng;
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrAsgnmVO;
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeAcmdtVO;
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeService;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctService;
@ -135,6 +145,10 @@ public class FndthInstrMngController {
@Resource(name = "vEInstrFeeService")
private VEInstrFeeService vEInstrFeeService;
// eGov 공통코드
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
/*
// 교육신청 서비스단
@ -258,7 +272,8 @@ public class FndthInstrMngController {
//@RequestMapping("eduInstrFeeMngList.do")
@RequestMapping("/kccadr/oprtn/fndthEnhanceTrn/eduInstrFeeMngList.do")
public String eduInstrFeeMngList(
@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO
//@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO
@ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO
, ModelMap model
) throws Exception {
@ -271,58 +286,95 @@ public class FndthInstrMngController {
//로그인 처리====================================
try {
//담당자 검색 이름 암호화
if("2".equals(vEEduAplctVO.getSearchCondition())) {
vEEduAplctVO.setSearchKeyword(egovCryptoUtil.encrypt(vEEduAplctVO.getSearchKeyword()));
}
model.addAttribute("cryptoUtil", egovCryptoUtil);
//로그인 처리====================================
//로그인 정보 가져오기
String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model);
if (!"".equals(s_oprtnLoginCheckNInfo)) return s_oprtnLoginCheckNInfo;
//로그인 처리====================================
//1.pageing step1
PaginationInfo paginationInfo = this.setPagingStep1_vEEduAplctVO(vEEduAplctVO);
PaginationInfo paginationInfo = this.setPagingStep1(vEPrcsDetailVO);
//임시로 페이징 처리를 안하기 위해서 RecordCountPerPage 수를 10000 으로 셋팅함
//paginationInfo.setRecordCountPerPage(10000);
//2. pageing step2
vEEduAplctVO = this.setPagingStep2_vEEduAplctVO(vEEduAplctVO, paginationInfo);
//vEEduAplctVO.setLctrDivCd("30"); // 저작권 체험교실 코드
vEEduAplctVO.setInstrDiv("50"); // 10-청소년, 20-성인, 30-체험, 40-외부, 50-기반, 60-기소
vEEduAplctVO.setLctrDivCd("50"); // 10-청소년, 20-성인, 30-체험, 40-외부, 50-기반, 60-기소
vEEduAplctVO.setAprvlCd("60");
vEEduAplctVO.setAsgnmAprvlCd("30"); //강사배정 교육승인
// vEEduAplctVO.setSearchSubmitYn("Y"); //제출에 대한 강사료 확정 여부
vEEduAplctVO.setSearchAsgnmAprvlCd("30");
vEEduAplctVO.setSearchTableJoin("tngrResult");
vEPrcsDetailVO = this.setPagingStep2(vEPrcsDetailVO, paginationInfo);
System.out.println("11111111111111113");
vEEduAplctVO = egovCryptoUtil.encryptVEEduAplctVOInfo(vEEduAplctVO);
List<VEEduAplctVO> vEEduAplctVOList = vEEduMIXService.selectTngrFeePagingList(vEEduAplctVO);
VEEduAplctVO vo = new VEEduAplctVO();
for(int i=0; i < vEEduAplctVOList.size(); i++) {
vo = egovCryptoUtil.decryptVEEduAplctVOInfo(vEEduAplctVOList.get(i));
System.out.println(" @@@@@@@@@@@@@ "+vo.getChrgNm());
vEEduAplctVOList.get(i).setChrgNm(vo.getChrgNm());
// 강사료 계산
VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng();
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = veInstrFeeMng.VeInstrFeeMng4Adult(vEInstrFeeService, vEEduAplctVOList.get(i).getEduAplctOrd(), vEEduAplctVOList.get(i).getEduChasiOrd());
vEEduAplctVOList.get(i).setInstrFeeSum(Integer.toString(vEInstrFeeAcmdtVO.getInstrFeeSum()));
//기반강화 조회
vEPrcsDetailVO.setLctrDivCd("50"); //강의구분코드 VE0011 10-청소년강의, 20-성인강의, 30-체험, 50-기반강화, 60-조건부
//교육확정 목록 조회
vEPrcsDetailVO.setDdlnCd("20");
//정렬
System.out.println(vEPrcsDetailVO.getSearchSortCnd());
System.out.println(vEPrcsDetailVO.getSearchSortOrd());
if(!"".equals(vEPrcsDetailVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
vEPrcsDetailVO.setOrderByQuery(vEPrcsDetailVO.getSearchSortCnd() + " " +vEPrcsDetailVO.getSearchSortOrd());
}
System.out.println("11111111111111112");
//강사명 검색시 암호화
if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) {
vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.encrypt(vEPrcsDetailVO.getSrchKwd3_1()));
}
List<VEPrcsDetailVO> vEPrcsDetailVOList = vEPrcsMIXService.selectPagingList4FndthInstr(vEPrcsDetailVO);
//강사명 검색시 복호화
if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) {
vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.decrypt(vEPrcsDetailVO.getSrchKwd3_1()));
}
//3.pageing step3
paginationInfo = this.setPagingStep3_vEEduAplctVO(vEEduAplctVOList, paginationInfo);
paginationInfo = this.setPagingStep3(vEPrcsDetailVOList, paginationInfo);
model.addAttribute("paginationInfo", paginationInfo);
// 지정된 강사가 있는지 확인
vEPrcsDetailVOList.stream().forEach(t->{
List<VEAPrcsAplctPrdInstrAsgnmVO> vEAPrcsAplctPrdInstrAsgnmList = vEAPrcsAplctPrdInstrAsgnmService.findByPrcsAplctPrdOrd(t.getPrcsAplctPrdOrd());
if(vEAPrcsAplctPrdInstrAsgnmList.size() > 0) {
t.setInstrCnt(Integer.toString(vEAPrcsAplctPrdInstrAsgnmList.size()));
}
});
// 강사료 계산
//vEEduAplctVO = egovCryptoUtil.encryptVEEduAplctVOInfo(vEEduAplctVO);
//List<VEEduAplctVO> vEEduAplctVOList = vEEduMIXService.selectTngrFeePagingList(vEEduAplctVO);
VEEduAplctVO vo = new VEEduAplctVO();
for(int i=0; i < vEPrcsDetailVOList.size(); i++) {
//vo = egovCryptoUtil.decryptVEEduAplctVOInfo(vEEduAplctVOList.get(i));
//System.out.println(" @@@@@@@@@@@@@ "+vo.getChrgNm());
//vEEduAplctVOList.get(i).setChrgNm(vo.getChrgNm());
// 강사료 계산
VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng();
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = veInstrFeeMng.VeInstrFeeMng4Fndth(
vEInstrFeeService
, vEPrcsDetailVOList.get(i).getPrcsAplctPrdOrd()
, vEPrcsDetailVOList.get(i).getUserId()
);
vEPrcsDetailVOList.get(i).setInstrFeeSum(Integer.toString(vEInstrFeeAcmdtVO.getInstrFeeSum()));
System.out.println("vEPrcsDetailVOList.get(i).getInstrPhone()");
System.out.println(vEPrcsDetailVOList.get(i).getInstrPhone());
System.out.println(vEPrcsDetailVOList.get(i).getInstrPhone());
}
//대상 리스트, 페이징 정보 전달
model.addAttribute("list", vEEduAplctVOList);
System.out.println("1111111111111111");
//대상 리스트, 페이징 정보 전달
//model.addAttribute("resultList", vEEduAplctVOList);
vEPrcsDetailVOList = egovCryptoUtil.decryptvEPrcsDetailList(vEPrcsDetailVOList);
model.addAttribute("list", vEPrcsDetailVOList);
}catch(Exception ex) {
ex.printStackTrace();
}
@ -330,6 +382,315 @@ public class FndthInstrMngController {
return "oprtn/fndthEnhanceTrn/eduInstrFeeMngList";
}
/**
* 강사료 확정 처리
*/
@RequestMapping("/kccadr/oprtn/fndthEnhanceTrn/eduInstrFeeCnfrmAjax.do")
public ModelAndView eduInstrFeeCnfrmAjax(
@ModelAttribute("vEInstrAsgnmVO") VEInstrAsgnmVO vEInstrAsgnmVO
, ModelMap model
//, RedirectAttributes redirectAttributes
, HttpServletRequest request
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
//로그인 처리====================================
//로그인 정보 가져오기
String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model);
if (!"".equals(s_oprtnLoginCheckNInfo)) {
modelAndView.addObject("result", "loginFail");
return modelAndView;
}
//로그인 처리====================================
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
try {
if(!"".equals(vEInstrAsgnmVO.getChk()) && vEInstrAsgnmVO.getChk() != null) {
String[] splitChk = vEInstrAsgnmVO.getChk().split(",");
for(int i=0; i<splitChk.length; i++) {
if(!"".equals(splitChk[i])) {
String[] aplctChasi = splitChk[i].split("\\@");
// 강사료 계산
VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng();
VEInstrFeeAcmdtVO vo = veInstrFeeMng.VeInstrFeeMng4Fndth(vEInstrFeeService, aplctChasi[0], aplctChasi[1]);
vo.setLastUpdusrId(loginVO.getUniqId()); //esntl_id
vo.setSbmtYn("Y");
if(!"".equals(vo.getInstrFeeOrd()) && vo.getInstrFeeOrd() != null) {
vo.setLastUpdusrId(loginVO.getUniqId()); //esntl_id
vEInstrFeeService.update(vo);
} else {
vo.setFrstRegisterId(loginVO.getUniqId()); //esntl_id
vEInstrFeeService.insert(vo);
}
}
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
modelAndView.addObject("result", "success");
return modelAndView;
}
/**
* 강사료 확정 처리 목록 Excel
* @param model
* @return
* @throws Exception
*/
@SuppressWarnings("rawtypes")
@RequestMapping(value = "/kccadr/oprtn/fndthEnhanceTrn/eduInstrFeeExcelDownLoad.do")
public ModelAndView eduInstrFeeExcelDownLoad(
//@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO
@ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO
, ModelMap model) throws Exception {
//로그인 처리====================================
//로그인 정보 가져오기
//String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model);
//if (!"".equals(s_oprtnLoginCheckNInfo)) return s_oprtnLoginCheckNInfo;
//로그인 처리====================================
//1.pageing step1
PaginationInfo paginationInfo = this.setPagingStep1(vEPrcsDetailVO);
//임시로 페이징 처리를 안하기 위해서 RecordCountPerPage 수를 10000 으로 셋팅함
//paginationInfo.setRecordCountPerPage(10000);
//2. pageing step2
vEPrcsDetailVO = this.setPagingStep2(vEPrcsDetailVO, paginationInfo);
//기반강화 조회
vEPrcsDetailVO.setLctrDivCd("50"); //강의구분코드 VE0011 10-청소년강의, 20-성인강의, 30-체험, 50-기반강화, 60-조건부
//교육확정 목록 조회
vEPrcsDetailVO.setDdlnCd("20");
//정렬
System.out.println(vEPrcsDetailVO.getSearchSortCnd());
System.out.println(vEPrcsDetailVO.getSearchSortOrd());
if(!"".equals(vEPrcsDetailVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
vEPrcsDetailVO.setOrderByQuery(vEPrcsDetailVO.getSearchSortCnd() + " " +vEPrcsDetailVO.getSearchSortOrd());
}
//강사명 검색시 암호화
if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) {
vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.encrypt(vEPrcsDetailVO.getSrchKwd3_1()));
}
List<VEPrcsDetailVO> vEPrcsDetailVOList = vEPrcsMIXService.selectPagingList4FndthInstr(vEPrcsDetailVO);
//강사명 검색시 복호화
if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) {
vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.decrypt(vEPrcsDetailVO.getSrchKwd3_1()));
}
//3.pageing step3
paginationInfo = this.setPagingStep3(vEPrcsDetailVOList, paginationInfo);
model.addAttribute("paginationInfo", paginationInfo);
vEPrcsDetailVOList = egovCryptoUtil.decryptvEPrcsDetailList(vEPrcsDetailVOList);
/*
// 엑셀 페이징으로 변경
vEEduAplctVO.setFirstIndex(0);
vEEduAplctVO.setRecordCountPerPage(10000000);
vEEduAplctVO.setInstrDiv("20"); // 성인교육 코드
vEEduAplctVO.setLctrDivCd("20"); // 성인교육 코드
vEEduAplctVO.setAprvlCd("60");
vEEduAplctVO.setAsgnmAprvlCd("30"); //강사배정 교육승인
vEEduAplctVO.setSearchAsgnmAprvlCd("30"); //강사배정 교육승인
vEEduAplctVO.setSearchTableJoin("tngrResult");
if("2".equals(vEEduAplctVO.getSearchCondition())) {
vEEduAplctVO.setSearchKeyword(egovCryptoUtil.encrypt(vEEduAplctVO.getSearchKeyword()));
}
vEEduAplctVO = egovCryptoUtil.encryptVEEduAplctVOInfo(vEEduAplctVO);
List<VEEduAplctVO> list = vEEduMIXService.selectTngrFeePagingList(vEEduAplctVO);
VEEduAplctVO aVo = new VEEduAplctVO();
for(int i=0; i < list.size(); i++) {
aVo = egovCryptoUtil.decryptVEEduAplctVOInfo(list.get(i));
System.out.println(" @@@@@@@@@@@@@ "+aVo.getChrgNm());
list.get(i).setChrgNm(aVo.getChrgNm());
if ("".equals(aVo.getUserIdNum())) {
list.get(i).setInstrNm(aVo.getInstrNm());
}else {
list.get(i).setInstrNm(aVo.getInstrNm()+aVo.getUserIdNum());
}
}
*/
VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng();
vEPrcsDetailVOList.forEach( vo -> {
ComDefaultCodeVO codeParam = new ComDefaultCodeVO();
/*
try {
// 교육일자
//vo.setEduHopeDt(CmmUtil.getStrDateFormat(vo.getEduHopeDt()));
vo.setEduHopeDt(vo.getEduHopeDt());
// 학교구분 코드
codeParam.setCodeId("VE0009");
codeParam.setCode(vo.getScholDivCd());
vo.setScholDivCd(cmmUseService.selectCmmCodeDetailCodeValue(codeParam));
// 교육선택지역코드
codeParam.setCodeId("VE0008");
codeParam.setCode(vo.getEduSlctAreaCd());
vo.setEduSlctAreaCd(cmmUseService.selectCmmCodeDetailCodeValue(codeParam));
// 강사료
vo.setTotFee(String.format("%,d", Integer.parseInt(vo.getTotFee())));
// 편도거리
if(StringUtils.isNotBlank(vo.getOnewayDstnc())) {
vo.setOnewayDstnc(vo.getOnewayDstnc() + "km");
}
}
catch(Exception ex) {
System.out.println(ex.toString());
}
*/
try {
// 강사료 계산
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = veInstrFeeMng.VeInstrFeeMng4Fndth4Excel(vEInstrFeeService, vo.getPrcsAplctPrdOrd(), vo.getUserId());
// 온라인 교육
/*
if("10".equals(vEInstrFeeAcmdtVO.getEduSlctCd())){
vo.setChasiCnt(Integer.toString(vo.getChasi())+"차시 (온라인강의)");
}else {
vo.setChasiCnt(Integer.toString(vo.getChasi())+"차시");
}
*/
/*
vo.setInstrFeeOrd(vEInstrFeeAcmdtVO.getInstrFee().replaceAll("\\B(?=(\\d{3})+(?!\\d))", ","));
vo.setSpecialWorkAllow(vEInstrFeeAcmdtVO.getSpecialWorkAllow());
vo.setDistanceAllow(vEInstrFeeAcmdtVO.getDistanceAllow());
vo.setTrafficFee(vEInstrFeeAcmdtVO.getTrafficFee());
vo.setFoodExpenses(vEInstrFeeAcmdtVO.getFoodExpenses());
vo.setAcmdtFee(vEInstrFeeAcmdtVO.getAcmdtFee());
*/
vo.setInstrFeeSum(String.format("%,d", vEInstrFeeAcmdtVO.getInstrFeeSum()));
/*
vo.setIncomeTax(String.format("%,d", Integer.parseInt(vEInstrFeeAcmdtVO.getIncomeTax())));
vo.setLocalIncomeTax(String.format("%,d", Integer.parseInt(vEInstrFeeAcmdtVO.getLocalIncomeTax())));
*/
// vo.setTaxSum(String.format("%,d", taxSum));
// vo.setTotalSum(String.format("%,d", totalSum));
}
catch(Exception ex) {
System.out.println(ex.toString());
}
});
List<Object> excelData = new ArrayList<>();
excelData.addAll(vEPrcsDetailVOList);
// 세팅값
String title = "강사료 지급내역";
// 너비
int[] width = {
4000, 4000
, 4000, 4000, 4000
, 4000
};
// 헤더
String[] header = {
"교육일자", "과정명"
, "강사이름", "강사료", "교통비"
, "강사료 합계"
};
// 컬럼명
String[] order = {
"EduHopeDt", "PrcsNm"
, "InstrNm", "InstrFee", "TrafficFee"
, "InstrFeeSum"
};
// 호출
SXSSFWorkbook workbook = ExcelUtil.makeSimpleFruitExcelWorkbook(excelData , header, order, width, title);
model.addAttribute("locale", Locale.KOREA);
model.addAttribute("workbook", workbook);
model.addAttribute("workbookName", title);
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("excelDownloadView");
modelAndView.addObject(model);
return modelAndView;
}
/**
* 강사료팝업
*/
@RequestMapping("/kccadr/oprtn/fndthEnhanceTrn/popup/instrCostPopup.do")
public String instrCostPopup(
@ModelAttribute("vEInstrAsgnmVO") VEInstrAsgnmVO vEInstrAsgnmVO
, ModelMap model
, HttpServletRequest request
) throws Exception {
//로그인 처리====================================
//로그인 정보 가져오기
//String s_userCheckNInfo = checkLoginUtil.userCheckNInfo(model, request);
//if (!"".equals(s_userCheckNInfo)) return s_userCheckNInfo;
//로그인 처리====================================
try {
// 강사료 계산
VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng();
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = veInstrFeeMng.VeInstrFeeMng4Fndth(vEInstrFeeService, vEInstrAsgnmVO.getEduAplctOrd(), vEInstrAsgnmVO.getEduChasiOrd());
//지급총액 계산
//int totalSum = instrFeeSum;
//vEInstrFeeAcmdtVO.setTotalSum(totalSum);
model.addAttribute("info",vEInstrFeeAcmdtVO);
}catch(Exception ex) {
ex.printStackTrace();
}
return "oprtn/fndthEnhanceTrn/popup/instrCostPopup";
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//

View File

@ -192,6 +192,88 @@
</select>
<!-- 강사료 정보 R 기소+기반-->
<select id="VEInstrFeeDAO.selectDetail4Fndth" parameterClass="VEInstrFeeAcmdtVO" resultClass="VEInstrFeeAcmdtVO">
/* VEInstrFeeDAO.selectDetail4Fndth */
SELECT
A.PRCS_APLCT_PRD_ORD AS eduAplctOrd
, A.USER_ID AS eduChasiOrd
, B.INSTR_FEE_ORD AS instrFeeOrd
, A.USER_ID AS userId
,(SELECT AA.div_cd FROM VE_INSTR_DETAIL AA WHERE 1=1 AND AA.USER_ID = A.USER_ID AND aa.use_yn ='Y') AS divCd
/*
,(SELECT AA.ADDR FROM VE_INSTR_DETAIL AA WHERE 1=1 AND AA.USER_ID = A.USER_ID AND aa.instr_div=e.lctr_div_cd AND aa.use_yn='Y') AS instrRsdnc
,(SELECT EE.NEW_ADDR FROM VE_SCHOL EE WHERE 1=1 AND EE.STNDRD_SCHOL_CD = E.STNDRD_SCHOL_CD) AS scholArea
*/
, NVL(DECODE(B.INSTR_FEE ,'','0',B.INSTR_FEE),'0') AS instrFee
, NVL(DECODE(B.SPECIAL_WORK_ALLOW ,'','0',B.SPECIAL_WORK_ALLOW), '0') AS specialWorkAllow
, NVL(DECODE(B.DISTANCE_ALLOW ,'','0',B.DISTANCE_ALLOW), '0') AS distanceAllow
, NVL(DECODE(B.TRAFFIC_FEE ,'','0',B.TRAFFIC_FEE), '0') AS trafficFee
, NVL(DECODE(B.FOOD_EXPENSES ,'','0',B.FOOD_EXPENSES), '0') AS foodExpenses
, NVL(DECODE(B.BSNS_TRIP_FEE ,'','0',B.BSNS_TRIP_FEE), '0') AS bsnsTripFee
, NVL(DECODE(B.SPARE_FEE ,'','0',B.SPARE_FEE), '0') AS spareFee
, NVL(DECODE(B.INCOME_TAX ,'','0',B.INCOME_TAX), '0') AS incomeTax
, NVL(DECODE(B.LOCAL_INCOME_TAX ,'','0',B.LOCAL_INCOME_TAX), '0') AS localIncomeTax
, B.SBMT_YN AS sbmtYn
/*
, NVL(DECODE(C.ACMDT_FEE ,'','0',C.ACMDT_FEE), '0') AS acmdtFee
, C.APRVL_CD AS acmdtAprvlCd
, C.ATCH_FILE_ID AS atchFileId
, C.APRVL_CD AS acmdtAprvlCd
, D.ONEWAY_DSTNC AS onewayDstnc
, E.ISLTN_SCHOL_YN AS isltnScholYn
, E.EDU_SLCT_CD AS eduSlctCd
, NVL(F.CHASI, '1') AS chasi
, F.EDU_HOPE_DT AS eduHopeDt
*/
FROM
VEA_PRCS_APLCT_PRD_INSTR_ASGNM A
LEFT OUTER JOIN VE_INSTR_FEE B
ON (
A.PRCS_APLCT_PRD_ORD = B.EDU_APLCT_ORD
AND A.USER_ID = B.EDU_CHASI_ORD
)
/*
LEFT OUTER JOIN VE_ACMDT_APLCT C
ON(
A.EDU_APLCT_ORD = C.EDU_APLCT_ORD
AND A.EDU_CHASI_ORD = C.EDU_CHASI_ORD
)
LEFT OUTER JOIN ve_edu_instr_dstnc D
ON(
A.EDU_APLCT_ORD = D.edu_aplct_ord
AND A.user_id = D.user_id
)
LEFT OUTER JOIN ve_edu_aplct E
ON(
A.EDU_APLCT_ORD = E.edu_aplct_ord
)
LEFT OUTER JOIN ve_edu_chasi F
ON(
A.EDU_APLCT_ORD = F.edu_aplct_ord
AND A.EDU_CHASI_ORD = F.EDU_CHASI_ORD
)
*/
WHERE 1=1
AND A.PRCS_APLCT_PRD_ORD = #eduAplctOrd#
AND A.USER_ID = #eduChasiOrd#
</select>
<!-- 강사료 정보 U -->
<update id="VEInstrFeeDAO.update" parameterClass="VEInstrFeeAcmdtVO">
UPDATE

View File

@ -431,6 +431,9 @@
/* VEPrcsDAO.selectPagingList4FndthInstr */
SELECT COUNT(1) OVER() AS totCnt ,
a.edu_strt_pnttm||'~'||a.edu_ddln_pnttm AS eduHopeDt ,
a.prcs_aplct_prd_ord AS prcsAplctPrdOrd,
a.lctr_div_cd AS lctrDivCd,
a.strt_pnttm AS strtPnttm,
@ -454,9 +457,16 @@
, c.user_id AS userId
, c.instr_nm AS instrNm
, f.sbmt_yn AS feeSbmtYn
, c.phone AS instrPhone
, f.INSTR_FEE AS instrFee
, f.TRAFFIC_FEE AS trafficFee
FROM ve_prcs_aplct_prd a
, ve_prcs b
,
@ -464,6 +474,7 @@
SELECT a0.prcs_aplct_prd_ord
, a0.user_id
, b.instr_nm
, b.phone
FROM vea_prcs_aplct_prd_instr_asgnm a0
, ve_instr_detail b
WHERE 1=1
@ -471,7 +482,12 @@
AND a0.user_id=b.user_id
AND b.use_yn='Y'
) c
LEFT OUTER JOIN ve_instr_fee f
ON (
c.prcs_aplct_prd_ord = f.edu_aplct_ord
AND c.user_id = f.edu_chasi_ord
)
WHERE 1 =1
AND a.prcs_ord =b.prcs_ord

View File

@ -6,7 +6,7 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ taglib prefix="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<%@ taglib prefix="un" uri="http://jakarta.apache.org/taglibs/unstandard-1.0" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<un:useConstants var="KccadrStatus" className="kcc.kccadr.cmm.KccadrConstants" />
@ -36,16 +36,38 @@
</style>
<script src="${pageContext.request.contextPath}/js/ve/sendSmsEmailUtil.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// 상태값 확인
$(".ddlnCdStts").each(function() {
var $currentCell = $(this);
// 텍스트가 비어있는지 확인
if ($currentCell.text().trim() === "") {
var $currentRow = $currentCell.closest('tr');
var strtPnttm = new Date($currentRow.find("td:eq(3)").text().split("~")[0].trim());
var endPnttm = new Date($currentRow.find("td:eq(3)").text().split("~")[1].trim());
var currentDate = new Date();
var ddlnCdText = '';
if (currentDate < strtPnttm) {
ddlnCdText = "접수전";
} else if (currentDate >= strtPnttm && currentDate <= endPnttm) {
ddlnCdText = "접수중";
} else if (currentDate > endPnttm) {
ddlnCdText = "접수종료";
}
$currentCell.text(ddlnCdText);
}
});
});
function press(event) {
if (event.keyCode==13) {
fncGoList();
}
}
function fncGoList(){
linkPage(1);
}
@ -53,28 +75,126 @@
function linkPage(pageNo){
var listForm = document.listForm ;
listForm.pageIndex.value = pageNo ;
listForm.searchCondition.value = $('#searchCondition').val();
listForm.searchKeyword.value = $('#searchKeyword').val();
//listForm.searchKeyword.value = $('#searchKeyword').val();
listForm.action = "<c:url value='/kccadr/oprtn/cndtnSspnIdtmt/eduInstrFeeMngList.do'/>";
listForm.submit();
}
function chkAll(thisObj){
$("input[name=chk]").prop("checked" , $(thisObj).is(":checked"));
function fncGoDetail(prcsAplctPrdOrd){
var listForm = document.listForm ;
listForm.prcsAplctPrdOrd.value = prcsAplctPrdOrd ;
listForm.action = "<c:url value='/kccadr/oprtn/fndthEnhanceTrn/fndthEduPrcsAplctCfnMngDetail.do'/>";
listForm.submit();
}
function fncDelete(prcsOrd){
document.listForm.prcsOrd.value = prcsOrd ;
var pageIndex = document.listForm.pageIndex.value;
if($(".listCount").length == '1'){
pageIndex = pageIndex -1;
}
var data = new FormData(document.getElementById("listForm"));
if(confirm("삭제하시겠습니까?")){
var url = "<c:url value='/kccadr/oprtn/fndthEnhanceTrn/fndthEduPrcsMngDeleteAjax.do'/>";
console.log(data);
$.ajax({
type:"POST",
url: url,
data: data,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
success:function(returnData){
if(returnData.result == "success"){
alert("삭제되었습니다.");
document.listForm.prcsOrd.value = ""; //리스트 이동시 prcsOrd 초기화
linkPage(pageIndex);
}
},
error:function(request , status, error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
}
event.stopImmediatePropagation();
}
function fncSaveSort(prcsOrd, count){
var sortNo = $('#prcsSortNo'+count).val();
if(sortNo == ''){
alert("표시순서를 입력해 주세요.");
return false;
}
$('#prcsOrd').val(prcsOrd);
$('#prcsSortNo').val(sortNo);
var data = new FormData(document.getElementById("listForm"));
var url = "<c:url value='/kccadr/oprtn/otsdCprtnPrcs/eduPrcsSortUpdateAjax.do'/>";
$.ajax({
type:"POST",
url: url,
data: data,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
success:function(returnData){
if(returnData.result == "success"){
alert("저장되었습니다.");
document.listForm.prcsOrd.value = ""; //리스트 이동시 prcsOrd 초기화
fncGoList();
}
},
error:function(request , status, error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
}
function fncReset(thisObj) {
var targetObj = $(thisObj).closest('.list_top').find('select,input');
$.each(targetObj, function() {
if ($(this).prop('tagName') == 'SELECT') {
if ($(this).attr('name').indexOf('Month') != -1) {
$(this).val(new Date().getMonth() + 1);
} else if ($(this).attr('name').indexOf('Year') != -1) {
$(this).val(new Date().getFullYear());
} else {
$(this).prop("selectedIndex", 0);
}
} else {
if ($(this).attr('type') == 'checkbox') {
$(this).prop('checked', false);
} else {
$(this).val('');
}
}
});
}
//강사료 팝업
function fncInstrCostInfo(eduAplctOrd,eduChasiOrd) {
document.popForm.eduAplctOrd.value = eduAplctOrd;
document.popForm.eduChasiOrd.value = eduChasiOrd;
document.popForm.action = "<c:url value='/kccadr/oprtn/adultVisitEdu/popup/instrCostPopup.do'/>";
document.popForm.action = "<c:url value='/kccadr/oprtn/fndthEnhanceTrn/popup/instrCostPopup.do'/>";
window.open("", "_instrCostPop", "scrollbars = no, top=100px, left=100px, height=750px, width=750px");
document.popForm.target = "_instrCostPop";
document.popForm.submit();
}
}
// 강사료 확정
function fnInstrFeeCnfrm() {
var chkLen = $(listForm).find("input[name=chk]:checked").length;
@ -101,7 +221,7 @@
if(confirm("선택한 목록의 강사료를 확정하시겠습니까?")){
$.ajax({
type:"POST",
url: "${pageContext.request.contextPath}/kccadr/oprtn/adultVisitEdu/eduInstrFeeCnfrmAjax.do",
url: "${pageContext.request.contextPath}/kccadr/oprtn/fndthEnhanceTrn/eduInstrFeeCnfrmAjax.do",
data: data1,
dataType:'json',
async: false,
@ -120,67 +240,7 @@
});
}
}
//숙박영수증 첨부파일 일괄 다운로드(zip) - 파일ID 다름, SN 동일 : type A
function fnAcmdtFileZipDownload(){
var frm = document.listForm;
var checkboxId = Array();
var checkboxSn = Array();
var checkboxCnt = 0;
var checkbox_check = false;
var checkbox_index = false;
$('input:checkbox[name="chk"]').each(function(){
if($(this).is(":checked")){
checkbox_check = true;
if($(this).attr("class") != ""){
checkboxId[checkboxCnt] = $(this).attr("class");
checkboxSn[checkboxCnt] = "0"
checkboxCnt++;
checkbox_index = true;
}
}
});
if(!checkbox_check){
alert("선택된 항목이 없습니다.");
return false;
}else if(!checkbox_index){
alert("다운로드할 영수증이 없습니다.");
return false;
}
frm.orgnZipNm.value="숙박영수증.zip";
frm.downloadType.value="A";
frm.action="${pageContext.request.contextPath}/cmm/fms/fileDownZip.do?atchFileId="+checkboxId+"&fileSn="+checkboxSn;
frm.submit();
}
function excelDownLoad(){
var listForm = document.listForm ;
listForm.action = "<c:url value='/kccadr/oprtn/adultVisitEdu/eduInstrFeeExcelDownLoad.do'/>";
listForm.submit();
}
function fncReset(thisObj){
var targetObj = $(thisObj).closest('.list_top').find('select,input');
$.each(targetObj, function(){
if($(this).prop('tagName') == 'SELECT'){
if($(this).attr('name').indexOf('Month') != -1){
$(this).val(new Date().getMonth()+1);
}else if($(this).attr('name').indexOf('Year') != -1){
$(this).val(new Date().getFullYear());
}else{
$(this).prop("selectedIndex", 0);
}
}else{
$(this).val('');
}
});
}
function chkSendSms(){
var chkLen = $(listForm).find("input[name=chk]:checked").length;
@ -200,200 +260,181 @@
});
alert("발송되었습니다.");
}
}
function excelDownLoad(){
var listForm = document.listForm ;
listForm.action = "<c:url value='/kccadr/oprtn/cndtnSspnIdtmt/eduInstrFeeExcelDownLoad.do'/>";
listForm.submit();
}
</script>
<title>신청관리</title>
<title>과정신청기간관리목록</title>
</head>
<body>
<form id="popForm" name="popForm" method="post">
<input type="hidden" name="eduAplctOrd" value=""/>
<input type="hidden" name="eduChasiOrd" value=""/>
</form>
<form:form id="listForm" name="listForm" method="post" onsubmit="return false;">
<input type="hidden" name="pageIndex" value="<c:out value='${vEEduAplctVO.pageIndex}' default='1' />"/>
<input type="hidden" name="searchSortCnd" value="<c:out value="${vEEduAplctVO.searchSortCnd}" />" />
<input type="hidden" name="searchSortOrd" value="<c:out value="${vEEduAplctVO.searchSortOrd}" />" />
<input type="hidden" name="eduAplctOrd" value="" />
<input type="hidden" name="eduChasiOrd" value="" />
<input type="hidden" name="sbmtYn" id="sbmtYn" value="" />
<input type="hidden" name="orgnZipNm" value="" />
<input type="hidden" name="downloadType" value="" />
<form:form id="listForm" name="listForm" method="post" commandName="vEPrcsDetailVO" onsubmit="return false;">
<input type="hidden" name="pageIndex" value="<c:out value='${vEPrcsDetailVO.pageIndex}' default='1' />"/>
<input type="hidden" name="searchSortCnd" value="<c:out value="${vEPrcsDetailVO.searchSortCnd}" />" />
<input type="hidden" name="searchSortOrd" value="<c:out value="${vEPrcsDetailVO.searchSortOrd}" />" />
<input type="hidden" id="prcsOrd" name="prcsOrd" value="" />
<input type="hidden" id="prcsAplctPrdOrd" name="prcsAplctPrdOrd" value="" />
<input type="hidden" id="prcsSortNo" name="prcsSortNo" value="" />
<div class="cont_wrap">
<div class="box">
<!-- cont_tit -->
<div class="cont_tit">
<h2>강사료 확정 처리 목록</h2>
<h2>강사료 확정 관리목록</h2>
<ul class="cont_nav">
<li class="home"><a href="/"><i></i></a></li>
<li>
<p>조건부기소유예관리</p>
<p>실무자역량강화</p>
</li>
<li><span class="cur_nav">강사료 확정 관리</span></li>
<li><span class="cur_nav">강사료 확정 관리목록</span></li>
</ul>
</div>
<!-- //cont_tit -->
<div class="cont">
<div class="tb_tit01">
<p>강사료 확정 관리</p>
</div>
<!-- list_top -->
<div class="list_top">
<div class="list_top search-only">
<div class="list_top_1">
<div class="util_left">
<p>구분</p>
</div>
<div class="util_right">
<ve:select codeId="VE0012" name="searchInsttDivCd" id="searchInsttDivCd" styleClass="sel_type1" selectedValue="${vEEduAplctVO.searchInsttDivCd}" defaultValue="" defaultText='전체'/>
<ve:select codeId="VE0007" name="searchEduSlctCd" id="searchEduSlctCd" styleClass="sel_type1" selectedValue="${vEEduAplctVO.searchEduSlctCd}" defaultValue="" defaultText='전체'/>
</div>
</div>
<div class="list_top_2">
<div class="util_left">
<p>교육일자</p>
</div>
<div class="util_right">
<kc:select codeId="VEA001" name="srchCndt1" id="srchCndt1" css="class='sel_type1'"
selectedValue="${vEPrcsDetailVO.srchCndt1 }" defaultValue=""
defaultText="전체"
/>
<div class="calendar_wrap">
<input type="text" class="calendar" title="시작일 선택" id="searchStartDt" name="searchStartDt" value="<c:out value='${vEEduAplctVO.searchStartDt}'/>">
<%-- <input type="text" class="calendar" title="시작일 선택" id="searchSmbtStartDt" name="searchSmbtStartDt" value="${vEPrcsDetailVO.srchKwd2_1}"> --%>
<input type="text" class="calendar" title="시작일 선택" id="srchKwd2_1" name="srchKwd2_1" value="${vEPrcsDetailVO.srchKwd2_1}">
</div>
~
<div class="calendar_wrap">
<input type="text" class="calendar" title="종료일 선택" id="searchEndDt" name="searchEndDt" value="<c:out value='${vEEduAplctVO.searchEndDt}'/>">
<input type="text" class="calendar" title="종료일 선택" id="srchKwd2_2" name="srchKwd2_2" value="${vEPrcsDetailVO.srchKwd2_2}">
</div>
<select class="sel_type1" name="searchCondition" id="searchCondition">
<option value="4" ${vEEduAplctVO.searchCondition eq '4' ? 'selected' : '' }>기관(단체)명</option>
<option value="2" ${vEEduAplctVO.searchCondition eq '2' ? 'selected' : '' }>강사이름</option>
</select>
<input type="text" id=searchKeyword name="searchKeyword" class="search_input" placeholder="검색어를 입력하세요" value="<c:out value='${cryptoUtil.decrypt(vEEduAplctVO.searchKeyword)}'/>" onkeyDown="press(event);">
<button class="btn_type08" onclick="fncGoList(); return false;">검색</button>
<button class="btn_type03" onclick="fncReset(this); return false;">초기화</button>
<input type="text" id="srchKwd3_1" name="srchKwd3_1" placeholder="강사명를 입력하세요." title="검색어 입력" class="search_input" value="<c:out value='${vEPrcsDetailVO.srchKwd3_1}'/>">
<button type="button" class="btn_type08" onclick="fncGoList(); return false;">검색</button>
<button class="btn_type03" onclick="fncReset(this); return false;">초기화</button>
</div>
</div>
</div>
<!-- //list_top -->
<!-- list util -->
</div>
<div class="list_util">
<p class="list_util_p">총 건수 : <span><c:out value="${paginationInfo.totalRecordCount}" /></span>건</p>
<p class="list_util_p"><span><c:out value="${paginationInfo.totalRecordCount}" /></span>건의 접수가 검색되었습니다.</p>
<div>
<select class="sel_type1" name="pageUnit" id="pageUnit" onchange="linkPage(1);" title="줄 선택" style="width: 140px">
<option value='10' <c:if test="${vEEduAplctVO.pageUnit == '10' or vEEduAplctVO.pageUnit == ''}">selected</c:if>>10줄</option>
<option value='20' <c:if test="${vEEduAplctVO.pageUnit == '20'}">selected</c:if>>20줄</option>
<option value='30' <c:if test="${vEEduAplctVO.pageUnit == '30'}">selected</c:if>>30줄</option>
<option value='100' <c:if test="${vEEduAplctVO.pageUnit == '100'}">selected</c:if>>100줄</option>
<select class="sel_type1" name="pageUnit" id="pageUnit" onchange="linkPage(1);" title="줄 선택" style="width: 140px" class="sel_type1">
<option value='10' <c:if test="${vEPrcsDetailVO.pageUnit == '10' or vEPrcsDetailVO.pageUnit == ''}">selected</c:if>>10줄</option>
<option value='20' <c:if test="${vEPrcsDetailVO.pageUnit == '20'}">selected</c:if>>20줄</option>
<option value='30' <c:if test="${vEPrcsDetailVO.pageUnit == '30'}">selected</c:if>>30줄</option>
<option value='100' <c:if test="${vEPrcsDetailVO.pageUnit == '100'}">selected</c:if>>100줄</option>
</select>
<%--<button type="button" class="btn_down_excel">엑셀 다운로드</button>--%>
</div>
</div>
<!-- //list_top -->
<!-- list -->
<div class="tb_type01">
<table>
<colgroup>
<col style="width: 5%;">
<col style="width: 10%;">
<col style="width: 14%;">
<col style="width: 8%;">
<col style="width: 10%;">
<col style="width: 5%">
<col style="width: 10%">
<col style="width: 180px;">
<col style="width: auto">
<col style="width: 9%;">
<col style="width: 9%;">
<col style="width: 8%;">
<col style="width: 10%">
<%-- <col style="width: 180px;"> --%>
<col style="width: 10%">
<col style="width: 10%">
<%-- <col style="width: 10%"> --%>
</colgroup>
<thead>
<tr>
<th><input type="checkbox" name="checkAll" id="checkAll" onclick="chkAll(this);" /><label for="checkAll"></label></th>
<th>교육일자</th>
<th>차시</th>
<th>기관구분</th>
<th>신청유형</th>
<th>기관(단체)명</th>
<th>강사이름</th>
<th>NO</th>
<th>교육구분코드</th>
<th>교육일자<button class="sort sortBtn" id="sort_eduStrtPnttm">▲</button></th>
<th>과정명<button class="sort sortBtn" id="sort_prcsNm">▲</button></th>
<th>강사명</th>
<!-- <th>신청자/정원</th> -->
<th>강사료</th>
<th>확정여부</th>
<th>확정여부<button class="sort sortBtn" id="sort_feeSbmtYn">▲</button></th>
<!-- <th>공개여부</th> -->
</tr>
</thead>
<tbody>
<c:forEach var="list" items="${list}" varStatus="status">
<tr>
<td>
<input name="chk" class="${list.atchFileId}" value="${list.eduAplctOrd}@${list.eduChasiOrd}"
<tr class="listCount">
<td>
<input name="chk" class="${list.atchFileId}" value="${list.prcsAplctPrdOrd}@${list.userId}"
data-instrphone="<c:out value='${list.instrPhone}' />" data-userid="<c:out value='${list.userId}' />"
data-date="<c:out value='${list.eduHopeDt}' /> <c:out value='${list.strtTm}' /> ~ <c:out value='${list.endTm}' />"
data-date="<c:out value='${list.strtPnttm}' />"
data-instrnm="<c:out value='${list.instrNm}' />" data-instrfeesum="<c:out value='${list.instrFeeSum}' />"
title="Check" type="checkbox"/>
</td>
<!--
<td>
<c:if test="${list.cnt eq 0}">미제출</c:if><c:if test="${list.cnt gt 0}">제출</c:if>
</td>
-->
<td>
${list.eduHopeDt}
<%-- <fmt:parseDate value="${list.eduHopeDt}" var="eduHopeDt" pattern="yyyy.MM.dd"/> --%>
<%-- <fmt:formatDate value="${eduHopeDt}" pattern="yyyy.MM.dd"/> --%>
</td>
<td>
<c:choose>
<c:when test="${fn:length(list.strtTm) eq 4}">
<fmt:parseDate value="${list.strtTm}" var="strtTm" pattern="kkmm"/><fmt:formatDate value="${strtTm}" pattern="kk:mm"/>
</c:when>
<c:otherwise>
${list.strtTm}
</c:otherwise>
</c:choose>
~
<c:choose>
<c:when test="${fn:length(list.endTm) eq 4}">
<fmt:parseDate value="${list.endTm}" var="endTm" pattern="kkmm"/><fmt:formatDate value="${endTm}" pattern="kk:mm"/>
</c:when>
<c:otherwise>
${list.strtTm}
</c:otherwise>
</c:choose>
(<c:out value="${list.lrnTm}"/>분)
</td>
<td>
<ve:code codeId="VE0012" code="${list.insttDivCd}"/>
</td>
<td>
<ve:code codeId="VE0007" code="${list.eduSlctCd}"/>
</td>
<td>
<c:out value="${list.insttNm}"/>
</td>
<td onclick="fncGoDetail('<c:out value="${list.prcsAplctPrdOrd}"/>');" style="cursor:pointer;">
<c:out value="${status.count}"/>
</td>
<td>
<kc:code codeId="VEA001" code="${list.prcsDiv}"/>
</td>
<td>
<c:out value="${list.eduStrtPnttm}"/>
</td>
<td onclick="fncGoDetail('<c:out value="${list.prcsAplctPrdOrd}"/>');" style="cursor:pointer;">
<c:out value="${list.prcsNm}"/>(<c:out value="${list.prcsAplctPrdOrd}"/>)
</td>
<td>
<c:out value="${list.instrNm}"/>
<c:if test="${list.instrNm ne null}">
<br/>(${fn:split(list.userId,'_')[1]*1})
</c:if>
</td>
</td>
<td>
<a href="#none" style="font-weight: 600; text-decoration-line: underline;"
onclick="fncInstrCostInfo('<c:out value="${list.eduAplctOrd}" />','<c:out value="${list.eduChasiOrd}" />'); return false;">
<fmt:formatNumber value="${list.instrFeeSum}" pattern="#,###"/>
onclick="fncInstrCostInfo('<c:out value="${list.prcsAplctPrdOrd}" />','<c:out value="${list.userId}" />'); return false;">
<c:choose>
<c:when test="${not empty list.instrFeeSum}">
<fmt:formatNumber value="${list.instrFeeSum}" pattern="#,###"/>
</c:when>
<c:otherwise>
미책정
</c:otherwise>
</c:choose>
</a>
</td>
<td>
<c:if test="${list.feeSbmtYn eq 'Y'}">확정</c:if>
<c:if test="${list.feeSbmtYn ne 'Y'}">미확정</c:if>
</td>
</td>
</tr>
</c:forEach>
<c:if test="${empty list}">
<tr><td colspan="9"><spring:message code="common.nodata.msg" /></td></tr>
<tr><td colspan="7"><spring:message code="common.nodata.msg" /></td></tr>
</c:if>
</tbody>
</table>
</div>
<!-- //list -->
<!-- page -->
<div class="page">
<ui:pagination paginationInfo = "${paginationInfo}" type="image" jsFunction="linkPage" />
</div>
<!-- //page -->
<div class="btn_wrap btn_layout01">
<div class="btn_left">
<!-- <button type="button" class="btn_type06" onclick="fnAcmdtFileZipDownload(); return false;">숙박영수증다운로드</button> -->
@ -405,11 +446,13 @@
<div class="btn_right">
<button type="button" class="btn_type04" onclick="fnInstrFeeCnfrm(); return false;">강사료 확정</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- //cont -->
<!-- //cont -->
</form:form>

View File

@ -6,7 +6,7 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ taglib prefix="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<%@ taglib prefix="un" uri="http://jakarta.apache.org/taglibs/unstandard-1.0" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<un:useConstants var="KccadrStatus" className="kcc.kccadr.cmm.KccadrConstants" />
@ -36,16 +36,38 @@
</style>
<script src="${pageContext.request.contextPath}/js/ve/sendSmsEmailUtil.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// 상태값 확인
$(".ddlnCdStts").each(function() {
var $currentCell = $(this);
// 텍스트가 비어있는지 확인
if ($currentCell.text().trim() === "") {
var $currentRow = $currentCell.closest('tr');
var strtPnttm = new Date($currentRow.find("td:eq(3)").text().split("~")[0].trim());
var endPnttm = new Date($currentRow.find("td:eq(3)").text().split("~")[1].trim());
var currentDate = new Date();
var ddlnCdText = '';
if (currentDate < strtPnttm) {
ddlnCdText = "접수전";
} else if (currentDate >= strtPnttm && currentDate <= endPnttm) {
ddlnCdText = "접수중";
} else if (currentDate > endPnttm) {
ddlnCdText = "접수종료";
}
$currentCell.text(ddlnCdText);
}
});
});
function press(event) {
if (event.keyCode==13) {
fncGoList();
}
}
function fncGoList(){
linkPage(1);
}
@ -53,28 +75,126 @@
function linkPage(pageNo){
var listForm = document.listForm ;
listForm.pageIndex.value = pageNo ;
listForm.searchCondition.value = $('#searchCondition').val();
listForm.searchKeyword.value = $('#searchKeyword').val();
//listForm.searchKeyword.value = $('#searchKeyword').val();
listForm.action = "<c:url value='/kccadr/oprtn/fndthEnhanceTrn/eduInstrFeeMngList.do'/>";
listForm.submit();
}
function chkAll(thisObj){
$("input[name=chk]").prop("checked" , $(thisObj).is(":checked"));
function fncGoDetail(prcsAplctPrdOrd){
var listForm = document.listForm ;
listForm.prcsAplctPrdOrd.value = prcsAplctPrdOrd ;
listForm.action = "<c:url value='/kccadr/oprtn/fndthEnhanceTrn/fndthEduPrcsAplctCfnMngDetail.do'/>";
listForm.submit();
}
function fncDelete(prcsOrd){
document.listForm.prcsOrd.value = prcsOrd ;
var pageIndex = document.listForm.pageIndex.value;
if($(".listCount").length == '1'){
pageIndex = pageIndex -1;
}
var data = new FormData(document.getElementById("listForm"));
if(confirm("삭제하시겠습니까?")){
var url = "<c:url value='/kccadr/oprtn/fndthEnhanceTrn/fndthEduPrcsMngDeleteAjax.do'/>";
console.log(data);
$.ajax({
type:"POST",
url: url,
data: data,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
success:function(returnData){
if(returnData.result == "success"){
alert("삭제되었습니다.");
document.listForm.prcsOrd.value = ""; //리스트 이동시 prcsOrd 초기화
linkPage(pageIndex);
}
},
error:function(request , status, error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
}
event.stopImmediatePropagation();
}
function fncSaveSort(prcsOrd, count){
var sortNo = $('#prcsSortNo'+count).val();
if(sortNo == ''){
alert("표시순서를 입력해 주세요.");
return false;
}
$('#prcsOrd').val(prcsOrd);
$('#prcsSortNo').val(sortNo);
var data = new FormData(document.getElementById("listForm"));
var url = "<c:url value='/kccadr/oprtn/otsdCprtnPrcs/eduPrcsSortUpdateAjax.do'/>";
$.ajax({
type:"POST",
url: url,
data: data,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
success:function(returnData){
if(returnData.result == "success"){
alert("저장되었습니다.");
document.listForm.prcsOrd.value = ""; //리스트 이동시 prcsOrd 초기화
fncGoList();
}
},
error:function(request , status, error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
}
function fncReset(thisObj) {
var targetObj = $(thisObj).closest('.list_top').find('select,input');
$.each(targetObj, function() {
if ($(this).prop('tagName') == 'SELECT') {
if ($(this).attr('name').indexOf('Month') != -1) {
$(this).val(new Date().getMonth() + 1);
} else if ($(this).attr('name').indexOf('Year') != -1) {
$(this).val(new Date().getFullYear());
} else {
$(this).prop("selectedIndex", 0);
}
} else {
if ($(this).attr('type') == 'checkbox') {
$(this).prop('checked', false);
} else {
$(this).val('');
}
}
});
}
//강사료 팝업
function fncInstrCostInfo(eduAplctOrd,eduChasiOrd) {
document.popForm.eduAplctOrd.value = eduAplctOrd;
document.popForm.eduChasiOrd.value = eduChasiOrd;
document.popForm.action = "<c:url value='/kccadr/oprtn/adultVisitEdu/popup/instrCostPopup.do'/>";
document.popForm.action = "<c:url value='/kccadr/oprtn/fndthEnhanceTrn/popup/instrCostPopup.do'/>";
window.open("", "_instrCostPop", "scrollbars = no, top=100px, left=100px, height=750px, width=750px");
document.popForm.target = "_instrCostPop";
document.popForm.submit();
}
}
// 강사료 확정
function fnInstrFeeCnfrm() {
var chkLen = $(listForm).find("input[name=chk]:checked").length;
@ -101,7 +221,7 @@
if(confirm("선택한 목록의 강사료를 확정하시겠습니까?")){
$.ajax({
type:"POST",
url: "${pageContext.request.contextPath}/kccadr/oprtn/adultVisitEdu/eduInstrFeeCnfrmAjax.do",
url: "${pageContext.request.contextPath}/kccadr/oprtn/fndthEnhanceTrn/eduInstrFeeCnfrmAjax.do",
data: data1,
dataType:'json',
async: false,
@ -120,67 +240,7 @@
});
}
}
//숙박영수증 첨부파일 일괄 다운로드(zip) - 파일ID 다름, SN 동일 : type A
function fnAcmdtFileZipDownload(){
var frm = document.listForm;
var checkboxId = Array();
var checkboxSn = Array();
var checkboxCnt = 0;
var checkbox_check = false;
var checkbox_index = false;
$('input:checkbox[name="chk"]').each(function(){
if($(this).is(":checked")){
checkbox_check = true;
if($(this).attr("class") != ""){
checkboxId[checkboxCnt] = $(this).attr("class");
checkboxSn[checkboxCnt] = "0"
checkboxCnt++;
checkbox_index = true;
}
}
});
if(!checkbox_check){
alert("선택된 항목이 없습니다.");
return false;
}else if(!checkbox_index){
alert("다운로드할 영수증이 없습니다.");
return false;
}
frm.orgnZipNm.value="숙박영수증.zip";
frm.downloadType.value="A";
frm.action="${pageContext.request.contextPath}/cmm/fms/fileDownZip.do?atchFileId="+checkboxId+"&fileSn="+checkboxSn;
frm.submit();
}
function excelDownLoad(){
var listForm = document.listForm ;
listForm.action = "<c:url value='/kccadr/oprtn/adultVisitEdu/eduInstrFeeExcelDownLoad.do'/>";
listForm.submit();
}
function fncReset(thisObj){
var targetObj = $(thisObj).closest('.list_top').find('select,input');
$.each(targetObj, function(){
if($(this).prop('tagName') == 'SELECT'){
if($(this).attr('name').indexOf('Month') != -1){
$(this).val(new Date().getMonth()+1);
}else if($(this).attr('name').indexOf('Year') != -1){
$(this).val(new Date().getFullYear());
}else{
$(this).prop("selectedIndex", 0);
}
}else{
$(this).val('');
}
});
}
function chkSendSms(){
var chkLen = $(listForm).find("input[name=chk]:checked").length;
@ -200,200 +260,181 @@
});
alert("발송되었습니다.");
}
}
function excelDownLoad(){
var listForm = document.listForm ;
listForm.action = "<c:url value='/kccadr/oprtn/fndthEnhanceTrn/eduInstrFeeExcelDownLoad.do'/>";
listForm.submit();
}
</script>
<title>신청관리</title>
<title>과정신청기간관리목록</title>
</head>
<body>
<form id="popForm" name="popForm" method="post">
<input type="hidden" name="eduAplctOrd" value=""/>
<input type="hidden" name="eduChasiOrd" value=""/>
</form>
<form:form id="listForm" name="listForm" method="post" onsubmit="return false;">
<input type="hidden" name="pageIndex" value="<c:out value='${vEEduAplctVO.pageIndex}' default='1' />"/>
<input type="hidden" name="searchSortCnd" value="<c:out value="${vEEduAplctVO.searchSortCnd}" />" />
<input type="hidden" name="searchSortOrd" value="<c:out value="${vEEduAplctVO.searchSortOrd}" />" />
<input type="hidden" name="eduAplctOrd" value="" />
<input type="hidden" name="eduChasiOrd" value="" />
<input type="hidden" name="sbmtYn" id="sbmtYn" value="" />
<input type="hidden" name="orgnZipNm" value="" />
<input type="hidden" name="downloadType" value="" />
<form:form id="listForm" name="listForm" method="post" commandName="vEPrcsDetailVO" onsubmit="return false;">
<input type="hidden" name="pageIndex" value="<c:out value='${vEPrcsDetailVO.pageIndex}' default='1' />"/>
<input type="hidden" name="searchSortCnd" value="<c:out value="${vEPrcsDetailVO.searchSortCnd}" />" />
<input type="hidden" name="searchSortOrd" value="<c:out value="${vEPrcsDetailVO.searchSortOrd}" />" />
<input type="hidden" id="prcsOrd" name="prcsOrd" value="" />
<input type="hidden" id="prcsAplctPrdOrd" name="prcsAplctPrdOrd" value="" />
<input type="hidden" id="prcsSortNo" name="prcsSortNo" value="" />
<div class="cont_wrap">
<div class="box">
<!-- cont_tit -->
<div class="cont_tit">
<h2>강사료 확정 처리 목록</h2>
<h2>강사료 확정 관리목록</h2>
<ul class="cont_nav">
<li class="home"><a href="/"><i></i></a></li>
<li>
<p>기반강화연수관리</p>
<p>실무자역량강화</p>
</li>
<li><span class="cur_nav">강사료 확정 관리</span></li>
<li><span class="cur_nav">강사료 확정 관리목록</span></li>
</ul>
</div>
<!-- //cont_tit -->
<div class="cont">
<div class="tb_tit01">
<p>강사료 확정 관리</p>
</div>
<!-- list_top -->
<div class="list_top">
<div class="list_top search-only">
<div class="list_top_1">
<div class="util_left">
<p>구분</p>
</div>
<div class="util_right">
<ve:select codeId="VE0012" name="searchInsttDivCd" id="searchInsttDivCd" styleClass="sel_type1" selectedValue="${vEEduAplctVO.searchInsttDivCd}" defaultValue="" defaultText='전체'/>
<ve:select codeId="VE0007" name="searchEduSlctCd" id="searchEduSlctCd" styleClass="sel_type1" selectedValue="${vEEduAplctVO.searchEduSlctCd}" defaultValue="" defaultText='전체'/>
</div>
</div>
<div class="list_top_2">
<div class="util_left">
<p>교육일자</p>
</div>
<div class="util_right">
<kc:select codeId="VEA001" name="srchCndt1" id="srchCndt1" css="class='sel_type1'"
selectedValue="${vEPrcsDetailVO.srchCndt1 }" defaultValue=""
defaultText="전체"
/>
<div class="calendar_wrap">
<input type="text" class="calendar" title="시작일 선택" id="searchStartDt" name="searchStartDt" value="<c:out value='${vEEduAplctVO.searchStartDt}'/>">
<%-- <input type="text" class="calendar" title="시작일 선택" id="searchSmbtStartDt" name="searchSmbtStartDt" value="${vEPrcsDetailVO.srchKwd2_1}"> --%>
<input type="text" class="calendar" title="시작일 선택" id="srchKwd2_1" name="srchKwd2_1" value="${vEPrcsDetailVO.srchKwd2_1}">
</div>
~
<div class="calendar_wrap">
<input type="text" class="calendar" title="종료일 선택" id="searchEndDt" name="searchEndDt" value="<c:out value='${vEEduAplctVO.searchEndDt}'/>">
<input type="text" class="calendar" title="종료일 선택" id="srchKwd2_2" name="srchKwd2_2" value="${vEPrcsDetailVO.srchKwd2_2}">
</div>
<select class="sel_type1" name="searchCondition" id="searchCondition">
<option value="4" ${vEEduAplctVO.searchCondition eq '4' ? 'selected' : '' }>기관(단체)명</option>
<option value="2" ${vEEduAplctVO.searchCondition eq '2' ? 'selected' : '' }>강사이름</option>
</select>
<input type="text" id=searchKeyword name="searchKeyword" class="search_input" placeholder="검색어를 입력하세요" value="<c:out value='${cryptoUtil.decrypt(vEEduAplctVO.searchKeyword)}'/>" onkeyDown="press(event);">
<button class="btn_type08" onclick="fncGoList(); return false;">검색</button>
<button class="btn_type03" onclick="fncReset(this); return false;">초기화</button>
<input type="text" id="srchKwd3_1" name="srchKwd3_1" placeholder="강사명를 입력하세요." title="검색어 입력" class="search_input" value="<c:out value='${vEPrcsDetailVO.srchKwd3_1}'/>">
<button type="button" class="btn_type08" onclick="fncGoList(); return false;">검색</button>
<button class="btn_type03" onclick="fncReset(this); return false;">초기화</button>
</div>
</div>
</div>
<!-- //list_top -->
<!-- list util -->
</div>
<div class="list_util">
<p class="list_util_p">총 건수 : <span><c:out value="${paginationInfo.totalRecordCount}" /></span>건</p>
<p class="list_util_p"><span><c:out value="${paginationInfo.totalRecordCount}" /></span>건의 접수가 검색되었습니다.</p>
<div>
<select class="sel_type1" name="pageUnit" id="pageUnit" onchange="linkPage(1);" title="줄 선택" style="width: 140px">
<option value='10' <c:if test="${vEEduAplctVO.pageUnit == '10' or vEEduAplctVO.pageUnit == ''}">selected</c:if>>10줄</option>
<option value='20' <c:if test="${vEEduAplctVO.pageUnit == '20'}">selected</c:if>>20줄</option>
<option value='30' <c:if test="${vEEduAplctVO.pageUnit == '30'}">selected</c:if>>30줄</option>
<option value='100' <c:if test="${vEEduAplctVO.pageUnit == '100'}">selected</c:if>>100줄</option>
<select class="sel_type1" name="pageUnit" id="pageUnit" onchange="linkPage(1);" title="줄 선택" style="width: 140px" class="sel_type1">
<option value='10' <c:if test="${vEPrcsDetailVO.pageUnit == '10' or vEPrcsDetailVO.pageUnit == ''}">selected</c:if>>10줄</option>
<option value='20' <c:if test="${vEPrcsDetailVO.pageUnit == '20'}">selected</c:if>>20줄</option>
<option value='30' <c:if test="${vEPrcsDetailVO.pageUnit == '30'}">selected</c:if>>30줄</option>
<option value='100' <c:if test="${vEPrcsDetailVO.pageUnit == '100'}">selected</c:if>>100줄</option>
</select>
<%--<button type="button" class="btn_down_excel">엑셀 다운로드</button>--%>
</div>
</div>
<!-- //list_top -->
<!-- list -->
<div class="tb_type01">
<table>
<colgroup>
<col style="width: 5%;">
<col style="width: 10%;">
<col style="width: 14%;">
<col style="width: 8%;">
<col style="width: 10%;">
<col style="width: 5%">
<col style="width: 10%">
<col style="width: 180px;">
<col style="width: auto">
<col style="width: 9%;">
<col style="width: 9%;">
<col style="width: 8%;">
<col style="width: 10%">
<%-- <col style="width: 180px;"> --%>
<col style="width: 10%">
<col style="width: 10%">
<%-- <col style="width: 10%"> --%>
</colgroup>
<thead>
<tr>
<th><input type="checkbox" name="checkAll" id="checkAll" onclick="chkAll(this);" /><label for="checkAll"></label></th>
<th>교육일자</th>
<th>차시</th>
<th>기관구분</th>
<th>신청유형</th>
<th>기관(단체)명</th>
<th>강사이름</th>
<th>NO</th>
<th>교육구분코드</th>
<th>교육기간<button class="sort sortBtn" id="sort_eduStrtPnttm">▲</button></th>
<th>과정명<button class="sort sortBtn" id="sort_prcsNm">▲</button></th>
<th>강사명</th>
<!-- <th>신청자/정원</th> -->
<th>강사료</th>
<th>확정여부</th>
<th>확정여부<button class="sort sortBtn" id="sort_feeSbmtYn">▲</button></th>
<!-- <th>공개여부</th> -->
</tr>
</thead>
<tbody>
<c:forEach var="list" items="${list}" varStatus="status">
<tr>
<td>
<input name="chk" class="${list.atchFileId}" value="${list.eduAplctOrd}@${list.eduChasiOrd}"
<tr class="listCount">
<td>
<input name="chk" class="${list.atchFileId}" value="${list.prcsAplctPrdOrd}@${list.userId}"
data-instrphone="<c:out value='${list.instrPhone}' />" data-userid="<c:out value='${list.userId}' />"
data-date="<c:out value='${list.eduHopeDt}' /> <c:out value='${list.strtTm}' /> ~ <c:out value='${list.endTm}' />"
data-date="<c:out value='${list.strtPnttm}' /> ~ <c:out value='${list.endPnttm}' />"
data-instrnm="<c:out value='${list.instrNm}' />" data-instrfeesum="<c:out value='${list.instrFeeSum}' />"
title="Check" type="checkbox"/>
</td>
<!--
<td>
<c:if test="${list.cnt eq 0}">미제출</c:if><c:if test="${list.cnt gt 0}">제출</c:if>
</td>
-->
<td>
${list.eduHopeDt}
<%-- <fmt:parseDate value="${list.eduHopeDt}" var="eduHopeDt" pattern="yyyy.MM.dd"/> --%>
<%-- <fmt:formatDate value="${eduHopeDt}" pattern="yyyy.MM.dd"/> --%>
</td>
<td>
<c:choose>
<c:when test="${fn:length(list.strtTm) eq 4}">
<fmt:parseDate value="${list.strtTm}" var="strtTm" pattern="kkmm"/><fmt:formatDate value="${strtTm}" pattern="kk:mm"/>
</c:when>
<c:otherwise>
${list.strtTm}
</c:otherwise>
</c:choose>
~
<c:choose>
<c:when test="${fn:length(list.endTm) eq 4}">
<fmt:parseDate value="${list.endTm}" var="endTm" pattern="kkmm"/><fmt:formatDate value="${endTm}" pattern="kk:mm"/>
</c:when>
<c:otherwise>
${list.strtTm}
</c:otherwise>
</c:choose>
(<c:out value="${list.lrnTm}"/>분)
</td>
<td>
<ve:code codeId="VE0012" code="${list.insttDivCd}"/>
</td>
<td>
<ve:code codeId="VE0007" code="${list.eduSlctCd}"/>
</td>
<td>
<c:out value="${list.insttNm}"/>
</td>
<td onclick="fncGoDetail('<c:out value="${list.prcsAplctPrdOrd}"/>');" style="cursor:pointer;">
<c:out value="${status.count}"/>
</td>
<td>
<kc:code codeId="VEA001" code="${list.prcsDiv}"/>
</td>
<td>
<c:out value="${list.eduStrtPnttm}"/>~<c:out value="${list.eduDdlnPnttm}"/>
</td>
<td onclick="fncGoDetail('<c:out value="${list.prcsAplctPrdOrd}"/>');" style="cursor:pointer;">
<c:out value="${list.prcsNm}"/>(<c:out value="${list.prcsAplctPrdOrd}"/>)
</td>
<td>
<c:out value="${list.instrNm}"/>
<c:if test="${list.instrNm ne null}">
<br/>(${fn:split(list.userId,'_')[1]*1})
</c:if>
</td>
</td>
<td>
<a href="#none" style="font-weight: 600; text-decoration-line: underline;"
onclick="fncInstrCostInfo('<c:out value="${list.eduAplctOrd}" />','<c:out value="${list.eduChasiOrd}" />'); return false;">
<fmt:formatNumber value="${list.instrFeeSum}" pattern="#,###"/>
onclick="fncInstrCostInfo('<c:out value="${list.prcsAplctPrdOrd}" />','<c:out value="${list.userId}" />'); return false;">
<c:choose>
<c:when test="${not empty list.instrFeeSum}">
<fmt:formatNumber value="${list.instrFeeSum}" pattern="#,###"/>
</c:when>
<c:otherwise>
미책정
</c:otherwise>
</c:choose>
</a>
</td>
<td>
<c:if test="${list.feeSbmtYn eq 'Y'}">확정</c:if>
<c:if test="${list.feeSbmtYn ne 'Y'}">미확정</c:if>
</td>
</td>
</tr>
</c:forEach>
<c:if test="${empty list}">
<tr><td colspan="9"><spring:message code="common.nodata.msg" /></td></tr>
<tr><td colspan="7"><spring:message code="common.nodata.msg" /></td></tr>
</c:if>
</tbody>
</table>
</div>
<!-- //list -->
<!-- page -->
<div class="page">
<ui:pagination paginationInfo = "${paginationInfo}" type="image" jsFunction="linkPage" />
</div>
<!-- //page -->
<div class="btn_wrap btn_layout01">
<div class="btn_left">
<!-- <button type="button" class="btn_type06" onclick="fnAcmdtFileZipDownload(); return false;">숙박영수증다운로드</button> -->
@ -405,11 +446,13 @@
<div class="btn_right">
<button type="button" class="btn_type04" onclick="fnInstrFeeCnfrm(); return false;">강사료 확정</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- //cont -->
<!-- //cont -->
</form:form>

View File

@ -0,0 +1,267 @@
<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ taglib prefix="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
/**
* @Class Name : instrCostPopup.jsp
* @Description : 강사비용 팝업
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ ------- -------- ---------------------------
* @ 2021.08.09 김봉호 최초 생성
* @author 안주영
* @since 2022.01.04
* @version 1.0
* @see
*
*/
%>
<html lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
</script>
<title>강의배정팝업</title>
<script type="text/javaScript" language="javascript">
$(document).ready(function(){
numberSum();
$("input:text[numberOnly]").on("keyup", function() {
$(this).val($(this).val().replace(/[^0-9]/g,""));
$(this).val($(this).val().replace(/\B(?=(\d{3})+(?!\d))/g, ','));
numberSum();
});
});
function numberSum(){
// 강사료 계산 [시작]
var instrFee = $("#instrFee").val();
instrFee = instrFee.replaceAll(",", "");
var trafficFee = $("#trafficFee").val();
trafficFee = trafficFee.replaceAll(",", "");
var instrFeeSum = Number(instrFee) + Number(trafficFee);
$("#instrFeeSum").val(instrFeeSum);
$("#instrFeeSum").val($("#instrFeeSum").val().replace(/\B(?=(\d{3})+(?!\d))/g, ','));
// 강사료 계산 [끝]
// 전체 계산 [시작]
var totalSum;
$("#totalSum").val(instrFeeSum);
$("#totalSum").val($("#totalSum").val().replace(/\B(?=(\d{3})+(?!\d))/g, ','));
// 전체 계산 [끝]
}
function fnSaveFee(flag){
var msg = "";
var msgDetail = "";
$("#instrFee").val($("#instrFee").val().replaceAll(',',''));
$("#trafficFee").val($("#trafficFee").val().replaceAll(',',''));
if(flag == 'Y') {
msg = "확정";
msgDetail = "(확정 후에는 수정이 불가능합니다.)"
} else {
msg = "저장(미확정)"
}
$("#sbmtYn").val(flag);
var data1 = new FormData(document.getElementById("createForm"));
if (confirm(msg+" 하시겠습니까?" +"\n"+msgDetail)) {
$.ajax({
type: "POST",
url: "${pageContext.request.contextPath}/kccadr/oprtn/adultVisitEdu/popup/instrFeeRegAjax.do",
//data: JSON.stringify(data),
data: data1,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
success: function (returnData, status) {
if(returnData.result == 'success'){
alert("정상적으로 "+ msg +" 되었습니다.");
opener.location.reload();
self.close();
}else{
alert(returnData.message);
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
}
}
function fncPopClose(){
self.close();
}
</script>
</head>
<body>
<form:form id="createForm" name="createForm" method="post" commandName="vEInstrFeeAcmdtVO" onsubmit="return false;">
<input type="hidden" name="eduAplctOrd" id="eduAplctOrd" value="<c:out value="${info.eduAplctOrd}" />">
<input type="hidden" name="eduChasiOrd" id="eduChasiOrd" value="<c:out value="${info.eduChasiOrd}" />">
<input type="hidden" name="instrFeeOrd" id="instrFeeOrd" value="<c:out value="${info.instrFeeOrd}" />" />
<input type="hidden" name="sbmtYn" id="sbmtYn" value="" />
<div class="area_popup">
<div class="cont_popup">
<c:if test="${empty info or info.sbmtYn ne 'Y'}">
<div class="pop_tb_tit01">
<p>강사료</p>
</div>
<table class="pop_tb_type02">
<colgroup>
<col style="width: 150px;">
<col style="width: auto;">
</colgroup>
<tbody>
<tr>
<th scope="row">
<p>강사료</p>
</th>
<td><input type="text" numberOnly id="instrFee" name="instrFee" value="<fmt:formatNumber value="${info.instrFee}" pattern="#,###"/>"/></td>
</tr>
<tr>
<th scope="row">
<p>교통비</p>
</th>
<td><input type="text" numberOnly id="trafficFee" name="trafficFee" value="<fmt:formatNumber value="${info.trafficFee}" pattern="#,###"/>"/></td>
</tr>
<tr>
<th scope="row">
<p>강사료 합계</p>
</th>
<td><!-- 합계 -->
<input type="text" id="instrFeeSum" name="instrFeeSum" disabled="disabled" value=""/>
</td>
</tr>
</tbody>
</table>
<div class="pop_tb_tit01">
<p>지급 총액</p>
※ 지급 총액은 세전 금액입니다.
</div>
<table class="pop_tb_type02">
<colgroup>
<col style="width: 150px;">
<col style="width: auto;">
</colgroup>
<tbody>
<tr>
<th scope="row">
<p>강사료 합계
</th>
<td><!-- 강사료합계-세금합계 -->
<input type="text" id="totalSum" name="totalSum" disabled="disabled" value=""/>
</td>
</tr>
</tbody>
</table>
</c:if>
<c:if test="${!empty info and info.sbmtYn eq 'Y'}">
<div class="pop_tb_tit01">
<p>강사료</p>
</div>
<table class="pop_tb_type02">
<colgroup>
<col style="width: 150px;">
<col style="width: auto;">
</colgroup>
<tbody>
<tr>
<th scope="row">
<p>강사료</p>
</th>
<td>
<fmt:formatNumber value="${info.instrFee}" pattern="#,###"/>
</td>
</tr>
<tr>
<th scope="row">
<p>교통비</p>
</th>
<td>
<fmt:formatNumber value="${info.trafficFee}" pattern="#,###"/>
</td>
</tr>
<tr>
<th scope="row">
<p>강사료 합계</p>
</th>
<td><!-- 합계 -->
<fmt:formatNumber value="${info.instrFeeSum}" pattern="#,###"/>
</td>
</tr>
</tbody>
</table>
<div class="pop_tb_tit01">
<p>지급 총액</p>
※ 지급 총액은 세전 금액입니다.
</div>
<table class="pop_tb_type02">
<colgroup>
<col style="width: 150px;">
<col style="width: auto;">
</colgroup>
<tbody>
<tr>
<th scope="row">
<p>강사료 합계
<!-- <br>-세금 합계 -->
</p>
</th>
<td><!-- 강사료 합계 - 세금 합계 -->
<fmt:formatNumber value="${info.totalSum}" pattern="#,###"/>
</td>
</tr>
<tr>
<th scope="row">
<p>확정여부</p>
</th>
<td>
<c:if test="${info.sbmtYn eq 'Y'}">확정</c:if>
<c:if test="${info.sbmtYn eq 'N'}">미확정</c:if>
</td>
</tr>
</tbody>
</table>
</c:if>
<div class="btn_wrap_pop btn_layout01">
<div class="btn_left">
</div>
<div class="btn_center">
<c:if test="${info != null }">
<c:if test="${info.sbmtYn ne 'Y'}">
<button type="button" class="btn_type04" onclick="fnSaveFee('Y')">확정</button>
<button type="button" class="btn_type04" onclick="fnSaveFee('N')">저장</button>
</c:if>
</c:if>
<button type="button" class="btn_type02" onclick="fncPopClose()">닫기</button>
</div>
<div class="btn_right">
</div>
</div>
</div>
</div>
</form:form>
</body>
</html>