From 17668bceb7a436c057e29708c3ea8c18b35a4bb5 Mon Sep 17 00:00:00 2001 From: wangxin Date: Mon, 12 Mar 2018 11:38:46 +0800 Subject: [PATCH 01/13] =?UTF-8?q?(1)=E4=BF=AE=E5=A4=8DIP=E7=B1=BBPZ?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E5=80=BC=E4=B8=BA0?= =?UTF-8?q?=E6=97=B6=E5=90=8E=E5=8F=B0=E6=B2=A1=E6=9C=89=E4=BC=A0=E5=80=BC?= =?UTF-8?q?=E7=9A=84bug=20(2)=E8=B0=83=E6=95=B4=E8=B0=83=E6=95=B4PZ?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E7=9A=84=E5=88=86=E7=B1=BB=EF=BC=8C=E6=80=A7?= =?UTF-8?q?=E8=B4=A8=EF=BC=8C=E6=A0=87=E7=AD=BE=E7=9A=84=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E7=94=B1ITEM=5FCODE=20=E6=94=B9=E4=B8=BA=20service=5F?= =?UTF-8?q?dict=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/IpCfgController.java | 6 +- .../nis/web/dao/configuration/IpCfgDao.xml | 86 +++++++++---------- .../webapp/WEB-INF/include/form/basicInfo.jsp | 22 ++--- .../WEB-INF/views/cfg/complexCfgList.jsp | 6 +- .../webapp/WEB-INF/views/cfg/ipCfgList.jsp | 35 ++++---- .../WEB-INF/views/cfg/stringCfgList.jsp | 6 +- 6 files changed, 82 insertions(+), 79 deletions(-) diff --git a/src/main/java/com/nis/web/controller/configuration/IpCfgController.java b/src/main/java/com/nis/web/controller/configuration/IpCfgController.java index 179088d42..4ff3d08be 100644 --- a/src/main/java/com/nis/web/controller/configuration/IpCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/IpCfgController.java @@ -14,8 +14,8 @@ import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import com.nis.domain.Page; -import com.nis.domain.ServiceConfigInfo; -import com.nis.domain.basics.ServiceDictInfo; +import com.nis.domain.ServiceConfigInfo; +import com.nis.domain.basics.ServiceDictInfo; import com.nis.domain.configuration.BaseIpCfg; import com.nis.domain.configuration.RequestInfo; import com.nis.util.Constants; @@ -65,7 +65,7 @@ public class IpCfgController extends BaseController{ model.addAttribute("page", page); model.addAttribute("action", ipCfg.getAction()); model.addAttribute("tableName", tableName); - List requestInfos=requestInfoService.getValidRequestInfo(); + List requestInfos=requestInfoService.getAllRequestInfo(); model.addAttribute("requestInfos", requestInfos); List fls=serviceDictInfoService.findAllFlDict(); model.addAttribute("fls", fls); diff --git a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml index c616369e8..7a310ebbb 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml @@ -276,19 +276,18 @@ left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_leaf=0 left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_leaf=0 - AND ${page.where} - + AND ${page.alias}.CFG_ID=#{cfgId,jdbcType=BIGINT} AND ${page.alias}.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') - + AND ${page.alias}.IP_TYPE=#{ipType,jdbcType=INTEGER} @@ -315,25 +314,25 @@ AND ${page.alias}.DST_PORT_MASK=#{dstPortMask,jdbcType=VARCHAR} - + AND ${page.alias}.DIRECTION=#{direction,jdbcType=INTEGER} - + AND ${page.alias}.PROTOCOL=#{protocol,jdbcType=INTEGER} - + AND ${page.alias}.PROTOCOL_ID=#{protocolId,jdbcType=INTEGER} - + AND ${page.alias}.ACTION=#{action,jdbcType=INTEGER} - + AND ${page.alias}.IS_VALID=#{isValid,jdbcType=INTEGER} - + AND ${page.alias}.IS_VALID != -1 - + AND ${page.alias}.IS_AUDIT=#{isAudit,jdbcType=INTEGER} @@ -354,16 +353,16 @@ AND ${page.alias}.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP} - + AND ${page.alias}.SERVICE_ID=#{serviceId,jdbcType=INTEGER} - + AND ${page.alias}.REQUEST_ID=#{requestId,jdbcType=INTEGER} - + AND ${page.alias}.COMPILE_ID=#{compileId,jdbcType=INTEGER} - + AND ${page.alias}.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -380,13 +379,13 @@ - + AND r.CFG_ID=#{cfgId,jdbcType=BIGINT} AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') - + AND r.IP_TYPE=#{ipType,jdbcType=INTEGER} @@ -413,25 +412,25 @@ AND r.DST_PORT_MASK=#{dstPortMask,jdbcType=VARCHAR} - + AND r.DIRECTION=#{direction,jdbcType=INTEGER} - + AND r.PROTOCOL=#{protocol,jdbcType=INTEGER} - + AND r.PROTOCOL_ID=#{protocolId,jdbcType=INTEGER} - + AND r.ACTION=#{action,jdbcType=INTEGER} - + AND r.IS_VALID=#{isValid,jdbcType=INTEGER} - + AND r.IS_VALID != -1 - + AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER} @@ -452,16 +451,16 @@ AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP} - + AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER} - + AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER} - + AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} - + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -478,7 +477,6 @@ - @@ -528,34 +526,34 @@ update ${tableName} - + cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, ip_type = #{ipType,jdbcType=INTEGER}, - + src_ip = #{srcIp,jdbcType=VARCHAR}, - + src_ip_mask = #{srcIpMask,jdbcType=VARCHAR}, - + src_port = #{srcPort,jdbcType=VARCHAR}, - + src_port_mask = #{srcPortMask,jdbcType=VARCHAR}, - + dst_ip = #{dstIp,jdbcType=VARCHAR}, - + dst_ip_mask = #{dstIpMask,jdbcType=VARCHAR}, - + dst_port = #{dstPort,jdbcType=VARCHAR}, - + dst_port_mask = #{srcPortMask,jdbcType=VARCHAR}, @@ -579,19 +577,19 @@ creator_id = #{creatorId,jdbcType=INTEGER}, - + create_time = #{createTime,jdbcType=TIMESTAMP}, editor_id = #{editorId,jdbcType=INTEGER}, - + edit_time = #{editTime,jdbcType=TIMESTAMP}, auditor_id = #{auditorId,jdbcType=INTEGER}, - + audit_time = #{auditTime,jdbcType=TIMESTAMP}, @@ -606,16 +604,16 @@ is_area_effective = #{isAreaEffective,jdbcType=INTEGER}, - + classify = #{classify,jdbcType=VARCHAR}, - + attribute = #{attribute,jdbcType=VARCHAR}, - + lable = #{lable,jdbcType=VARCHAR}, - + area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR} diff --git a/src/main/webapp/WEB-INF/include/form/basicInfo.jsp b/src/main/webapp/WEB-INF/include/form/basicInfo.jsp index c95b9f089..663019d58 100644 --- a/src/main/webapp/WEB-INF/include/form/basicInfo.jsp +++ b/src/main/webapp/WEB-INF/include/form/basicInfo.jsp @@ -28,20 +28,20 @@ - + - >${fl.itemValue} - @@ -62,13 +62,13 @@ - + - @@ -86,13 +86,13 @@ - + - diff --git a/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp index 72030fa79..5cd144e66 100644 --- a/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp @@ -154,7 +154,7 @@ - + ${fl.itemValue}, @@ -164,14 +164,14 @@ - ${xz.itemValue}, + ${xz.itemValue}, - ${lable.itemValue}, + ${lable.itemValue}, diff --git a/src/main/webapp/WEB-INF/views/cfg/ipCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/ipCfgList.jsp index d4d441021..5447598ff 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipCfgList.jsp @@ -21,19 +21,21 @@ \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/requestList.jsp b/src/main/webapp/WEB-INF/views/cfg/requestList.jsp index a0dad7780..5468db2f2 100644 --- a/src/main/webapp/WEB-INF/views/cfg/requestList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/requestList.jsp @@ -13,7 +13,7 @@ +

@@ -41,7 +41,7 @@
- 所有状态 + @@ -50,14 +50,14 @@
- + + + + +
- + type="text" value="">
@@ -65,28 +65,27 @@
- +
- +
- - + +
@@ -109,14 +108,14 @@
- +
- " onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
- +
- +
- " onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/> + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
- +
- " onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/> + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
@@ -147,8 +146,8 @@
- - + +
@@ -170,7 +169,7 @@ - + @@ -187,7 +186,7 @@ - + @@ -215,28 +214,6 @@ @@ -253,6 +230,18 @@ From 0dfba79e68cb8d1294562af286e07e66f008d53f Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Mon, 12 Mar 2018 16:11:20 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/views/login.jsp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/login.jsp b/src/main/webapp/WEB-INF/views/login.jsp index 0e9fbd2f2..44049db97 100644 --- a/src/main/webapp/WEB-INF/views/login.jsp +++ b/src/main/webapp/WEB-INF/views/login.jsp @@ -139,8 +139,15 @@ // 如果在框架或在对话框中,则弹出提示并跳转到首页 if(self.frameElement && self.frameElement.tagName == "IFRAME" || $('#left').length > 0 || $('.jbox').length > 0){ - alertx(""); - window.setTimeout(function () { top.location = "${pageContext.request.contextPath }"; }, 5000); + top.$.jBox.confirm("","",function(v,h,f){ + + if(v=="ok"){ + top.location = "${pageContext.request.contextPath }"; + }else{ + top.location = "${pageContext.request.contextPath }"; + } + },{buttonsFocus:1}); + top.$('.jbox-body .jbox-icon').css('top','55px'); } From 2df9aa96654675821aef4dba11d9f298ab2fcc6e Mon Sep 17 00:00:00 2001 From: wangxin Date: Mon, 12 Mar 2018 16:34:55 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=B3=E8=81=94?= =?UTF-8?q?=E5=88=86=E7=B1=BB=EF=BC=8C=E6=80=A7=E8=B4=A8=EF=BC=8C=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E7=9A=84=E7=B1=BB=E5=9E=8Bsql=20join=201,2,3=20?= =?UTF-8?q?=E6=95=B0=E5=80=BC=E7=B1=BB=EF=BC=8C=E5=A2=9E=E5=BC=BA=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E7=B1=BBPZ=E6=90=9C=E7=B4=A2=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ComplexStringCfgController.java | 2 +- .../configuration/NumCfgController.java | 13 +- .../dao/configuration/ComplexStringCfgDao.xml | 285 ++++++++++++------ .../nis/web/dao/configuration/IpCfgDao.xml | 4 +- .../nis/web/dao/configuration/NumCfgDao.xml | 271 +++++++++++------ .../web/dao/configuration/StringCfgDao.xml | 4 +- .../WEB-INF/include/form/complexInfo.jsp | 18 +- .../WEB-INF/views/cfg/complexCfgList.jsp | 214 ++++++++++--- .../webapp/WEB-INF/views/cfg/ipCfgList.jsp | 1 + .../WEB-INF/views/cfg/stringCfgList.jsp | 1 + 10 files changed, 559 insertions(+), 254 deletions(-) diff --git a/src/main/java/com/nis/web/controller/configuration/ComplexStringCfgController.java b/src/main/java/com/nis/web/controller/configuration/ComplexStringCfgController.java index e45d0055b..85d816c50 100644 --- a/src/main/java/com/nis/web/controller/configuration/ComplexStringCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ComplexStringCfgController.java @@ -44,7 +44,7 @@ public class ComplexStringCfgController extends BaseController{ if(!StringUtils.isBlank(tableName)){ logger.info("table name is "+tableName); cfg.setTableName(tableName); - Page page = complexStringCfgService.findPage(new Page(request, response), cfg); + Page page = complexStringCfgService.findPage(new Page(request, response,"r"), cfg); model.addAttribute("page", page); model.addAttribute("action", cfg.getAction()); model.addAttribute("tableName", tableName); diff --git a/src/main/java/com/nis/web/controller/configuration/NumCfgController.java b/src/main/java/com/nis/web/controller/configuration/NumCfgController.java index 226263b6c..5aa2a68fb 100644 --- a/src/main/java/com/nis/web/controller/configuration/NumCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/NumCfgController.java @@ -5,7 +5,6 @@ import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; @@ -13,10 +12,10 @@ import org.springframework.web.bind.annotation.RequestMapping; import com.nis.domain.Page; import com.nis.domain.ServiceConfigInfo; +import com.nis.domain.basics.ServiceDictInfo; import com.nis.domain.configuration.BaseCfg; import com.nis.domain.configuration.NumBoundaryCfg; import com.nis.domain.configuration.RequestInfo; -import com.nis.domain.basics.ServiceDictInfo; import com.nis.util.Constants; import com.nis.web.controller.BaseController; @@ -40,17 +39,11 @@ public class NumCfgController extends BaseController{ model.addAttribute("serviceId", serviceId); ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); if(serviceConfigInfo!=null){ - Page searchPage=new Page(request, response, 1); - if(pageNo!=null) searchPage.setPageNo(pageNo); - if(pageSize!=null) searchPage.setPageSize(pageSize); - if(cfg.getPage()!=null){ - if(!StringUtils.isBlank(cfg.getPage().getOrderBy())); - searchPage.setOrderBy(cfg.getPage().getOrderBy()); - } + Page searchPage=new Page(request, response, "r"); Page page = numCfgService.findPage(searchPage, cfg); model.addAttribute("page", page); model.addAttribute("action", cfg.getAction()); - List requestInfos=requestInfoService.getValidRequestInfo(); + List requestInfos=requestInfoService.getAllRequestInfo(); model.addAttribute("requestInfos", requestInfos); List fls=serviceDictInfoService.findAllFlDict(); model.addAttribute("fls", fls); diff --git a/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.xml index f086ae03c..7267ef454 100644 --- a/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.xml @@ -39,12 +39,30 @@ SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN - + + + + + ${page.alias}.CFG_ID as cfgId, ${page.alias}.CFG_DESC as cfgDesc,${page.alias}.DISTRICT as district, ${page.alias}.KEYWORDS as keywords, ${page.alias}.ACTION as action,${page.alias}.IS_VALID as isValid,${page.alias}.IS_AUDIT as isAudit, + ${page.alias}.CREATOR_ID as creatorId,${page.alias}.CREATE_TIME AS createTime,${page.alias}.EDITOR_ID as editorId,${page.alias}.EDIT_TIME AS editTime,${page.alias}.AUDITOR_ID as auditorId,${page.alias}.AUDIT_TIME AS auditTime, + ${page.alias}.SERVICE_ID as serviceId,${page.alias}.REQUEST_ID AS requestId,${page.alias}.COMPILE_ID AS compileId,${page.alias}.IS_AREA_EFFECTIVE as isAreaEffective,${page.alias}.classify, + ${page.alias}.ATTRIBUTE AS attribute,${page.alias}.LABLE AS lable,${page.alias}.EXPR_TYPE as exprType,${page.alias}.MATCH_METHOD as matchMethod,${page.alias}.IS_HEXBIN as isHexbin, + ${page.alias}.AREA_EFFECTIVE_IDS AS areaEffectiveIds + + + r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc,r.DISTRICT as district, r.KEYWORDS as keywords, r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit, + r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime, + r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify, + r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.EXPR_TYPE as exprType,r.MATCH_METHOD as matchMethod,r.IS_HEXBIN as isHexbin, + r.AREA_EFFECTIVE_IDS AS areaEffectiveIds + + CFG_DESC,DISTRICT,KEYWORDS, ACTION,IS_VALID,IS_AUDIT, @@ -149,14 +167,7 @@ @@ -14,7 +14,7 @@
-
+
@@ -24,7 +24,7 @@
-
+
@@ -33,7 +33,7 @@ <%--
-
+
checked @@ -69,7 +69,7 @@
-
+
${requestInfo.id } ${requestInfo.requestNumber } ${requestInfo.requestOrg }${requestInfo.requestContent } ${requestInfo.taskName } - <%-- --%>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
${taskInfo.id }${taskInfo.taskName }${taskInfo.taskOrg } + + + + + + ${taskInfo.creatorName } + + + + + + + + + +
+
${page}
+
+
+
+ + + + + + + diff --git a/src/main/webapp/WEB-INF/views/cfg/requestList.jsp b/src/main/webapp/WEB-INF/views/cfg/requestList.jsp index 5468db2f2..0c06ec979 100644 --- a/src/main/webapp/WEB-INF/views/cfg/requestList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/requestList.jsp @@ -57,7 +57,7 @@ - type="text" value=""> +
@@ -180,7 +180,7 @@ - +<%-- --%> @@ -213,8 +213,6 @@ ${requestInfo.requestTitle } ${requestInfo.requestContent } ${requestInfo.taskName } - - @@ -229,7 +227,6 @@ @@ -39,7 +55,6 @@
-