Merge branch 'dev' into dev-feat-code

main
minuk926 2 years ago
commit f124aa1fee

@ -7,6 +7,7 @@ import org.apache.ibatis.session.RowBounds;
import egovframework.rte.psl.dataaccess.mapper.Mapper;
@SuppressWarnings("MybatisXMapperMethodInspection")
@Mapper
public interface IRt0300Mapper {
List<Map<String, Object>> selectRt0300List(Map<String, Object> paraMap, RowBounds rowBounds);

@ -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)));
}
}

@ -21,7 +21,6 @@ public class SampleController {
@GetMapping(value = "/sampleForm")
public void sampleForm(){
}
@GetMapping(value = "/findRt0100List")

@ -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>

@ -56,24 +56,9 @@
<div class="contents">
<div class="topBtnArea">
<ul class="btnList">
<!-- <li> -->
<!-- <button data-show-popup="sampleBox">팝업 버튼 예시</button> -->
<!-- </li> -->
<li>
<button type="button" id="btnExcel"><i class="ico far fa-file-excel"></i> 엑셀</button>
</li>
<!-- <li> -->
<!-- <button id="btnExportPdf"><i class="ico far fa-file-pdf"></i> pdf</button> -->
<!-- </li> -->
<!-- <li> -->
<!-- <button id="btnRegist"><i class="ico fas fa-save"></i> 저장</button> -->
<!-- </li> -->
<!-- <li> -->
<!-- <button id="btnModify"><i class="ico fas fa-edit"></i> 수정</button> -->
<!-- </li> -->
<!-- <li> -->
<!-- <button id="btnRemove"><i class="ico far fa-trash-alt"></i> 삭제</button> -->
<!-- </li> -->
</ul>
<div class="list clearfix" id="totCnt">전체 ㅣ <span></span></div>
</div>
@ -102,11 +87,14 @@
</div>
<!-- //tabs -->
</div>
<!-- </div> -->
</div>
<!-- 다이얼로그 팝업 예시(sampleBox) -->
<div id = "somthing" style="display: none; padding:50px; border:1px solid red;">
내기 셍긱단거
</div>
<%-- <!-- 다이얼로그 팝업 예시(sampleBox) -->
<div class="modal-wrap">
<div class="modal-cell">
<!-- cont-box는 ID를 추가하여 여러개의 내용을 넣어주세요.
@ -123,7 +111,7 @@
<button data-modal-close class="fas btn-close"></button>
</div>
</div>
</div>
</div>--%>
<script type="text/javaScript">
@ -197,7 +185,7 @@
];
//DataSource
let tab0Datasource = {
//initialRequest: false, // 화면 load시 조회 함 - default
//initialRequest: false, // 화면 load시 조회 함 - default
api: {
readData: {
url: '<c:url value="/fims/biz/rt/findRt0200List.do"/>'
@ -247,26 +235,7 @@
onDblClickEventSet(2);
});
/*
//Grid 체크박스 checked EventListner
ARR_INSTANCE[CUR_TAB_SEQ].on('check', function(ev) {
// console.log('check!', ev);
});
//Grid 체크박스 unchecked EventListner
ARR_INSTANCE[CUR_TAB_SEQ].on('uncheck', function(ev) {
// console.log('uncheck!', ev);
});
//Grid 체크박스 focus이동 EventListner
ARR_INSTANCE[CUR_TAB_SEQ].on('focusChange', function(ev) {
// console.log('change focused cell!', ev);
});
//Grid 처리상태에 따른 콜백
ARR_INSTANCE[CUR_TAB_SEQ].on('successResponse', function(ev) {
//조회한 데이터 카운트
//$('#totCnt span').text(JSON.parse(ev.xhr.response).data.pagination.totalCount);
});
*/
}
/* *******************************
@ -335,11 +304,8 @@
,clickRegBtn: function(props){
const rowData = props.grid.getRow(props.rowKey);
fnRt0200Sel.pagePopup(
'detail',
'<c:url value="/cmm/fimsPopup/fimsTotalPopup.do"/>',
{tilesDef: 'popup', selectedId: rowData.reglt_id}
);
$('#somthing').show();
$('#somthing').focus();
}
,validate: function(flag){

@ -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…
Cancel
Save