운행정지 상태관리 기능 추가

dev
Kurt92 2 years ago
parent 46c2c332f6
commit 8ada7f148e

@ -6,6 +6,7 @@ import java.util.List;
import egovframework.rte.psl.dataaccess.mapper.Mapper; import egovframework.rte.psl.dataaccess.mapper.Mapper;
import xit.vips.category.rev.rev010101.vo.Rev010101SearchVO; import xit.vips.category.rev.rev010101.vo.Rev010101SearchVO;
import xit.vips.category.rev.rev010101.vo.Rev010101VO; import xit.vips.category.rev.rev010101.vo.Rev010101VO;
import xit.vips.process.model.DisableDriveVO;
@Mapper @Mapper
public interface Rev010101Mapper { public interface Rev010101Mapper {
@ -14,4 +15,9 @@ public List<Rev010101VO> findList(Rev010101SearchVO searchVO)throws SQLException
public int countList(Rev010101SearchVO searchVO)throws SQLException; public int countList(Rev010101SearchVO searchVO)throws SQLException;
public Rev010101VO findView(Rev010101VO vo)throws SQLException; public Rev010101VO findView(Rev010101VO vo)throws SQLException;
public int addDriveDisable(DisableDriveVO vo)throws SQLException;
public int deleteDriveDisable(DisableDriveVO vo)throws SQLException;
} }

@ -1,7 +1,11 @@
package xit.vips.category.rev.rev010101.service; package xit.vips.category.rev.rev010101.service;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List; import java.util.List;
import xit.com.ext.jfile.org.json.JSONArray;
import xit.com.ext.jfile.org.json.JSONException;
import xit.vips.category.rev.rev010101.vo.Rev010101SearchVO; import xit.vips.category.rev.rev010101.vo.Rev010101SearchVO;
import xit.vips.category.rev.rev010101.vo.Rev010101VO; import xit.vips.category.rev.rev010101.vo.Rev010101VO;
@ -83,9 +87,26 @@ public interface Rev010101Service {
/** /**
* <pre> : () </pre> * <pre> : () </pre>
* @param vo void * @param vo void
* @author: * @author:
* @date: 2019. 9. 17. * @date: 2019. 9. 17.
*/ */
public void addAnytmLevyProc(Rev010101VO vo); public void addAnytmLevyProc(Rev010101VO vo);
/**
* <pre> : </pre>
* @param jsonArr void
* @author:
* @date: 2023. 05. 10.
*/
public void addDriveDisable(JSONArray jsonArr, String mode) throws JSONException, IOException, SQLException;
/**
* <pre> : </pre>
* @param jsonArr void
* @author:
* @date: 2023. 05. 10.
*/
} }

