Merge pull request 'feat : 조회통계 조건검색 경고통계 작업' (#23) from jh/jh into dev
Reviewed-on: http://211.119.124.110:3000/cjm/clean-parking/pulls/23pull/25/head^2
commit
f059994e8d
@ -0,0 +1,40 @@
|
||||
package go.kr.project.biz.search.caution.controller;
|
||||
|
||||
import egovframework.constant.TilesConstants;
|
||||
import egovframework.util.ApiResponseUtil;
|
||||
import go.kr.project.biz.search.caution.model.CautionDto;
|
||||
import go.kr.project.biz.search.caution.service.CautionService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class CautionController {
|
||||
|
||||
private final CautionService cautionService;
|
||||
|
||||
@GetMapping("/search/caution/caution.do")
|
||||
|
||||
public String cautionPageReturn() {
|
||||
return "biz/search/caution" + TilesConstants.BASE;
|
||||
}
|
||||
|
||||
@PostMapping("/search/caution/caution-select.ajax")
|
||||
public ResponseEntity<?> list(@ModelAttribute CautionDto.Request.Search dto) {
|
||||
|
||||
dto.setTotalCount(0);
|
||||
dto.setPagingYn("N");
|
||||
|
||||
List<CautionDto.Response.cpMain> result = cautionService.selectAllSearch(dto);
|
||||
|
||||
return ApiResponseUtil.successWithGrid(result,dto);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package go.kr.project.biz.search.caution.mapper;
|
||||
|
||||
import go.kr.project.biz.search.caution.model.CautionDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CautionMapper {
|
||||
|
||||
List<CautionDto.Response.cpMain> selectAllSearch(CautionDto.Request.Search dto);
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package go.kr.project.biz.search.caution.model;
|
||||
|
||||
import go.kr.project.system.common.model.PagingVO;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
public class CautionDto {
|
||||
public static class Request {
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public static class Search extends PagingVO {
|
||||
|
||||
|
||||
private String searchCondition;
|
||||
private String searchCondition1;
|
||||
private String searchCondition2;
|
||||
private String searchCondition3;
|
||||
private String searchCondition4;
|
||||
private String searchKeyword;
|
||||
private String searchStartDt;
|
||||
private String searchEndDt;
|
||||
private String searchCarno;
|
||||
private String searchName;
|
||||
private String searchJno;
|
||||
private String searchUser;
|
||||
private String searchTel;
|
||||
private String searchBbsno;
|
||||
private String searchPos;
|
||||
private String searchAddr;
|
||||
private String searchTime1;
|
||||
private String searchTime2;
|
||||
private String worker;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
public static class Response {
|
||||
@Getter
|
||||
@Setter
|
||||
public static class cpMain {
|
||||
|
||||
private String mmIngb;
|
||||
private String mmDate;
|
||||
private String mmCarno;
|
||||
private String omJno;
|
||||
private String omName;
|
||||
private String mmKeum2;
|
||||
private String mmImageGb;
|
||||
private String mmImageCnt;
|
||||
private String mmCarcheck;
|
||||
private String mmState;
|
||||
private String mmCode;
|
||||
private String asUser;
|
||||
private String asJsno;
|
||||
private String asJsdate;
|
||||
private String asBbsNo;
|
||||
private String ccCause;
|
||||
private String ccDate;
|
||||
private String ccEtc;
|
||||
|
||||
|
||||
}
|
||||
@Getter
|
||||
@Setter
|
||||
public static class Violation {
|
||||
|
||||
private String vlCode;
|
||||
private String vlId;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package go.kr.project.biz.search.caution.service;
|
||||
|
||||
import go.kr.project.biz.search.caution.model.CautionDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CautionService {
|
||||
|
||||
List<CautionDto.Response.cpMain> selectAllSearch(CautionDto.Request.Search dto);
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package go.kr.project.biz.search.caution.service.impl;
|
||||
|
||||
import go.kr.project.biz.search.caution.mapper.CautionMapper;
|
||||
import go.kr.project.biz.search.caution.model.CautionDto;
|
||||
import go.kr.project.biz.search.caution.service.CautionService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class CautionServiceImpl extends EgovAbstractServiceImpl implements CautionService {
|
||||
|
||||
private final CautionMapper cautionMapper;
|
||||
|
||||
@Override
|
||||
public List<CautionDto.Response.cpMain> selectAllSearch(CautionDto.Request.Search dto) {
|
||||
|
||||
List<CautionDto.Response.cpMain> list = cautionMapper.selectAllSearch(dto);
|
||||
|
||||
return list;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package go.kr.project.biz.search.filtersearch.controller;
|
||||
|
||||
import egovframework.constant.TilesConstants;
|
||||
import egovframework.util.ApiResponseUtil;
|
||||
import go.kr.project.biz.search.filtersearch.model.FilterSearchDto;
|
||||
import go.kr.project.biz.search.filtersearch.service.FilterSearchService;
|
||||
import go.kr.project.biz.search.model.SearchDto;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class FilterSearchController {
|
||||
|
||||
private final FilterSearchService filterSearchService;
|
||||
|
||||
@GetMapping("/search/filtersearch/filtersearch.do")
|
||||
|
||||
public String searchPageReturn() {
|
||||
return "biz/search/filtersearch" + TilesConstants.BASE;
|
||||
}
|
||||
@PostMapping("/search/filtersearch/filtersearch-select.ajax")
|
||||
public ResponseEntity<?> list(@ModelAttribute FilterSearchDto.Request.Search dto) {
|
||||
|
||||
dto.setTotalCount(0);
|
||||
dto.setPagingYn("N");
|
||||
|
||||
List<FilterSearchDto.Response.cpMain> result = filterSearchService.selectAllSearch(dto);
|
||||
|
||||
return ApiResponseUtil.successWithGrid(result,dto);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package go.kr.project.biz.search.filtersearch.mapper;
|
||||
|
||||
import go.kr.project.biz.search.filtersearch.model.FilterSearchDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface FilterSearchMapper {
|
||||
|
||||
List<FilterSearchDto.Response.cpMain> selectAllSearch(FilterSearchDto.Request.Search dto);
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package go.kr.project.biz.search.filtersearch.model;
|
||||
|
||||
import go.kr.project.system.common.model.PagingVO;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
public class FilterSearchDto {
|
||||
public static class Request {
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public static class Search extends PagingVO {
|
||||
|
||||
|
||||
private String searchCondition;
|
||||
private String searchCondition1;
|
||||
private String searchCondition2;
|
||||
private String searchCondition3;
|
||||
private String searchCondition4;
|
||||
private String searchKeyword;
|
||||
private String searchStartDt;
|
||||
private String searchEndDt;
|
||||
private String searchCarno;
|
||||
private String searchName;
|
||||
private String searchJno;
|
||||
private String searchUser;
|
||||
private String searchTel;
|
||||
private String searchBbsno;
|
||||
private String searchPos;
|
||||
private String searchAddr;
|
||||
private String searchTime1;
|
||||
private String searchTime2;
|
||||
private String worker;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
public static class Response {
|
||||
@Getter
|
||||
@Setter
|
||||
public static class cpMain {
|
||||
|
||||
private String mmIngb;
|
||||
private String mmDate;
|
||||
private String mmCarno;
|
||||
private String omJno;
|
||||
private String omName;
|
||||
private String mmKeum2;
|
||||
private String mmImageGb;
|
||||
private String mmImageCnt;
|
||||
private String mmCarcheck;
|
||||
private String mmState;
|
||||
private String mmCode;
|
||||
private String asUser;
|
||||
private String asJsno;
|
||||
private String asJsdate;
|
||||
private String asBbsNo;
|
||||
private String ccCause;
|
||||
private String ccDate;
|
||||
private String ccEtc;
|
||||
|
||||
|
||||
}
|
||||
@Getter
|
||||
@Setter
|
||||
public static class Violation {
|
||||
|
||||
private String vlCode;
|
||||
private String vlId;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package go.kr.project.biz.search.filtersearch.service;
|
||||
|
||||
import go.kr.project.biz.search.filtersearch.model.FilterSearchDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface FilterSearchService {
|
||||
List<FilterSearchDto.Response.cpMain> selectAllSearch(FilterSearchDto.Request.Search dto);
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package go.kr.project.biz.search.filtersearch.service.impl;
|
||||
|
||||
import go.kr.project.biz.search.filtersearch.mapper.FilterSearchMapper;
|
||||
import go.kr.project.biz.search.filtersearch.model.FilterSearchDto;
|
||||
import go.kr.project.biz.search.filtersearch.service.FilterSearchService;
|
||||
import go.kr.project.vo.code.MmIngbEnum;
|
||||
import go.kr.project.vo.code.MmStateEnum;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class FilterSearchServiceImpl extends EgovAbstractServiceImpl implements FilterSearchService {
|
||||
|
||||
private final FilterSearchMapper filterSearchMapper;
|
||||
|
||||
@Override
|
||||
public List<FilterSearchDto.Response.cpMain> selectAllSearch(FilterSearchDto.Request.Search dto) {
|
||||
|
||||
List<FilterSearchDto.Response.cpMain> list = filterSearchMapper.selectAllSearch(dto);
|
||||
|
||||
// Enum Desc 변환
|
||||
list.forEach(item -> {
|
||||
item.setMmIngb(MmIngbEnum.getDescByCode(item.getMmIngb()));
|
||||
item.setMmState(MmStateEnum.getDescByCode(item.getMmState()));
|
||||
});
|
||||
|
||||
if (dto.getSearchCondition1() != null && !dto.getSearchCondition1().isEmpty()) {
|
||||
MmStateEnum.getCodeByDesc(dto.getSearchCondition1());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,126 @@
|
||||
<?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="go.kr.project.biz.search.caution.mapper.CautionMapper">
|
||||
|
||||
<select id="selectAllSearch"
|
||||
parameterType="go.kr.project.biz.search.caution.model.CautionDto"
|
||||
resultType="go.kr.project.biz.search.caution.model.CautionDto$Response$cpMain">
|
||||
SELECT M.MM_INGB,
|
||||
DATE_FORMAT(
|
||||
STR_TO_DATE(CONCAT(M.MM_DATE, M.MM_TIME), '%Y%m%d%H%i%s'),
|
||||
'%Y-%m-%d %H:%i:%s' ) AS mmDate,
|
||||
M.MM_CARNO,
|
||||
O.OM_JNO,
|
||||
O.OM_NAME,
|
||||
M.MM_KEUM2,
|
||||
M.MM_IMAGEGB,
|
||||
M.MM_IMAGECNT,
|
||||
M.MM_CARCHECK,
|
||||
M.MM_STATE,
|
||||
DATE_FORMAT(A.AS_JSDATE, '%Y-%m-%d') AS AS_JSDATE,
|
||||
A.AS_USER,
|
||||
A.AS_JSNO,
|
||||
A.AS_BBS_NO,
|
||||
C.CC_CAUSE,
|
||||
DATE_FORMAT(C.CC_DATE, '%Y-%m-%d') AS CC_DATE,
|
||||
C.CC_ETC,
|
||||
M.MM_CODE
|
||||
FROM CP_MAIN M
|
||||
LEFT OUTER JOIN CP_ANSWER A ON M.MM_CODE = AS_MMCODE
|
||||
LEFT OUTER JOIN CP_CANCEL C ON M.MM_CODE=CC_MMCODE
|
||||
LEFT OUTER JOIN CP_OWNER O ON M.MM_OMCODE=O.OM_CODE
|
||||
<where>
|
||||
<!-- 날짜 -->
|
||||
<if test="searchStartDt != null and searchStartDt != ''">
|
||||
AND M.MM_DATE >= REPLACE(#{searchStartDt}, '-', '')
|
||||
</if>
|
||||
<if test="searchEndDt != null and searchEndDt != ''">
|
||||
AND M.MM_DATE <= REPLACE(#{searchEndDt}, '-', '')
|
||||
</if>
|
||||
<!-- 시간 -->
|
||||
<if test="searchTime1 != null and searchTime1 != ''">
|
||||
AND M.MM_TIME >= REPLACE(#{searchTime1}, '-', '')
|
||||
</if>
|
||||
<if test="searchTime2 != null and searchTime2 != ''">
|
||||
AND M.MM_TIME <= REPLACE(#{searchTime2}, '-', '')
|
||||
</if>
|
||||
<!-- 위반내용 (searchCondition : code1~6) -->
|
||||
<!-- <if test="searchCondition != null and searchCondition != ''">-->
|
||||
<!-- <!– 코드가없다. –>-->
|
||||
<!-- AND M.VL_CODE = #{searchCondition}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- 처리상태 (searchCondition1 : code1~22) -->
|
||||
<if test="searchCondition1 != null and searchCondition1 != ''">
|
||||
AND M.MM_STATE = #{searchCondition1}
|
||||
</if>
|
||||
|
||||
<!-- 등록구분 -->
|
||||
<if test="searchCondition2 != null and searchCondition2 != ''">
|
||||
AND M.MM_DLGB = #{searchCondition2}
|
||||
</if>
|
||||
|
||||
<!-- 자료출처 -->
|
||||
<if test="searchCondition3 != null and searchCondition3 != ''">
|
||||
AND M.MM_INGB = #{searchCondition3}
|
||||
</if>
|
||||
|
||||
<!-- <!– 법정동 –>-->
|
||||
<!-- <if test="searchCondition4 != null and searchCondition4 != ''">-->
|
||||
<!-- AND M.MM_DONG = #{searchCondition4}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- ===== 텍스트 입력 필드들 (값이 있으면 AND LIKE) ===== -->
|
||||
|
||||
<!-- 차량번호 -->
|
||||
<if test="searchCarno != null and searchCarno != ''">
|
||||
AND M.MM_CARNO LIKE CONCAT('%', #{searchCarno}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 소유자성명 -->
|
||||
<if test="searchName != null and searchName != ''">
|
||||
AND O.OM_NAME LIKE CONCAT('%', #{searchName}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 주민번호 -->
|
||||
<if test="searchJno != null and searchJno != ''">
|
||||
AND O.OM_JNO LIKE CONCAT('%', #{searchJno}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 신고자 -->
|
||||
<if test="searchUser != null and searchUser != ''">
|
||||
AND A.AS_USER LIKE CONCAT('%', #{searchUser}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 신고자 전화번호 -->
|
||||
<if test="searchTel != null and searchTel != ''">
|
||||
AND A.AS_TEL LIKE CONCAT('%', #{searchTel}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 목록번호 -->
|
||||
<if test="searchBbsno != null and searchBbsno != ''">
|
||||
AND A.AS_BBS_NO LIKE CONCAT('%', #{searchBbsno}, '%')
|
||||
</if>
|
||||
|
||||
<!-- <!– 위반장소 –>-->
|
||||
<!-- <if test="searchPos != null and searchPos != ''">-->
|
||||
<!-- AND M.MM_PLACE LIKE CONCAT('%', #{searchPos}, '%')-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- 상세주소 (예: O.OM_ADDR) -->
|
||||
<!-- <if test="searchAddr != null and searchAddr != ''">-->
|
||||
<!-- AND O.OM_ADDR LIKE CONCAT('%', #{searchAddr}, '%')-->
|
||||
<!-- </if>-->
|
||||
</where>
|
||||
ORDER BY AS_JSDATE DESC, AS_JSNO DESC
|
||||
</select>
|
||||
<select id="selectViolationList"
|
||||
resultType="go.kr.project.biz.search.filtersearch.model.FilterSearchDto$Response$Violation">
|
||||
SELECT
|
||||
VL_CODE,
|
||||
VL_ID
|
||||
FROM CP_VIOLATION
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,126 @@
|
||||
<?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="go.kr.project.biz.search.filtersearch.mapper.FilterSearchMapper">
|
||||
|
||||
<select id="selectAllSearch"
|
||||
parameterType="go.kr.project.biz.search.filtersearch.model.FilterSearchDto"
|
||||
resultType="go.kr.project.biz.search.filtersearch.model.FilterSearchDto$Response$cpMain">
|
||||
SELECT M.MM_INGB,
|
||||
DATE_FORMAT(
|
||||
STR_TO_DATE(CONCAT(M.MM_DATE, M.MM_TIME), '%Y%m%d%H%i%s'),
|
||||
'%Y-%m-%d %H:%i:%s' ) AS mmDate,
|
||||
M.MM_CARNO,
|
||||
O.OM_JNO,
|
||||
O.OM_NAME,
|
||||
M.MM_KEUM2,
|
||||
M.MM_IMAGEGB,
|
||||
M.MM_IMAGECNT,
|
||||
M.MM_CARCHECK,
|
||||
M.MM_STATE,
|
||||
DATE_FORMAT(A.AS_JSDATE, '%Y-%m-%d') AS AS_JSDATE,
|
||||
A.AS_USER,
|
||||
A.AS_JSNO,
|
||||
A.AS_BBS_NO,
|
||||
C.CC_CAUSE,
|
||||
DATE_FORMAT(C.CC_DATE, '%Y-%m-%d') AS CC_DATE,
|
||||
C.CC_ETC,
|
||||
M.MM_CODE
|
||||
FROM CP_MAIN M
|
||||
LEFT OUTER JOIN CP_ANSWER A ON M.MM_CODE = AS_MMCODE
|
||||
LEFT OUTER JOIN CP_CANCEL C ON M.MM_CODE=CC_MMCODE
|
||||
LEFT OUTER JOIN CP_OWNER O ON M.MM_OMCODE=O.OM_CODE
|
||||
<where>
|
||||
<!-- 날짜 -->
|
||||
<if test="searchStartDt != null and searchStartDt != ''">
|
||||
AND M.MM_DATE >= REPLACE(#{searchStartDt}, '-', '')
|
||||
</if>
|
||||
<if test="searchEndDt != null and searchEndDt != ''">
|
||||
AND M.MM_DATE <= REPLACE(#{searchEndDt}, '-', '')
|
||||
</if>
|
||||
<!-- 시간 -->
|
||||
<if test="searchTime1 != null and searchTime1 != ''">
|
||||
AND M.MM_TIME >= REPLACE(#{searchTime1}, '-', '')
|
||||
</if>
|
||||
<if test="searchTime2 != null and searchTime2 != ''">
|
||||
AND M.MM_TIME <= REPLACE(#{searchTime2}, '-', '')
|
||||
</if>
|
||||
<!-- 위반내용 (searchCondition : code1~6) -->
|
||||
<!-- <if test="searchCondition != null and searchCondition != ''">-->
|
||||
<!-- <!– 코드가없다. –>-->
|
||||
<!-- AND M.VL_CODE = #{searchCondition}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- 처리상태 (searchCondition1 : code1~22) -->
|
||||
<if test="searchCondition1 != null and searchCondition1 != ''">
|
||||
AND M.MM_STATE = #{searchCondition1}
|
||||
</if>
|
||||
|
||||
<!-- 등록구분 -->
|
||||
<if test="searchCondition2 != null and searchCondition2 != ''">
|
||||
AND M.MM_DLGB = #{searchCondition2}
|
||||
</if>
|
||||
|
||||
<!-- 자료출처 -->
|
||||
<if test="searchCondition3 != null and searchCondition3 != ''">
|
||||
AND M.MM_INGB = #{searchCondition3}
|
||||
</if>
|
||||
|
||||
<!-- <!– 법정동 –>-->
|
||||
<!-- <if test="searchCondition4 != null and searchCondition4 != ''">-->
|
||||
<!-- AND M.MM_DONG = #{searchCondition4}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- ===== 텍스트 입력 필드들 (값이 있으면 AND LIKE) ===== -->
|
||||
|
||||
<!-- 차량번호 -->
|
||||
<if test="searchCarno != null and searchCarno != ''">
|
||||
AND M.MM_CARNO LIKE CONCAT('%', #{searchCarno}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 소유자성명 -->
|
||||
<if test="searchName != null and searchName != ''">
|
||||
AND O.OM_NAME LIKE CONCAT('%', #{searchName}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 주민번호 -->
|
||||
<if test="searchJno != null and searchJno != ''">
|
||||
AND O.OM_JNO LIKE CONCAT('%', #{searchJno}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 신고자 -->
|
||||
<if test="searchUser != null and searchUser != ''">
|
||||
AND A.AS_USER LIKE CONCAT('%', #{searchUser}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 신고자 전화번호 -->
|
||||
<if test="searchTel != null and searchTel != ''">
|
||||
AND A.AS_TEL LIKE CONCAT('%', #{searchTel}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 목록번호 -->
|
||||
<if test="searchBbsno != null and searchBbsno != ''">
|
||||
AND A.AS_BBS_NO LIKE CONCAT('%', #{searchBbsno}, '%')
|
||||
</if>
|
||||
|
||||
<!-- <!– 위반장소 –>-->
|
||||
<!-- <if test="searchPos != null and searchPos != ''">-->
|
||||
<!-- AND M.MM_PLACE LIKE CONCAT('%', #{searchPos}, '%')-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- 상세주소 (예: O.OM_ADDR) -->
|
||||
<!-- <if test="searchAddr != null and searchAddr != ''">-->
|
||||
<!-- AND O.OM_ADDR LIKE CONCAT('%', #{searchAddr}, '%')-->
|
||||
<!-- </if>-->
|
||||
</where>
|
||||
ORDER BY AS_JSDATE DESC, AS_JSNO DESC
|
||||
</select>
|
||||
<select id="selectViolationList"
|
||||
resultType="go.kr.project.biz.search.filtersearch.model.FilterSearchDto$Response$Violation">
|
||||
SELECT
|
||||
VL_CODE,
|
||||
VL_ID
|
||||
FROM CP_VIOLATION
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,419 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: moong
|
||||
Date: 2025-11-27
|
||||
Time: 오후 3:21
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
|
||||
<div class="main_body">
|
||||
<section id="section8" class="main_bars">
|
||||
<div class="bgs-main">
|
||||
<section id="section5">
|
||||
<div class="sub_title"></div>
|
||||
<button type="button" onclick="location.href='<c:url value='/template/noticeSample/register.do'/>'" class="newbtn bg1">등록</button>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
<div class="contants_body">
|
||||
<div class="gs_b_top">
|
||||
<ul class="lef">
|
||||
<li class="th">조회일자 지정</li>
|
||||
<li>
|
||||
<input type="text" id="searchStartDt" name="searchStartDt" class="input calender datepicker" value="${param.searchStartDt}" /> ~
|
||||
<input type="text" id="searchEndDt" name="searchEndDt" class="input calender datepicker" value="${param.searchEndDt}" />
|
||||
</li>
|
||||
<li>
|
||||
<button type="button" id="search_btn" class="newbtnss bg1">검색</button>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button" id="btnHwp" class="newbtnss bg1">한글파일출력</button>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="rig2">
|
||||
<li>
|
||||
<select id="perPageSelect" class="input">
|
||||
<option value="10" <c:if test="${param.perPage eq '10'}">selected</c:if>>페이지당 10</option>
|
||||
<option value="30" <c:if test="${empty param.perPage or param.perPage eq '30'}">selected</c:if>>페이지당 30</option>
|
||||
<option value="100" <c:if test="${param.perPage eq '100'}">selected</c:if>>페이지당 100</option>
|
||||
</select>
|
||||
<span class="page_number"><span id="currentPage"></span><span class="bar">/</span><sapn id="totalPages"></sapn> Pages</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gs_booking">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="box_column">
|
||||
<div class="containers">
|
||||
|
||||
<!-- 상단 3개 그리드 -->
|
||||
<div class="grid-row-top">
|
||||
<!-- 1. 연도별 경고/과태료 합계 -->
|
||||
<div class="grid-wrap">
|
||||
<div class="grid-title">연도별 합계</div>
|
||||
<div id="gridYear"></div>
|
||||
</div>
|
||||
|
||||
<!-- 2. 연도별 단속수단 -->
|
||||
<div class="grid-wrap">
|
||||
<div class="grid-title">연도별 단속수단</div>
|
||||
<div id="gridDevice"></div>
|
||||
</div>
|
||||
|
||||
<!-- 3. 위반유형별 경고/과태료 -->
|
||||
<div class="grid-wrap">
|
||||
<div class="grid-title">위반유형별</div>
|
||||
<div id="gridType"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 하단 1개 그리드 -->
|
||||
<div class="grid-row-bottom">
|
||||
<div class="grid-wrap">
|
||||
<div class="grid-title">상세 통계</div>
|
||||
<div id="gridDetail"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
/* 전체 컨테이너 */
|
||||
.gs_booking {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 상단 3개 그리드 영역 */
|
||||
.grid-row-top {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
height: 260px; /* 반드시 px 지정 */
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* 상단 개별 박스 */
|
||||
.grid-row-top .grid-wrap {
|
||||
flex: 1;
|
||||
border: 1px solid #c0c0c0;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* 하단 1개 그리드 영역 */
|
||||
.grid-row-bottom {
|
||||
width: 100%;
|
||||
height: 260px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.grid-row-bottom .grid-wrap {
|
||||
height: 100%;
|
||||
border: 1px solid #c0c0c0;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* 그리드 타이틀 */
|
||||
.grid-title {
|
||||
flex: 0 0 30px;
|
||||
line-height: 30px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
padding-left: 8px;
|
||||
background: #f5f5f5;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#gridYear,
|
||||
#gridDevice,
|
||||
#gridType,
|
||||
#gridDetail {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
/* 버튼 우측 정렬 */
|
||||
.btn-area-right {
|
||||
margin-top: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
let INIT_POPUP = null;
|
||||
let SEARCH_COND = {};
|
||||
let GRID_YEAR = null;
|
||||
let GRID_DEVICE = null;
|
||||
let GRID_TYPE = null;
|
||||
let GRID_DETAIL = null;
|
||||
|
||||
// 검색조건 세팅
|
||||
let setSearchCond = function () {
|
||||
let searchCondition = $.trim(nvl($("#searchCondition").val(), ""));
|
||||
let searchKeyword = $.trim(nvl($("#searchKeyword").val(), ""));
|
||||
let searchUseYn = $.trim(nvl($("#searchUseYn").val(), ""));
|
||||
let searchStartDt = $.trim(nvl($("#searchStartDt").val(), ""));
|
||||
let searchEndDt = $.trim(nvl($("#searchEndDt").val(), ""));
|
||||
|
||||
SEARCH_COND.searchCondition = searchCondition;
|
||||
SEARCH_COND.searchKeyword = searchKeyword;
|
||||
SEARCH_COND.searchUseYn = searchUseYn;
|
||||
SEARCH_COND.searchStartDt = searchStartDt;
|
||||
SEARCH_COND.searchEndDt = searchEndDt;
|
||||
|
||||
};
|
||||
|
||||
const fnBiz = {
|
||||
|
||||
init: () => {
|
||||
initGrid();
|
||||
},
|
||||
|
||||
eventListener: () => {
|
||||
|
||||
// 검색 버튼
|
||||
$('#search_btn').on('click', function () {
|
||||
let startDate = $("#searchStartDt").val();
|
||||
let endDate = $("#searchEndDt").val();
|
||||
|
||||
if ((startDate && !endDate) || (!startDate && endDate)) {
|
||||
alert("등록일 검색 시 시작일과 종료일을 모두 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
if (startDate && endDate) {
|
||||
if (!isDate(startDate) || !isDate(endDate)) {
|
||||
alert("유효한 날짜 형식이 아닙니다. (YYYY-MM-DD)");
|
||||
return;
|
||||
}
|
||||
let startDateObj = new Date(startDate);
|
||||
let endDateObj = new Date(endDate);
|
||||
if (startDateObj > endDateObj) {
|
||||
alert("시작일은 종료일보다 이후일 수 없습니다.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$("#page").val(1);
|
||||
GRID.readData(1);
|
||||
});
|
||||
|
||||
// 검색어 엔터
|
||||
$('#searchKeyword').on('keypress', function (e) {
|
||||
if (e.which === 13) {
|
||||
e.preventDefault();
|
||||
$('#search_btn').trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
// perPage 변경 이벤트 추가
|
||||
$('#perPageSelect').on('change', () => {
|
||||
const pagination = TuiGrid.instance.getPagination();
|
||||
if (!pagination) return;
|
||||
|
||||
pagination.setItemsPerPage($('#perPageSelect').val());
|
||||
pagination.reset(TuiGrid.instance.getRowCount());
|
||||
pagination.movePageTo(1);
|
||||
});
|
||||
|
||||
// 상태 탭 클릭
|
||||
$('.state-tabs li').on('click', function () {
|
||||
$('.state-tabs li').removeClass('on');
|
||||
$(this).addClass('on');
|
||||
|
||||
const state = $(this).data('state') || '';
|
||||
$('#tabState').val(state);
|
||||
|
||||
SEARCH_COND = {};
|
||||
GRID.readData(1);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/** tui-grid Set */
|
||||
const initGrid = () => {
|
||||
|
||||
// 1. 연도별 합계
|
||||
GRID_YEAR = new tui.Grid({
|
||||
el: document.getElementById('gridYear'),
|
||||
bodyHeight: '200',
|
||||
rowHeaders: [],
|
||||
scrollX: false,
|
||||
scrollY: true,
|
||||
columns: [
|
||||
{ header: '구분', name: 'gbn', width: 80, align: 'center' },
|
||||
{ header: '경고', name: 'warnCnt', width: 80, align: 'right' },
|
||||
{ header: '과태료', name: 'fineCnt', width: 80, align: 'right' },
|
||||
{ header: '전체', name: 'totalCnt', width: 80, align: 'right' }
|
||||
],
|
||||
data: []
|
||||
});
|
||||
|
||||
// 2. 연도별 단속수단
|
||||
GRID_DEVICE = new tui.Grid({
|
||||
el: document.getElementById('gridDevice'),
|
||||
bodyHeight: '200',
|
||||
rowHeaders: [],
|
||||
scrollX: false,
|
||||
scrollY: true,
|
||||
columns: [
|
||||
{ header: '구분', name: 'gbn', width: 80, align: 'center' },
|
||||
{ header: '자동단속기', name: 'autoCnt', width: 80, align: 'right' },
|
||||
{ header: '안전신문고', name: 'safeCnt', width: 80, align: 'right' },
|
||||
{ header: '합계', name: 'totalCnt', width: 80, align: 'right' }
|
||||
],
|
||||
data: []
|
||||
});
|
||||
|
||||
// 3. 위반유형별
|
||||
GRID_TYPE = new tui.Grid({
|
||||
el: document.getElementById('gridType'),
|
||||
bodyHeight: '200',
|
||||
rowHeaders: [],
|
||||
scrollX: false,
|
||||
scrollY: true,
|
||||
columns: [
|
||||
{ header: '구분', name: 'gbn', width: 120, align: 'left' },
|
||||
{ header: '경고', name: 'warnCnt', width: 80, align: 'right' },
|
||||
{ header: '과태료', name: 'fineCnt', width: 80, align: 'right' },
|
||||
{ header: '합계', name: 'totalCnt', width: 80, align: 'right' }
|
||||
],
|
||||
data: []
|
||||
});
|
||||
|
||||
// 4. 상세 통계 (하단)
|
||||
GRID_DETAIL = new tui.Grid({
|
||||
el: document.getElementById('gridDetail'),
|
||||
bodyHeight: '220',
|
||||
rowHeaders: [],
|
||||
scrollX: true,
|
||||
scrollY: true,
|
||||
columns: [
|
||||
{ header: '구분', name: 'gbn', width: 80, align: 'center' },
|
||||
{ header: '계도-일반', name: 'cdGen', width: 90, align: 'right' },
|
||||
{ header: '계도-등기', name: 'cd5', width: 90, align: 'right' },
|
||||
{ header: '사전-일반', name: 'sjGen', width: 90, align: 'right' },
|
||||
{ header: '사전-등기', name: 'sj5', width: 90, align: 'right' },
|
||||
{ header: '부과-일반', name: 'bgGen', width: 90, align: 'right' },
|
||||
{ header: '부과-등기', name: 'bg5', width: 90, align: 'right' },
|
||||
{ header: '독촉-일반', name: 'dcGen', width: 90, align: 'right' },
|
||||
{ header: '독촉-등기', name: 'dc5', width: 90, align: 'right' },
|
||||
{ header: '합계', name: 'totalCnt', width: 90, align: 'right' }
|
||||
],
|
||||
data: []
|
||||
});
|
||||
|
||||
const gridDatasource = {
|
||||
api: {
|
||||
readData: {
|
||||
url: '<c:url value="/search/caution/caution-select.ajax"/>',
|
||||
method: 'POST',
|
||||
contentType: 'application/x-www-form-urlencoded',
|
||||
processData: true
|
||||
}
|
||||
},
|
||||
initialRequest: true,
|
||||
serializer: function (params) {
|
||||
setSearchCond();
|
||||
SEARCH_COND.perPage = params.perPage;
|
||||
SEARCH_COND.page = params.page;
|
||||
|
||||
return $.param(SEARCH_COND);
|
||||
}
|
||||
};
|
||||
|
||||
const perPage = parseInt($('#perPageSelect').val() || 10, 10);
|
||||
|
||||
const gridOptions = {
|
||||
el: 'grid',
|
||||
rowHeaders: ['checkbox'],
|
||||
columns: gridColumns,
|
||||
noData: "처리 할 초기자료가 없습니다.",
|
||||
pageOptions: {
|
||||
useClient: false,
|
||||
perPage: perPage
|
||||
}
|
||||
};
|
||||
|
||||
// 실제 GRID 생성
|
||||
GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => {
|
||||
// 서버 응답 후 페이지 정보 세팅
|
||||
const data = res.data || {};
|
||||
if (data.pagination) {
|
||||
$("#currentPage").text(data.pagination.page || '');
|
||||
$("#totalPages").text(data.pagination.totalPages || '');
|
||||
}
|
||||
|
||||
// 더블 클릭 이벤트
|
||||
GRID.on("dblclick", (e) => {
|
||||
var popUrl = '/minwon/init/init_popup.do';
|
||||
var popTitle = "initPopup";
|
||||
var popOption = "width=1400px, height=900px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px";
|
||||
|
||||
// 1) localStorage에 저장
|
||||
console.log(e)
|
||||
|
||||
let cursor = e.instance.getValue(e.rowKey, 'mmCode');
|
||||
let mmCodes = e.instance.getData().map(row => row.mmCode);
|
||||
|
||||
console.log(cursor);
|
||||
|
||||
const state = { cursor, mmCodes, savedAt: Date.now() };
|
||||
localStorage.setItem('TOTAL_INFO_STATE', JSON.stringify(state));
|
||||
|
||||
// 2) 팝업이 없거나 닫혀 있으면 새로 열기
|
||||
if (!INIT_POPUP || INIT_POPUP.closed) {
|
||||
INIT_POPUP = window.open(popUrl, popTitle, popOption);
|
||||
} else {
|
||||
// 이미 떠 있으면 새로 안 만들고, 그 창에 포커스만 줌
|
||||
INIT_POPUP.focus();
|
||||
INIT_POPUP.INIT_POP_API.search();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 최초 1페이지 조회
|
||||
GRID.readData(1);
|
||||
};
|
||||
|
||||
const loadWarningStats = () => {
|
||||
|
||||
setSearchCond();
|
||||
|
||||
$.ajax({
|
||||
url: '<c:url value="/caution/statistics.ajax"/>',
|
||||
type: 'POST',
|
||||
data: SEARCH_COND,
|
||||
success: function (res) {
|
||||
|
||||
const yearList = res.yearList || [];
|
||||
const deviceList = res.deviceList || [];
|
||||
const typeList = res.typeList || [];
|
||||
const detailList = res.detailList || [];
|
||||
|
||||
GRID_YEAR.resetData(yearList);
|
||||
GRID_DEVICE.resetData(deviceList);
|
||||
GRID_TYPE.resetData(typeList);
|
||||
GRID_DETAIL.resetData(detailList);
|
||||
},
|
||||
error: function () {
|
||||
alert('경고 통계 조회 중 오류가 발생했습니다.');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 레디펑션
|
||||
$(function () {
|
||||
fnBiz.init();
|
||||
fnBiz.eventListener();
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -0,0 +1,493 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: moong
|
||||
Date: 2025-11-25
|
||||
Time: 오후 5:13
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
|
||||
<div class="main_body">
|
||||
<section id="section8" class="main_bars">
|
||||
<div class="bgs-main">
|
||||
<section id="section5">
|
||||
<div class="sub_title"></div>
|
||||
<button type="button" onclick="location.href='<c:url value='/template/noticeSample/register.do'/>'" class="newbtn bg1">등록</button>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="contants_body">
|
||||
<div class="gs_b_top">
|
||||
|
||||
<ul class="lef lef-row1">
|
||||
<li class="th">위반일</li>
|
||||
<li>
|
||||
<input type="text" id="searchStartDt" name="searchStartDt" class="input calender datepicker" value="${param.searchStartDt}" /> ~
|
||||
<input type="text" id="searchEndDt" name="searchEndDt" class="input calender datepicker" value="${param.searchEndDt}" />
|
||||
</li>
|
||||
|
||||
<li class="th">위반시간</li>
|
||||
<li>
|
||||
<input type="text" id="searchTime1" name="searchTime1" class="input" maxlength="4" placeholder="0000" />
|
||||
<input type="text" id="searchTime2" name="searchTime2" class="input" maxlength="4" placeholder="2359" />
|
||||
</li>
|
||||
|
||||
<li class="th">위반내용</li>
|
||||
<li>
|
||||
<select id="searchCondition" name="searchCondition" class="input">
|
||||
<option value="">전체</option>
|
||||
<option value="code1" <c:if test="${paramVO.searchCondition eq 'code1'}">selected</c:if>>주차위반</option>
|
||||
<option value="code2" <c:if test="${paramVO.searchCondition eq 'code2'}">selected</c:if>>주차방해</option>
|
||||
<option value="code3" <c:if test="${paramVO.searchCondition eq 'code3'}">selected</c:if>>시설훼손</option>
|
||||
<option value="code4" <c:if test="${paramVO.searchCondition eq 'code4'}">selected</c:if>>완속충전위반</option>
|
||||
<option value="code5" <c:if test="${paramVO.searchCondition eq 'code5'}">selected</c:if>>급속충전위반</option>
|
||||
<option value="code6" <c:if test="${paramVO.searchCondition eq 'code6'}">selected</c:if>>전용주차구역</option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="th">처리상태</li>
|
||||
<li>
|
||||
<select id="searchCondition1" name="searchCondition1" class="input">
|
||||
<option value="">전체</option>
|
||||
<option value="00" <c:if test="${paramVO.searchCondition1 eq 'code1'}">selected</c:if>>보류자료</option>
|
||||
<option value="01" <c:if test="${paramVO.searchCondition1 eq 'code2'}">selected</c:if>>초기상태</option>
|
||||
<option value="11" <c:if test="${paramVO.searchCondition1 eq 'code3'}">selected</c:if>>임차인조회대상</option>
|
||||
<option value="21" <c:if test="${paramVO.searchCondition1 eq 'code4'}">selected</c:if>>차적조회완료</option>
|
||||
<option value="31" <c:if test="${paramVO.searchCondition1 eq 'code5'}">selected</c:if>>의견진술중</option>
|
||||
<option value="42" <c:if test="${paramVO.searchCondition1 eq 'code6'}">selected</c:if>>사전통보중</option>
|
||||
<option value="51" <c:if test="${paramVO.searchCondition1 eq 'code7'}">selected</c:if>>사전통보완료</option>
|
||||
<option value="52" <c:if test="${paramVO.searchCondition1 eq 'code8'}">selected</c:if>>독촉</option>
|
||||
<option value="53" <c:if test="${paramVO.searchCondition1 eq 'code9'}">selected</c:if>>압류예고</option>
|
||||
<option value="54" <c:if test="${paramVO.searchCondition1 eq 'code10'}">selected</c:if>>압류대상</option>
|
||||
<option value="55" <c:if test="${paramVO.searchCondition1 eq 'code11'}">selected</c:if>>압류</option>
|
||||
<option value="code12" <c:if test="${paramVO.searchCondition1 eq 'code12'}">selected</c:if>>의견진술 미수용</option>
|
||||
<option value="code13" <c:if test="${paramVO.searchCondition1 eq 'code13'}">selected</c:if>>의견진술 자진취하</option>
|
||||
<option value="71" <c:if test="${paramVO.searchCondition1 eq 'code14'}">selected</c:if>>사전통보수납</option>
|
||||
<option value="72" <c:if test="${paramVO.searchCondition1 eq 'code15'}">selected</c:if>>부과수납</option>
|
||||
<option value="73" <c:if test="${paramVO.searchCondition1 eq 'code16'}">selected</c:if>>독촉수납</option>
|
||||
<option value="74" <c:if test="${paramVO.searchCondition1 eq 'code17'}">selected</c:if>>압류예정수납</option>
|
||||
<option value="75" <c:if test="${paramVO.searchCondition1 eq 'code18'}">selected</c:if>>압류수납</option>
|
||||
<option value="76" <c:if test="${paramVO.searchCondition1 eq 'code19'}">selected</c:if>>시효결손</option>
|
||||
<option value="80" <c:if test="${paramVO.searchCondition1 eq 'code20'}">selected</c:if>>부과취소</option>
|
||||
<option value="81" <c:if test="${paramVO.searchCondition1 eq 'code21'}">selected</c:if>>미부과처리</option>
|
||||
<option value="82" <c:if test="${paramVO.searchCondition1 eq 'code22'}">selected</c:if>>의견진술수용</option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="th">등록구분</li>
|
||||
<li>
|
||||
<select id="searchCondition2" name="searchCondition2" class="input">
|
||||
<option value="">전체</option>
|
||||
<option value="code1" <c:if test="${paramVO.searchCondition2 eq 'code1'}">selected</c:if>>변환등록</option>
|
||||
<option value="code2" <c:if test="${paramVO.searchCondition2 eq 'code2'}">selected</c:if>>수기등록</option>
|
||||
<option value="code3" <c:if test="${paramVO.searchCondition2 eq 'code3'}">selected</c:if>>자동등록</option>
|
||||
<option value="code4" <c:if test="${paramVO.searchCondition2 eq 'code4'}">selected</c:if>>재등록</option>
|
||||
<option value="code5" <c:if test="${paramVO.searchCondition2 eq 'code5'}">selected</c:if>>복사등록</option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="th">자료출처</li>
|
||||
<li>
|
||||
<select id="searchCondition3" name="searchCondition3" class="input">
|
||||
<option value="">전체</option>
|
||||
<option value="code1" <c:if test="${paramVO.searchCondition3 eq 'code1'}">selected</c:if>>생활불편</option>
|
||||
<option value="code2" <c:if test="${paramVO.searchCondition3 eq 'code2'}">selected</c:if>>구청단속</option>
|
||||
<option value="code3" <c:if test="${paramVO.searchCondition3 eq 'code3'}">selected</c:if>>시청단속</option>
|
||||
<option value="code4" <c:if test="${paramVO.searchCondition3 eq 'code4'}">selected</c:if>>기타</option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="th">법정동</li>
|
||||
<li>
|
||||
<select id="searchCondition4" name="searchCondition4" class="input">
|
||||
<option value="">전체</option>
|
||||
<option value="code1" <c:if test="${paramVO.searchCondition4 eq 'code1'}">selected</c:if>>생활불편</option>
|
||||
<option value="code2" <c:if test="${paramVO.searchCondition4 eq 'code2'}">selected</c:if>>구청단속</option>
|
||||
<option value="code3" <c:if test="${paramVO.searchCondition4 eq 'code3'}">selected</c:if>>시청단속</option>
|
||||
<option value="code4" <c:if test="${paramVO.searchCondition4 eq 'code4'}">selected</c:if>>기타</option>
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="lef lef-row2">
|
||||
<li class="cond">
|
||||
<span class="th">차량번호</span>
|
||||
<input type="text" id="searchCarno" name="searchCarno" class="input" />
|
||||
</li>
|
||||
|
||||
<li class="cond">
|
||||
<span class="th">소유자성명</span>
|
||||
<input type="text" id="searchName" name="searchName" class="input" />
|
||||
</li>
|
||||
|
||||
<li class="cond">
|
||||
<span class="th">주민번호</span>
|
||||
<input type="text" id="searchJno" name="searchJno" class="input" />
|
||||
</li>
|
||||
|
||||
<li class="cond">
|
||||
<span class="th">신고자</span>
|
||||
<input type="text" id="searchUser" name="searchUser" class="input" />
|
||||
</li>
|
||||
|
||||
<li class="cond">
|
||||
<span class="th">신고자 전화번호</span>
|
||||
<input type="text" id="searchTel" name="searchTel" class="input" />
|
||||
</li>
|
||||
|
||||
<li class="cond">
|
||||
<span class="th">목록번호</span>
|
||||
<input type="text" id="searchBbsno" name="searchBbsno" class="input" />
|
||||
</li>
|
||||
|
||||
<li class="cond">
|
||||
<span class="th">위반장소</span>
|
||||
<input type="text" id="searchPos" name="searchPos" class="input" />
|
||||
</li>
|
||||
|
||||
<li class="cond">
|
||||
<span class="th">상세주소</span>
|
||||
<input type="text" id="searchAddr" name="searchAddr" class="input" />
|
||||
</li>
|
||||
|
||||
<li class="cond cond-button">
|
||||
<span class="th"> </span>
|
||||
<button type="button" id="search_btn" class="newbtnss bg1">검색</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="rig2">
|
||||
<li>
|
||||
<select id="perPageSelect" class="input">
|
||||
<option value="10" <c:if test="${param.perPage eq '10'}">selected</c:if>>페이지당 10</option>
|
||||
<option value="30" <c:if test="${empty param.perPage or param.perPage eq '30'}">selected</c:if>>페이지당 30</option>
|
||||
<option value="100" <c:if test="${param.perPage eq '100'}">selected</c:if>>페이지당 100</option>
|
||||
</select>
|
||||
<span class="page_number">
|
||||
<span id="currentPage"></span><span class="bar">/</span><span id="totalPages"></span> Pages
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="gs_booking">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="box_column">
|
||||
<div class="containers">
|
||||
<div id="grid"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.gs_b_top ul.lef-row1 {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.gs_b_top ul.lef-row2 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4열 */
|
||||
column-gap: 16px; /* 좌우 간격 */
|
||||
row-gap: 6px; /* 위/아래 간격 */
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.gs_b_top ul.lef-row2 li.cond {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.gs_b_top ul.lef-row2 li.cond .th {
|
||||
display: inline-block;
|
||||
font-weight: 700;
|
||||
margin-right: 4px;
|
||||
min-width: 100px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.gs_b_top ul.lef-row2 li.cond .input {
|
||||
flex: 1;
|
||||
}
|
||||
.gs_b_top {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#search_btn {
|
||||
position: absolute;
|
||||
right: 500px;
|
||||
top: 65px;
|
||||
z-index: 10;
|
||||
height: 34px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.gs_b_top {
|
||||
padding-bottom: 6px !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.gs_b_top ul.lef-row2 {
|
||||
margin-bottom: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.gs_booking {
|
||||
margin-top: 30px !important;
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
let INIT_POPUP = null;
|
||||
let SEARCH_COND = {};
|
||||
let GRID = null;
|
||||
|
||||
function isTimeHHmm(value) {
|
||||
const timeRegex = /^([01][0-9]|2[0-3])[0-5][0-9]$/;
|
||||
return timeRegex.test(value);
|
||||
}
|
||||
|
||||
// 검색조건 세팅
|
||||
let setSearchCond = function () {
|
||||
let searchCondition = $.trim(nvl($("#searchCondition").val(), ""));
|
||||
let searchKeyword = $.trim(nvl($("#searchKeyword").val(), ""));
|
||||
let searchStartDt = $.trim(nvl($("#searchStartDt").val(), ""));
|
||||
let searchEndDt = $.trim(nvl($("#searchEndDt").val(), ""));
|
||||
let searchCondition1 = $.trim(nvl($("#searchCondition1").val(), ""));
|
||||
let searchCondition2 = $.trim(nvl($("#searchCondition2").val(), ""));
|
||||
let searchCondition3 = $.trim(nvl($("#searchCondition3").val(), ""));
|
||||
let searchCondition4 = $.trim(nvl($("#searchCondition4").val(), ""));
|
||||
let searchCarno = $.trim(nvl($("#searchCarno").val(), ""));
|
||||
let searchName = $.trim(nvl($("#searchName").val(), ""));
|
||||
let searchJno = $.trim(nvl($("#searchJno").val(), ""));
|
||||
let searchUser = $.trim(nvl($("#searchUser").val(), ""));
|
||||
let searchTel = $.trim(nvl($("#searchTel").val(), ""));
|
||||
let searchBbsno = $.trim(nvl($("#searchBbsno").val(), ""));
|
||||
let searchPos = $.trim(nvl($("#searchPos").val(), ""));
|
||||
let searchAddr = $.trim(nvl($("#searchAddr").val(), ""));
|
||||
let searchTime1 = $.trim(nvl($("#searchTime1").val(), ""));
|
||||
let searchTime2 = $.trim(nvl($("#searchTime2").val(), ""));
|
||||
|
||||
SEARCH_COND.searchCondition = searchCondition;
|
||||
SEARCH_COND.searchKeyword = searchKeyword;
|
||||
SEARCH_COND.searchStartDt = searchStartDt;
|
||||
SEARCH_COND.searchEndDt = searchEndDt;
|
||||
SEARCH_COND.searchCondition1 = searchCondition1;
|
||||
SEARCH_COND.searchCondition2 = searchCondition2;
|
||||
SEARCH_COND.searchCondition3 = searchCondition3;
|
||||
SEARCH_COND.searchCondition4 = searchCondition4;
|
||||
SEARCH_COND.searchCarno = searchCarno;
|
||||
SEARCH_COND.searchName = searchName;
|
||||
SEARCH_COND.searchJno = searchJno;
|
||||
SEARCH_COND.searchUser = searchUser;
|
||||
SEARCH_COND.searchTel = searchTel;
|
||||
SEARCH_COND.searchBbsno = searchBbsno;
|
||||
SEARCH_COND.searchPos = searchPos;
|
||||
SEARCH_COND.searchAddr = searchAddr;
|
||||
SEARCH_COND.searchTime1 = searchTime1;
|
||||
SEARCH_COND.searchTime2 = searchTime2;
|
||||
|
||||
};
|
||||
|
||||
const fnBiz = {
|
||||
|
||||
init: () => {
|
||||
initGrid();
|
||||
},
|
||||
|
||||
eventListener: () => {
|
||||
|
||||
// 검색 버튼
|
||||
$('#search_btn').on('click', function () {
|
||||
let startDate = $("#searchStartDt").val();
|
||||
let endDate = $("#searchEndDt").val();
|
||||
let startTime = $("#searchTime1").val();
|
||||
let endTime = $("#searchTime2").val();
|
||||
|
||||
if ((startDate && !endDate) || (!startDate && endDate)) {
|
||||
alert("등록일 검색 시 시작일과 종료일을 모두 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
if (startDate && endDate) {
|
||||
if (!isDate(startDate) || !isDate(endDate)) {
|
||||
alert("유효한 날짜 형식이 아닙니다. (YYYY-MM-DD)");
|
||||
return;
|
||||
}
|
||||
let startDateObj = new Date(startDate);
|
||||
let endDateObj = new Date(endDate);
|
||||
if (startDateObj > endDateObj) {
|
||||
alert("시작일은 종료일보다 이후일 수 없습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
if ((startTime && !endTime) || (!startTime && endTime)) {
|
||||
alert("위반시간 검색 시 시작시간과 종료시간을 모두 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (startTime && endTime) {
|
||||
|
||||
if (!isTimeHHmm(startTime) || !isTimeHHmm(endTime)) {
|
||||
alert("시간은 0000 ~ 2359 형식으로 입력해주세요. (예: 0930)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (parseInt(startTime) > parseInt(endTime)) {
|
||||
alert("시작시간은 종료시간보다 이후일 수 없습니다.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
$("#page").val(1);
|
||||
GRID.readData(1);
|
||||
});
|
||||
|
||||
// 검색어 엔터
|
||||
$('#searchKeyword').on('keypress', function (e) {
|
||||
if (e.which === 13) {
|
||||
e.preventDefault();
|
||||
$('#search_btn').trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
// perPage 변경 이벤트 추가
|
||||
$('#perPageSelect').on('change', () => {
|
||||
const pagination = TuiGrid.instance.getPagination();
|
||||
if (!pagination) return;
|
||||
|
||||
pagination.setItemsPerPage($('#perPageSelect').val());
|
||||
pagination.reset(TuiGrid.instance.getRowCount());
|
||||
pagination.movePageTo(1);
|
||||
});
|
||||
|
||||
// 상태 탭 클릭
|
||||
$('.state-tabs li').on('click', function () {
|
||||
$('.state-tabs li').removeClass('on');
|
||||
$(this).addClass('on');
|
||||
|
||||
const state = $(this).data('state') || '';
|
||||
$('#tabState').val(state);
|
||||
|
||||
SEARCH_COND = {};
|
||||
GRID.readData(1);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/** tui-grid Set */
|
||||
const initGrid = () => {
|
||||
|
||||
const gridColumns = [
|
||||
{ header: '자료출처', name: 'mmIngb', width: 150, align: 'center' },
|
||||
{ header: '접수(위반)일시', name: 'mmDate', width: 150, align: 'center' },
|
||||
{ header: '차량번호', name: 'mmCarno', width: 150, align: 'center' },
|
||||
{ header: '신고자', name: 'asUser', width: 150, align: 'center' },
|
||||
{ header: '접수번호', name: 'asJsno', width: 150, align: 'center' },
|
||||
{ header: '접수일자', name: 'asJsdate', width: 150, align: 'center' },
|
||||
{ header: '목록번호', name: 'asBbsNo', width: 150, align: 'center' },
|
||||
{ header: '주민번호', name: 'omJno', width: 150, align: 'center' },
|
||||
{ header: '소유자', name: 'omName', width: 150, align: 'center' },
|
||||
{ header: '잔액', name: 'mmKeum2', width: 150, align: 'center' },
|
||||
{ header: '영상매체', name: 'mmImageGb', width: 150, align: 'center' },
|
||||
{ header: '사진', name: 'mmImageCnt', width: 150, align: 'center' },
|
||||
{ header: '차량확인', name: 'mmCarcheck', width: 150, align: 'center' },
|
||||
{ header: '처리상태', name: 'mmState', width: 150, align: 'center' },
|
||||
{ header: '제외사유', name: 'ccCause', width: 150, align: 'center' },
|
||||
{ header: '제외일자', name: 'ccDate', width: 150, align: 'center' },
|
||||
{ header: '제외기타사항', name: 'ccEtc', width: 150, align: 'center' },
|
||||
{ header: 'mmCode', name: 'mmCode', sortable: true, width: 150, align: 'center', hidden: true}
|
||||
];
|
||||
|
||||
const gridDatasource = {
|
||||
api: {
|
||||
readData: {
|
||||
url: '<c:url value="/search/filtersearch/filtersearch-select.ajax"/>',
|
||||
method: 'POST',
|
||||
contentType: 'application/x-www-form-urlencoded',
|
||||
processData: true
|
||||
}
|
||||
},
|
||||
initialRequest: true,
|
||||
serializer: function (params) {
|
||||
setSearchCond();
|
||||
SEARCH_COND.perPage = params.perPage;
|
||||
SEARCH_COND.page = params.page;
|
||||
|
||||
return $.param(SEARCH_COND);
|
||||
}
|
||||
};
|
||||
|
||||
const perPage = parseInt($('#perPageSelect').val() || 10, 10);
|
||||
|
||||
const gridOptions = {
|
||||
el: 'grid',
|
||||
rowHeaders: ['checkbox'],
|
||||
columns: gridColumns,
|
||||
noData: "처리 할 초기자료가 없습니다.",
|
||||
pageOptions: {
|
||||
useClient: false,
|
||||
perPage: perPage
|
||||
}
|
||||
};
|
||||
|
||||
// 실제 GRID 생성
|
||||
GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => {
|
||||
// 서버 응답 후 페이지 정보 세팅
|
||||
const data = res.data || {};
|
||||
if (data.pagination) {
|
||||
$("#currentPage").text(data.pagination.page || '');
|
||||
$("#totalPages").text(data.pagination.totalPages || '');
|
||||
}
|
||||
|
||||
// 더블 클릭 이벤트
|
||||
GRID.on("dblclick", (e) => {
|
||||
var popUrl = '/minwon/init/init_popup.do';
|
||||
var popTitle = "initPopup";
|
||||
var popOption = "width=1400px, height=900px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px";
|
||||
|
||||
// 1) localStorage에 저장
|
||||
console.log(e)
|
||||
|
||||
let cursor = e.instance.getValue(e.rowKey, 'mmCode');
|
||||
let mmCodes = e.instance.getData().map(row => row.mmCode);
|
||||
|
||||
console.log(cursor);
|
||||
|
||||
const state = { cursor, mmCodes, savedAt: Date.now() };
|
||||
localStorage.setItem('TOTAL_INFO_STATE', JSON.stringify(state));
|
||||
|
||||
// 2) 팝업이 없거나 닫혀 있으면 새로 열기
|
||||
if (!INIT_POPUP || INIT_POPUP.closed) {
|
||||
INIT_POPUP = window.open(popUrl, popTitle, popOption);
|
||||
} else {
|
||||
// 이미 떠 있으면 새로 안 만들고, 그 창에 포커스만 줌
|
||||
INIT_POPUP.focus();
|
||||
INIT_POPUP.INIT_POP_API.search();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 최초 1페이지 조회
|
||||
GRID.readData(1);
|
||||
};
|
||||
|
||||
// 레디펑션
|
||||
$(function () {
|
||||
fnBiz.init();
|
||||
fnBiz.eventListener();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue