2023-12-06 14:51 강사료 확정 처리
This commit is contained in:
parent
e2fe96924c
commit
3598375199
@ -75,6 +75,14 @@ public class VeConstants {
|
|||||||
public static final String APRVL_CD_230 = "230"; // 대기
|
public static final String APRVL_CD_230 = "230"; // 대기
|
||||||
|
|
||||||
/*강사료 구분*/
|
/*강사료 구분*/
|
||||||
|
public static final String BASE_INSTR_FEE_A10 = "150000";//성인 강사료 기본료 입문/2급 10,60
|
||||||
|
public static final String BASE_INSTR_FEE_A20 = "200000";//성인 강사료 기본료 전문/1급 20,50
|
||||||
|
public static final String BASE_INSTR_FEE_A30 = "100000";//성인 강사료 기본료 내부
|
||||||
|
|
||||||
|
public static final String BASE_INSTR_FEE_A10_A = "75000";//성인 강사료 추가 입문/2급 10,60
|
||||||
|
public static final String BASE_INSTR_FEE_A20_A = "100000";//성인 강사료 추가 전문/1급 20,50
|
||||||
|
public static final String BASE_INSTR_FEE_A30_A = "50000";//성인 강사료 추가 내부
|
||||||
|
|
||||||
public static final String BASE_INSTR_FEE = "43000";//청소년 강사료 기본료
|
public static final String BASE_INSTR_FEE = "43000";//청소년 강사료 기본료
|
||||||
|
|
||||||
public static final String BASE_ISLTN_FEE = "15000";//도서벽지 기본료
|
public static final String BASE_ISLTN_FEE = "15000";//도서벽지 기본료
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeService;
|
|||||||
|
|
||||||
public class VeInstrFeeMng {
|
public class VeInstrFeeMng {
|
||||||
|
|
||||||
|
//청소년강사용 강사료 계산
|
||||||
public VEInstrFeeAcmdtVO VeInstrFeeMng(VEInstrFeeService vEInstrFeeService , String eduAplctOrd, String eduChasiOrd) throws Exception {
|
public VEInstrFeeAcmdtVO VeInstrFeeMng(VEInstrFeeService vEInstrFeeService , String eduAplctOrd, String eduChasiOrd) throws Exception {
|
||||||
|
|
||||||
// 강사료
|
// 강사료
|
||||||
@ -154,6 +155,222 @@ public class VeInstrFeeMng {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 강사료 합계
|
||||||
|
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())
|
||||||
|
;
|
||||||
|
vEInstrFeeAcmdtVO.setInstrFeeSum(instrFeeSum);
|
||||||
|
|
||||||
|
// 세금 합계 -> 세금 제거 요청으로 제거
|
||||||
|
// int taxSum = Integer.parseInt(vEInstrFeeAcmdtVO.getIncomeTax())
|
||||||
|
// + Integer.parseInt(vEInstrFeeAcmdtVO.getLocalIncomeTax());
|
||||||
|
// vEInstrFeeAcmdtVO.setTaxSum(taxSum);
|
||||||
|
|
||||||
|
// 강사료 합계-세금 합계
|
||||||
|
// int totalSum = instrFeeSum - taxSum;
|
||||||
|
|
||||||
|
return vEInstrFeeAcmdtVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
//성인강사용 강사료 계산+기반+기소
|
||||||
|
public VEInstrFeeAcmdtVO VeInstrFeeMng4Adult(VEInstrFeeService vEInstrFeeService , String eduAplctOrd, String eduChasiOrd) throws Exception {
|
||||||
|
|
||||||
|
// 강사료
|
||||||
|
VEInstrFeeAcmdtVO infoVO = new VEInstrFeeAcmdtVO();
|
||||||
|
infoVO.setEduAplctOrd(eduAplctOrd);
|
||||||
|
infoVO.setEduChasiOrd(eduChasiOrd);
|
||||||
|
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = vEInstrFeeService.selectDetail(infoVO);
|
||||||
|
|
||||||
|
|
||||||
|
if(vEInstrFeeAcmdtVO.getInstrFeeOrd() == null) {
|
||||||
|
|
||||||
|
List<VEInstrFeeAcmdtVO> selectChasiList = vEInstrFeeService.selectChasiList(vEInstrFeeAcmdtVO);
|
||||||
|
System.out.println("@@ "+selectChasiList.get(0).getTotCnt());
|
||||||
|
|
||||||
|
boolean check = false;
|
||||||
|
|
||||||
|
System.out.println(" 조회 차시 정보 "+vEInstrFeeAcmdtVO.getEduChasiOrd());
|
||||||
|
System.out.println(" 첫번쨰 차시 정보 "+selectChasiList.get(0).getEduChasiOrd());
|
||||||
|
if(selectChasiList.get(0).getEduChasiOrd().equals(vEInstrFeeAcmdtVO.getEduChasiOrd())) {
|
||||||
|
check = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 강사료 계산 정리
|
||||||
|
* 강사료 계산 : 기본요금 * 차시 수량
|
||||||
|
* 도서벽지수당 : 오프라인 교육이며 AND 교육지역이 도서벽지에 해당이 되면 기본 값 15,000원 * 차시 수량
|
||||||
|
* 교통비 : 왕복 거리 * 160원
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
|
||||||
|
// 강사료 계산 (강의차시 * 강사 기본값)
|
||||||
|
//성인은 구분에 따라 강사료가 다르다
|
||||||
|
String s_divCd = vEInstrFeeAcmdtVO.getDivCd();
|
||||||
|
int i_lrnTm = Integer.parseInt(selectChasiList.get(0).getLrnTm());
|
||||||
|
|
||||||
|
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));
|
||||||
|
|
||||||
|
// 온라인 여부 확인(10:온라인, 20:오프라인)
|
||||||
|
/*
|
||||||
|
if("20".equals(vEInstrFeeAcmdtVO.getEduSlctCd())){
|
||||||
|
|
||||||
|
// 도서벽지수당 계산(강의 차시 * 15,000원) 22.06.15 도서벽지 수당 중복하도록 요청으로 인한 변경
|
||||||
|
try {
|
||||||
|
if(vEInstrFeeAcmdtVO.getIsltnScholYn().equals("Y")) {
|
||||||
|
int isltnFee = Integer.parseInt(vEInstrFeeAcmdtVO.getChasi()) * Integer.parseInt(VeConstants.BASE_ISLTN_FEE);
|
||||||
|
vEInstrFeeAcmdtVO.setSpecialWorkAllow(Integer.toString(isltnFee));
|
||||||
|
}
|
||||||
|
}catch(Exception ex) {
|
||||||
|
System.out.println(ex.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(check) {
|
||||||
|
|
||||||
|
|
||||||
|
if(vEInstrFeeAcmdtVO.getOnewayDstnc() == null || vEInstrFeeAcmdtVO.getOnewayDstnc().equals("")) {
|
||||||
|
vEInstrFeeAcmdtVO.setOnewayDstnc("0");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 거리비교 200Km 이상 : 40000원, 100Km 이상 : 30000원, 12Km 이상 : 20000원, 1Km 이상 10000원
|
||||||
|
int dstnc = (Integer.parseInt(vEInstrFeeAcmdtVO.getOnewayDstnc()) * 2);
|
||||||
|
|
||||||
|
String passCityList = "강원도,경기도,경상북도,경상남도,충청북도,충청남도,전라북도,전라남도,제주특별자치도";
|
||||||
|
String[] passCityArray = passCityList.split(",");
|
||||||
|
|
||||||
|
boolean passCity = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
String[] scholArea = vEInstrFeeAcmdtVO.getScholArea().split(" ");
|
||||||
|
String[] instrRsdnc = vEInstrFeeAcmdtVO.getInstrRsdnc().split(" ");
|
||||||
|
|
||||||
|
|
||||||
|
System.out.println("학교 : "+scholArea[0]+" "+scholArea[1]+" _강사 :"+instrRsdnc[0]+" "+instrRsdnc[1]+" _거리 :" + dstnc);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 주소 앞자리 비교
|
||||||
|
passCity = true;
|
||||||
|
if(scholArea[0].contains(instrRsdnc[0])){
|
||||||
|
|
||||||
|
for(int i=0; i < passCityArray.length; i++) {
|
||||||
|
if(passCityArray[i].equals(scholArea[0])) {
|
||||||
|
if(!scholArea[1].equals(instrRsdnc[1])){
|
||||||
|
System.out.println("타지역 ");
|
||||||
|
passCity = false;
|
||||||
|
break;
|
||||||
|
}else {
|
||||||
|
System.out.println("거주지");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
// 다르면 끝
|
||||||
|
passCity = false;
|
||||||
|
}
|
||||||
|
}catch(Exception ex) {
|
||||||
|
System.out.println(ex.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 장거리교육수당 확인(거주지 : 10000)
|
||||||
|
if(passCity || dstnc < 12){ // 거주지 인경우
|
||||||
|
System.out.println("거주지");
|
||||||
|
vEInstrFeeAcmdtVO.setDistanceAllow("10000");
|
||||||
|
}else { // 타지역 인경우
|
||||||
|
System.out.println("타지역 : " + vEInstrFeeAcmdtVO.getOnewayDstnc());
|
||||||
|
|
||||||
|
if(dstnc >= 200) {
|
||||||
|
vEInstrFeeAcmdtVO.setDistanceAllow("40000");
|
||||||
|
}else if(dstnc >= 100 && dstnc < 200) {
|
||||||
|
vEInstrFeeAcmdtVO.setDistanceAllow("30000");
|
||||||
|
}else if(dstnc >= 12 && dstnc < 100) {
|
||||||
|
vEInstrFeeAcmdtVO.setDistanceAllow("20000");
|
||||||
|
}else {
|
||||||
|
vEInstrFeeAcmdtVO.setDistanceAllow("10000");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 교통비 계산 (거리 * 교통비 기본값)
|
||||||
|
int trafficFee = (Integer.parseInt(vEInstrFeeAcmdtVO.getOnewayDstnc()) * 2) * Integer.parseInt(VeConstants.BASE_TRAFFIC_FEE);
|
||||||
|
vEInstrFeeAcmdtVO.setTrafficFee(Integer.toString(trafficFee));
|
||||||
|
}
|
||||||
|
vEInstrFeeAcmdtVO.setLikeCheckYn("N");
|
||||||
|
}else {
|
||||||
|
vEInstrFeeAcmdtVO.setDistanceAllow("0");
|
||||||
|
vEInstrFeeAcmdtVO.setLikeCheckYn("Y");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 수당 합계
|
||||||
|
int sum = + Integer.parseInt(vEInstrFeeAcmdtVO.getSpecialWorkAllow())
|
||||||
|
+ Integer.parseInt(vEInstrFeeAcmdtVO.getDistanceAllow());
|
||||||
|
vEInstrFeeAcmdtVO.setAllowance(sum);
|
||||||
|
|
||||||
|
// 여비 합계
|
||||||
|
sum = Integer.parseInt(vEInstrFeeAcmdtVO.getTrafficFee())
|
||||||
|
+ Integer.parseInt(vEInstrFeeAcmdtVO.getAcmdtFee());
|
||||||
|
vEInstrFeeAcmdtVO.setSpareFee(String.format("%,d", sum));
|
||||||
|
}else if("10".equals(vEInstrFeeAcmdtVO.getEduSlctCd())){
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 강사료 합계
|
// 강사료 합계
|
||||||
int instrFeeSum = Integer.parseInt(vEInstrFeeAcmdtVO.getInstrFee())
|
int instrFeeSum = Integer.parseInt(vEInstrFeeAcmdtVO.getInstrFee())
|
||||||
+ Integer.parseInt(vEInstrFeeAcmdtVO.getSpecialWorkAllow())
|
+ Integer.parseInt(vEInstrFeeAcmdtVO.getSpecialWorkAllow())
|
||||||
|
|||||||
@ -38,6 +38,8 @@ public interface VEEduMIXService {
|
|||||||
|
|
||||||
List<VEEduAplctVO> selectTngrFeePagingList(VEEduAplctVO paramVO) throws Exception;
|
List<VEEduAplctVO> selectTngrFeePagingList(VEEduAplctVO paramVO) throws Exception;
|
||||||
|
|
||||||
|
List<VEEduAplctVO> selectAdultFeePagingList(VEEduAplctVO paramVO) throws Exception;
|
||||||
|
|
||||||
List<VEEduAplctVO> selectTngrRsltPagingList4Excel(VEEduAplctVO paramVO) throws Exception;
|
List<VEEduAplctVO> selectTngrRsltPagingList4Excel(VEEduAplctVO paramVO) throws Exception;
|
||||||
|
|
||||||
List<VEEduChasiVO> selectChasiList(VEEduChasiVO vEEduChasiVO) throws Exception;
|
List<VEEduChasiVO> selectChasiList(VEEduChasiVO vEEduChasiVO) throws Exception;
|
||||||
|
|||||||
@ -93,6 +93,12 @@ public class VEEduMIXDAO extends EgovAbstractDAO {
|
|||||||
return tlist;
|
return tlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<VEEduAplctVO> selectAdultFeePagingList(VEEduAplctVO paramVO) {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
List<VEEduAplctVO> tlist = (List<VEEduAplctVO>) list("VEEduMIXDAO.selectAdultFeePagingList", paramVO);
|
||||||
|
return tlist;
|
||||||
|
}
|
||||||
|
|
||||||
public List<VEEduAplctVO> selectTngrRsltPagingList4Excel(VEEduAplctVO paramVO) {
|
public List<VEEduAplctVO> selectTngrRsltPagingList4Excel(VEEduAplctVO paramVO) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<VEEduAplctVO> tlist = (List<VEEduAplctVO>) list("VEEduMIXDAO.selectTngrRsltPagingList4Excel", paramVO);
|
List<VEEduAplctVO> tlist = (List<VEEduAplctVO>) list("VEEduMIXDAO.selectTngrRsltPagingList4Excel", paramVO);
|
||||||
|
|||||||
@ -81,6 +81,11 @@ public class VEEduMIXServiceImpl implements VEEduMIXService {
|
|||||||
return vEEduMIXDAO.selectTngrFeePagingList(paramVO);
|
return vEEduMIXDAO.selectTngrFeePagingList(paramVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<VEEduAplctVO> selectAdultFeePagingList(VEEduAplctVO paramVO) throws Exception{
|
||||||
|
return vEEduMIXDAO.selectAdultFeePagingList(paramVO);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<VEEduAplctVO> selectTngrRsltPagingList4Excel(VEEduAplctVO paramVO) throws Exception{
|
public List<VEEduAplctVO> selectTngrRsltPagingList4Excel(VEEduAplctVO paramVO) throws Exception{
|
||||||
return vEEduMIXDAO.selectTngrRsltPagingList4Excel(paramVO);
|
return vEEduMIXDAO.selectTngrRsltPagingList4Excel(paramVO);
|
||||||
|
|||||||
@ -32,7 +32,7 @@ import kcc.kccadr.adjreqmgr.service.AdjReqMgrVO;
|
|||||||
import kcc.kccadr.kccadrCom.service.KccadrMgrUdtService;
|
import kcc.kccadr.kccadrCom.service.KccadrMgrUdtService;
|
||||||
import kcc.let.uat.uia.service.SsoLoginVO;
|
import kcc.let.uat.uia.service.SsoLoginVO;
|
||||||
import kcc.let.utl.fcc.service.EgovCryptoUtil;
|
import kcc.let.utl.fcc.service.EgovCryptoUtil;
|
||||||
import kcc.ve.cmm.VeConstants;
|
import kcc.ve.cmm.VeInstrFeeMng;
|
||||||
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEAsgnmMIXService;
|
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEAsgnmMIXService;
|
||||||
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEEduChasiInstrAsgnmService;
|
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEEduChasiInstrAsgnmService;
|
||||||
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEEduPnltyService;
|
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEEduPnltyService;
|
||||||
@ -972,6 +972,7 @@ public class AreaLctrMngAdultController {
|
|||||||
//로그인 처리====================================
|
//로그인 처리====================================
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
/*
|
||||||
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = new VEInstrFeeAcmdtVO();
|
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = new VEInstrFeeAcmdtVO();
|
||||||
|
|
||||||
vEInstrFeeAcmdtVO.setEduAplctOrd(vEInstrAsgnmVO.getEduAplctOrd());
|
vEInstrFeeAcmdtVO.setEduAplctOrd(vEInstrAsgnmVO.getEduAplctOrd());
|
||||||
@ -990,10 +991,15 @@ public class AreaLctrMngAdultController {
|
|||||||
int instrFeeSum = Integer.parseInt(vEInstrFeeAcmdtVO.getInstrFee()) + Integer.parseInt(vEInstrFeeAcmdtVO.getTrafficFee());
|
int instrFeeSum = Integer.parseInt(vEInstrFeeAcmdtVO.getInstrFee()) + Integer.parseInt(vEInstrFeeAcmdtVO.getTrafficFee());
|
||||||
|
|
||||||
vEInstrFeeAcmdtVO.setInstrFeeSum(instrFeeSum);
|
vEInstrFeeAcmdtVO.setInstrFeeSum(instrFeeSum);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 강사료 계산
|
||||||
|
VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng();
|
||||||
|
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = veInstrFeeMng.VeInstrFeeMng4Adult(vEInstrFeeService, vEInstrAsgnmVO.getEduAplctOrd(), vEInstrAsgnmVO.getEduChasiOrd());
|
||||||
|
|
||||||
//지급총액 계산
|
//지급총액 계산
|
||||||
int totalSum = instrFeeSum;
|
//int totalSum = instrFeeSum;
|
||||||
vEInstrFeeAcmdtVO.setTotalSum(totalSum);
|
//vEInstrFeeAcmdtVO.setTotalSum(totalSum);
|
||||||
|
|
||||||
model.addAttribute("info",vEInstrFeeAcmdtVO);
|
model.addAttribute("info",vEInstrFeeAcmdtVO);
|
||||||
}catch(Exception ex) {
|
}catch(Exception ex) {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import javax.annotation.Resource;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -20,6 +21,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
|
|
||||||
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
|
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
|
||||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import kcc.com.cmm.ComDefaultCodeVO;
|
||||||
import kcc.com.cmm.LoginVO;
|
import kcc.com.cmm.LoginVO;
|
||||||
import kcc.com.cmm.service.EgovCmmUseService;
|
import kcc.com.cmm.service.EgovCmmUseService;
|
||||||
import kcc.com.cmm.service.EgovFileMngService;
|
import kcc.com.cmm.service.EgovFileMngService;
|
||||||
@ -39,6 +41,7 @@ import kcc.ve.cmm.VeConstants;
|
|||||||
import kcc.ve.cmm.VeInstrFeeMng;
|
import kcc.ve.cmm.VeInstrFeeMng;
|
||||||
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEAsgnmMIXService;
|
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEAsgnmMIXService;
|
||||||
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEEduPnltyService;
|
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEEduPnltyService;
|
||||||
|
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrAsgnmVO;
|
||||||
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeAcmdtVO;
|
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeAcmdtVO;
|
||||||
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeService;
|
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeService;
|
||||||
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctService;
|
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctService;
|
||||||
@ -486,7 +489,7 @@ public class EduRsltMngAdultController {
|
|||||||
|
|
||||||
// 강사료 계산
|
// 강사료 계산
|
||||||
VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng();
|
VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng();
|
||||||
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = veInstrFeeMng.VeInstrFeeMng(vEInstrFeeService, vEEduAplctVOList.get(i).getEduAplctOrd(), vEEduAplctVOList.get(i).getEduChasiOrd());
|
VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = veInstrFeeMng.VeInstrFeeMng4Adult(vEInstrFeeService, vEEduAplctVOList.get(i).getEduAplctOrd(), vEEduAplctVOList.get(i).getEduChasiOrd());
|
||||||
vEEduAplctVOList.get(i).setInstrFeeSum(Integer.toString(vEInstrFeeAcmdtVO.getInstrFeeSum()));
|
vEEduAplctVOList.get(i).setInstrFeeSum(Integer.toString(vEInstrFeeAcmdtVO.getInstrFeeSum()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -513,6 +516,214 @@ public class EduRsltMngAdultController {
|
|||||||
return "oprtn/adultVisitEdu/eduInstrFeeMngList";
|
return "oprtn/adultVisitEdu/eduInstrFeeMngList";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 강사료 확정 처리
|
||||||
|
*/
|
||||||
|
@RequestMapping("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.VeInstrFeeMng4Adult(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 = "eduInstrFeeExcelDownLoad.do")
|
||||||
|
public ModelAndView eduInstrFeeExcelDownLoad(@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO
|
||||||
|
, ModelMap model) throws Exception {
|
||||||
|
|
||||||
|
// 엑셀 페이징으로 변경
|
||||||
|
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();
|
||||||
|
list.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.VeInstrFeeMng4Adult(vEInstrFeeService, vo.getEduAplctOrd(), vo.getEduChasiOrd());
|
||||||
|
|
||||||
|
// 온라인 교육
|
||||||
|
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(list);
|
||||||
|
// 세팅값
|
||||||
|
String title = "강사료 지급내역";
|
||||||
|
|
||||||
|
// 너비
|
||||||
|
int[] width = {
|
||||||
|
4000, 4000, 4000, 6000, 6000
|
||||||
|
, 4000, 4000, 4000, 4000, 4000, 4000, 4000
|
||||||
|
, 4000, 4000
|
||||||
|
};
|
||||||
|
|
||||||
|
// 헤더
|
||||||
|
String[] header = {
|
||||||
|
"교육일자", "차시", "학교구분", "지역", "학교(기관)명"
|
||||||
|
, "강사이름", "강사료", "편도거리", "도서벽지 수당", "거리 수당", "교통비", "식비"
|
||||||
|
,"숙박비", "강사료 합계"
|
||||||
|
};
|
||||||
|
|
||||||
|
// 컬럼명
|
||||||
|
String[] order = {
|
||||||
|
"EduHopeDt", "ChasiCnt", "ScholDivCd", "EduSlctAreaCd", "ScholInsttNm"
|
||||||
|
, "InstrNm", "InstrFeeOrd", "OnewayDstnc", "SpecialWorkAllow", "DistanceAllow" , "TrafficFee", "FoodExpenses"
|
||||||
|
, "AcmdtFee", "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;
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@RequestMapping(value = "eduRsltSrvyExcelDownLoad.do")
|
@RequestMapping(value = "eduRsltSrvyExcelDownLoad.do")
|
||||||
public ModelAndView eduRsltSrvyExcelDownLoad(@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO, ModelMap model) throws Exception {
|
public ModelAndView eduRsltSrvyExcelDownLoad(@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO, ModelMap model) throws Exception {
|
||||||
|
|||||||
@ -347,6 +347,7 @@
|
|||||||
COUNT(1) OVER() AS totCnt
|
COUNT(1) OVER() AS totCnt
|
||||||
, A.EDU_APLCT_ORD AS eduAplctOrd
|
, A.EDU_APLCT_ORD AS eduAplctOrd
|
||||||
, A.EDU_CHASI_ORD AS eduChasiOrd
|
, A.EDU_CHASI_ORD AS eduChasiOrd
|
||||||
|
, F.lrn_tm AS lrnTm
|
||||||
FROM
|
FROM
|
||||||
VE_EDU_CHASI_INSTR_ASGNM A
|
VE_EDU_CHASI_INSTR_ASGNM A
|
||||||
LEFT OUTER JOIN ve_edu_chasi F
|
LEFT OUTER JOIN ve_edu_chasi F
|
||||||
|
|||||||
@ -100,7 +100,7 @@
|
|||||||
if(confirm("선택한 목록의 강사료를 확정하시겠습니까?")){
|
if(confirm("선택한 목록의 강사료를 확정하시겠습니까?")){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url: "${pageContext.request.contextPath}/kccadr/oprtn/tngrVisitEdu/eduInstrFeeCnfrmAjax.do",
|
url: "${pageContext.request.contextPath}/kccadr/oprtn/adultVisitEdu/eduInstrFeeCnfrmAjax.do",
|
||||||
data: data1,
|
data: data1,
|
||||||
dataType:'json',
|
dataType:'json',
|
||||||
async: false,
|
async: false,
|
||||||
@ -159,7 +159,7 @@
|
|||||||
|
|
||||||
function excelDownLoad(){
|
function excelDownLoad(){
|
||||||
var listForm = document.listForm ;
|
var listForm = document.listForm ;
|
||||||
listForm.action = "<c:url value='/kccadr/oprtn/tngrVisitEdu/eduInstrFeeExcelDownLoad.do'/>";
|
listForm.action = "<c:url value='/kccadr/oprtn/adultVisitEdu/eduInstrFeeExcelDownLoad.do'/>";
|
||||||
listForm.submit();
|
listForm.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user