@ -1,11 +1,18 @@
package xit.vips.category.rev.rev010101.service.impl; package xit.vips.category.rev.rev010101.service.impl;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import xit.com.ext.jfile.org.json.JSONArray;
import xit.com.ext.jfile.org.json.JSONException;
import xit.com.ext.jfile.org.json.JSONObject;
import xit.com.ext.jfile.service.impl.JFileVO; import xit.com.ext.jfile.service.impl.JFileVO;
import xit.common.service.FrameworkService; import xit.common.service.FrameworkService;
import xit.itgcms.util.CommUtil; import xit.itgcms.util.CommUtil;
@ -19,6 +26,7 @@ import xit.vips.process.common.service.CmmnFindByCategoryService;
import xit.vips.process.common.service.CmmnProcessService; import xit.vips.process.common.service.CmmnProcessService;
import xit.vips.process.common.service.CreateKeyService; import xit.vips.process.common.service.CreateKeyService;
import xit.vips.process.core.service.VipsUnitService; import xit.vips.process.core.service.VipsUnitService;
import xit.vips.process.model.DisableDriveVO;
import xit.vips.process.util.VipsConstant.CATEGORY; import xit.vips.process.util.VipsConstant.CATEGORY;
@ -124,6 +132,7 @@ public class Rev010101ServiceImpl implements Rev010101Service {
, vo.getLevyVO().getLevy_aftdte() ,vo.getLevyVO().getAddi_rt_se() , user_cd); , vo.getLevyVO().getLevy_aftdte() ,vo.getLevyVO().getAddi_rt_se() , user_cd);
} }
@Override @Override
public void addRciv(Rev010101VO vo) { public void addRciv(Rev010101VO vo) {
String user_cd =CommUtil.getMngrMemId(); String user_cd =CommUtil.getMngrMemId();
@ -173,4 +182,46 @@ public class Rev010101ServiceImpl implements Rev010101Service {
} }
@Override
public void addDriveDisable(JSONArray jsonArr, String mode) throws JSONException, IOException, SQLException {
String user_cd =CommUtil.getMngrMemId();
DisableDriveVO disableDriveVO = new DisableDriveVO();
disableDriveVO.setUser_cd(user_cd);
JSONObject jsonObj = new JSONObject();
for(int i=0; i<jsonArr.length(); i++) {
jsonObj = (JSONObject)jsonArr.get(i);
switch (mode) {
case "disableDriveSave":
disableDriveVO.convertJSONObjectToObject(jsonObj);
disableDriveVO.setDelete_type("upd");
disableDriveVO.setDelete_yn("N");
rev010101Mapper.deleteDriveDisable(disableDriveVO);
rev010101Mapper.addDriveDisable(disableDriveVO);
break;
case "disableDriveDelete":
disableDriveVO.convertJSONObjectToObject(jsonObj);
disableDriveVO.setDelete_type("del");
disableDriveVO.setDelete_yn("Y");
rev010101Mapper.deleteDriveDisable(disableDriveVO);
break;
default:
throw new IOException("flagError : 인자로 넘어오는 mode를 확인하세요");
}
}
}
} }

@ -1,10 +1,6 @@
package xit.vips.category.rev.rev010101.vo; package xit.vips.category.rev.rev010101.vo;
import xit.vips.process.model.LevyVO; import xit.vips.process.model.*;
import xit.vips.process.model.OndssAdresVO;
import xit.vips.process.model.OwnerVO;
import xit.vips.process.model.RegistVioltVO;
import xit.vips.process.model.VhcleVO;
import xit.vips.process.model.cetegory.CmmnRevVO; import xit.vips.process.model.cetegory.CmmnRevVO;
import xit.vips.process.model.cetegory.CmmnSendAdresVO; import xit.vips.process.model.cetegory.CmmnSendAdresVO;

@ -4,6 +4,7 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.sql.Array;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -14,6 +15,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.ModelAttribute;
@ -23,7 +25,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import xit.com.ext.jfile.org.json.JSONArray;
import xit.com.ext.jfile.org.json.JSONException; import xit.com.ext.jfile.org.json.JSONException;
import xit.com.ext.jfile.org.json.JSONObject;
import xit.com.ext.jfile.service.impl.JFileVO; import xit.com.ext.jfile.service.impl.JFileVO;
import xit.common.model.AttachfileVO; import xit.common.model.AttachfileVO;
import xit.common.service.CmmnCodeService; import xit.common.service.CmmnCodeService;
@ -309,6 +313,8 @@ public class Rev010101Controller {
,@ModelAttribute OndssAdresVO ondssAdresVO ,@ModelAttribute OndssAdresVO ondssAdresVO
,ModelMap model, HttpServletRequest request, HttpServletResponse response) throws IOException, SQLException, RuntimeException, JSONException { ,ModelMap model, HttpServletRequest request, HttpServletResponse response) throws IOException, SQLException, RuntimeException, JSONException {
JSONArray jsonArr = new JSONArray(request.getParameter("jsonArr"));
boolean result = false; boolean result = false;
vo.setRegistVioltVO(registVioltVO); vo.setRegistVioltVO(registVioltVO);
@ -382,6 +388,12 @@ public class Rev010101Controller {
rev010101Service.addAnytmLevyProc(vo); rev010101Service.addAnytmLevyProc(vo);
result = true; result = true;
break; break;
case "disableDriveSave":
rev010101Service.addDriveDisable(jsonArr, mode);
break;
/*case "disableDriveDelete":
rev010101Service.deleteDriveDisable(jsonArr, mode);
break;*/
default: default:
throw new RuntimeException("유효하지 않은 처리 요청 입니다."); throw new RuntimeException("유효하지 않은 처리 요청 입니다.");
} }

@ -0,0 +1,129 @@
package xit.vips.process.model;
import xit.common.model.BaseVO;
/**
*
* <ul>
* <li> : VO</li>
* <li> : </li>
* <li>: 2023. 05. 11
* </ul>
*
* @author
*
*/
public class DisableDriveVO extends BaseVO {
private String atdrc_cd;
private String violt_iem_cd;
private String manage_year;
private String manage_no;
private String seq;
private String create_dt;
private String create_user_cd;
private String update_dt;
private String update_user_cd;
private String delete_yn;
private String user_cd;
private String delete_type;
public String getDelete_type() {
return delete_type;
}
public void setDelete_type(String delete_type) {
this.delete_type = delete_type;
}
public String getUser_cd() {
return user_cd;
}
public void setUser_cd(String user_cd) {
this.user_cd = user_cd;
}
public String getAtdrc_cd() {
return atdrc_cd;
}
public void setAtdrc_cd(String atdrc_cd) {
this.atdrc_cd = atdrc_cd;
}
public String getViolt_iem_cd() {
return violt_iem_cd;
}
public void setViolt_iem_cd(String violt_iem_cd) {
this.violt_iem_cd = violt_iem_cd;
}
public String getManage_year() {
return manage_year;
}
public void setManage_year(String manage_year) {
this.manage_year = manage_year;
}
public String getManage_no() {
return manage_no;
}
public void setManage_no(String manage_no) {
this.manage_no = manage_no;
}
public String getSeq() {
return seq;
}
public void setSeq(String seq) {
this.seq = seq;
}
public String getCreate_dt() {
return create_dt;
}
public void setCreate_dt(String create_dt) {
this.create_dt = create_dt;
}
public String getCreate_user_cd() {
return create_user_cd;
}
public void setCreate_user_cd(String create_user_cd) {
this.create_user_cd = create_user_cd;
}
public String getUpdate_dt() {
return update_dt;
}
public void setUpdate_dt(String update_dt) {
this.update_dt = update_dt;
}
public String getUpdate_user_cd() {
return update_user_cd;
}
public void setUpdate_user_cd(String update_user_cd) {
this.update_user_cd = update_user_cd;
}
public String getDelete_yn() {
return delete_yn;
}
public void setDelete_yn(String delete_yn) {
this.delete_yn = delete_yn;
}
}

