getIntegrationDataList(SprtQuery query);
+ /**단속 특기사항을 일괄 저장한다.
+ * @param etcCn 특기사항, crdnIds 단속 ID 목록
+ * @return 저장여부
+ */
+ boolean updateEtcCn(String etcCn, String... crdnIds);
+
}
diff --git a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01Bean.java b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01Bean.java
index d7fe5934..a470f533 100644
--- a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01Bean.java
+++ b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01Bean.java
@@ -6,6 +6,8 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Component;
+import cokr.xit.fims.crdn.Crdn;
+import cokr.xit.fims.crdn.dao.CrdnUpdtMapper;
import cokr.xit.fims.sprt.SprtQuery;
import cokr.xit.fims.sprt.dao.IntegrationSearchMapper;
import cokr.xit.foundation.AbstractComponent;
@@ -28,6 +30,9 @@ public class Sprt01Bean extends AbstractComponent {
@Resource(name = "integrationSearchMapper")
private IntegrationSearchMapper integrationSearchMapper;
+ @Resource(name = "crdnUpdtMapper")
+ private CrdnUpdtMapper crdnUpdtMapper;
+
/**지정한 조건에 따라 통합 조회 자료 목록을 조회하여 반환한다.
* @param query 통합 조회 조건
* @return 통합 자료 목록
@@ -37,4 +42,26 @@ public class Sprt01Bean extends AbstractComponent {
return integrationSearchMapper.selectIntegrationDataList(query);
}
+ /**단속 특기사항을 일괄 저장한다.
+ * @param etcCn 특기사항, crdnIds 단속 ID 목록
+ * @return 저장여부
+ */
+ public boolean updateEtcCn(String etcCn, String[] crdnIds) {
+
+ Crdn crdn = new Crdn();
+ crdn.setEtcCn(etcCn);
+
+ int effected = 0;
+ for(String crdnId : crdnIds) {
+ crdn.setCrdnId(crdnId);
+ int result = crdnUpdtMapper.updateEtcCn(crdn);
+ effected += result;
+ }
+
+ if(effected != crdnIds.length) {
+ throw new RuntimeException("특기사항 저장 중 오류가 발생하였습니다.");
+ }
+ return true;
+ }
+
}
diff --git a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01ServiceBean.java b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01ServiceBean.java
index d981155e..cfeec6c9 100644
--- a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01ServiceBean.java
+++ b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01ServiceBean.java
@@ -33,4 +33,11 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
return sprt01Bean.getIntegrationDataList(query);
}
+ @Override
+ public boolean updateEtcCn(String etcCn, String... crdnIds) {
+
+ return sprt01Bean.updateEtcCn(etcCn, crdnIds);
+
+ }
+
}
diff --git a/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java b/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java
index 21b94fb2..76f4a494 100644
--- a/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java
+++ b/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java
@@ -32,6 +32,18 @@ import cokr.xit.foundation.data.DataObject;
*/
public class Sprt01Controller extends ApplicationController {
+ public static final String CLASS_URL = "/sprt/sprt01";
+
+ public class METHOD_URL {
+ public static final String
+ integrationSearchMain = "/010/main.do",
+ getIntegrationDataList = "/010/list.do",
+ manageEtcCnMain = "/020/info.do",
+ inputEtcCnMain = "/030/info.do",
+ inputEtcCn = "/030/update.do"
+ ;
+ }
+
/**통합 조회 서비스*/
@Resource(name="sprt01Service")
private Sprt01Service sprt01Service;
@@ -69,7 +81,7 @@ public class Sprt01Controller extends ApplicationController {
addCodes(commonCodes, mav, "FIM003", "FIM010", "FIM026", "FIM054"
,"FIM004","FIM005","FIM006","FIM061","FIM064");
- mav.addObject("pageName", "sprt01010");// View(jsp)에서 사용할 id 뒤에 붙일 suffix
+ mav.addObject("pageName", "sprt01010-main");// View(jsp)에서 사용할 id 뒤에 붙일 suffix
String fastBy = req.getParameter("fastBy");
String fastTerm = req.getParameter("fastTerm");
@@ -224,4 +236,36 @@ public class Sprt01Controller extends ApplicationController {
return temp1 + temp2;
}
+
+ /**특기사항 일괄 입력 화면을 연다.
+ *
+ * @return /fims/sprt/sprt01030
+ */
+ public ModelAndView inputEtcCnMain(String... crdnIds) {
+ ModelAndView mav = new ModelAndView("fims/sprt/sprt01030-info");
+
+ mav.addObject("crdnIds", toJson(crdnIds));
+
+ return mav;
+ }
+
+ /**특기사항을 일괄 갱신한다.
+ * @param etcCn 특기사항, crdnIds 단속 ID 목록
+ * @return jsonView
+ * {
+ * "affected": 저장된 정보수
+ * "saved": 저장되었으면 true, 그렇지 않으면 false
+ * }
+ */
+ public ModelAndView inputEtcCn(String etcCn, String... crdnIds) {
+ ModelAndView mav = new ModelAndView("jsonView");
+
+ boolean saved = false;
+
+ saved = sprt01Service.updateEtcCn(etcCn, crdnIds);
+
+ mav.addObject("saved", saved);
+
+ return mav;
+ }
}
diff --git a/src/main/java/cokr/xit/fims/task/web/CmnController.java b/src/main/java/cokr/xit/fims/task/web/CmnController.java
index 8f752e21..43d74a06 100644
--- a/src/main/java/cokr/xit/fims/task/web/CmnController.java
+++ b/src/main/java/cokr/xit/fims/task/web/CmnController.java
@@ -330,23 +330,36 @@ public class CmnController {
}
@Controller
- @RequestMapping(name = "통합 조회", value = "/sprt/sprt01")
+ @RequestMapping(name = "통합 조회", value = Sprt01Controller.CLASS_URL)
class Sprt01Controller extends cokr.xit.fims.sprt.web.Sprt01Controller {
/** 통합조회 메인 화면을 연다.
* @return fims/sprt/sprt01010-main
*/
@Override
- @RequestMapping(name="통합조회 메인", value="/010/main.do")
+ @RequestMapping(name="통합조회 메인", value=METHOD_URL.integrationSearchMain)
public ModelAndView integrationSearchMain(HttpServletRequest req) {
return super.integrationSearchMain(req);
}
@Override
- @RequestMapping(name="통합조회 자료 목록", value="/010/list.do")
+ @RequestMapping(name="통합조회 자료 목록", value=METHOD_URL.getIntegrationDataList)
public ModelAndView getIntegrationDataList(SprtQuery query, HttpServletRequest req) {
return super.getIntegrationDataList(query, req);
}
+
+ @Override
+ @RequestMapping(name="특기사항 일괄 입력 화면", value=METHOD_URL.inputEtcCnMain)
+ public ModelAndView inputEtcCnMain(String... crdnIds) {
+ return super.inputEtcCnMain(crdnIds);
+ }
+
+ @Override
+ @RequestMapping(name="특기사항 일괄 입력", value=METHOD_URL.inputEtcCn)
+ public ModelAndView inputEtcCn(String etcCn, String... crdnIds) {
+ return super.inputEtcCn(etcCn, crdnIds);
+ }
+
}
@Controller
diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn-updt-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn-updt-mapper.xml
index 8e9d53bc..088c8933 100644
--- a/src/main/resources/sql/mapper/fims/crdn/crdn-updt-mapper.xml
+++ b/src/main/resources/sql/mapper/fims/crdn/crdn-updt-mapper.xml
@@ -112,6 +112,14 @@
WHERE CRDN_ID = #{crdnId} /* 단속 ID */
+
+ /* 단속 기타사항 수정(crdnUpdtMapper.updateEtcCn) */
+ UPDATE TB_CRDN
+ SET MDFCN_DT = /* 수정일시 */
+ , MDFR = #{modifiedBy} /* 수정자 */
+ , ETC_CN = #{etcCn}
+ WHERE CRDN_ID = #{crdnId} /* 단속 ID */
+
/* 단속 정보 수정(crdnUpdtMapper.updateEditCrdn) */
UPDATE TB_CRDN
diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp
index 4e899b80..2869b7ed 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp
@@ -314,6 +314,65 @@ integrationSearch.fnCopyPyrNo = (updown) => {
}
}
+//특기사항관리
+integrationSearch.fnManageEtcCn = (updown) => {
+ var cur;
+ if(updown == "up"){
+ cur = integrationSearchControl.updataset.getCurrent();
+ } else {
+ cur = integrationSearchControl.downdataset.getCurrent();
+ }
+
+ if(cur != null){
+
+ }
+}
+
+//특기사항일괄입력
+integrationSearch.fnInputEtcCn = (updown) => {
+ var cur;
+ if(updown == "up"){
+ cur = integrationSearchControl.updataset;
+
+ } else {
+ cur = integrationSearchControl.downdataset;
+
+ }
+
+ if(cur == null && cur.length <= 0){
+ return;
+ }
+
+ var list = cur.getDataset();
+ var grouped = Object.groupBy(list, ({ CRDN_ID }) => CRDN_ID);
+ var crdnIds = Object.keys(grouped);
+
+ var url = wctx.url("/sprt/sprt01/030/info.do");
+
+ var dialogId = "inputEtcCnDialog";
+ ajax.get({
+ url : url
+ , data : { crdnIds : crdnIds.join(",") }
+ , success : resp => {
+ dialog.open({
+ id : dialogId
+ , title : "특기사항입력-일괄"
+ , size : "xl"
+ , content : resp
+ , init : () => {
+
+ $("#"+dialogId).find("input[name='dialogId']").val(dialogId);
+ var found = $("#"+dialogId).find("template")[0].innerHTML;
+ var trs = cur.inStrings(found, null);
+ $("#"+dialogId).find("tbody").html(trs.join());
+ }
+ , onClose : () => { }
+ });
+ }
+ });
+
+}
+
//개별총정보 dialog
integrationSearch.getInfo = (taskSeCd, crdnId) => {
if (crdnId == undefined || crdnId == null || crdnId == "") {
@@ -357,6 +416,13 @@ integrationSearch.setEvent = () => {
$("#btnUpCopyPyrNo--${pageName}").on("click", function(){ integrationSearch.fnCopyPyrNo("up"); });
$("#btnDownCopyPyrNo--${pageName}").on("click", function(){ integrationSearch.fnCopyPyrNo("down"); });
+
+ $("#btnUpManageEtcCn--${pageName}").on("click", function(){ integrationSearch.fnManageEtcCn("up"); });
+ $("#btnDownManageEtcCn--${pageName}").on("click", function(){ integrationSearch.fnManageEtcCn("down"); });
+
+ $("#btnUpInputEtcCn--${pageName}").on("click", function(){ integrationSearch.fnInputEtcCn("up"); });
+ $("#btnDownInputEtcCn--${pageName}").on("click", function(){ integrationSearch.fnInputEtcCn("down"); });
+
//$("#btn").on("click", function(){ });
diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01012-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01012-info.jsp
index d1c5a869..b4617732 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01012-info.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01012-info.jsp
@@ -33,11 +33,11 @@
title="납부자번호복사">
납부자번호복사
-
-
diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01013-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01013-info.jsp
index 1624411e..dc19de02 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01013-info.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01013-info.jsp
@@ -41,11 +41,11 @@
title="납부자번호복사">
납부자번호복사
-
-
diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01020-info.jsp
new file mode 100644
index 00000000..433f45dd
--- /dev/null
+++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01020-info.jsp
@@ -0,0 +1,5 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
+<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
+
+특기사항관리
+
diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01030-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01030-info.jsp
new file mode 100644
index 00000000..abdea5af
--- /dev/null
+++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01030-info.jsp
@@ -0,0 +1,102 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
+<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
+
+특기사항입력-일괄
+
+
+
+
\ No newline at end of file