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.mapping.MappedStatement;
import org.apache.ibatis.plugin.Intercepts; import org.apache.ibatis.plugin.Intercepts;
import org.apache.ibatis.plugin.Signature; 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.applib.ApplicationContextProvider;
import cokr.xit.base.FileController; import cokr.xit.base.FileController;
import cokr.xit.base.file.service.FileQuery;
import cokr.xit.foundation.data.paging.MapperSupport; import cokr.xit.foundation.data.paging.MapperSupport;
@Intercepts({ @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}) @Signature(type = Executor.class, method = "update", args = {MappedStatement.class, Object.class})
}) })
public class AddsMapperSupport extends MapperSupport { 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 @Override
protected Object update(Executor executor, MappedStatement mappedStatement, Object obj) throws SQLException { protected Object update(Executor executor, MappedStatement mappedStatement, Object obj) throws SQLException {
String id = mappedStatement.getId(); 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.DsuseMgtReceiptQuery;
import cokr.xit.adds.nims.service.DsuseMgtDocService; import cokr.xit.adds.nims.service.DsuseMgtDocService;
import cokr.xit.adds.nims.service.DsuseMgtReceiptService; 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.code.CommonCode;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.foundation.data.DataObject;
@Controller @Controller
@RequestMapping( @RequestMapping(
@ -27,6 +30,9 @@ public class AddsNimsController extends ApplicationController {
@Value("${app.api.host:}") @Value("${app.api.host:}")
private String apiHost; private String apiHost;
@Resource(name="defaultOgdpBean")
DefaultOgdpBean defaultOgdpBean;
@Resource(name="dsuseMgtReceiptService") @Resource(name="dsuseMgtReceiptService")
private DsuseMgtReceiptService dsuseMgtReceiptService; private DsuseMgtReceiptService dsuseMgtReceiptService;
@ -134,9 +140,13 @@ public class AddsNimsController extends ApplicationController {
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
@RequestMapping(value = "/dsuseMgtReceipt.do", name="신청서 접수 메인") @RequestMapping(value = "/dsuseMgtReceipt.do", name="신청서 접수 메인")
public ModelAndView dsuseMgtReceiptMain() { public ModelAndView dsuseMgtReceiptMain() {
ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtReceipt-main"); ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtReceipt-main");
setCmmCode("ADDS11", mav); setCmmCode("ADDS11", mav);
List<DataObject> deptList = defaultOgdpBean.getDeptList(new OgdpQuery());
mav.addObject("DEPTList", deptList);
return mav return mav
.addObject("pageName", "dsuseMgtReceipt") // View(jsp)에서 사용할 id 뒤에 붙일 suffix .addObject("pageName", "dsuseMgtReceipt") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
// .addObject("infoPrefix", "dsuseMgtReceipt") // prefix // .addObject("infoPrefix", "dsuseMgtReceipt") // prefix

@ -44,8 +44,8 @@
<sql id="selectCategories"><include refid="utility.paging-prefix" /> <sql id="selectCategories"><include refid="utility.paging-prefix" />
SELECT * SELECT *
FROM TB_CODE_CTGR FROM TB_CODE_CTGR
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="categoryIDs != null"> AND CTGR_ID IN (<foreach collection="categoryIDs" item="categoryID" separator=",">#{categoryID}</foreach>)</if></where>
<include refid="utility.orderBy" /> <include refid="utility.orderBy" />
<include refid="utility.paging-suffix" /></sql> <include refid="utility.paging-suffix" /></sql>
@ -94,9 +94,9 @@ UPDATE TB_CODE_CTGR SET
<sql id="selectGroups"><include refid="utility.paging-prefix" /> <sql id="selectGroups"><include refid="utility.paging-prefix" />
SELECT * SELECT *
FROM TB_CODE_GRP 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="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.orderBy" />
<include refid="utility.paging-suffix" /></sql> <include refid="utility.paging-suffix" /></sql>
@ -151,9 +151,9 @@ UPDATE TB_CODE_GRP SET
<sql id="selectCodes"><include refid="utility.paging-prefix" /> <sql id="selectCodes"><include refid="utility.paging-prefix" />
SELECT * SELECT *
FROM TB_CMN_CODE 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='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.orderBy" />
<include refid="utility.paging-suffix" /></sql> <include refid="utility.paging-suffix" /></sql>

@ -33,12 +33,14 @@
<sql id="selectFiles"> <sql id="selectFiles">
<if test="fileIDs != null"> <if test="fileIDs != null">
SELECT A.*, FILE_PATH URL SELECT A.*
, REPLACE(FILE_PATH,#{type},'/files/') AS URL
FROM TB_FILE A FROM TB_FILE A
WHERE FILE_ID IN (<foreach collection="fileIDs" item="fileID" separator=",">#{fileID}</foreach>) WHERE FILE_ID IN (<foreach collection="fileIDs" item="fileID" separator=",">#{fileID}</foreach>)
ORDER BY FILE_ID</if> ORDER BY FILE_ID</if>
<if test="fileIDs == null"><include refid="utility.paging-prefix" /> <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 FROM TB_FILE A
<where> <where>
<if test="infoType != null"> AND A.INF_TYPE = #{infoType}</if> <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> <label class="form-label fw-bold form-search-title text-end" for="schSggCd--${pageName}">관할관청</label>
<select class="form-select" id="schSggCd--${pageName}" name="schSggCd"> <select class="form-select" id="schSggCd--${pageName}" name="schSggCd">
<option value="">전체</option> <option value="">전체</option>
<option value="01">수지구</option> <c:forEach items="${DEPTList}" var="item">
<option value="03">기흥구</option> <option value="${item.DEPT_CD}">${item.DEPT_NM}</option>
<option value="05">처인구</option> </c:forEach>
</select> </select>
</div> </div>

@ -35,7 +35,7 @@
<tbody id="groupList"> <tbody id="groupList">
</tbody> </tbody>
<template id="groupRow"> <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 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_ID}</td>
<td onclick="codeControl.groups.setCurrent('{GRP_ID}')" ondblclick="codeControl.groups.getInfo({})">{GRP_NM}</td> <td onclick="codeControl.groups.setCurrent('{GRP_ID}')" ondblclick="codeControl.groups.getInfo({})">{GRP_NM}</td>
@ -73,7 +73,7 @@
<tbody id="codeList"> <tbody id="codeList">
</tbody> </tbody>
<template id="codeRow"> <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 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}</td>
<td onclick="codeControl.codes.setCurrent('{CODE}')" ondblclick="codeControl.codes.getInfo({})">{CODE_VAL}</td> <td onclick="codeControl.codes.setCurrent('{CODE}')" ondblclick="codeControl.codes.getInfo({})">{CODE_VAL}</td>
@ -131,7 +131,10 @@ function renderGroupList() {
let trs = empty ? let trs = empty ?
[document.getElementById("groupNotFound").innerHTML] : <%-- from template#groupNotFound --%> [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()); $("#groupList").html(trs.join());
$("th input[type='checkbox']").prop("checked", false); $("th input[type='checkbox']").prop("checked", false);
} }
@ -174,7 +177,10 @@ function renderCodeList() {
let trs = empty ? let trs = empty ?
[document.getElementById("codeNotFound").innerHTML] : <%-- from template#groupNotFound --%> [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()); $("#codeList").html(trs.join());
$("#codeToggler").prop("checked", false); $("#codeToggler").prop("checked", false);
} }

Loading…
Cancel
Save