From e80f2e2967b2465423aabacc72b9d14383e0f152 Mon Sep 17 00:00:00 2001 From: duandongmei Date: Fri, 1 Jun 2018 18:13:07 +0800 Subject: [PATCH] =?UTF-8?q?contip=E3=80=81conturl=E3=80=81picip=E3=80=81pi?= =?UTF-8?q?curl=E5=8A=9F=E8=83=BD=E6=8F=90=E4=BA=A4=20areainfo=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=8C=BA=E5=9F=9F=E5=92=8C=E8=BF=90=E8=90=A5=E5=95=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E4=BA=8C=E9=80=89=E4=B8=80=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/configuration/AvContUrlCfg.java | 18 + .../nis/domain/configuration/AvPicUrlCfg.java | 18 + .../nis/web/controller/BaseController.java | 31 +- .../ntc/AvContentController.java | 146 ++++- .../dao/configuration/AvContentCfgDao.java | 17 +- .../web/dao/configuration/AvContentCfgDao.xml | 308 ++++++++++ .../configuration/AvContentCfgService.java | 571 +++++++++++++++++- .../webapp/WEB-INF/include/form/areaInfo.jsp | 39 +- .../webapp/WEB-INF/include/form/ipInfo.jsp | 4 +- .../WEB-INF/include/form/stringInfo.jsp | 191 ++---- .../views/cfg/av/contIp/contIpForm.jsp | 3 +- .../views/cfg/av/contIp/contIpList.jsp | 12 +- .../views/cfg/av/contUrl/contUrlForm.jsp | 119 ++++ .../views/cfg/av/contUrl/contUrlList.jsp | 410 +++++++++++++ .../WEB-INF/views/cfg/av/picIp/picIpForm.jsp | 3 +- .../views/cfg/av/picUrl/picUrlForm.jsp | 119 ++++ .../views/cfg/av/picUrl/picUrlList.jsp | 410 +++++++++++++ .../WEB-INF/views/cfg/av/voip/voipForm.jsp | 7 +- .../1.11.0/jquery.validate.method.js | 12 + .../1.11.0/localization/messages_en.js | 3 +- .../1.11.0/localization/messages_ru.js | 3 +- .../1.11.0/localization/messages_zh.js | 1 + 22 files changed, 2241 insertions(+), 204 deletions(-) create mode 100644 src/main/java/com/nis/domain/configuration/AvContUrlCfg.java create mode 100644 src/main/java/com/nis/domain/configuration/AvPicUrlCfg.java create mode 100644 src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp create mode 100644 src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp create mode 100644 src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp create mode 100644 src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp diff --git a/src/main/java/com/nis/domain/configuration/AvContUrlCfg.java b/src/main/java/com/nis/domain/configuration/AvContUrlCfg.java new file mode 100644 index 000000000..74eeb5ebb --- /dev/null +++ b/src/main/java/com/nis/domain/configuration/AvContUrlCfg.java @@ -0,0 +1,18 @@ +package com.nis.domain.configuration; + +/** + * @ClassName: AvContUrlCfg.java + * @Description: 音视频Cont URL + * @author (dell) + * @date 2018年2月6日 上午8:29:26 + * @version V1.0 + */ +public class AvContUrlCfg extends BaseStringCfg { + + /** + * + */ + private static final long serialVersionUID = 1249923766365462700L; + + +} diff --git a/src/main/java/com/nis/domain/configuration/AvPicUrlCfg.java b/src/main/java/com/nis/domain/configuration/AvPicUrlCfg.java new file mode 100644 index 000000000..dbdf80fbf --- /dev/null +++ b/src/main/java/com/nis/domain/configuration/AvPicUrlCfg.java @@ -0,0 +1,18 @@ +package com.nis.domain.configuration; + +/** + * @ClassName: AvPicUrlCfg.java + * @Description: 音视频Pic URL + * @author (dell) + * @date 2018年2月6日 上午8:29:26 + * @version V1.0 + */ +public class AvPicUrlCfg extends BaseStringCfg { + + /** + * + */ + private static final long serialVersionUID = 1249923766365462700L; + + +} diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index 9592935bb..e675eb1b2 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -333,6 +333,15 @@ public class BaseController { } } protected void initUpdateFormCondition(Model model,BaseCfg cfg){ + List itTypeList=new ArrayList(); + itTypeList.add(Constants.ITEM_TYPE_AREA); + List areas = sysDictInfoService.findAllSysDictInfo(new SysDictInfo(),itTypeList,null); + model.addAttribute("areas", areas); + itTypeList.clear(); + itTypeList.add(Constants.ITEM_TYPE_ISP); + List isps = sysDictInfoService.findAllSysDictInfo(new SysDictInfo(),itTypeList,null); + model.addAttribute("isps", isps); + //查询配置对应的地域ip List areaCfgs=ipCfgService.getAreaCfgByCompileId(cfg.getCompileId()); model.addAttribute("areaCfgs", areaCfgs); @@ -349,6 +358,7 @@ public class BaseController { //从区域生效ID中获取区域与运营商 String areaEffectiveIds=cfg.getAreaEffectiveIds(); List areaIspList=new ArrayList(); + //areaEffectiveIds : 存在冒号,则冒号前为area后为isp;不存在冒号,判断id是否为isp,否则为area if(StringUtils.isNotBlank(areaEffectiveIds)){ String[] areaIsps=areaEffectiveIds.split(","); for(String areaIsp:areaIsps){ @@ -357,7 +367,18 @@ public class BaseController { area.setArea(areaIsp.split(":")[0]); area.setIsp(areaIsp.split(":")[1]); }else{ - area.setArea(areaIsp); + boolean isIsp=false; + for (SysDictInfo ispDict : isps) { + if(ispDict.getItemCode().equals(areaIsp)){ + area.setIsp(areaIsp); + isIsp=true; + break; + } + } + if(!isIsp){ + area.setArea(areaIsp); + } + } areaIspList.add(area); } @@ -371,14 +392,6 @@ public class BaseController { model.addAttribute("xzs", xzs); List lables=serviceDictInfoService.findAllLableDict(); model.addAttribute("lables", lables); - List itTypeList=new ArrayList(); - itTypeList.add(Constants.ITEM_TYPE_AREA); - List areas = sysDictInfoService.findAllSysDictInfo(new SysDictInfo(),itTypeList,null); - model.addAttribute("areas", areas); - itTypeList.clear(); - itTypeList.add(Constants.ITEM_TYPE_ISP); - List isps = sysDictInfoService.findAllSysDictInfo(new SysDictInfo(),itTypeList,null); - model.addAttribute("isps", isps); List regionList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId()); model.addAttribute("regionList", regionList); List serviceList = DictUtils.getFunctionServiceDictList(cfg.getFunctionId()); diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java b/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java index 7fbff469b..35def5ec1 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java @@ -23,6 +23,7 @@ import com.nis.domain.configuration.AvVoipAccountCfg; import com.nis.domain.configuration.CfgIndexInfo; import com.nis.domain.configuration.AvVoipIpCfg; import com.nis.domain.configuration.BaseIpCfg; +import com.nis.domain.configuration.BaseStringCfg; import com.nis.util.StringUtil; import com.nis.web.controller.BaseController; import com.nis.web.security.UserUtils; @@ -137,7 +138,7 @@ public class AvContentController extends BaseController { /*****************************contIp业务***************/ //视频文本内容配置列表 - @RequestMapping(value = {"/contentIpList"}) + @RequestMapping(value = {"/contIpList"}) public String contIpList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")BaseIpCfg entity){ Page page = avContentCfgService.findContIpPage(new Page(request, response,"r"), entity); model.addAttribute("page", page); @@ -145,8 +146,8 @@ public class AvContentController extends BaseController { return "/cfg/av/contIp/contIpList"; } //音视频CONTIP新增界面 - @RequestMapping(value = {"/contentIpForm"}) - @RequiresPermissions(value={"avContentIp:config"}) + @RequestMapping(value = {"/contIpForm"}) + @RequiresPermissions(value={"avContIp:config"}) public String contIpForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseIpCfg cfg){ if(!StringUtil.isEmpty(ids)){ cfg.setCfgId(Long.parseLong(ids)); @@ -173,19 +174,19 @@ public class AvContentController extends BaseController { addMessage(model,"save_failed"); } - return "redirect:" + adminPath +"/ntc/av/contentIpList?functionId="+cfg.getFunctionId(); + return "redirect:" + adminPath +"/ntc/av/contIpList?functionId="+cfg.getFunctionId(); } //修改CONTIP例配置状态 @RequestMapping(value = {"/updateAvContIpValid"}) - @RequiresPermissions(value={"avContentIp:config"}) + @RequiresPermissions(value={"avContIp:config"}) public String updateAvContIpValid(Integer isAudit,Integer isValid,String ids,Integer functionId){ avContentCfgService.updateContIpValid(isAudit,isValid,ids,functionId); - return "redirect:" + adminPath +"/ntc/av/contentIpList?functionId="+functionId; + return "redirect:" + adminPath +"/ntc/av/contIpList?functionId="+functionId; } //修改CONTIP配置审核 @RequestMapping(value = {"/auditAvContIp"}) - @RequiresPermissions(value={"avContentIp:audit"}) + @RequiresPermissions(value={"avContIp:audit"}) public String auditContIp(Integer isAudit,Integer isValid,String ids,Integer functionId){ if(!StringUtil.isEmpty(ids)){ String[] idArray = ids.split(","); @@ -195,7 +196,7 @@ public class AvContentController extends BaseController { } } - return "redirect:" + adminPath +"/ntc/av/contentIpList?functionId="+functionId; + return "redirect:" + adminPath +"/ntc/av/contIpList?functionId="+functionId; } /*****************************contIp业务***************/ @@ -263,4 +264,133 @@ public class AvContentController extends BaseController { } /*****************************picIp业务***************/ + + /*****************************contUrl业务***************/ + //视频文本内容配置列表 + @RequestMapping(value = {"/contUrlList"}) + public String contUrlList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")BaseStringCfg entity){ + Page page = avContentCfgService.findContUrlPage(new Page(request, response,"r"), entity); + model.addAttribute("page", page); + initPageCondition(model); + return "/cfg/av/contUrl/contUrlList"; + } + //音视频CONTUrl新增界面 + @RequestMapping(value = {"/contUrlForm"}) + @RequiresPermissions(value={"avContUrl:config"}) + public String contUrlForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseStringCfg cfg){ + if(!StringUtil.isEmpty(ids)){ + cfg.setCfgId(Long.parseLong(ids)); + cfg = avContentCfgService.getContUrlCfgById(cfg); + initUpdateFormCondition(model, cfg); + }else{ + initFormCondition(model,cfg); + } + model.addAttribute("_cfg", cfg); + return "/cfg/av/contUrl/contUrlForm"; + } + + //保存CONTUrl信息 + @RequestMapping(value = {"/saveContUrl"}) + public String saveContUrl(Model model,HttpServletRequest request,HttpServletResponse response, + @ModelAttribute("cfg")BaseStringCfg cfg, + @ModelAttribute("areaCfgIds")String areaCfgIds){ + try{ + avContentCfgService.saveOrUpdateContUrl(cfg,areaCfgIds); + addMessage(model,"save_success"); + }catch(Exception e){ + logger.error("信息保存失败",e); + e.printStackTrace(); + addMessage(model,"save_failed"); + } + + return "redirect:" + adminPath +"/ntc/av/contUrlList?functionId="+cfg.getFunctionId(); + } + + //修改CONTUrl例配置状态 + @RequestMapping(value = {"/updateAvContUrlValid"}) + @RequiresPermissions(value={"avContUrl:config"}) + public String updateAvContUrlValid(Integer isAudit,Integer isValid,String ids,Integer functionId){ + avContentCfgService.updateContUrlValid(isAudit,isValid,ids,functionId); + return "redirect:" + adminPath +"/ntc/av/contUrlList?functionId="+functionId; + } + //修改CONTUrl配置审核 + @RequestMapping(value = {"/auditAvContUrl"}) + @RequiresPermissions(value={"avContUrl:audit"}) + public String auditContUrl(Integer isAudit,Integer isValid,String ids,Integer functionId){ + if(!StringUtil.isEmpty(ids)){ + String[] idArray = ids.split(","); + Date auditTime=new Date(); + for(String id :idArray){ + avContentCfgService.auditContUrl(isAudit,isValid,functionId,id,auditTime); + } + + } + return "redirect:" + adminPath +"/ntc/av/contUrlList?functionId="+functionId; + } + /*****************************contUrl业务***************/ + + + /*****************************picUrl业务***************/ + //视频文本内容配置列表 + @RequestMapping(value = {"/picUrlList"}) + public String picUrlList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")BaseStringCfg entity){ + Page page = avContentCfgService.findPicUrlPage(new Page(request, response,"r"), entity); + model.addAttribute("page", page); + initPageCondition(model); + return "/cfg/av/picUrl/picUrlList"; + } + //音视频CONTUrl新增界面 + @RequestMapping(value = {"/picUrlForm"}) + @RequiresPermissions(value={"avPicUrl:config"}) + public String picUrlForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseStringCfg cfg){ + if(!StringUtil.isEmpty(ids)){ + cfg.setCfgId(Long.parseLong(ids)); + cfg = avContentCfgService.getPicUrlCfgById(cfg); + initUpdateFormCondition(model, cfg); + }else{ + initFormCondition(model,cfg); + } + model.addAttribute("_cfg", cfg); + return "/cfg/av/picUrl/picUrlForm"; + } + + //保存CONTUrl信息 + @RequestMapping(value = {"/savePicUrl"}) + public String savePicUrl(Model model,HttpServletRequest request,HttpServletResponse response, + @ModelAttribute("cfg")BaseStringCfg cfg, + @ModelAttribute("areaCfgIds")String areaCfgIds){ + try{ + avContentCfgService.saveOrUpdatePicUrl(cfg,areaCfgIds); + addMessage(model,"save_success"); + }catch(Exception e){ + logger.error("信息保存失败",e); + e.printStackTrace(); + addMessage(model,"save_failed"); + } + + return "redirect:" + adminPath +"/ntc/av/picUrlList?functionId="+cfg.getFunctionId(); + } + + //修改CONTUrl例配置状态 + @RequestMapping(value = {"/updateAvPicUrlValid"}) + @RequiresPermissions(value={"avPicUrl:config"}) + public String updateAvPicUrlValid(Integer isAudit,Integer isValid,String ids,Integer functionId){ + avContentCfgService.updatePicUrlValid(isAudit,isValid,ids,functionId); + return "redirect:" + adminPath +"/ntc/av/picUrlList?functionId="+functionId; + } + //修改CONTUrl配置审核 + @RequestMapping(value = {"/auditAvPicUrl"}) + @RequiresPermissions(value={"avPicUrl:audit"}) + public String auditPicUrl(Integer isAudit,Integer isValid,String ids,Integer functionId){ + if(!StringUtil.isEmpty(ids)){ + String[] idArray = ids.split(","); + Date auditTime=new Date(); + for(String id :idArray){ + avContentCfgService.auditPicUrl(isAudit,isValid,functionId,id,auditTime); + } + + } + return "redirect:" + adminPath +"/ntc/av/picUrlList?functionId="+functionId; + } + /*****************************picUrl业务***************/ } diff --git a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.java b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.java index fb94dd275..d2de898f1 100644 --- a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.java +++ b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.java @@ -3,24 +3,18 @@ package com.nis.web.dao.configuration; import java.util.List; -import org.apache.ibatis.annotations.Param; import com.nis.domain.configuration.AvVoipAccountCfg; import com.nis.domain.configuration.AvVoipIpCfg; import com.nis.domain.configuration.BaseIpCfg; +import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.CfgIndexInfo; -import com.nis.domain.configuration.AvContIpCfg; -import com.nis.domain.configuration.AvFileSampleCfg; -import com.nis.domain.configuration.AvSignSampleCfg; -import com.nis.web.dao.CrudDao; import com.nis.web.dao.MyBatisDao; @MyBatisDao public interface AvContentCfgDao { public List findVoipList(CfgIndexInfo entity) ; - public List findIpList(BaseIpCfg entity) ; - public List getIpList(BaseIpCfg entity) ; public List findVoipIpCfgList(CfgIndexInfo entity); public List findVoipAccountCfgList(CfgIndexInfo entity); public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity); @@ -32,7 +26,16 @@ public interface AvContentCfgDao { public void updateAvVoipAccount(CfgIndexInfo entity); public void deleteAvVoipIp(CfgIndexInfo entity); public void deleteAvVoipAccount(CfgIndexInfo entity); + public BaseIpCfg findIpCfgById(BaseIpCfg entity) ; public void insertIp(BaseIpCfg entity); public void updateIp(BaseIpCfg entity); + public List findIpList(BaseIpCfg entity) ; + public List getIpList(BaseIpCfg entity) ; + + public BaseStringCfg findStringCfgById(BaseStringCfg entity) ; + public void insertString(BaseStringCfg entity); + public void updateString(BaseStringCfg entity); + public List findStringList(BaseStringCfg entity) ; + public List getStringList(BaseStringCfg entity) ; } diff --git a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml index c6940aaf1..69b400c8b 100644 --- a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml @@ -123,6 +123,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + r.CFG_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME, @@ -151,6 +181,12 @@ r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable ,r.area_effective_ids,r.function_id,r.cfg_region_code + + r.cfg_id,r.cfg_desc,r.cfg_keywords,r.cfg_type, + r.action,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id,r.edit_time, r.auditor_id, + r.audit_time,r.service_id,r.request_id,r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable, + r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,r.cfg_region_code + SELECT @@ -1120,4 +1157,275 @@ + + + + + + + + + + + + insert into ${tableName} ( + CFG_DESC, + ACTION, + IS_VALID, + IS_AUDIT, + CREATOR_ID, + CREATE_TIME, + EDITOR_ID, + EDIT_TIME, + AUDITOR_ID, + AUDIT_TIME, + SERVICE_ID, + REQUEST_ID, + COMPILE_ID, + IS_AREA_EFFECTIVE, + CLASSIFY, + ATTRIBUTE, + LABLE, + AREA_EFFECTIVE_IDS, + function_id, + cfg_keywords, + expr_type, + match_method, + is_hexbin, + cfg_type, + cfg_region_code + )values ( + #{cfgDesc,jdbcType=VARCHAR}, + #{action,jdbcType=INTEGER}, + 0, + 0, + #{creatorId,jdbcType=INTEGER}, + #{createTime,jdbcType=TIMESTAMP}, + #{editorId,jdbcType=INTEGER}, + #{editTime,jdbcType=TIMESTAMP}, + #{auditorId,jdbcType=INTEGER}, + #{auditTime,jdbcType=TIMESTAMP}, + #{serviceId,jdbcType=INTEGER}, + #{requestId,jdbcType=INTEGER}, + #{compileId,jdbcType=INTEGER}, + #{isAreaEffective,jdbcType=INTEGER}, + #{classify,jdbcType=VARCHAR}, + #{attribute,jdbcType=VARCHAR}, + #{lable,jdbcType=VARCHAR}, + #{areaEffectiveIds,jdbcType=VARCHAR}, + #{functionId,jdbcType=INTEGER}, + #{cfgKeywords,jdbcType=VARCHAR}, + #{exprType,jdbcType=INTEGER}, + #{matchMethod,jdbcType=INTEGER}, + #{isHexbin,jdbcType=INTEGER}, + #{cfgType,jdbcType=VARCHAR}, + #{cfgRegionCode,jdbcType=INTEGER} + ) + + + + + update ${tableName} + + + + cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, + + + action = #{action,jdbcType=INTEGER}, + + + is_valid = #{isValid,jdbcType=INTEGER}, + + + is_audit = #{isAudit,jdbcType=INTEGER}, + + + editor_id = #{editorId,jdbcType=INTEGER}, + + + edit_time = #{editTime,jdbcType=TIMESTAMP}, + + + AUDITOR_ID = #{auditorId,jdbcType=INTEGER}, + + + AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP}, + + + COMPILE_ID = #{compileId,jdbcType=TIMESTAMP}, + + + request_id = #{requestId,jdbcType=INTEGER}, + + + is_area_effective = #{isAreaEffective,jdbcType=INTEGER}, + + + classify = #{classify,jdbcType=VARCHAR}, + + + attribute = #{attribute,jdbcType=VARCHAR}, + + + lable = #{lable,jdbcType=VARCHAR}, + + + area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR}, + + + function_id = #{functionId,jdbcType=INTEGER}, + + + service_id = #{serviceId,jdbcType=INTEGER}, + + + cfg_keywords = #{cfgKeywords,jdbcType=VARCHAR}, + + + expr_type = #{exprType,jdbcType=INTEGER}, + + + match_method = #{matchMethod,jdbcType=INTEGER}, + + + is_hexbin = #{isHexbin,jdbcType=INTEGER}, + + + cfg_type = #{cfgType,jdbcType=VARCHAR}, + + + cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER}, + + + + + + and cfg_id = #{cfgId,jdbcType=INTEGER} + + + and function_id = #{functionId,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java index 2c7ca969e..753b70e28 100644 --- a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java @@ -17,6 +17,7 @@ import com.nis.domain.configuration.AreaIpCfg; import com.nis.domain.configuration.AvVoipAccountCfg; import com.nis.domain.configuration.AvVoipIpCfg; import com.nis.domain.configuration.BaseIpCfg; +import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.CfgIndexInfo; import com.nis.domain.maat.MaatCfg; import com.nis.domain.maat.ToMaatBean; @@ -118,10 +119,12 @@ public class AvContentCfgService extends BaseService{ if(Constants.AREA_EFFECTIVE_TYPE_AREA_ISP==entity.getAreaType()&&areaIsps!=null&&areaIsps.size()>0){ StringBuffer areaEffectiveIds=new StringBuffer(); for(int i=0;i0){ StringBuffer areaEffectiveIds=new StringBuffer(); for(int i=0;i0){ StringBuffer areaEffectiveIds=new StringBuffer(); for(int i=0;i findContUrlPage(Page page, BaseStringCfg entity) { + entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r")); + entity.setPage(page); + entity.setTableName("av_cont_url_cfg"); + List list=avContentCfgDao.findStringList(entity); + page.setList(list); + return page; + } + + /** + * ContUrl根据id查询contIpCfg信息 + * @param entity + * @return + */ + public BaseStringCfg getContUrlCfgById(BaseStringCfg entity) { + entity.setTableName("av_cont_url_cfg"); + return avContentCfgDao.findStringCfgById(entity); + } + @Transactional(readOnly=false,rollbackFor=RuntimeException.class) + public void saveOrUpdateContUrl(BaseStringCfg entity,String areaCfgIds){ + Date createTime=new Date(); + entity.setTableName("av_cont_url_cfg"); + //区域IPsetAreaEffectiveIds设置 + List areaCfg=entity.getAreaCfg(); + List areaIsps=entity.getAreaIsp(); + if(Constants.IS_AREA_EFFECTIVE_NO==entity.getIsAreaEffective()){ + entity.setAreaEffectiveIds(""); + entity.setAreaType(null); + }else if(Constants.IS_AREA_EFFECTIVE_YES==entity.getIsAreaEffective()){ + if(Constants.AREA_EFFECTIVE_TYPE_AREA_ISP==entity.getAreaType()&&areaIsps!=null&&areaIsps.size()>0){ + StringBuffer areaEffectiveIds=new StringBuffer(); + for(int i=0;i0){ + entity.setAreaEffectiveIds(""); + } + } + + //新增 + if(entity.getCfgId()==null){ + entity.setCreatorId(UserUtils.getUser().getId()); + entity.setCreateTime(createTime); + entity.setIsValid(0); + entity.setIsAudit(0); + //调用服务接口获取compileId + List compileIds = new ArrayList(); + try { + compileIds = ConfigServiceUtil.getId(1,1); + } catch (Exception e) { + e.printStackTrace(); + logger.info("获取编译ID出错"); + throw new MaatConvertException(":"+e.getMessage()); + } + if(compileIds != null && compileIds.size() >0 && compileIds.get(0) != 0){ + entity.setCompileId(compileIds.get(0)); + + //保存区域IP信息 + if(entity.getAreaCfg()!=null&&entity.getAreaCfg().size()>0){ + for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) { + BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode" + ,"cfgType" + }); + areaIpCfgDao.saveAreaIpCfg(areaIpCfg); + } + } + + //保存cfgIndexInfo + avContentCfgDao.insertString(entity); + }else{ + throw new MaatConvertException(""); + } + + //修改 + }else{ + Date editTime=new Date(); + entity.setIsValid(0); + entity.setIsAudit(0); + + areaCfgIds=!StringUtil.isEmpty(areaCfgIds)? ","+areaCfgIds:""; + + if(!StringUtil.isEmpty(entity.getAreaCfg())){ + for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) { + if(!StringUtil.isEmpty(areaIpCfg.getCfgId())){ + if(areaCfgIds.contains(","+areaIpCfg.getCfgId()+",")){ + areaCfgIds=areaCfgIds.replace(areaIpCfg.getCfgId()+",", ""); + } + //修改 + entity.setEditorId(UserUtils.getUser().getId()); + entity.setEditTime(editTime); + BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode" + ,"cfgType" + ,"cfgId" + }); + areaIpCfgDao.updateAreaIpCfg(areaIpCfg); + }else{ + //新增 + entity.setCreatorId(UserUtils.getUser().getId()); + entity.setCreateTime(createTime); + BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode" + ,"cfgType" + }); + areaIpCfgDao.saveAreaIpCfg(areaIpCfg); + } + } + } + //delete 真是删除areaIpCfg信息 + if(!StringUtil.isEmpty(areaCfgIds.replaceAll(",", ""))){ + areaCfgIds=areaCfgIds.substring(1,areaCfgIds.length()); + for (String cfgId : areaCfgIds.split(",")) { + AreaIpCfg areaIpCfg=new AreaIpCfg(); + areaIpCfg.setCfgId(Long.parseLong(cfgId)); + areaIpCfgDao.deleteAreaIpCfgByCfgId(areaIpCfg); + } + } + + entity.setEditorId(UserUtils.getUser().getId()); + entity.setEditTime(editTime); + entity.setTableName("av_cont_url_cfg"); + avContentCfgDao.updateString(entity); + } + } + + /** + * + * @param isAudit + * @param isValid + * @param ids compileIds + */ + @Transactional(readOnly=false,rollbackFor=RuntimeException.class) + public void updateContUrlValid(Integer isAudit,Integer isValid,String ids,Integer functionId){ + BaseStringCfg entity = new BaseStringCfg(); + entity.setTableName("av_cont_url_cfg"); + String[] idArray = ids.split(","); + for(String id :idArray){ + entity.setCfgId(Long.parseLong(id)); + entity.setFunctionId(functionId); + entity.setIsAudit(isAudit); + entity.setIsValid(isValid); + entity.setEditorId(UserUtils.getUser().getId()); + entity.setEditTime(new Date()); + avContentCfgDao.updateString(entity); + AreaIpCfg areaIpCfg=new AreaIpCfg(); + BeanUtils.copyProperties(entity, areaIpCfg); + areaIpCfgDao.updateAreaIpCfgValid(areaIpCfg); + } + } + /** + * + * @param isAudit + * @param isValid + * @param ids cfgId + * @param functionId + */ + @Transactional(readOnly=false,rollbackFor=RuntimeException.class) + public void auditContUrl(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){ + BaseStringCfg entity = new BaseStringCfg(); + entity.setTableName("av_cont_url_cfg"); + List list = new ArrayList(); + List areaIpCfgList = new ArrayList(); + + entity.setCfgId(Long.parseLong(id)); + entity = avContentCfgDao.findStringCfgById(entity); + entity.setTableName("av_cont_url_cfg"); + entity.setIsAudit(isAudit); + entity.setIsValid(isValid); + entity.setAuditorId(UserUtils.getUser().getId()); + entity.setAuditTime(auditTime); + + + avContentCfgDao.updateString(entity); + AreaIpCfg areaIpCfg=new AreaIpCfg(); + BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode" + ,"cfgType" + ,"cfgId" + }); + areaIpCfgDao.updateAreaIpCfg(areaIpCfg); + + list=avContentCfgDao.getStringList(entity); + areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId()); + + ToMaatBean maatBean = new ToMaatBean(); + MaatCfg maatCfg = new MaatCfg(); + List configCompileList = new ArrayList(); + List groupRelationList = new ArrayList(); + List ipRegionList = new ArrayList(); + List strRegionList = new ArrayList(); + List numRegionList = new ArrayList(); + List digestRegionList = new ArrayList(); + List areaIpRegionList = new ArrayList(); + + if(isAudit==1){ + if(!StringUtil.isEmpty(list)){ + Map strMap = cfgConvert(strRegionList,list,2,entity,groupRelationList); + groupRelationList=strMap.get("groupList"); + strRegionList=strMap.get("dstList"); + } + + if(!StringUtil.isEmpty(areaIpCfgList)){ + Map areaMap = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList); + groupRelationList=areaMap.get("groupList"); + areaIpRegionList=areaMap.get("dstList"); + } + } + + //构造提交综合服务参数格式,一条配置提交一次综合服务 + if(isAudit==1){ + maatCfg.initDefaultValue(); + BeanUtils.copyProperties(entity, maatCfg); + maatCfg.setAction(entity.getAction()); + maatCfg.setAuditTime(entity.getAuditTime()); + maatCfg.setIpRegionList(ipRegionList); + maatCfg.setStrRegionList(strRegionList); + maatCfg.setNumRegionList(numRegionList); + maatCfg.setDigestRegionList(digestRegionList); + maatCfg.setGroupRelationList(groupRelationList); + maatCfg.setGroupNum(groupRelationList.size()); + maatCfg.setAreaIpRegionList(areaIpRegionList); + maatCfg.setIsValid(entity.getIsValid()); + configCompileList.add(maatCfg); + maatBean.setConfigCompileList(configCompileList); + maatBean.setAuditTime(entity.getAuditTime()); + maatBean.setCreatorName(entity.getCurrentUser().getName()); + maatBean.setVersion(Constants.MAAT_VERSION); + maatBean.setOpAction(Constants.INSERT_ACTION); + //调用服务接口下发配置数据 + String json=gsonToJson(maatBean); + logger.info("contIp配置下发配置参数:"+json); + //TODO 调用服务接口下发配置 + //ToMaatResult result = ConfigServiceUtil.postMaatCfg(json); + //logger.info("contIp配置下发响应信息:"+result.getMsg()); + + }else if(isAudit==3){ + maatCfg.setCompileId(entity.getCompileId()); + maatCfg.setServiceId(entity.getServiceId()); + maatCfg.setIsValid(0);//无效 + configCompileList.add(maatCfg); + maatBean.setConfigCompileList(configCompileList); + maatBean.setAuditTime(entity.getAuditTime()); + maatBean.setCreatorName(entity.getCurrentUser().getName()); + maatBean.setVersion(Constants.MAAT_VERSION); + maatBean.setOpAction(Constants.UPDATE_ACTION); + //调用服务接口取消配置 + String json=gsonToJson(maatBean); + logger.info("contIp配置下发配置参数:"+json); + //调用服务接口下发配置 + //ToMaatResult result = ConfigServiceUtil.put(json,1); + //logger.info("http配置取消配置响应信息:"+result.getMsg()); + } + } + /********************************contUrl业务*********************************/ + + + /********************************picUrl业务*********************************/ + /** + * picIp查询分页数据 + * @param page 分页对象 + * @param entity + * @return + */ + public Page findPicUrlPage(Page page, BaseStringCfg entity) { + entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r")); + entity.setPage(page); + entity.setTableName("av_pic_url_cfg"); + List list=avContentCfgDao.findStringList(entity); + page.setList(list); + return page; + } + + /** + * PicUrl根据id查询picIpCfg信息 + * @param entity + * @return + */ + public BaseStringCfg getPicUrlCfgById(BaseStringCfg entity) { + entity.setTableName("av_pic_url_cfg"); + return avContentCfgDao.findStringCfgById(entity); + } + @Transactional(readOnly=false,rollbackFor=RuntimeException.class) + public void saveOrUpdatePicUrl(BaseStringCfg entity,String areaCfgIds){ + Date createTime=new Date(); + entity.setTableName("av_pic_url_cfg"); + //区域IPsetAreaEffectiveIds设置 + List areaCfg=entity.getAreaCfg(); + List areaIsps=entity.getAreaIsp(); + if(Constants.IS_AREA_EFFECTIVE_NO==entity.getIsAreaEffective()){ + entity.setAreaEffectiveIds(""); + entity.setAreaType(null); + }else if(Constants.IS_AREA_EFFECTIVE_YES==entity.getIsAreaEffective()){ + if(Constants.AREA_EFFECTIVE_TYPE_AREA_ISP==entity.getAreaType()&&areaIsps!=null&&areaIsps.size()>0){ + StringBuffer areaEffectiveIds=new StringBuffer(); + for(int i=0;i0){ + entity.setAreaEffectiveIds(""); + } + } + + //新增 + if(entity.getCfgId()==null){ + entity.setCreatorId(UserUtils.getUser().getId()); + entity.setCreateTime(createTime); + entity.setIsValid(0); + entity.setIsAudit(0); + //调用服务接口获取compileId + List compileIds = new ArrayList(); + try { + compileIds = ConfigServiceUtil.getId(1,1); + } catch (Exception e) { + e.printStackTrace(); + logger.info("获取编译ID出错"); + throw new MaatConvertException(":"+e.getMessage()); + } + if(compileIds != null && compileIds.size() >0 && compileIds.get(0) != 0){ + entity.setCompileId(compileIds.get(0)); + + //保存区域IP信息 + if(entity.getAreaCfg()!=null&&entity.getAreaCfg().size()>0){ + for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) { + BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode" + ,"cfgType" + }); + areaIpCfgDao.saveAreaIpCfg(areaIpCfg); + } + } + + //保存cfgIndexInfo + avContentCfgDao.insertString(entity); + }else{ + throw new MaatConvertException(""); + } + + //修改 + }else{ + Date editTime=new Date(); + entity.setIsValid(0); + entity.setIsAudit(0); + + areaCfgIds=!StringUtil.isEmpty(areaCfgIds)? ","+areaCfgIds:""; + + if(!StringUtil.isEmpty(entity.getAreaCfg())){ + for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) { + if(!StringUtil.isEmpty(areaIpCfg.getCfgId())){ + if(areaCfgIds.contains(","+areaIpCfg.getCfgId()+",")){ + areaCfgIds=areaCfgIds.replace(areaIpCfg.getCfgId()+",", ""); + } + //修改 + entity.setEditorId(UserUtils.getUser().getId()); + entity.setEditTime(editTime); + BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode" + ,"cfgType" + ,"cfgId" + }); + areaIpCfgDao.updateAreaIpCfg(areaIpCfg); + }else{ + //新增 + entity.setCreatorId(UserUtils.getUser().getId()); + entity.setCreateTime(createTime); + BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode" + ,"cfgType" + }); + areaIpCfgDao.saveAreaIpCfg(areaIpCfg); + } + } + } + //delete 真是删除areaIpCfg信息 + if(!StringUtil.isEmpty(areaCfgIds.replaceAll(",", ""))){ + areaCfgIds=areaCfgIds.substring(1,areaCfgIds.length()); + for (String cfgId : areaCfgIds.split(",")) { + AreaIpCfg areaIpCfg=new AreaIpCfg(); + areaIpCfg.setCfgId(Long.parseLong(cfgId)); + areaIpCfgDao.deleteAreaIpCfgByCfgId(areaIpCfg); + } + } + + entity.setEditorId(UserUtils.getUser().getId()); + entity.setEditTime(editTime); + entity.setTableName("av_pic_url_cfg"); + avContentCfgDao.updateString(entity); + } + } + + /** + * + * @param isAudit + * @param isValid + * @param ids compileIds + */ + @Transactional(readOnly=false,rollbackFor=RuntimeException.class) + public void updatePicUrlValid(Integer isAudit,Integer isValid,String ids,Integer functionId){ + BaseStringCfg entity = new BaseStringCfg(); + entity.setTableName("av_pic_url_cfg"); + String[] idArray = ids.split(","); + for(String id :idArray){ + entity.setCfgId(Long.parseLong(id)); + entity.setFunctionId(functionId); + entity.setIsAudit(isAudit); + entity.setIsValid(isValid); + entity.setEditorId(UserUtils.getUser().getId()); + entity.setEditTime(new Date()); + avContentCfgDao.updateString(entity); + AreaIpCfg areaIpCfg=new AreaIpCfg(); + BeanUtils.copyProperties(entity, areaIpCfg); + areaIpCfgDao.updateAreaIpCfgValid(areaIpCfg); + } + } + /** + * + * @param isAudit + * @param isValid + * @param ids cfgId + * @param functionId + */ + @Transactional(readOnly=false,rollbackFor=RuntimeException.class) + public void auditPicUrl(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){ + BaseStringCfg entity = new BaseStringCfg(); + entity.setTableName("av_pic_url_cfg"); + List list = new ArrayList(); + List areaIpCfgList = new ArrayList(); + + entity.setCfgId(Long.parseLong(id)); + entity = avContentCfgDao.findStringCfgById(entity); + entity.setTableName("av_pic_url_cfg"); + entity.setIsAudit(isAudit); + entity.setIsValid(isValid); + entity.setAuditorId(UserUtils.getUser().getId()); + entity.setAuditTime(auditTime); + + + avContentCfgDao.updateString(entity); + AreaIpCfg areaIpCfg=new AreaIpCfg(); + BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode" + ,"cfgType" + ,"cfgId" + }); + areaIpCfgDao.updateAreaIpCfg(areaIpCfg); + + list=avContentCfgDao.getStringList(entity); + areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId()); + + ToMaatBean maatBean = new ToMaatBean(); + MaatCfg maatCfg = new MaatCfg(); + List configCompileList = new ArrayList(); + List groupRelationList = new ArrayList(); + List ipRegionList = new ArrayList(); + List strRegionList = new ArrayList(); + List numRegionList = new ArrayList(); + List digestRegionList = new ArrayList(); + List areaIpRegionList = new ArrayList(); + + if(isAudit==1){ + if(!StringUtil.isEmpty(list)){ + Map strMap = cfgConvert(strRegionList,list,2,entity,groupRelationList); + groupRelationList=strMap.get("groupList"); + strRegionList=strMap.get("dstList"); + } + + if(!StringUtil.isEmpty(areaIpCfgList)){ + Map areaMap = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList); + groupRelationList=areaMap.get("groupList"); + areaIpRegionList=areaMap.get("dstList"); + } + } + + //构造提交综合服务参数格式,一条配置提交一次综合服务 + if(isAudit==1){ + maatCfg.initDefaultValue(); + BeanUtils.copyProperties(entity, maatCfg); + maatCfg.setAction(entity.getAction()); + maatCfg.setAuditTime(entity.getAuditTime()); + maatCfg.setIpRegionList(ipRegionList); + maatCfg.setStrRegionList(strRegionList); + maatCfg.setNumRegionList(numRegionList); + maatCfg.setDigestRegionList(digestRegionList); + maatCfg.setGroupRelationList(groupRelationList); + maatCfg.setGroupNum(groupRelationList.size()); + maatCfg.setAreaIpRegionList(areaIpRegionList); + maatCfg.setIsValid(entity.getIsValid()); + configCompileList.add(maatCfg); + maatBean.setConfigCompileList(configCompileList); + maatBean.setAuditTime(entity.getAuditTime()); + maatBean.setCreatorName(entity.getCurrentUser().getName()); + maatBean.setVersion(Constants.MAAT_VERSION); + maatBean.setOpAction(Constants.INSERT_ACTION); + //调用服务接口下发配置数据 + String json=gsonToJson(maatBean); + logger.info("picUrl配置下发配置参数:"+json); + //TODO 调用服务接口下发配置 + //ToMaatResult result = ConfigServiceUtil.postMaatCfg(json); + //logger.info("picUrl配置下发响应信息:"+result.getMsg()); + + }else if(isAudit==3){ + maatCfg.setCompileId(entity.getCompileId()); + maatCfg.setServiceId(entity.getServiceId()); + maatCfg.setIsValid(0);//无效 + configCompileList.add(maatCfg); + maatBean.setConfigCompileList(configCompileList); + maatBean.setAuditTime(entity.getAuditTime()); + maatBean.setCreatorName(entity.getCurrentUser().getName()); + maatBean.setVersion(Constants.MAAT_VERSION); + maatBean.setOpAction(Constants.UPDATE_ACTION); + //调用服务接口取消配置 + String json=gsonToJson(maatBean); + logger.info("picUrl配置下发配置参数:"+json); + //调用服务接口下发配置 + //ToMaatResult result = ConfigServiceUtil.put(json,1); + //logger.info("http配置取消配置响应信息:"+result.getMsg()); + } + } + /********************************picUrl业务*********************************/ } diff --git a/src/main/webapp/WEB-INF/include/form/areaInfo.jsp b/src/main/webapp/WEB-INF/include/form/areaInfo.jsp index 30a1f87d0..2fbdc404f 100644 --- a/src/main/webapp/WEB-INF/include/form/areaInfo.jsp +++ b/src/main/webapp/WEB-INF/include/form/areaInfo.jsp @@ -14,18 +14,13 @@ $(function(){ - - -
@@ -57,9 +52,9 @@ $(function(){
- +
- @@ -94,9 +89,9 @@ $(function(){
- +
-
@@ -164,9 +159,9 @@ $(function(){
@@ -176,7 +171,7 @@ $(function(){
- +
@@ -189,8 +184,8 @@ $(function(){
@@ -200,7 +195,7 @@ $(function(){
- +
@@ -211,7 +206,7 @@ $(function(){
- +
@@ -220,7 +215,7 @@ $(function(){
- +
@@ -235,7 +230,7 @@ $(function(){ - +
@@ -275,7 +270,7 @@ $(function(){
@@ -324,7 +319,7 @@ $(function(){
- +
diff --git a/src/main/webapp/WEB-INF/include/form/ipInfo.jsp b/src/main/webapp/WEB-INF/include/form/ipInfo.jsp index 004944d27..a681f8172 100644 --- a/src/main/webapp/WEB-INF/include/form/ipInfo.jsp +++ b/src/main/webapp/WEB-INF/include/form/ipInfo.jsp @@ -1,7 +1,7 @@ <%@ page contentType="text/html;charset=UTF-8"%> <%@ include file="/WEB-INF/include/taglib.jsp"%>

-
+
@@ -9,7 +9,7 @@
diff --git a/src/main/webapp/WEB-INF/include/form/stringInfo.jsp b/src/main/webapp/WEB-INF/include/form/stringInfo.jsp index 7bf902008..ab70700d8 100644 --- a/src/main/webapp/WEB-INF/include/form/stringInfo.jsp +++ b/src/main/webapp/WEB-INF/include/form/stringInfo.jsp @@ -1,134 +1,67 @@ <%@ page contentType="text/html;charset=UTF-8"%> <%@ include file="/WEB-INF/include/taglib.jsp"%>

-
-
-
- -
- -
-
-
-
-
-
- -
- -
-
-
-
+
+
+
+
+ +
+ +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+ +
+ +
+
+
+
+ +
- - - - - - - - -
-
-
- -
- - -
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
- -
- - - - - -
-
-
-
-
-
- <%--
-
- -
- -
-
-
-
--%> - -
-
-
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp index 0448ea4e2..ea2b75fac 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp @@ -83,7 +83,7 @@ $(function(){ serviceId="${service.serviceId }" protocolId="${service.protocolId }" value="${service.action }" class="required action" - checked> + checked> @@ -96,7 +96,6 @@ $(function(){ <%@include file="/WEB-INF/include/form/ipInfo.jsp" %> <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> - <%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp index 7df9386e6..5772f8283 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp @@ -55,9 +55,9 @@
+ + +
+
+
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp new file mode 100644 index 000000000..0606e368f --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp @@ -0,0 +1,410 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + +<spring:message code="${cfgName}"></spring:message> + + + + +
+ + +

+ +

+ +
+
+
+
+
+ + + + + + + + + +
+
+ + + + + + + <%-- --%> + +
+ +
+ +
+
+ + + + + + +
+ + + +
+
+
+ + + +
+
+ + + + + +
+ + +
+
+ href="javascript:;"> + + +
+
+ + + +
+
+ +
+ +
+ + + + + + + + +
+ +
+ +
+ +
+ + + + + + + +
+ +
+ +
+ +
+ + + + + + + + +
+ +
+ +
+ +
+ + + + + + + +
+ +
+ +
+ +
+
+
+ + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+
+ + +
+ + +
+
+
+ + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + +
${cfg.cfgDesc }${cfg.cfgKeywords } + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${cfg.requestName } + ${fns:abbr(classify,20)} + + ${fns:abbr(attribute,20)} + + ${fns:abbr(lableInfo,20)} + ${cfg.areaEffectiveIds } + + + + ${cfg.creatorName }${cfg.editorName }${cfg.auditorName }
+
${page}
+
+ +
+
+
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp index 36a081af0..00dd761dd 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp @@ -83,7 +83,7 @@ $(function(){ serviceId="${service.serviceId }" protocolId="${service.protocolId }" value="${service.action }" class="required action" - checked> + checked> @@ -96,7 +96,6 @@ $(function(){ <%@include file="/WEB-INF/include/form/ipInfo.jsp" %> <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> - <%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp new file mode 100644 index 000000000..83e618839 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp @@ -0,0 +1,119 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + +<spring:message code="${cfgName}"></spring:message> + + + + +
+ + <%--

+ +

--%> + +
+
+
+
+
+ + + +
+
+
+ +
+ + + + + + + + + + + +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ + + +
+
+
+
+
+ + <%@include file="/WEB-INF/include/form/stringInfo.jsp" %> + <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> + <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> +
+
+
+
+
+
+ + +
+
+
+
+
+
+
+ +
+
+
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp new file mode 100644 index 000000000..9335047e9 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp @@ -0,0 +1,410 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + +<spring:message code="${cfgName}"></spring:message> + + + + +
+ + +

+ +

+ +
+
+
+
+
+ + + + + + + + + +
+
+ + + + + + + <%-- --%> + +
+ +
+ +
+
+ + + + + + +
+ + + +
+
+
+ + + +
+
+ + + + + +
+ + +
+
+ href="javascript:;"> + + +
+
+ + + +
+
+ +
+ +
+ + + + + + + + +
+ +
+ +
+ +
+ + + + + + + +
+ +
+ +
+ +
+ + + + + + + + +
+ +
+ +
+ +
+ + + + + + + +
+ +
+ +
+ +
+
+
+ + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+
+ + +
+ + +
+
+
+ + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + +
${cfg.cfgDesc }${cfg.cfgKeywords } + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${cfg.requestName } + ${fns:abbr(classify,20)} + + ${fns:abbr(attribute,20)} + + ${fns:abbr(lableInfo,20)} + ${cfg.areaEffectiveIds } + + + + ${cfg.creatorName }${cfg.editorName }${cfg.auditorName }
+
${page}
+
+ +
+
+
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp index dfe254cee..fe20c2531 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp @@ -129,7 +129,7 @@ var delContent=function(contentClassName,addBtnClassName){ serviceId="${service.serviceId }" protocolId="${service.protocolId }" value="${service.action }" class="required action" - checked> + checked> @@ -184,8 +184,8 @@ var delContent=function(contentClassName,addBtnClassName){
@@ -418,7 +418,6 @@ var delContent=function(contentClassName,addBtnClassName){
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
- <%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js index 41e7835c2..e6434a544 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js @@ -311,6 +311,18 @@ jQuery.validator.addMethod("portCheck",function(value, element) { } } }); +jQuery.validator.addMethod("chooseAreaOrIsp",function(value, element) { + var isp=""; + if($(element).is(":visible")){ + isp=$(element).closest(".row").find("select[name$='.isp']").val() + } + if(value =='' && isp==""){ + $.validator.messages.chooseAreaOrIsp=$.validator.messages.chooseAreaOrIsp + return false; + } + return true; + +}); //ip v4转数字 var ipToNumber=function (ip){ var num =0; diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js index 8bbed11c9..db1b3602b 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js @@ -32,6 +32,7 @@ portCheck:"Please enter a correct port", notStartZero:"Please enter a valid Integer", portRange:"Please enter a valid Integer", - portMaskRange:"Port must be a valid Integer and mask must between 0 and 65535.The correct pattern is \"port/mask\"." + portMaskRange:"Port must be a valid Integer and mask must between 0 and 65535.The correct pattern is \"port/mask\".", + chooseAreaOrIsp:"The region and the oprater must choose one" }); }(jQuery)); diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js index e34cf4324..e14e428f8 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js @@ -30,6 +30,7 @@ ipRange1:"start IP should smaller than end IP", portCheck: " Пожалуйста, введите  правильный  порт.", portRange:"Please enter a valid Integer", - portMaskRange:"Port must be a valid Integer and mask must between 0 and 65535.The correct pattern is \"port/mask\"." + portMaskRange:"Port must be a valid Integer and mask must between 0 and 65535.The correct pattern is \"port/mask\".", + chooseAreaOrIsp:"The region and the oprater must choose one" }); }(jQuery)); \ No newline at end of file diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js index 92fd649c3..3e5da1b0b 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js @@ -34,5 +34,6 @@ ipRange1:"起始IP值应小于结束IP值", portRange:"端口必须为整数,非0数字不能以0开头", portMaskRange:"端口必须为整数,掩码范围0-65535,非0数字不能以0开头。格式为\"端口/掩码\"", + chooseAreaOrIsp:"区域和运营商必选一个" }); }(jQuery));