diff --git a/src/main/java/xit/vips/category/rev/rev010101/web/Rev010101Controller.java b/src/main/java/xit/vips/category/rev/rev010101/web/Rev010101Controller.java index 14afcb0..a3cd974 100644 --- a/src/main/java/xit/vips/category/rev/rev010101/web/Rev010101Controller.java +++ b/src/main/java/xit/vips/category/rev/rev010101/web/Rev010101Controller.java @@ -388,12 +388,9 @@ public class Rev010101Controller { rev010101Service.addAnytmLevyProc(vo); result = true; break; - case "disableDriveSave": + case "disableDriveSave": case"disableDriveDelete": rev010101Service.addDriveDisable(jsonArr, mode); break; - /*case "disableDriveDelete": - rev010101Service.deleteDriveDisable(jsonArr, mode); - break;*/ default: throw new RuntimeException("유효하지 않은 처리 요청 입니다."); } diff --git a/src/main/resources/xit/sqlmap/oracle/vips/CmmnFindByCategory_SQL.xml b/src/main/resources/xit/sqlmap/oracle/vips/CmmnFindByCategory_SQL.xml index 7bd36ca..5549349 100644 --- a/src/main/resources/xit/sqlmap/oracle/vips/CmmnFindByCategory_SQL.xml +++ b/src/main/resources/xit/sqlmap/oracle/vips/CmmnFindByCategory_SQL.xml @@ -1252,15 +1252,21 @@ AND EXISTS ( SELECT 1 - FROM TB_REGIST_VIOLT_VHCLE_STTS SA - LEFT OUTER JOIN TB_DISABLE_DRIVE TDD on (SA.ATDRC_CD=TDD.ATDRC_CD and SA.VIOLT_IEM_CD=TDD.VIOLT_IEM_CD and SA.MANAGE_YEAR=TDD.MANAGE_YEAR and SA.MANAGE_NO=TDD.MANAGE_NO) + FROM TB_REGIST_VIOLT_VHCLE_STTS sas WHERE 1=1 - AND A.ATDRC_CD=SA.ATDRC_CD - AND A.VIOLT_IEM_CD=SA.VIOLT_IEM_CD - AND A.MANAGE_YEAR=SA.MANAGE_YEAR - AND A.MANAGE_NO=SA.MANAGE_NO - AND SA.EXP_INSPT_VALID_AT = 0 - AND (TDD.DELETE_YN != 'N' OR TDD.DELETE_YN IS NULL) + AND A.ATDRC_CD=sas.ATDRC_CD + AND A.VIOLT_IEM_CD=sas.VIOLT_IEM_CD + AND A.MANAGE_YEAR=sas.MANAGE_YEAR + AND A.MANAGE_NO=sas.MANAGE_NO + AND sas.EXP_INSPT_VALID_AT = 0 + AND NOT exists ( + SELECT 1 FROM TB_DISABLE_DRIVE tdd + WHERE sas.ATDRC_CD=tdd.ATDRC_CD + AND sas.VIOLT_IEM_CD=tdd.VIOLT_IEM_CD + AND sas.MANAGE_YEAR=tdd.MANAGE_YEAR + AND sas.MANAGE_NO=tdd.MANAGE_NO + AND tdd.delete_yn = 'N' + ) ) diff --git a/src/main/webapp/WEB-INF/jsp/xit/vips/category/rev/rev0101/rev010101/rev010101_list.jsp b/src/main/webapp/WEB-INF/jsp/xit/vips/category/rev/rev0101/rev010101/rev010101_list.jsp index 7199c38..3242a5c 100644 --- a/src/main/webapp/WEB-INF/jsp/xit/vips/category/rev/rev0101/rev010101/rev010101_list.jsp +++ b/src/main/webapp/WEB-INF/jsp/xit/vips/category/rev/rev0101/rev010101/rev010101_list.jsp @@ -474,9 +474,8 @@ - - <%----%> @@ -614,7 +613,7 @@ - + @@ -1098,6 +1097,7 @@ function fn_search(procFlag, obj){ ,manage_no : manage_no }, success:function(data){ + console.log('is this reason?') //요청별 결과 출력 switch (procFlag) { case 'insert': //신규등록 @@ -1371,11 +1371,12 @@ $("#report_btn").click(function(){ }); - -$('#filterData').click(function(){ +$('#disableDrive').click(function(){ //운행정지여부 체크 if($('#isSchDisableDrive').is(':checked') == false){ alert('운행정지 대상자료 체크가 되어있지 않습니다.\n운행정지 조건을 선택하여 조회해주세요.'); + } else if ($('#div_tbody input[name="checkbox"]:checked').length == 0) { + alert('선택된 자료가 없습니다.'); } else { //다이얼로그 오픈 $("#disableDriveDialog").dialog({ @@ -1388,53 +1389,61 @@ $('#filterData').click(function(){ if($('#isSchDisableDriveSe').val() == 'disableDriveY'){ console.log('disableDriveY') $('#disableDriveDelete').css('display','') + $('#disableDriveSave').css('display','none') }else{ + $('#disableDriveSave').css('display','') $('#disableDriveDelete').css('display','none') } - $('#disableDriveDialog button').click(function(e){ - console.log(e.target.id); - var arrParam = []; - $('input[name="checkbox"]:checked:not(#checkAll)').each(function(){ - var $row = $(this).parents('tr'); - var param = new Object(); - param.atdrc_cd = $row.attr("atdrc_cd"); - param.violt_iem_cd = $row.attr("violt_iem_cd"); - param.manage_year = $row.attr("manage_year"); - param.manage_no = $row.attr("manage_no"); - param.vhcle_no = $row.attr("vhcle_no"); - arrParam.push(param); - }); - //form 생성 - var form = document.createElement("form"); - var mode = document.createElement('input'); - mode.setAttribute('type', 'hidden'); - mode.setAttribute('name', 'mode'); - if(e.target.id == 'disableDriveSave'){ - mode.setAttribute('value', 'disableDriveSave'); - } else { - mode.setAttribute('value', 'disableDriveDelete'); - } - form.appendChild(mode); - var param = document.createElement('input'); - param.setAttribute('type', 'hidden'); - param.setAttribute('name', 'jsonArr'); - param.setAttribute('value', JSON.stringify(arrParam)); - form.appendChild(param); - $.ajax({ - type:"POST", - url:'', - dataType:"json", - data: $(form).serialize(), - success:function(data){ - alert('정상처리 되었습니다.'); - $('#diaRegexRemove').dialog('close'); - fn_search(); - } - }); - }) } }); +$('#disableDriveDialog button').click(function(e){ + console.log("!!!!!!!btnClick!!!!!!!!!!",e.target.id); + var arrParam = []; + $('#div_tbody tbody input[name="checkbox"]:checked').each(function(){ + + var $row = $(this).parents('tr'); + var param = new Object(); + param.atdrc_cd = $row.attr("atdrc_cd"); + param.violt_iem_cd = $row.attr("violt_iem_cd"); + param.manage_year = $row.attr("manage_year"); + param.manage_no = $row.attr("manage_no"); + param.vhcle_no = $row.attr("vhcle_no"); + arrParam.push(param); + console.log('arrParam', arrParam); + }); + //form 생성 + var form = document.createElement("form"); + var mode = document.createElement("input"); + mode.setAttribute('type', 'hidden'); + mode.setAttribute('name', 'mode'); + mode.setAttribute('disableDriveAttact', 'Y') + if(e.target.id == 'disableDriveSave'){ + mode.setAttribute('value', 'disableDriveSave'); + } else { + mode.setAttribute('value', 'disableDriveDelete'); + } + form.appendChild(mode); + var param = document.createElement('input'); + param.setAttribute('type', 'hidden'); + param.setAttribute('name', 'jsonArr'); + param.setAttribute('value', JSON.stringify(arrParam)); + form.appendChild(param); + + console.log("ajax call"); + + $.ajax({ + type:"POST", + url:'', + dataType:"json", + data: $(form).serialize(), + success:function(data){ + alert('success'); + $('#disableDriveDialog').dialog('close'); + fn_search(); + } + }); +}) \ No newline at end of file