@ -59,6 +59,10 @@ public class CmmnRevSearchVO extends SearchVO {
protected String sch_last_link_de_begin; protected String sch_last_link_de_begin;
protected String sch_last_link_de_end; protected String sch_last_link_de_end;
protected String isNotCurInspect = "N"; //종합검사(or정기검사) 미검사자료 필터 사용여부 protected String isNotCurInspect = "N"; //종합검사(or정기검사) 미검사자료 필터 사용여부
/*2023.05.09 최정민 운행정지 대상자료 추출을 위한 필드추가 isSchDisableDrive** */
protected String isSchDisableDrive = "N"; //종합검사 운행정지대상자료 필터 사용 여부
protected String isSchDisableDriveSe;
protected String isChangeRegistAt = "N"; //자동차등록사항변경 필터 사용여부 protected String isChangeRegistAt = "N"; //자동차등록사항변경 필터 사용여부
protected String is_sch_elapse_sndng_tme = "N"; //경과안내장발송회차 필터 사용여부 protected String is_sch_elapse_sndng_tme = "N"; //경과안내장발송회차 필터 사용여부
protected String sch_elapse_sndng_tme_begin; protected String sch_elapse_sndng_tme_begin;
@ -103,6 +107,22 @@ public class CmmnRevSearchVO extends SearchVO {
protected String sch_choose_atdrc; protected String sch_choose_atdrc;
public String getIsSchDisableDrive() {
return isSchDisableDrive;
}
public void setIsSchDisableDrive(String isSchDisableDrive) {
this.isSchDisableDrive = isSchDisableDrive;
}
public String getIsSchDisableDriveSe() {
return isSchDisableDriveSe;
}
public void setIsSchDisableDriveSe(String isSchDisableDriveSe) {
this.isSchDisableDriveSe = isSchDisableDriveSe;
}
public String getIs_sch_choose_atdrc() { public String getIs_sch_choose_atdrc() {
return is_sch_choose_atdrc; return is_sch_choose_atdrc;
} }

@ -1245,6 +1245,39 @@
</choose> </choose>
) )
</if> </if>
<!-- 2023.05.09 최정민 -->
<!-- 운행정지 대상자료 필터 -->
<if test="'Y'.toString() eq isSchDisableDrive">
<if test = "'disableDriveTarget'.toString() eq isSchDisableDriveSe">
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)
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)
)
</if>
<if test = "'disableDriveY'.toString() eq isSchDisableDriveSe">
AND EXISTS (
SELECT 1
FROM TB_REGIST_VIOLT_VHCLE_STTS SA
INNER 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)
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'
)
</if>
</if>
<!-- 이첩자료 필터 --> <!-- 이첩자료 필터 -->
<if test="'Y'.toString() eq is_sch_trfntf_result"> <if test="'Y'.toString() eq is_sch_trfntf_result">
<choose> <choose>

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="xit.vips.category.rev.rev010101.dao.Rev010101Mapper">
<insert id="addDriveDisable">
/** addDriveDisable */
/** 운행정지 자료 등록 */
INSERT INTO TB_DISABLE_DRIVE(
ATDRC_CD
,VIOLT_IEM_CD
,MANAGE_YEAR
,MANAGE_NO
,SEQ
,CREATE_DT
,CREATE_USER_CD
,DELETE_YN
) VALUES (
#{atdrc_cd}
,#{violt_iem_cd}
,#{manage_year}
,#{manage_no}
,NVL(
(SELECT MAX(SEQ)
FROM TB_DISABLE_DRIVE
WHERE ATDRC_CD = #{atdrc_cd}
AND VIOLT_IEM_CD = #{violt_iem_cd}
AND MANAGE_YEAR = #{manage_year}
AND MANAGE_NO = #{manage_no}
), 0
) +1
,SYSDATE
,#{user_cd}
,#{delete_yn}
)
</insert>
<update id="deleteDriveDisable">
/** deleteDriveDisable */
/** 운행정지 자료 삭제 */
UPDATE TB_DISABLE_DRIVE
SET DELETE_YN = 'Y'
, UPDATE_DT = SYSDATE
, UPDATE_USER_CD = #{user_cd}
WHERE ATDRC_CD = #{atdrc_cd}
AND VIOLT_IEM_CD = #{violt_iem_cd}
AND MANAGE_YEAR = #{manage_year}
AND MANAGE_NO = #{manage_no}
AND SEQ = (
SELECT MAX(SEQ)
FROM TB_DISABLE_DRIVE
WHERE ATDRC_CD = #{atdrc_cd}
AND VIOLT_IEM_CD = #{violt_iem_cd}
AND MANAGE_YEAR = #{manage_year}
AND MANAGE_NO = #{manage_no}
)
</update>
</mapper>

