2024-03-18 17:08 실무역량강화 반려/승인시 다시 사용 가능하도록 수정

This commit is contained in:
myname 2024-03-18 17:08:41 +09:00
parent 0045754f04
commit 188640b804
9 changed files with 380 additions and 11 deletions

View File

@ -37,6 +37,7 @@ import kcc.let.utl.fcc.service.ITNotiUtil;
import kcc.ve.adv.tngr.stngInfo.service.VEACmpltCrtfcMixService;
import kcc.ve.aplct.adultVisitEdu.eduAplct.service.EduAplctAdultService;
import kcc.ve.aplct.fndtnEnhanceTrn.service.FndtnEnhanceTrnService;
import kcc.ve.aplct.sspnIdtmt.service.SspnIdtmtService;
import kcc.ve.cmm.VeConstants;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctOnlnService;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctService;
@ -91,6 +92,9 @@ public class FndtnEnhanceTrnController {
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileService;
//온라인콘텐츠과정 관리
@Resource(name = "sspnIdtmtService")
private SspnIdtmtService sspnIdtmtService;
//과정 관리
@Resource(name = "vEPrcsService")
@ -499,6 +503,7 @@ public class FndtnEnhanceTrnController {
}
*/
/*
//1.pageing step1
//과정 조회
VEPrcsDetailVO vEPrcsDetailVODetail = vEPrcsAplctPrdService.selectDetailNewOne4Fndth(vEPrcsDetailVO);
@ -530,6 +535,48 @@ public class FndtnEnhanceTrnController {
vEPrcsDetailVODetail.setPrcsAplctPrdEtcOrd(vEPrcsEtcDetail.getPrcsAplctPrdEtcOrd());
}
model.addAttribute("info", vEPrcsDetailVODetail);
//model.addAttribute("prcsAplctVO", vEEduAplctVO);
*/
//1.pageing step1
//과정 조회
VEPrcsDetailVO vEPrcsDetailVODetail = vEPrcsAplctPrdService.selectDetailNewOne4Fndth(vEPrcsDetailVO);
VEEduAplctVO vEEduAplctReqVO = new VEEduAplctVO();
vEEduAplctReqVO.setUserId(loginVO.getUniqId());
vEEduAplctReqVO.setLctrDivCd(vEPrcsDetailVODetail.getLctrDivCd());
vEEduAplctReqVO.setPrcsAplctPrdOrd(vEPrcsDetailVODetail.getPrcsAplctPrdOrd());
vEEduAplctReqVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_50);
VEEduAplctVO vEEduAplctVO = sspnIdtmtService.findByAprvlCd(vEEduAplctReqVO);
// VO를 먼저 null 체크 진행해야 에러안남
// vEEduAplctVO != null &&
if(vEEduAplctVO != null && StringUtils.isNotEmpty(vEEduAplctVO.getAprvlCd())) {
vEPrcsDetailVODetail.setAprvlCd(vEEduAplctVO.getAprvlCd());
}
model.addAttribute("info", vEPrcsDetailVODetail);
model.addAttribute("infoAplctOrd", vEEduAplctVO);
//신청 상태 정보를 가져온다.
VEPrcsDetailVO vEPrcsAplctVO = new VEPrcsDetailVO();
//신청이 없는 경우를 위한 예외 처리
try {
if (vEEduAplctVO !=null) {
vEPrcsAplctVO.setPrcsAplctPrdOrd(vEPrcsDetailVODetail.getPrcsAplctPrdOrd());
vEPrcsAplctVO.setEduAplctOrd(vEEduAplctVO.getEduAplctOrd());
vEPrcsAplctVO = vEPrcsAplctPrdService.selectAplctInfo(vEPrcsAplctVO);
}
}catch(Exception ex) {
ex.printStackTrace();
}
model.addAttribute("prcsAplctVO", vEPrcsAplctVO);
}catch(Exception ex) {
ex.printStackTrace();
}
@ -1034,7 +1081,68 @@ public class FndtnEnhanceTrnController {
}
//사용자 - 기소유예 상태 변경
@RequestMapping(value="/web/ve/aplct/fndtnEnhanceTrn/eduAplctStatusChange4UserAjax.do")
public ModelAndView eduAplctStatusChange4UserAjax( HttpServletRequest request , ModelMap model
, VEPrcsDetailVO vEPrcsDetailVO
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
//로그인 체크====================================
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기
String s_userCheckNInfo = checkLoginUtil.userCheckNInfo(model, request);
if (!"".equals(s_userCheckNInfo)) {
modelAndView.addObject("result", "loginFail");
return modelAndView;
}
//로그인 체크====================================
//4개 테이블에 대한 상태 변경이 필요하다.
//ve_prcs_aplct_prd - 교육과정정보,
//ve_edu_aplct - 교육신청상태,
//vea_aplct_detail_info - 교육신청 상세
//vea_sspn_idtmt_trgt - 교육의뢰대상자
/*
* 기본 전달값을 하면 요청 번호에 따라서 처리 하도록 한다.
private String eduAplctOrd; //교육신청순번
private String prcsAplctPrdOrd; //교육과정순번
private String reqNo; //요청번호 - excel 참고 - 해당 번호에 따라서 처리
*/
//신청 상태 정보를 가져온다.
VEPrcsDetailVO vEPrcsAplctVO = vEPrcsAplctPrdService.selectAplctInfo(vEPrcsDetailVO);
if (vEPrcsAplctVO==null) {
modelAndView.addObject("result", "fail");
return modelAndView;
}
vEPrcsAplctVO.setReqNo(vEPrcsDetailVO.getReqNo());
//수정자 정보
vEPrcsAplctVO.setLastUpdusrId(loginVO.getUniqId());
System.out.println("vEPrcsAplctVO.getReqNo()");
System.out.println(vEPrcsAplctVO.getReqNo());
System.out.println(vEPrcsAplctVO.getReqNo());
int i_ret = 0;
try {
i_ret = vEPrcsAplctPrdService.updateStatusChange4User4Fndtn(vEPrcsAplctVO);
}catch(Exception ex) {
System.out.println(ex.toString());
}
modelAndView.addObject("result", "success");
modelAndView.addObject("rsCnt", i_ret);
return modelAndView;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//

View File

@ -61,6 +61,8 @@ public interface VEPrcsAplctPrdService {
//사용자 취소 신청 처리
int updateStatusChange4User(VEPrcsDetailVO vEPrcsDetailVO) throws Exception;
//사용자 취소 신청 처리-실무역량
int updateStatusChange4User4Fndtn(VEPrcsDetailVO vEPrcsDetailVO) throws Exception;
void updateOneColumn(VEPrcsDetailVO vEPrcsDetailVO) throws Exception;

View File

@ -264,6 +264,84 @@ public class VEPrcsAplctPrdServiceImpl implements VEPrcsAplctPrdService {
//return vEPrcsAplctPrdDAO.updateStatusChange4User(vEPrcsDetailVO);
}
@Override
public int updateStatusChange4User4Fndtn(VEPrcsDetailVO vEPrcsDetailVO) throws Exception {
String s_reqNo = vEPrcsDetailVO.getReqNo();
if ("2-1".equals(s_reqNo) //사용자 신청 취소
|| "3-1".equals(s_reqNo) //관리자 승인 취소
|| "5-1".equals(s_reqNo) //관리자 교육 신청 마감 이후 취소
) {
//대상자 교육신청후 교육 취소 처리
//ve_prcs_aplct_prd : 처리 없음
//ve_edu_aplct : 삭제
//vea_aplct_detail_info : 삭제
VEEduAplctVO vEEduAplctVO = new VEEduAplctVO();
vEEduAplctVO.setEduAplctOrd(vEPrcsDetailVO.getEduAplctOrd());
//vEPrcsAplctPrdDAO.delete(vEPrcsDetailVO);
vEEduAplctDAO.delete(vEEduAplctVO);
vEPrcsMIXDAO.deleteAplctDetailInfo(vEPrcsDetailVO);
//vEPrcsMIXDAO.updateSspnIdmtTrgtCancelNew(vEPrcsDetailVO);
}else if ("4".equals(vEPrcsDetailVO.getReqNo())) {
//대상자 교육신청후 관리자가 반려 처리
//ve_prcs_aplct_prd : 처리 없음
//ve_edu_aplct : update aprvl_cd=35
//vea_aplct_detail_info : 처리 없음
VEEduAplctVO vEEduAplctVO = new VEEduAplctVO();
vEEduAplctVO.setEduAplctOrd(vEPrcsDetailVO.getEduAplctOrd());
//vEPrcsAplctPrdDAO.delete(vEPrcsDetailVO);
//vEEduAplctDAO.delete(vEEduAplctVO);
vEEduAplctDAO.updateSspnIdmtTrgtCancelNew(vEPrcsDetailVO);
vEPrcsMIXDAO.updateAplctDetailInfo(vEPrcsDetailVO);
//vEPrcsMIXDAO.updateSspnIdmtTrgtCancelNew(vEPrcsDetailVO);
}else if ("6".equals(vEPrcsDetailVO.getReqNo())) {
//교육확정
//ve_prcs_aplct_prd : 처리 없음(앞에서 처리)
//ve_edu_aplct : update aprvl_cd=60
//vea_aplct_detail_info : 처리 없음
VEEduAplctVO vEEduAplctVO = new VEEduAplctVO();
vEEduAplctVO.setEduAplctOrd(vEPrcsDetailVO.getEduAplctOrd());
//vEPrcsAplctPrdDAO.delete(vEPrcsDetailVO);
//vEEduAplctDAO.delete(vEEduAplctVO);
vEEduAplctDAO.updateSspnIdmtTrgtCancelNew(vEPrcsDetailVO);
//vEPrcsMIXDAO.updateAplctDetailInfo(vEPrcsDetailVO);
//vEPrcsMIXDAO.updateSspnIdmtTrgtCancelNew(vEPrcsDetailVO);
}else if ("6-1".equals(vEPrcsDetailVO.getReqNo())) {
//대상자 교육신청후 교육 취소 처리
//ve_prcs_aplct_prd : 처리 없음
//ve_edu_aplct : update aprvl_cd=35
//vea_aplct_detail_info : 처리 없음
VEEduAplctVO vEEduAplctVO = new VEEduAplctVO();
vEEduAplctVO.setEduAplctOrd(vEPrcsDetailVO.getEduAplctOrd());
//vEPrcsAplctPrdDAO.delete(vEPrcsDetailVO);
//vEEduAplctDAO.delete(vEEduAplctVO);
vEEduAplctDAO.updateSspnIdmtTrgtCancelNew(vEPrcsDetailVO);
//vEPrcsMIXDAO.deleteAplctDetailInfo(vEPrcsDetailVO);
//vEPrcsMIXDAO.updateSspnIdmtTrgtCancelNew(vEPrcsDetailVO);
}
return 1;
//return vEPrcsAplctPrdDAO.updateStatusChange4User(vEPrcsDetailVO);
}
@Override
public List<VEPrcsDetailVO> selectTrgtList4_60(VEPrcsDetailVO paramVO) throws Exception{
return vEPrcsAplctPrdDAO.selectTrgtList4_60(paramVO);

View File

@ -27,6 +27,7 @@ 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.uat.uia.service.SsoLoginVO;
import kcc.let.utl.fcc.service.EgovCryptoUtil;
import kcc.ve.cmm.VeInstrFeeMng;
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrAsgnmVO;
@ -691,6 +692,85 @@ public class FndthInstrMngController {
return "oprtn/fndthEnhanceTrn/popup/instrCostPopup";
}
//사용자 - 기소유예 상태 변경
@RequestMapping(value="/kccadr/oprtn/fndthEnhanceTrn/eduAplctStatusChange4UserListAjax.do")
public ModelAndView eduAplctStatusChange4UserListAjax( HttpServletRequest request , ModelMap model
, VEPrcsDetailVO vEPrcsDetailVO
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
//로그인 체크====================================
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기
if (loginVO==null) {
modelAndView.addObject("result", "loginFail");
return modelAndView;
}
//로그인 체크====================================
//4개 테이블에 대한 상태 변경이 필요하다.
//ve_prcs_aplct_prd - 교육과정정보,
//ve_edu_aplct - 교육신청상태,
//vea_aplct_detail_info - 교육신청 상세
//vea_sspn_idtmt_trgt - 교육의뢰대상자
/*
* 기본 전달값을 하면 요청 번호에 따라서 처리 하도록 한다.
private String eduAplctOrd; //교육신청순번
private String prcsAplctPrdOrd; //교육과정순번
private String reqNo; //요청번호 - excel 참고 - 해당 번호에 따라서 처리
*/
int i_ret = 0;
for(String eduAplctOrd : vEPrcsDetailVO.getEduAplctOrdList()) {
//결과보고서 제출 알림
try {
//신청 상태 정보를 가져온다.
vEPrcsDetailVO.setEduAplctOrd(eduAplctOrd);
VEPrcsDetailVO vEPrcsAplctVO = vEPrcsAplctPrdService.selectAplctInfo(vEPrcsDetailVO);
if (vEPrcsAplctVO==null) {
modelAndView.addObject("result", "fail");
return modelAndView;
}
vEPrcsAplctVO.setReqNo(vEPrcsDetailVO.getReqNo());
//수정자 정보
vEPrcsAplctVO.setLastUpdusrId(loginVO.getUniqId());
System.out.println("vEPrcsAplctVO.getReqNo()");
System.out.println(vEPrcsAplctVO.getReqNo());
System.out.println(vEPrcsAplctVO.getReqNo());
try {
i_ret = vEPrcsAplctPrdService.updateStatusChange4User4Fndtn(vEPrcsAplctVO);
}catch(Exception ex) {
System.out.println(ex.toString());
}
}catch(Exception ex) {
ex.printStackTrace();
}
}
modelAndView.addObject("result", "success");
modelAndView.addObject("rsCnt", i_ret);
return modelAndView;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//

View File

@ -260,7 +260,6 @@
</isNotEmpty>
AND a.use_yn = 'Y'
AND a.aprvl_cd != '40' /* 취소된 내역 안 보여줌 */
AND a.aprvl_cd != 100 /*찜 신청자 제거*/
<!-- AND le.MBER_NM IS NOT NULL -->

View File

@ -274,6 +274,68 @@
alert("발송되었습니다.");
}
// 사용자 승인 반려 처리 : 체크박스X
function fncCancelUserList(
p_prcsAplctPrdOrd
, p_reqNo
){
// 기존에 있던 updateEduAplctOrdList function 사용하기 위한 function
var selectedEduAplctOrd = [];
// "chk" 이름을 가진 체크박스가 체크된 항목들을 순회
$("input[name='chk']:checked").each(function() {
var eduAplctOrdValue = $(this).val();
selectedEduAplctOrd.push(eduAplctOrdValue);
});
// 선택된 항목이 없으면 경고 메시지를 표시하고 함수를 종료
if (selectedEduAplctOrd.length === 0) {
alert("선택된 항목이 없습니다. 선택 후 다시 시도하세요.");
return false;
}
var dataToSend = {
"eduAplctOrdList": selectedEduAplctOrd,
"prcsAplctPrdOrd": p_prcsAplctPrdOrd,
"reqNo" : p_reqNo
};
var url = "<c:url value='/kccadr/oprtn/fndthEnhanceTrn/eduAplctStatusChange4UserListAjax.do'/>";
commAjax_url(dataToSend, url);
}
function commAjax_url(dataToSend, p_url){
//var url = "<c:url value='/kccadr/oprtn/cndtnSspnIdtmt/updateEduAplctAprvlCdAjax.do'/>";
var url = p_url;
// AJAX 호출을 통해 서버에 데이터 전송
$.ajax({
type:"POST",
url: url,
data: $.param(dataToSend, true), // 직렬화 , 컨트롤러에서 @ModelAttribute로 받을 수 있음
// contentType : 'application/json',
dataType:'json',
success:function(returnData){
if(returnData.result == "success"){
alert("변경 처리 되었습니다.");
window.location.reload();
}else{
alert("변경 중 오류가 발생하였습니다.");
}
},
error: function(jqXHR, textStatus, errorThrown) {
console.error("AJAX Error:", textStatus, errorThrown);
console.error("Response:", jqXHR.responseText);
}
});
}
</script>
</head>
@ -693,8 +755,10 @@
</div>
<div class="btn_right">
<button type="button" class="btn_type04" onclick="location.href='<c:url value="/kccadr/oprtn/fndthEnhanceTrn/fndthEduPrcsAplctPrdMngList.do" />'; return false;">강의목록</button>
<button type="button" class="btn_type04" onclick="updateEduAplctOrd(30, '<c:out value="${info.prcsAplctPrdOrd }" />'); return false;">접수취소(반려)</button>
<%-- <button type="button" class="btn_type04" onclick="updateEduAplctOrd(30, '<c:out value="${info.prcsAplctPrdOrd }" />'); return false;">접수취소(반려)</button> --%>
<button type="button" class="btn_type04" onclick="fncCancelUserList('<c:out value="${info.prcsAplctPrdOrd }" />','4'); return false;">접수취소(반려)</button>
<button type="button" class="btn_type04" onclick="updateEduAplctOrd(20, '<c:out value="${info.prcsAplctPrdOrd }" />'); return false;">교육승인</button>
</div>
</div>

View File

@ -42,7 +42,10 @@
// 텍스트가 비어있는지 확인
console.log('$ddlnCdStts.text(): ',$ddlnCdStts.text());
if ($ddlnCdStts.text().trim() === "" || $ddlnCdStts.text().trim() === "찜하기") {
if ($ddlnCdStts.text().trim() === ""
|| $ddlnCdStts.text().trim() === "찜하기"
|| $ddlnCdStts.text().trim() === "반려"
) {
var dateText = $ddlnCdStts.closest('table').find("td:eq(2)").text().trim();
var strtPnttm = new Date(dateText.split("~")[0].trim().replace(/\./g, '-'));
@ -52,6 +55,9 @@
endPnttm.setHours(0, 0, 0, 0);
var currentDate = new Date();
// new Date에서 년, 월, 일만 생성
currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());
var textVal='';
if (currentDate < strtPnttm) {
@ -195,6 +201,33 @@
);
}
function fncCancelUser(
p_eduAplctOrd
, p_prcsAplctPrdOrd
, p_reqNo
){
if(confirm("교육 수강을 취소 하시겠습니까?")){
$.ajax({
type:"POST",
url:"${pageContext.request.contextPath}/web/ve/aplct/fndtnEnhanceTrn/eduAplctStatusChange4UserAjax.do",
data: {
"eduAplctOrd" : p_eduAplctOrd
, "prcsAplctPrdOrd" : p_prcsAplctPrdOrd
, "reqNo" : p_reqNo
},
dataType:'json',
success:function(returnData){
if(returnData.rsCnt > 0){
alert("취소 되었습니다.");
fncGoList();
}
},
error:function(request , status, error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
}
}
</script>
<form name="listForm">
@ -346,6 +379,9 @@
</button>
</div>
<div class="btn_center">
<c:if test="${(info.aprvlCd eq '10' or info.aprvlCd eq '20') and info.ddlnCd ne '20'}">
<button type="button" class="btnType05" onclick="fncCancelUser('${infoAplctOrd.eduAplctOrd}', '${infoAplctOrd.prcsOrd}', '2-1')">교육취소</button>
</c:if>
</div>
<div class="btn_right">
<button type="button" id="regBtn" class="btnType04" onclick="fn_eduRegPopup('<c:out value="${info.prcsAplctPrdOrd}"/>');" data-info="<c:out value='${info.prcsAplctPrdOrd}'/>" data-tooltip="target_confirm_popup">

View File

@ -313,8 +313,9 @@ $(document).ready(function(){
);
}
function fn_cancel(){
alert("관리자에게 취소 요청 해주세요~");
function fn_cancel(p_prcsAplctPrdOrd){
fncGoDetail(p_prcsAplctPrdOrd);
//alert("관리자에게 취소 요청 해주세요~");
}
function fn_ggim(prcsAplctPrdOrd){
var regForm = document.regForm;

View File

@ -59,6 +59,7 @@
// new Date에서 년, 월, 일만 생성
currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());
if (currentDate < strtPnttm) {
$ddlnCdStts.text("접수전");
} else if (currentDate >= strtPnttm && currentDate <= endPnttm) {