diff --git a/src/main/java/cokr/xit/adds/cmm/model/DsuseMappingInfo.java b/src/main/java/cokr/xit/adds/cmm/model/DsuseMappingInfo.java index 41f2397..44a6395 100644 --- a/src/main/java/cokr/xit/adds/cmm/model/DsuseMappingInfo.java +++ b/src/main/java/cokr/xit/adds/cmm/model/DsuseMappingInfo.java @@ -69,6 +69,7 @@ public class DsuseMappingInfo { private String dscdmngId; private String usrRptIdNo; private String dsusePrvNm; + private String dsusePrvCd; private String rndDtlRptCnt; private String hdrDe; private String dsuseDe; diff --git a/src/main/java/cokr/xit/adds/cmm/model/DsuseRsltInfo.java b/src/main/java/cokr/xit/adds/cmm/model/DsuseRsltInfo.java index c930618..9c58271 100644 --- a/src/main/java/cokr/xit/adds/cmm/model/DsuseRsltInfo.java +++ b/src/main/java/cokr/xit/adds/cmm/model/DsuseRsltInfo.java @@ -48,6 +48,7 @@ public class DsuseRsltInfo { @JsonAlias("RPRSNTV_NM") private String rprsntvNm; + /** * 담당자명 */ @@ -69,6 +70,7 @@ public class DsuseRsltInfo { private String dscdmngId; private String usrRptIdNo; private String dsusePrvNm; + private String dsusePrvCd; private Integer rndDtlRptCnt; private String hdrDe; diff --git a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java index a874057..cb0b9db 100644 --- a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java +++ b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java @@ -49,6 +49,8 @@ import cokr.xit.base.web.ApplicationController; import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.JSON; import cokr.xit.foundation.web.WebClient; +import net.minidev.json.JSONObject; +import net.minidev.json.parser.ParseException; @Controller @RequestMapping( @@ -68,8 +70,8 @@ public class AddsNimsController extends ApplicationController { @Value("${app.inf.nims.api.productAndseqInfo}") private String productAndseqInfoEndpoint; - @Resource(name="defaultOgdpBean") - private DefaultOgdpBean defaultOgdpBean; + @Resource(name="sigunguDepartmentService") + private SigunguDepartmentService sggDeptService; @Resource(name="dsuseMgtReceiptService") private DsuseMgtReceiptService dsuseMgtReceiptService; @@ -374,7 +376,7 @@ public class AddsNimsController extends ApplicationController { ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtReceipt-main"); setCmmCode("ADDS11", mav); - List deptList = defaultOgdpBean.getDeptList(new OgdpQuery()); + List deptList = sggDeptService.getDepartmentList(new DepartmentQuery()); mav.addObject("DEPTList", deptList); return mav @@ -388,7 +390,7 @@ public class AddsNimsController extends ApplicationController { public ModelAndView dsuseMgtRsltMain() { ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtRslt-main"); setCmmCode("ADDS11", mav); - List deptList = defaultOgdpBean.getDeptList(new OgdpQuery()); + List deptList = sggDeptService.getDepartmentList(new DepartmentQuery()); mav.addObject("DEPTList", deptList); return mav @@ -402,7 +404,7 @@ public class AddsNimsController extends ApplicationController { public ModelAndView dsuseMgtMapping() { ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtMapping-main"); setCmmCode("ADDS11", mav); - List deptList = defaultOgdpBean.getDeptList(new OgdpQuery()); + List deptList = sggDeptService.getDepartmentList(new DepartmentQuery()); mav.addObject("DEPTList", deptList); return mav @@ -427,7 +429,7 @@ public class AddsNimsController extends ApplicationController { .filter(c -> c.getCode().compareTo("06") >= 0) .toList()); - List deptList = defaultOgdpBean.getDeptList(new OgdpQuery()); + List deptList = sggDeptService.getDepartmentList(new DepartmentQuery()); mav.addObject("DEPTList", deptList); mav.addObject("pageName", "dsuseMgtDoc"); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 1876d98..d4ae033 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -105,8 +105,9 @@ spring: datasource: hikari: - driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - jdbc-url: jdbc:log4jdbc:mariadb://211.119.124.9:4407/adds?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul&useSSL=false + #driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy + driver-class-name: org.mariadb.jdbc.Driver + jdbc-url: jdbc:mariadb://211.119.124.9:4407/adds?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul&useSSL=false username: addsweb password: addsweb1234 auto-commit: false diff --git a/src/main/resources/sql/mapper/base/actiongroup-mapper.xml b/src/main/resources/sql/mapper/base/actiongroup-mapper.xml index ef923c9..a190755 100644 --- a/src/main/resources/sql/mapper/base/actiongroup-mapper.xml +++ b/src/main/resources/sql/mapper/base/actiongroup-mapper.xml @@ -52,7 +52,10 @@ DELETE FROM TB_ACTION_GRP /* 권한-기능그룹 가져오기(authorityMapper.getActionGroups) */ -SELECT * +SELECT AUTH_ID + , GRP_ID + , REG_DT FROM TB_AUTH_ACTION WHERE AUTH_ID IN (#{authID}) ORDER BY AUTH_ID, GRP_ID @@ -135,7 +137,10 @@ SELECT A.AUTH_ID -SELECT A.*, USER_ACNT +SELECT A.AUTH_ID + , A.USER_ID + , A.REG_DT + , B.USER_ACNT FROM TB_AUTH_USER A , TB_USER B diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/bssh-popup.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/bssh-popup.jsp index c9754a1..9d7a087 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/bssh-popup.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/bssh-popup.jsp @@ -8,16 +8,22 @@ <%-- --%>
-
- - +
+ +
-
- - +
+ + +
+
+ + +
+
+   +
-   -
@@ -205,9 +211,10 @@ $P.fnSearchList = (dbSkipYn) => { $P.control.query = { - ... $P.formFields.get(), + //... $P.formFields.get(), bc: $P.formFields.get().schBsshCd, bn: $P.formFields.get().schBsshNm, + rprsntvNm: $P.formFields.get().schRprsntvNm, dbSkipYn: dbSkipYn? dbSkipYn : "N", userId: "${currentUser.account}" }; diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseDoc-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseDoc-main.jsp index a0fa1b8..e7904a5 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseDoc-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseDoc-main.jsp @@ -218,9 +218,10 @@ $("#btnCreateDsuseRsltListPhoto--${pageName}").prop("disabled", true); return; } - $("#btnCreateDsuseRsltDoc--${pageName}").prop("disabled", false); - $("#btnCreateDsuseRsltListPhoto--${pageName}").prop("disabled", false); - + if(!${currentUser.hasAuthorities("ROLE_MANAGER")} && !${currentUser.hasAuthorities("ROLE_ADMIN")}) { + $("#btnCreateDsuseRsltDoc--${pageName}").prop("disabled", false); + $("#btnCreateDsuseRsltListPhoto--${pageName}").prop("disabled", false); + } let key = item.data.dscdmng_id; $("#tbody--${pageName}").setCurrentRow(key); diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-main.jsp index 1fe86ff..a3a5d3c 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-main.jsp @@ -274,18 +274,19 @@ $P.detailControl.query = { "schDscdmngId" : dscdmngId}; $P.detailControl.load(1); - if(item.data.PRGRS_STTS_CD == '21'){ - $("#btnPrgsSttus--${pageName}").prop("disabled", false); - }else{ - $("#btnPrgsSttus--${pageName}").prop("disabled", true); - } + if(!${currentUser.hasAuthorities("ROLE_MANAGER")} && !${currentUser.hasAuthorities("ROLE_ADMIN")}) { + if(item.data.PRGRS_STTS_CD == '21'){ + $("#btnPrgsSttus--${pageName}").prop("disabled", false); + }else{ + $("#btnPrgsSttus--${pageName}").prop("disabled", true); + } - if(item.data.PRGRS_STTS_CD == '06' || item.data.PRGRS_STTS_CD == '21'){ - $("#btnCreateDsuseMgtMapping--${pageName}").prop("disabled", false); - }else{ - $("#btnCreateDsuseMgtMapping--${pageName}").prop("disabled", true); + if(item.data.PRGRS_STTS_CD == '06' || item.data.PRGRS_STTS_CD == '21'){ + $("#btnCreateDsuseMgtMapping--${pageName}").prop("disabled", false); + }else{ + $("#btnCreateDsuseMgtMapping--${pageName}").prop("disabled", true); + } } - }; // 현재 선택 자료 변경 이벤트 @@ -332,7 +333,7 @@ bsshCd: row.BSSH_CD, usrRptIdNo: row.USR_RPT_ID_NO, indutyNm: row.INDUTY_NM, - dsusePrvNm: row.DSUSE_PRV_NM, + dsusePrvCd: row.DSUSE_PRV_CD, rndDtlRptCnt: row.RND_DTL_RPT_CNT, hdrDe: row.HDR_DE, dsuseDe: row.DSUSE_DE, diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp index 6fa83ea..19ff9c1 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp @@ -224,8 +224,6 @@ if (!item) return; $P.bsshFormFields.set($P.control, item); - // 업무구분에 따른 URL 변경 - //$P.fnSetURL(item.data.bsshCd); } $P.productControl.onCurrentChange = item => { @@ -233,8 +231,6 @@ // Dataset 셋팅 $P.productFormFields.set($P.productControl, item); - // 업무구분에 따른 URL 변경 - //$P.fnSetURL(item.data.bsshCd); } // 저장 callback @@ -388,14 +384,7 @@ $P.control.query.fetchSize = $P.control.defaultFetchSize * $P.control.query.pageNum; $P.control.load(1); } - - // 업무구분에 따른 URL 설정 - $P.fnSetURL = (taskSeCd) => { -// $P.control.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/create.do"); // 등록 -// $P.control.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/update.do"); // 수정 - } - - // 전자우편 안내문 등록 버튼 이벤트 + $P.fnSearchBssh = (title) => { $P.control.getBsshInfo(); } @@ -547,7 +536,9 @@ // 초기 화면 설정 $P.initForm = () => { - + if(${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) { + $("#btnSave--${pageName}").prop("disabled", true); + } } diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp index 9039bb1..7964616 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp @@ -643,6 +643,11 @@ $("#schDateTo--${pageName}").datepicker("setDate", new Date()); $('#schSggCd--${pageName}').val("${currentUser.deptCode}"); + + if(${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) { + $('#btnCreateDsuseMGT--${pageName}').prop('disabled', true); + $('#btnRemoveDsuseMGT--${pageName}').prop('disabled', true); + } } /************************************************************************** diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp index c707481..9762b47 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp @@ -52,7 +52,8 @@
-
+
+
-
+
-
+
- +
@@ -454,7 +455,9 @@ initDatepicker("frmEdit--${pageName}"); // 달력 초기화 - + if(${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) { + $("#btnSave--${pageName}").prop("disabled", true); + } } diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-main.jsp index b032dc9..b6dea03 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-main.jsp @@ -271,11 +271,16 @@ // 현재 선택 자료 변경 이벤트 $P.detailControl.onCurrentChange = (item) => { - if (!item) return; + if (!item){ + $('#btnCreateDsuseMGT--${pageName}').prop('disabled', true); + return; + } let key = item.data.DSCDMNG_SN; - $("#tbody--${pageName}Detail").setCurrentRow(key); + if(!${currentUser.hasAuthorities("ROLE_MANAGER")} && !${currentUser.hasAuthorities("ROLE_ADMIN")}) { + $('#btnCreateDsuseMGT--${pageName}').prop('disabled', false); + } }; // 신청서 정보 dialog @@ -560,7 +565,6 @@ $('#schSttsCd--${pageName}').val('01'); $('#schSggCd--${pageName}').val("${currentUser.deptCode}"); } - /************************************************************************** * 최초 실행 함수 **************************************************************************/