@ -466,6 +466,22 @@
<label for="isNotCurInspect" >미검사차량만</label> <label for="isNotCurInspect" >미검사차량만</label>
</th> </th>
</tr> </tr>
<tr>
<th colspan="2">
<input type="checkbox" id="isSchDisableDrive" name="isSchDisableDrive" value="Y"/>
<label for="isSchDisableDrive" >운행정지 대상 자료</label>
</th>
</tr>
<tr>
<td colspan="2">
<select name="isSchDisableDriveSe" class="isSchDisableDrive" style="width: 150px;">
<option value="disableDriveTarget">운행정지 대상자료</option>
<%--<option value="includeDisableDriveSeY">기운행정지 자료 포함</option>--%>
<option value="disableDriveY">기운행정지 자료만</option>
</select>
</td>
</tr>
<!-- <tr> --> <!-- <tr> -->
<!-- <th colspan="2"> --> <!-- <th colspan="2"> -->
<%-- <input type="checkbox" id="isOnlyOpnstemt" name="isOnlyOpnstemt" value="Y" <c:if test="${not empty param.isOnlyOpnstemt }">checked="checked"</c:if>/> --%> <%-- <input type="checkbox" id="isOnlyOpnstemt" name="isOnlyOpnstemt" value="Y" <c:if test="${not empty param.isOnlyOpnstemt }">checked="checked"</c:if>/> --%>
@ -598,6 +614,7 @@
<button type="button" id="uptAdresFromCarLink_btn" class="btn sm gray" style="margin: 5px 0;"><img src="/resource/images/common/search.png" alt="주소업데이트(자망)"/>주소업데이트(자망)</button> <button type="button" id="uptAdresFromCarLink_btn" class="btn sm gray" style="margin: 5px 0;"><img src="/resource/images/common/search.png" alt="주소업데이트(자망)"/>주소업데이트(자망)</button>
<button type="button" id="uptAdresFromJuminLink_btn" class="btn sm gray" style="margin: 5px 0;"><img src="/resource/images/common/search.png" alt="주소업데이트(주민망)"/>주소업데이트(주민망)</button> <button type="button" id="uptAdresFromJuminLink_btn" class="btn sm gray" style="margin: 5px 0;"><img src="/resource/images/common/search.png" alt="주소업데이트(주민망)"/>주소업데이트(주민망)</button>
<button type="button" id="bundle_btn" class="btn sm gray" style="margin: 5px 0;" onclick="dialog()"><img src="/resource/images/common/search.png" alt="묶음자료생성"/>묶음자료생성</button> <button type="button" id="bundle_btn" class="btn sm gray" style="margin: 5px 0;" onclick="dialog()"><img src="/resource/images/common/search.png" alt="묶음자료생성"/>묶음자료생성</button>
<button type="button" id="filterData" class="btn sm gray" style="margin: 5px 0;"><img src="/resource/images/common/search.png" alt="운행정지데이터 관리"/>운행정지관리</button>
</th> </th>
</tr> </tr>
</tbody> </tbody>
@ -723,6 +740,50 @@
<label style="float:right;color:white;margin-top:5px;" for="cookieOff">하루동안 이 창을 열지 않음</label><input style="float:right;margin-top:5px;margin-right:5px;" type="checkbox" id="cookieOff" name="cookieOff"/> <label style="float:right;color:white;margin-top:5px;" for="cookieOff">하루동안 이 창을 열지 않음</label><input style="float:right;margin-top:5px;margin-right:5px;" type="checkbox" id="cookieOff" name="cookieOff"/>
</div> </div>
</div> </div>
<!-- 자료제거 버튼 클릭 dialog -->
<div id="disableDriveDialog" class="dialog" style="display: none">
<div class="grp">
<table class="tbl04">
<colgroup>
<col style="width: ;"/>
</colgroup>
<tbody>
<tr>
<td style="color: #006fbd;">
<span style="font-weight: bold;">※운행정지 대상 자료 상태관리</span>
<br/><span>- 운행정지 처리후 중복조회를 방지하기 위하여 자동차과태료시스템 내에서 상태를 변경하는 메뉴입니다. </span>
<br/>
<br/><span>- 등록 : 운행정지 자료를 추출, 처리 후 해당자료들에서하여 운행정지상태로 변경합니다. </span>
<br/><span>- 삭제 : [기운행정지 자료만]을 선택하면 활성화 됩니다. 운행정지 처리한 자료를 미처리 상태로 돌립니다. </span>
<br/>
<br/><span> * 운행정지 처리 혹은 취소 이후 자동차과태료 시스템에서 해당 메뉴를 통하여 자료의 상태를 일치시켜 주어야 합니다. </span>
<br/><span> * 타 시스템에서 운행정지에 대한 정보가 바뀌었다면 꼭 업데이트 해주시길 바랍니다. </span>
</td>
</tr>
<tr>
<td style="display: flex">
<%--<select id="filterSelectBox" style="width: 100px">
</select>
<input type="text" id="filteringInput">--%>
</td>
</tr>
</tbody>
</table>
</div>
<table>
<tr>
<th colspan="2">
<button type="button" id="disableDriveSave" class="btn gray">등록</button>
<button type="button" id="disableDriveDelete" name="cancel_btn" class="btn gray" style="display: none" >삭제</button>
</th>
</tr>
</table>
</div>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
if('${trfntfYN}' =="Y"){ if('${trfntfYN}' =="Y"){
@ -812,6 +873,9 @@ $('#uptAdresFromCarLink_btn').on({
} }
}); });
/**묶음 자료 생성 다이얼로그*/ /**묶음 자료 생성 다이얼로그*/
function dialog(){ function dialog(){
var checkCount = $('#div_tbody input[name="checkbox"]:checked').length; var checkCount = $('#div_tbody input[name="checkbox"]:checked').length;
@ -1307,4 +1371,70 @@ $("#report_btn").click(function(){
}); });
$('#filterData').click(function(){
//운행정지여부 체크
if($('#isSchDisableDrive').is(':checked') == false){
alert('운행정지 대상자료 체크가 되어있지 않습니다.\n운행정지 조건을 선택하여 조회해주세요.');
} else {
//다이얼로그 오픈
$("#disableDriveDialog").dialog({
title : "운행정지명령 상태관리",
width : 650,
height: 230,
modal : true,
}).prev(".ui-dialog-titlebar").css("background","#515151");
//운행정지 자료만 선택 여부
if($('#isSchDisableDriveSe').val() == 'disableDriveY'){
console.log('disableDriveY')
$('#disableDriveDelete').css('display','')
}else{
$('#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:'<c:url value="/category/rev/rev0101/rev010101_proc.do"/>',
dataType:"json",
data: $(form).serialize(),
success:function(data){
alert('정상처리 되었습니다.');
$('#diaRegexRemove').dialog('close');
fn_search();
}
});
})
}
});
</script> </script>

@ -141,7 +141,7 @@
<tr> <tr>
<th>차량번호</th> <th>차량번호</th>
<td> <td>
<input type="text" id="vhrno" name="vhrno" value="<c:out value="${param.vhrno }"/>" title="차량번호" class="required validate-kr-or-digits"/> <input type="text" id="vhrno" name="vhrno" value="<c:out value="${param.vhrno }"/>" title="차량번호" <%--class="required validate-kr-or-digits"--%>/>
</td> </td>
<th>조회기준일자</th> <th>조회기준일자</th>
<td> <td>

@ -3173,3 +3173,76 @@ function personalCheck(){
} }
} }
/** 2023.03.28
* 데이터 필터링 공통
* */
class DataFilter {
constructor(obj) {
this.obj = obj;
this.createDialog();
this.dialogOpen();
}
dialogOpen(){
$("#diaRegexRemove").dialog({
title : this.obj.title,
width : 370,
height: 190,
modal : true,
}).prev(".ui-dialog-titlebar").css("background","#515151");
}
setSelectOptions(){
let options = [];
for(const key in this.obj.options){
options.push({'value':this.obj.options[key], 'text':key});
}
return this.obj.options = options;
}
createDialog(){
this.setSelectOptions();
document.querySelector('#filterSelectBox').innerHTML='';
for(const key in this.obj.options){
let option = document.createElement("option");
option.value = this.obj.options[key].value;
option.text = this.obj.options[key].text;
document.querySelector('#filterSelectBox').append(option);
}
}
/**
* @param option : filterSelectBox > option
* @param param : filteringInput
* @returns 필터링 데이터
*/
dataFilter(option, param){
let count = 0;
let result = this.obj.data.filter((data, i)=>{
let paramLeng = this.obj.data[i][option].indexOf(param);
if(paramLeng != -1) {
console.log('걸린 데이터 : ', data[option]);
document.querySelector("tr["+option+"='"+data[option]+"']").remove();
count++
}
console.log(this.obj.data.length);
return paramLeng == -1;
})
this.obj.data=result;
if (count == 0){
alert('[' + param + '] 를 포함한 자료가 존재하지 않습니다.');
} else {
alert(count + '개의 자료를 제외하였습니다.');
}
$('#div_tbody').siblings('div.cnt_tbody').text(this.obj.data.length+' 건');
return this.obj.data;
}
dataRollBack(){
fn_gridDraw(this.obj.copyDataSet);
this.obj.data = this.obj.copyDataSet;
$('#div_tbody').siblings('div.cnt_tbody').text(this.obj.data.length+' 건');
return this.obj.copyDataSet;
}
}

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">
</web-app>
Loading…
Cancel
Save