From 32b67d31f33ffb8c1c1a6e2178d7201b3988376c Mon Sep 17 00:00:00 2001 From: wangxin Date: Mon, 30 Jul 2018 09:15:36 +0800 Subject: [PATCH] =?UTF-8?q?(1)=E7=89=B9=E5=AE=9A=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=AE=A1=E7=90=86UL=E4=BF=AE=E6=94=B9=20(2)=E7=89=B9=E5=AE=9A?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AE=A1=E7=90=86=E5=8A=A0=E5=85=A5=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E5=8F=B7=E9=87=8D=E5=A4=8D=E9=AA=8C=E8=AF=81=EF=BC=8C?= =?UTF-8?q?=E6=9C=89=E4=B8=8A=E7=BA=A7=E9=85=8D=E7=BD=AE=E5=88=99=E4=B8=8A?= =?UTF-8?q?=E7=BA=A7=E9=85=8D=E7=BD=AE=E7=9A=84=E6=89=80=E6=9C=89=E4=B8=8B?= =?UTF-8?q?=E7=BA=A7=E9=85=8D=E7=BD=AEID=E4=B8=8D=E8=83=BD=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=EF=BC=8C=E6=97=A0=E4=B8=8A=E7=BA=A7=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=B8=80=E7=BA=A7=E9=85=8D=E7=BD=AEID=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=20(3)=E5=8F=96=E6=B6=88jBox=E7=9A=84Cookie?= =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SpecificServiceCfgController.java | 29 +- .../dao/specific/SpecificServiceCfgDao.java | 4 +- .../dao/specific/SpecificServiceCfgDao.xml | 11 + .../specific/SpecificServiceCfgService.java | 8 +- .../views/specific/specificServiceCfgForm.jsp | 252 +++++++++++------- .../jquery-jbox/2.3/jquery.jBox-2.3.src.js | 2 +- .../1.11.0/jquery.validate.method.js | 24 ++ .../1.11.0/localization/messages_en.js | 3 +- .../1.11.0/localization/messages_ru.js | 3 +- .../1.11.0/localization/messages_zh.js | 3 +- 10 files changed, 228 insertions(+), 111 deletions(-) diff --git a/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java b/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java index 56fa943dc..08d2081c8 100644 --- a/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java +++ b/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java @@ -250,21 +250,32 @@ public class SpecificServiceCfgController extends BaseController { * @return */ @ResponseBody - @RequestMapping(value = "isIdRepeat") - public boolean isIdRepeat(String specServiceId,String oldId){ - if(oldId!=null){ - if(oldId.trim().equals(specServiceId)){ - return true; + @RequestMapping(value = "isCodeNotRepeat") + public boolean isIdRepeat(@RequestParam(required=false,value="parentId")Integer parentId,@RequestParam(required=false,value="specServiceId")Integer specServiceId,@RequestParam(required=true,value="specServiceCode")Integer specServiceCode,@RequestParam(required=true,value="cfgType")Integer cfgType){ + if(parentId!=null&&parentId.intValue()!=0) { + Integer parentCode=specificServiceCfgService.getParentCode(parentId); + if(parentCode!=null&&parentCode.intValue()==specServiceCode) { + return false; } } if(specServiceId!=null){ SpecificServiceCfg ss = specificServiceCfgService.getBySpecServiceId(Integer.valueOf(specServiceId)); - if(ss==null){ - return true; + if(ss!=null){ + if(ss.getSpecServiceCode().intValue()==specServiceCode.intValue()&&cfgType.intValue()==ss.getCfgType().intValue()) { + return true; + }else { + ss=specificServiceCfgService.getRepeat(specServiceCode, cfgType,parentId); + if(ss==null) { + return true; + } + } } + }else { + SpecificServiceCfg ss=specificServiceCfgService.getRepeat(specServiceCode, cfgType,parentId); + if(ss==null) { + return true; + } } - - return false; } diff --git a/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.java b/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.java index cc199a10f..2360e1d46 100644 --- a/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.java +++ b/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.java @@ -48,5 +48,7 @@ public interface SpecificServiceCfgDao extends CrudDao { Integer updateConfigGroupInfobyGroupId(ConfigGroupInfo entity); Integer getParentType(Integer specServiceId); - + Integer getParentCode(Integer specServiceId); + SpecificServiceCfg getRepeat(@Param("specServiceCode")Integer code, @Param("cfgType")Integer cfgType,@Param("parentId")Integer parentId); + } \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml b/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml index e13b34120..a48e94fbd 100644 --- a/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml +++ b/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml @@ -37,10 +37,21 @@ select from specific_service_cfg s where s.spec_service_id = #{specServiceId} + + diff --git a/src/main/java/com/nis/web/service/specific/SpecificServiceCfgService.java b/src/main/java/com/nis/web/service/specific/SpecificServiceCfgService.java index 7e5c3626d..cc667f328 100644 --- a/src/main/java/com/nis/web/service/specific/SpecificServiceCfgService.java +++ b/src/main/java/com/nis/web/service/specific/SpecificServiceCfgService.java @@ -143,5 +143,11 @@ public class SpecificServiceCfgService extends BaseService{ public Integer getParentType(Integer specServiceId) { return specificServiceCfgDao.getParentType(specServiceId); } - + public Integer getParentCode(Integer specServiceId) { + return specificServiceCfgDao.getParentCode(specServiceId); + } + public SpecificServiceCfg getRepeat (Integer code,Integer cfgType,Integer parentId) { + return specificServiceCfgDao.getRepeat(code,cfgType,parentId); + } + } diff --git a/src/main/webapp/WEB-INF/views/specific/specificServiceCfgForm.jsp b/src/main/webapp/WEB-INF/views/specific/specificServiceCfgForm.jsp index 092446921..a326377a9 100644 --- a/src/main/webapp/WEB-INF/views/specific/specificServiceCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/specific/specificServiceCfgForm.jsp @@ -3,6 +3,11 @@ + - -
- - -

-
@@ -100,87 +142,105 @@ -->
-
- - -
- + - -
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
- <%--
- -
- - - - - -
-
--%> -
- -
- - - -
-
-
- -
- -
-
-
-
-
- - +
+
+
+
+
+ +
+ + +
+ +
+ + + + + + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+ <%--
+ +
+ + + + + +
+
--%> + <%--
+ +
+ + + +
+
--%> +
+ +
+ +
+
+
+
+
+ + +
+
+
+
+
+
-
-
-
- - - \ No newline at end of file diff --git a/src/main/webapp/static/global/plugins/jquery-jbox/2.3/jquery.jBox-2.3.src.js b/src/main/webapp/static/global/plugins/jquery-jbox/2.3/jquery.jBox-2.3.src.js index 2ba8d1b2e..ef4d6cf46 100644 --- a/src/main/webapp/static/global/plugins/jquery-jbox/2.3/jquery.jBox-2.3.src.js +++ b/src/main/webapp/static/global/plugins/jquery-jbox/2.3/jquery.jBox-2.3.src.js @@ -606,7 +606,7 @@ var lang = navigator.userLanguage;//支持IE }*/ var arrCookie = document.cookie.toLowerCase().split(";"); - console.log(document.cookie); + //console.log(document.cookie); for(i=0;i