Merge remote-tracking branch 'origin/main'

dev
Jonguk. Lim 5 months ago
commit 2bce1160d6

@ -7,16 +7,32 @@ import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.plugin.Intercepts;
import org.apache.ibatis.plugin.Signature;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;
import cokr.xit.applib.ApplicationContextProvider;
import cokr.xit.base.FileController;
import cokr.xit.base.file.service.FileQuery;
import cokr.xit.foundation.data.paging.MapperSupport;
@Intercepts({
@Signature(type = Executor.class, method = "query", args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class}),
@Signature(type = Executor.class, method = "update", args = {MappedStatement.class, Object.class})
})
public class AddsMapperSupport extends MapperSupport {
@Override
protected Object query(Executor executor, MappedStatement mappedStatement, Object obj, RowBounds rowBounds, ResultHandler<?> resultHandler) throws SQLException {
String id = mappedStatement.getId();
if(id.equals("cokr.xit.base.file.dao.FileMapper.getFileList")
|| id.equals("cokr.xit.base.file.dao.FileMapper.getFilesOf")) {
FileController addsFileController = (FileController) ApplicationContextProvider.getApplicationContext().getBean("fileController");
((FileQuery)obj).setType(addsFileController.getFileRootPath());
}
return super.query(executor, mappedStatement, obj, rowBounds, resultHandler);
}
@Override
protected Object update(Executor executor, MappedStatement mappedStatement, Object obj) throws SQLException {
String id = mappedStatement.getId();

@ -15,8 +15,11 @@ import cokr.xit.adds.nims.DsuseMgtDocQuery;
import cokr.xit.adds.nims.DsuseMgtReceiptQuery;
import cokr.xit.adds.nims.service.DsuseMgtDocService;
import cokr.xit.adds.nims.service.DsuseMgtReceiptService;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.service.bean.DefaultOgdpBean;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.foundation.data.DataObject;
@Controller
@RequestMapping(
@ -27,6 +30,9 @@ public class AddsNimsController extends ApplicationController {
@Value("${app.api.host:}")
private String apiHost;
@Resource(name="defaultOgdpBean")
DefaultOgdpBean defaultOgdpBean;
@Resource(name="dsuseMgtReceiptService")
private DsuseMgtReceiptService dsuseMgtReceiptService;
@ -134,9 +140,13 @@ public class AddsNimsController extends ApplicationController {
//-------------------------------------------------------------------------------------------------
@RequestMapping(value = "/dsuseMgtReceipt.do", name="신청서 접수 메인")
public ModelAndView dsuseMgtReceiptMain() {
ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtReceipt-main");
setCmmCode("ADDS11", mav);
List<DataObject> deptList = defaultOgdpBean.getDeptList(new OgdpQuery());
mav.addObject("DEPTList", deptList);
return mav
.addObject("pageName", "dsuseMgtReceipt") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
// .addObject("infoPrefix", "dsuseMgtReceipt") // prefix

@ -44,8 +44,8 @@
<sql id="selectCategories"><include refid="utility.paging-prefix" />
SELECT *
FROM TB_CODE_CTGR
WHERE USE_YN = 'Y'
<if test="categoryIDs != null"> AND CTGR_ID IN (<foreach collection="categoryIDs" item="categoryID" separator=",">#{categoryID}</foreach>)</if>
<where><if test="!includeAll"> AND USE_YN = 'Y'</if>
<if test="categoryIDs != null"> AND CTGR_ID IN (<foreach collection="categoryIDs" item="categoryID" separator=",">#{categoryID}</foreach>)</if></where>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" /></sql>
@ -94,9 +94,9 @@ UPDATE TB_CODE_CTGR SET
<sql id="selectGroups"><include refid="utility.paging-prefix" />
SELECT *
FROM TB_CODE_GRP
WHERE USE_YN = 'Y'
<where><if test="!includeAll"> AND USE_YN = 'Y'</if>
<if test="categoryIDs != null"> AND CTGR_ID IN (<foreach collection="categoryIDs" item="categoryID" separator=",">#{categoryID}</foreach>)</if>
<if test="groupIDs != null">AND GRP_ID IN (<foreach collection="groupIDs" item="groupID" separator=",">#{groupID}</foreach>)</if>
<if test="groupIDs != null"> AND GRP_ID IN (<foreach collection="groupIDs" item="groupID" separator=",">#{groupID}</foreach>)</if></where>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" /></sql>
@ -151,9 +151,9 @@ UPDATE TB_CODE_GRP SET
<sql id="selectCodes"><include refid="utility.paging-prefix" />
SELECT *
FROM TB_CMN_CODE
WHERE USE_YN = 'Y'
<where><if test="!includeAll"> AND USE_YN = 'Y'</if>
<if test='groupIDs != null'> AND GRP_ID IN (<foreach collection="groupIDs" item="groupID" separator=",">#{groupID}</foreach>)</if>
<if test='codes != null'>AND CODE IN (<foreach collection="codes" item="code" separator=",">#{code}</foreach>)</if>
<if test='codes != null'> AND CODE IN (<foreach collection="codes" item="code" separator=",">#{code}</foreach>)</if></where>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" /></sql>

@ -33,12 +33,14 @@
<sql id="selectFiles">
<if test="fileIDs != null">
SELECT A.*, FILE_PATH URL
SELECT A.*
, REPLACE(FILE_PATH,#{type},'/files/') AS URL
FROM TB_FILE A
WHERE FILE_ID IN (<foreach collection="fileIDs" item="fileID" separator=",">#{fileID}</foreach>)
ORDER BY FILE_ID</if>
<if test="fileIDs == null"><include refid="utility.paging-prefix" />
SELECT A.*, FILE_PATH URL
SELECT A.*
, REPLACE(FILE_PATH,#{type},'/files/') AS URL
FROM TB_FILE A
<where>
<if test="infoType != null"> AND A.INF_TYPE = #{infoType}</if>

@ -16,9 +16,9 @@
<label class="form-label fw-bold form-search-title text-end" for="schSggCd--${pageName}">관할관청</label>
<select class="form-select" id="schSggCd--${pageName}" name="schSggCd">
<option value="">전체</option>
<option value="01">수지구</option>
<option value="03">기흥구</option>
<option value="05">처인구</option>
<c:forEach items="${DEPTList}" var="item">
<option value="${item.DEPT_CD}">${item.DEPT_NM}</option>
</c:forEach>
</select>
</div>

@ -35,7 +35,7 @@
<tbody id="groupList">
</tbody>
<template id="groupRow">
<tr data-key="{GRP_ID}">
<tr data-key="{GRP_ID}"{notUsed}>
<td style="text-align:center;"><input value="{GRP_ID}" onchange="codeControl.groups.select('{GRP_ID}', this.checked);" type="checkbox" class="form-check-input"></td>
<td onclick="codeControl.groups.setCurrent('{GRP_ID}')" ondblclick="codeControl.groups.getInfo({})">{GRP_ID}</td>
<td onclick="codeControl.groups.setCurrent('{GRP_ID}')" ondblclick="codeControl.groups.getInfo({})">{GRP_NM}</td>
@ -73,7 +73,7 @@
<tbody id="codeList">
</tbody>
<template id="codeRow">
<tr data-key="{CODE}">
<tr data-key="{CODE}"{notUsed}>
<td style="text-align:center;"><input value="{CODE}" onchange="codeControl.codes.select('{CODE}', this.checked);" type="checkbox" class="form-check-input"></td>
<td onclick="codeControl.codes.setCurrent('{CODE}')" ondblclick="codeControl.codes.getInfo({})">{CODE}</td>
<td onclick="codeControl.codes.setCurrent('{CODE}')" ondblclick="codeControl.codes.getInfo({})">{CODE_VAL}</td>
@ -131,7 +131,10 @@ function renderGroupList() {
let trs = empty ?
[document.getElementById("groupNotFound").innerHTML] : <%-- from template#groupNotFound --%>
groupList.inStrings(document.getElementById("groupRow").innerHTML); <%-- from template#groupRow --%>
groupList.inStrings(
document.getElementById("groupRow").innerHTML,
(tmpl, item) => tmpl.replace(/{notUsed}/gi, item.getValue("USE_YN") == "N" ? "class=\"not-used\"" : "")
); <%-- from template#groupRow --%>
$("#groupList").html(trs.join());
$("th input[type='checkbox']").prop("checked", false);
}
@ -174,7 +177,10 @@ function renderCodeList() {
let trs = empty ?
[document.getElementById("codeNotFound").innerHTML] : <%-- from template#groupNotFound --%>
codeList.inStrings(document.getElementById("codeRow").innerHTML); <%-- from template#groupRow --%>
codeList.inStrings(
document.getElementById("codeRow").innerHTML,
(tmpl, item) => tmpl.replace(/{notUsed}/gi, item.getValue("USE_YN") == "N" ? "class=\"not-used\"" : "")
); <%-- from template#groupRow --%>
$("#codeList").html(trs.join());
$("#codeToggler").prop("checked", false);
}

Loading…
Cancel
Save