Merge branch 'dev' into dev-feat-code
commit
f124aa1fee
@ -0,0 +1,15 @@
|
||||
package kr.xit.fims.biz.sample.mapper;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface ISample2Mapper {
|
||||
|
||||
List<Map<String, Object>> selectSampleList(Map<String, Object> paraMap, RowBounds rowBounds);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package kr.xit.fims.biz.sample.service;
|
||||
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ISample2Service {
|
||||
|
||||
List<Map<String, Object>> findSampleList(Map<String, Object> paraMap, RowBounds pagingInfo);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package kr.xit.fims.biz.sample.service;
|
||||
|
||||
import kr.xit.fims.biz.sample.mapper.ISample2Mapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class Sample2Service implements ISample2Service{
|
||||
|
||||
private final ISample2Mapper mapper;
|
||||
@Override
|
||||
public List<Map<String, Object>> findSampleList(Map<String, Object> paraMap, RowBounds rowBounds) {
|
||||
|
||||
return mapper.selectSampleList(paraMap, rowBounds);
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package kr.xit.fims.biz.sample.web;
|
||||
|
||||
|
||||
import kr.xit.fims.biz.sample.service.ISample2Service;
|
||||
import kr.xit.fims.biz.sample.service.ISampleService;
|
||||
import kr.xit.fims.biz.sample.service.Sample2Service;
|
||||
import kr.xit.framework.core.model.ResultResponse;
|
||||
import kr.xit.framework.support.mybatis.MybatisUtils;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Controller
|
||||
@RequestMapping(value = "/fims/biz/sample")
|
||||
public class Sample2Controller {
|
||||
|
||||
private final ISample2Service sample2Service;
|
||||
|
||||
@GetMapping(value = "/sampleForm2")
|
||||
public void sampleForm(){
|
||||
}
|
||||
|
||||
@GetMapping(value = "/findSampleList")
|
||||
public ModelAndView findSampleList(@RequestParam Map<String,Object> paraMap){
|
||||
|
||||
return ResultResponse.of(sample2Service.findSampleList(paraMap, MybatisUtils.getPagingInfo(paraMap)));
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?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="kr.xit.fims.biz.sample.mapper.ISample2Mapper">
|
||||
|
||||
<select id="selectSampleList" parameterType="map" resultType="caseMap">
|
||||
/* sample2-mysql-mapper|selectRt0100List-|cjm */
|
||||
select
|
||||
idx_no
|
||||
, col_nm
|
||||
, col_no1
|
||||
, col_no2
|
||||
, col_no3
|
||||
, col_no4
|
||||
from tb_sample
|
||||
where 1=1
|
||||
<if test = "sch_word != null || sch_word != ''">
|
||||
and col_nm = #{sch_word}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectRt0100" parameterType="string" resultType="string">
|
||||
/* sample2-mysql-mapper|selectRt0100-|cjm */
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,218 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
|
||||
|
||||
|
||||
<form id="frmSearch" name="frmSearch" method="get">
|
||||
<input type="hidden" id="searchGubun" name="searchGubun" value="excel">
|
||||
<input type="hidden" id="sch_tab_id" name="sch_tab_id" value="0"/>
|
||||
|
||||
<div class="search">
|
||||
<div class="detail_02" style="display: block;">
|
||||
<fieldset class="frmSearch">
|
||||
<legend>상세 검색</legend>
|
||||
<ul class="detailGroup_02">
|
||||
|
||||
<li>
|
||||
<span class="title"><label style="padding-right: 26px;">조회일자 :</label></span>
|
||||
<select id="sch_date_opt" name="sch_date_opt" class="selectBox">
|
||||
<option value="1">위반일자</option>
|
||||
<option value="2">등록일자</option>
|
||||
</select>
|
||||
|
||||
<!-- tag lib sample -->
|
||||
<code:select id="sch_date_opt1" name="sch_date_opt1" codeId="ENS003" title="시작날자선택" defaultSelect="99" cls="selectBox" alt="selectBox tag"/>
|
||||
<code:radio id="sch_date_opt2" name="sch_date_opt2" codeId="ENS003" defaultSelect="02" cls="radioBox" alt="radio tag"/>
|
||||
</li>
|
||||
<li>
|
||||
<span class="cal-box">
|
||||
<input id="sch_date_from" class="inputText cal" name="sch_date_from" type="text" title="시작 날짜 선택">
|
||||
<button type="button" name="sch_date_from" class="calendar"><span class="ico far fa-calendar-alt">
|
||||
<%-- <img style="width:18px;" src="${ctx }/resources/ens/content/images/common/main/calendar.png"/><em>달력</em></span> --%>
|
||||
<img style="width:18px;" src="${ctx }/resources/biz/content/images/common/main/calendar.png"/><em>달력</em></span>
|
||||
</button>
|
||||
~
|
||||
<input id="sch_date_to" class="inputText cal" name="sch_date_to" type="text" title="종료 날짜 선택" placeholder="날짜를 선택하세요">
|
||||
<button type="button" name="sch_date_to" class="calendar"><span class="ico far fa-calendar-alt">
|
||||
<%-- <img style="width:18px;" src="${ctx }/resources/ens/content/images/common/main/calendar.png"/><em>달력</em></span> --%>
|
||||
<img style="width:18px;" src="${ctx }/resources/biz/content/images/common/main/calendar.png"/><em>달력</em></span>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li style="padding-bottom:10px; padding-left: 40px;">
|
||||
<span class="title">상태 : </span>
|
||||
<select id="sch_opt" name="sch_opt" class="selectBox">
|
||||
<option value="1">차량번호</option>
|
||||
<option value="2">소유자명</option>
|
||||
</select>
|
||||
</li>
|
||||
<input type="text" id="sch_word" name="sch_word" value="">
|
||||
<button type="button" class="btnSearch" id="btnSearch" name="btnSearch">검색</button>
|
||||
</ul>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="contents">
|
||||
<div class="topBtnArea">
|
||||
<ul class="btnList">
|
||||
<li>
|
||||
<button type="button" id="btnExcel"><i class="ico far fa-file-excel"></i> 엑셀</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="list clearfix" id="totCnt">전체 ㅣ <span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="grid"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javaScript">
|
||||
|
||||
/**************************************************************************
|
||||
* Global Variable
|
||||
**************************************************************************/
|
||||
var callbackSearch = () => fnBiz.search(); // 데이터 조회 : popup에서 사용
|
||||
let GRID = null;
|
||||
|
||||
|
||||
|
||||
/* *******************************
|
||||
* Biz function
|
||||
******************************* */
|
||||
const fnBiz = {
|
||||
search: () => {
|
||||
GRID.reloadData();
|
||||
}
|
||||
|
||||
,pagePopup: function(flag, params){
|
||||
let url = '<c:url value="/framework/biz/mng/menu/mngProgramMgtPopup.do"/>';
|
||||
let popTitle;
|
||||
let popOption = {width: 700, height:660}
|
||||
switch (flag) {
|
||||
case "add": //등록
|
||||
popTitle = "프로그램 등록";
|
||||
break;
|
||||
case "detail": //상세
|
||||
popTitle = "프로그램 상세";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
CmmPopup.open(url, params, popOption, popTitle);
|
||||
}
|
||||
|
||||
,onClickGrid: function(props){
|
||||
const rowData = props.grid.getRow(props.rowKey);
|
||||
fnBiz.pagePopup('detail', rowData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* event
|
||||
**************************************************************************/
|
||||
$(() => {
|
||||
$('#btnSearch').on('click', () => {
|
||||
fnBiz.search();
|
||||
});
|
||||
|
||||
$('#btnRegist').on('click', () => {
|
||||
fnBiz.pagePopup('add', null);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* *******************************
|
||||
* Grid
|
||||
******************************* */
|
||||
const initGrid = () => {
|
||||
|
||||
/* ******************************
|
||||
* Grid start
|
||||
****************************** */
|
||||
const gridColumns = [ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
|
||||
{
|
||||
header: '인덱스',
|
||||
name: 'idx_no',
|
||||
minWidth: 200,
|
||||
sortable: false,
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
header: '컬럼이름',
|
||||
name: 'col_nm',
|
||||
minWidth: 200,
|
||||
sortable: false,
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
header: '컬럼1',
|
||||
name: 'col_no1',
|
||||
minWidth: 200,
|
||||
sortable: false,
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
header: '컬럼2',
|
||||
name: 'col_no2',
|
||||
minWidth: 200,
|
||||
sortable: false,
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
header: '컬럼3',
|
||||
name: 'col_no3',
|
||||
minWidth: 200,
|
||||
sortable: false,
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
header: '컬럼4',
|
||||
name: 'col_no4',
|
||||
minWidth: 200,
|
||||
sortable: false,
|
||||
align: 'left'
|
||||
}
|
||||
];
|
||||
const gridDatasource = { //DataSource
|
||||
/* -----------------------
|
||||
* DataSource API Setting
|
||||
----------------------- */
|
||||
initialRequest: true, // 화면 load시 조회 안함 - default
|
||||
api: {
|
||||
readData: {
|
||||
url: '<c:url value="/fims/biz/sample/findSampleList.do"/>'
|
||||
,serializer: (params) => fnAddPageInfo(document.frmSearch, params)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const gridOptions = {
|
||||
el: 'grid',
|
||||
rowHeaders: ['rowNum'],
|
||||
columns: gridColumns,
|
||||
};
|
||||
GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => {
|
||||
});
|
||||
};
|
||||
|
||||
/**************************************************************************
|
||||
* initialize
|
||||
**************************************************************************/
|
||||
$(document).ready(function(){
|
||||
initGrid();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue