diff --git a/src/main/java/com/nis/domain/configuration/BaseIpCfg.java b/src/main/java/com/nis/domain/configuration/BaseIpCfg.java index cc50d83dc..989c85006 100644 --- a/src/main/java/com/nis/domain/configuration/BaseIpCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseIpCfg.java @@ -8,6 +8,8 @@ */ package com.nis.domain.configuration; +import java.util.List; + import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import com.nis.util.excel.ExcelField; @@ -60,6 +62,8 @@ public class BaseIpCfg extends BaseCfg { @ExcelField(title="group_name") protected String groupName; + private List ntcSubscribeIdCfgList; + private NtcSubscribeIdCfg ntcSubscribeIdCfg; /** * irType * @return irType @@ -289,4 +293,17 @@ public class BaseIpCfg extends BaseCfg { this.direction = 0; } + public List getNtcSubscribeIdCfgList() { + return ntcSubscribeIdCfgList; + } + public void setNtcSubscribeIdCfgList(List ntcSubscribeIdCfgList) { + this.ntcSubscribeIdCfgList = ntcSubscribeIdCfgList; + } + public NtcSubscribeIdCfg getNtcSubscribeIdCfg() { + return ntcSubscribeIdCfg; + } + public void setNtcSubscribeIdCfg(NtcSubscribeIdCfg ntcsSubscribeIdCfg) { + this.ntcSubscribeIdCfg = ntcsSubscribeIdCfg; + } + } diff --git a/src/main/java/com/nis/domain/configuration/BaseStringCfg.java b/src/main/java/com/nis/domain/configuration/BaseStringCfg.java index 71ee9b13f..075f64547 100644 --- a/src/main/java/com/nis/domain/configuration/BaseStringCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseStringCfg.java @@ -8,6 +8,8 @@ */ package com.nis.domain.configuration; +import java.util.List; + import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import com.nis.util.excel.ExcelField; @@ -65,6 +67,9 @@ public class BaseStringCfg extends BaseCfg { @SerializedName("isHexbin") protected Integer isHexbin; + private List ntcSubscribeIdCfgList; + private NtcSubscribeIdCfg ntcSubscribeIdCfg; + /** * exprType * @return exprType @@ -142,4 +147,16 @@ public class BaseStringCfg extends BaseCfg { cfgKeywords = cfgKeywords.replace(",", "&");*/ return cfgKeywords; } + public List getNtcSubscribeIdCfgList() { + return ntcSubscribeIdCfgList; + } + public void setNtcSubscribeIdCfgList(List ntcSubscribeIdCfgList) { + this.ntcSubscribeIdCfgList = ntcSubscribeIdCfgList; + } + public NtcSubscribeIdCfg getNtcSubscribeIdCfg() { + return ntcSubscribeIdCfg; + } + public void setNtcSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg) { + this.ntcSubscribeIdCfg = ntcSubscribeIdCfg; + } } 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 f6cb701d0..24e519955 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 @@ -30,6 +30,7 @@ import com.nis.domain.configuration.AreaIpCfg; import com.nis.domain.configuration.AvContIpCfg; import com.nis.domain.configuration.AvVoipAccountCfg; import com.nis.domain.configuration.CfgIndexInfo; +import com.nis.domain.configuration.IpPortCfg; import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.exceptions.MaatConvertException; import com.nis.domain.configuration.AvVoipIpCfg; @@ -320,7 +321,7 @@ public class AvContentController extends BaseController { @RequiresPermissions(value={"avContIp:config"}) public String contIpForm(Model model,HttpServletRequest request,HttpServletResponse response ,String ids,String compileIds - ,@ModelAttribute("cfg")BaseIpCfg cfg + ,BaseIpCfg cfg ,RedirectAttributes redirectAttributes){ if(!StringUtil.isEmpty(compileIds)){ cfg.setCompileId(Integer.parseInt(compileIds)); @@ -383,6 +384,29 @@ public class AvContentController extends BaseController { } return "redirect:" + adminPath +"/ntc/av/contIpList?functionId="+functionId; } + // 获取域配置信息 + @RequestMapping(value = {"ajaxAvContIpList"}) + public String ajaxAvContIpList(Model model,Long cfgId,Integer index) { + BaseIpCfg baseIpCfg = new BaseIpCfg(); + baseIpCfg.setCfgId(cfgId); + BaseIpCfg cfg = avContentCfgService.getContIpCfgById(baseIpCfg); + List tabList = new ArrayList(); + + tabList.add(new String[]{"1",cfg.getCfgType()}); + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(BaseStringCfg subscribeId:cfg.getNtcSubscribeIdCfgList()){ + if(!subscribeId.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",subscribeId.getCfgType()}); + cfgType = subscribeId.getCfgType(); + } + } + } + model.addAttribute("_cfg", cfg); + model.addAttribute("index", index); + model.addAttribute("tabList", tabList); + return "/cfg/av/subList"; + } /*****************************contIp业务***************/ /*****************************picIp业务***************/ @@ -402,7 +426,7 @@ public class AvContentController extends BaseController { @RequiresPermissions(value={"avPicIp:config"}) public String picIpForm(Model model,HttpServletRequest request ,HttpServletResponse response,String ids - ,String compileIds,@ModelAttribute("cfg")BaseIpCfg cfg + ,String compileIds,BaseIpCfg cfg ,RedirectAttributes redirectAttributes){ if(!StringUtil.isEmpty(compileIds)){ cfg.setCompileId(Integer.parseInt(compileIds)); @@ -465,6 +489,29 @@ public class AvContentController extends BaseController { } return "redirect:" + adminPath +"/ntc/av/picIpList?functionId="+functionId; } + // 获取域配置信息 + @RequestMapping(value = {"ajaxAvPicIpList"}) + public String ajaxAvPicIpList(Model model,Long cfgId,Integer index) { + BaseIpCfg baseIpCfg = new BaseIpCfg(); + baseIpCfg.setCfgId(cfgId); + BaseIpCfg cfg = avContentCfgService.getPicIpCfgById(baseIpCfg); + List tabList = new ArrayList(); + + tabList.add(new String[]{"1",cfg.getCfgType()}); + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(BaseStringCfg subscribeId:cfg.getNtcSubscribeIdCfgList()){ + if(!subscribeId.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",subscribeId.getCfgType()}); + cfgType = subscribeId.getCfgType(); + } + } + } + model.addAttribute("_cfg", cfg); + model.addAttribute("index", index); + model.addAttribute("tabList", tabList); + return "/cfg/av/subList"; + } /*****************************picIp业务***************/ @@ -547,6 +594,29 @@ public class AvContentController extends BaseController { } return "redirect:" + adminPath +"/ntc/av/contUrlList?functionId="+functionId; } + // 获取域配置信息 + @RequestMapping(value = {"ajaxAvContUrlList"}) + public String ajaxAvContUrlList(Model model,Long cfgId,Integer index) { + BaseStringCfg baseStrCfg = new BaseStringCfg(); + baseStrCfg.setCfgId(cfgId); + BaseStringCfg cfg = avContentCfgService.getContUrlCfgById(baseStrCfg); + List tabList = new ArrayList(); + + tabList.add(new String[]{"2",cfg.getCfgType()}); + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(NtcSubscribeIdCfg subscribeId:cfg.getNtcSubscribeIdCfgList()){ + if(!subscribeId.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",subscribeId.getCfgType()}); + cfgType = subscribeId.getCfgType(); + } + } + } + model.addAttribute("_cfg", cfg); + model.addAttribute("index", index); + model.addAttribute("tabList", tabList); + return "/cfg/av/subList"; + } /*****************************contUrl业务***************/ @@ -629,6 +699,29 @@ public class AvContentController extends BaseController { } return "redirect:" + adminPath +"/ntc/av/picUrlList?functionId="+functionId; } + // 获取域配置信息 + @RequestMapping(value = {"ajaxAvPicUrlList"}) + public String ajaxAvPicUrlList(Model model,Long cfgId,Integer index) { + BaseStringCfg baseStrCfg = new BaseStringCfg(); + baseStrCfg.setCfgId(cfgId); + BaseStringCfg cfg = avContentCfgService.getPicUrlCfgById(baseStrCfg); + List tabList = new ArrayList(); + + tabList.add(new String[]{"2",cfg.getCfgType()}); + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(NtcSubscribeIdCfg subscribeId:cfg.getNtcSubscribeIdCfgList()){ + if(!subscribeId.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",subscribeId.getCfgType()}); + cfgType = subscribeId.getCfgType(); + } + } + } + model.addAttribute("_cfg", cfg); + model.addAttribute("index", index); + model.addAttribute("tabList", tabList); + return "/cfg/av/subList"; + } /*****************************picUrl业务***************/ /** * 1、effectiveIds分组展示 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 7e3e73fc6..5bc029af1 100644 --- a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java @@ -618,7 +618,12 @@ public class AvContentCfgService extends BaseService{ */ public BaseIpCfg getContIpCfgById(BaseIpCfg entity) { entity.setTableName("av_cont_ip_cfg"); - return avContentCfgDao.findIpCfgById(entity); + BaseIpCfg cfg = avContentCfgDao.findIpCfgById(entity); + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(cfg, subscribeIdCfg, new String[] {"cfgId","isValid"}); + List list = stringCfgDao.findSubscribeIdCfgList(subscribeIdCfg); + cfg.setNtcSubscribeIdCfgList(list); + return cfg; } @Transactional(readOnly=false,rollbackFor=RuntimeException.class) public void saveOrUpdateContIp(BaseIpCfg entity,String areaCfgIds){ @@ -641,6 +646,18 @@ public class AvContentCfgService extends BaseService{ logger.info("获取编译ID出错"); throw new MaatConvertException(":"+e.getMessage()); } + + // 添加subscribeId + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + entity.setCompileId(compileIds.get(0)); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } + if(compileIds != null && compileIds.size() >0 && compileIds.get(0) != 0){ entity.setCompileId(compileIds.get(0)); @@ -733,6 +750,21 @@ public class AvContentCfgService extends BaseService{ entity.setEditorId(UserUtils.getUser().getId()); entity.setEditTime(editTime); avContentCfgDao.updateIp(entity); + + entity.setCreateTime(new Date()); + entity.setCreatorId(entity.getCurrentUser().getId()); + // 删除SubscribeId配置再进行添加 + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, subscribeIdCfg,new String[]{"cfgId","cfgType"}); + stringCfgDao.deleteSubscribeIdCfg(subscribeIdCfg); + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } } } @@ -757,6 +789,14 @@ public class AvContentCfgService extends BaseService{ entity.setEditorId(UserUtils.getUser().getId()); entity.setEditTime(new Date()); avContentCfgDao.updateIp(entity); + // 查询域配置信息 + BaseIpCfg cfg = this.getContIpCfgById(entity); + if(cfg.getNtcSubscribeIdCfgList() != null && cfg.getNtcSubscribeIdCfgList().size()>0) { + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(cfg, subscribeIdCfg, new String[] {"cfgId","cfgType","tableName"}); + stringCfgDao.updateSubscribeIdCfg(subscribeIdCfg); + } + AreaIpCfg areaIpCfg=new AreaIpCfg(); BeanUtils.copyProperties(entity, areaIpCfg); areaIpCfgDao.updateAreaIpCfgValid(areaIpCfg); @@ -829,6 +869,19 @@ public class AvContentCfgService extends BaseService{ } } + // 修改审核状态 + BaseIpCfg baseIpCfg = this.getContIpCfgById(entity); + if(!StringUtil.isEmpty(baseIpCfg.getNtcSubscribeIdCfgList())) { + NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, cfg, new String[] {"cfgId","cfgType"}); + stringCfgDao.updateSubscribeIdCfg(cfg); + if(isAudit==1) { + Map map = cfgConvert(strRegionList,baseIpCfg.getNtcSubscribeIdCfgList(),2,entity,groupRelationList); + groupRelationList=map.get("groupList"); + strRegionList=map.get("dstList"); + } + } + //构造提交综合服务参数格式,一条配置提交一次综合服务 if(isAudit==1){ maatCfg.initDefaultValue(); @@ -900,7 +953,12 @@ public class AvContentCfgService extends BaseService{ */ public BaseIpCfg getPicIpCfgById(BaseIpCfg entity) { entity.setTableName("av_pic_ip_cfg"); - return avContentCfgDao.findIpCfgById(entity); + BaseIpCfg cfg = avContentCfgDao.findIpCfgById(entity); + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(cfg, subscribeIdCfg,new String[] {"cfgId","isValid"}); + List list = stringCfgDao.findSubscribeIdCfgList(subscribeIdCfg); + cfg.setNtcSubscribeIdCfgList(list); + return cfg; } @Transactional(readOnly=false,rollbackFor=RuntimeException.class) public void saveOrUpdatePicIp(BaseIpCfg entity,String areaCfgIds){ @@ -923,6 +981,18 @@ public class AvContentCfgService extends BaseService{ logger.info("获取编译ID出错"); throw new MaatConvertException(":"+e.getMessage()); } + + // 添加subscribeId + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + entity.setCompileId(compileIds.get(0)); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } + if(compileIds != null && compileIds.size() >0 && compileIds.get(0) != 0){ entity.setCompileId(compileIds.get(0)); @@ -1015,6 +1085,21 @@ public class AvContentCfgService extends BaseService{ entity.setEditorId(UserUtils.getUser().getId()); entity.setEditTime(editTime); avContentCfgDao.updateIp(entity); + + entity.setCreateTime(new Date()); + entity.setCreatorId(entity.getCurrentUser().getId()); + // 删除SubscribeId配置再进行添加 + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, subscribeIdCfg,new String[]{"cfgId","cfgType"}); + stringCfgDao.deleteSubscribeIdCfg(subscribeIdCfg); + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } } } @@ -1039,6 +1124,14 @@ public class AvContentCfgService extends BaseService{ entity.setEditorId(UserUtils.getUser().getId()); entity.setEditTime(new Date()); avContentCfgDao.updateIp(entity); + // 查询域配置信息 + BaseIpCfg cfg = this.getPicIpCfgById(entity); + if(cfg.getNtcSubscribeIdCfgList() != null && cfg.getNtcSubscribeIdCfgList().size()>0) { + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(cfg, subscribeIdCfg, new String[] {"cfgId","cfgTyep","tableName"}); + stringCfgDao.updateSubscribeIdCfg(subscribeIdCfg); + } + AreaIpCfg areaIpCfg=new AreaIpCfg(); BeanUtils.copyProperties(entity, areaIpCfg); areaIpCfgDao.updateAreaIpCfgValid(areaIpCfg); @@ -1112,6 +1205,19 @@ public class AvContentCfgService extends BaseService{ } } + // 修改审核状态 + BaseIpCfg baseIpCfg = this.getPicIpCfgById(entity); + if(!StringUtil.isEmpty(baseIpCfg.getNtcSubscribeIdCfgList())) { + NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, cfg, new String[] {"cfgId","cfgType"}); + stringCfgDao.updateSubscribeIdCfg(cfg); + if(isAudit==1) { + Map map = cfgConvert(strRegionList,baseIpCfg.getNtcSubscribeIdCfgList(),2,entity,groupRelationList); + groupRelationList=map.get("groupList"); + strRegionList=map.get("dstList"); + } + } + //构造提交综合服务参数格式,一条配置提交一次综合服务 if(isAudit==1){ maatCfg.initDefaultValue(); @@ -1182,9 +1288,14 @@ public class AvContentCfgService extends BaseService{ * @param entity * @return */ - public BaseStringCfg getContUrlCfgById(BaseStringCfg entity) { + public BaseStringCfg getContUrlCfgById(BaseStringCfg entity) { entity.setTableName("av_cont_url_cfg"); - return avContentCfgDao.findStringCfgById(entity); + BaseStringCfg cfg = avContentCfgDao.findStringCfgById(entity); + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(cfg, subscribeIdCfg, new String[] {"cfgId","isValid"}); + List list = stringCfgDao.findSubscribeIdCfgList(subscribeIdCfg); + cfg.setNtcSubscribeIdCfgList(list); + return cfg; } @Transactional(readOnly=false,rollbackFor=RuntimeException.class) public void saveOrUpdateContUrl(BaseStringCfg entity,String areaCfgIds){ @@ -1207,6 +1318,20 @@ public class AvContentCfgService extends BaseService{ logger.info("获取编译ID出错"); throw new MaatConvertException(":"+e.getMessage()); } + + // 添加subscribeId + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + entity.setCompileId(compileIds.get(0)); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType", + "cfgKeywords","exprType", + "matchMethod","isHexbin"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } + if(compileIds != null && compileIds.size() >0 && compileIds.get(0) != 0){ entity.setCompileId(compileIds.get(0)); @@ -1273,6 +1398,23 @@ public class AvContentCfgService extends BaseService{ entity.setEditTime(editTime); entity.setTableName("av_cont_url_cfg"); avContentCfgDao.updateString(entity); + + entity.setCreateTime(new Date()); + entity.setCreatorId(entity.getCurrentUser().getId()); + // 删除SubscribeId配置再进行添加 + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, subscribeIdCfg,new String[]{"cfgId","cfgType"}); + stringCfgDao.deleteSubscribeIdCfg(subscribeIdCfg); + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType", + "cfgKeywords","exprType", + "matchMethod","isHexbin"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } } } @@ -1297,6 +1439,13 @@ public class AvContentCfgService extends BaseService{ entity.setEditorId(UserUtils.getUser().getId()); entity.setEditTime(new Date()); avContentCfgDao.updateString(entity); + // 查询域配置信息 + BaseStringCfg cfg = this.getContUrlCfgById(entity); + if(cfg.getNtcSubscribeIdCfgList() != null && cfg.getNtcSubscribeIdCfgList().size()>0) { + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(cfg, subscribeIdCfg, new String[] {"cfgId","cfgType","tableName"}); + stringCfgDao.updateSubscribeIdCfg(subscribeIdCfg); + } AreaIpCfg areaIpCfg=new AreaIpCfg(); BeanUtils.copyProperties(entity, areaIpCfg); areaIpCfgDao.updateAreaIpCfgValid(areaIpCfg); @@ -1360,6 +1509,20 @@ public class AvContentCfgService extends BaseService{ } } + // 修改审核状态 + BaseStringCfg baseStrCfg = this.getContUrlCfgById(entity); + if(!StringUtil.isEmpty(baseStrCfg.getNtcSubscribeIdCfgList())) { + NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, cfg, new String[] {"cfgId","cfgType","cfgKeywords", + "exprType","matchMethod","isHexbin"}); + stringCfgDao.updateSubscribeIdCfg(cfg); + if(isAudit==1) { + Map map = cfgConvert(strRegionList,baseStrCfg.getNtcSubscribeIdCfgList(),2,entity,groupRelationList); + groupRelationList=map.get("groupList"); + strRegionList=map.get("dstList"); + } + } + //构造提交综合服务参数格式,一条配置提交一次综合服务 if(isAudit==1){ maatCfg.initDefaultValue(); @@ -1429,9 +1592,14 @@ public class AvContentCfgService extends BaseService{ * @param entity * @return */ - public BaseStringCfg getPicUrlCfgById(BaseStringCfg entity) { + public BaseStringCfg getPicUrlCfgById(BaseStringCfg entity) { entity.setTableName("av_pic_url_cfg"); - return avContentCfgDao.findStringCfgById(entity); + BaseStringCfg cfg = avContentCfgDao.findStringCfgById(entity); + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(cfg, subscribeIdCfg, new String[] {"cfgId","isValid"}); + List list = stringCfgDao.findSubscribeIdCfgList(subscribeIdCfg); + cfg.setNtcSubscribeIdCfgList(list); + return cfg; } @Transactional(readOnly=false,rollbackFor=RuntimeException.class) public void saveOrUpdatePicUrl(BaseStringCfg entity,String areaCfgIds){ @@ -1454,6 +1622,20 @@ public class AvContentCfgService extends BaseService{ logger.info("获取编译ID出错"); throw new MaatConvertException(":"+e.getMessage()); } + + // 添加subscribeId + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + entity.setCompileId(compileIds.get(0)); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType", + "cfgKeywords","exprType", + "matchMethod","isHexbin"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } + if(compileIds != null && compileIds.size() >0 && compileIds.get(0) != 0){ entity.setCompileId(compileIds.get(0)); @@ -1520,6 +1702,23 @@ public class AvContentCfgService extends BaseService{ entity.setEditTime(editTime); entity.setTableName("av_pic_url_cfg"); avContentCfgDao.updateString(entity); + + entity.setCreateTime(new Date()); + entity.setCreatorId(entity.getCurrentUser().getId()); + // 删除SubscribeId配置再进行添加 + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, subscribeIdCfg,new String[]{"cfgId","cfgType"}); + stringCfgDao.deleteSubscribeIdCfg(subscribeIdCfg); + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType", + "cfgKeywords","exprType", + "matchMethod","isHexbin"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } } } @@ -1544,6 +1743,13 @@ public class AvContentCfgService extends BaseService{ entity.setEditorId(UserUtils.getUser().getId()); entity.setEditTime(new Date()); avContentCfgDao.updateString(entity); + // 查询域配置信息 + BaseStringCfg cfg = this.getContUrlCfgById(entity); + if(cfg.getNtcSubscribeIdCfgList() != null && cfg.getNtcSubscribeIdCfgList().size()>0) { + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(cfg, subscribeIdCfg, new String[] {"cfgId","cfgType","tableName"}); + stringCfgDao.updateSubscribeIdCfg(subscribeIdCfg); + } AreaIpCfg areaIpCfg=new AreaIpCfg(); BeanUtils.copyProperties(entity, areaIpCfg); areaIpCfgDao.updateAreaIpCfgValid(areaIpCfg); @@ -1607,6 +1813,20 @@ public class AvContentCfgService extends BaseService{ } } + // 修改审核状态 + BaseStringCfg baseStrCfg = this.getPicUrlCfgById(entity); + if(!StringUtil.isEmpty(baseStrCfg.getNtcSubscribeIdCfgList())) { + NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, cfg, new String[] {"cfgId","cfgType","cfgKeywords", + "exprType","matchMethod","isHexbin"}); + stringCfgDao.updateSubscribeIdCfg(cfg); + if(isAudit==1) { + Map map = cfgConvert(strRegionList,baseStrCfg.getNtcSubscribeIdCfgList(),2,entity,groupRelationList); + groupRelationList=map.get("groupList"); + strRegionList=map.get("dstList"); + } + } + //构造提交综合服务参数格式,一条配置提交一次综合服务 if(isAudit==1){ maatCfg.initDefaultValue(); diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 68391c110..8b3668462 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -1173,4 +1173,5 @@ visits=Visits percentage=Percentage APP_SSL=APP SSL Feature APP_IP_RANGE=APP IP RANGE -APP_DK=APP DK Feature \ No newline at end of file +APP_DK=APP DK Feature +MM_SUBSCRIBE_ID=Subscribe ID \ No newline at end of file diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index 2aeca4d0e..4e8561ca2 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -1171,3 +1171,4 @@ percentage=\u767E\u5206\u6BD4 APP_SSL=APP SSL\u7279\u5F81 APP_IP_RANGE=APP IP RANGE APP_DK=APP DK\u7279\u5F81 +MM_SUBSCRIBE_ID=\u8D26\u53F7 \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/include/form/ipInfo.jsp b/src/main/webapp/WEB-INF/include/form/ipInfo.jsp index b67163d3d..340e260ad 100644 --- a/src/main/webapp/WEB-INF/include/form/ipInfo.jsp +++ b/src/main/webapp/WEB-INF/include/form/ipInfo.jsp @@ -1,6 +1,13 @@ <%@ page contentType="text/html;charset=UTF-8"%> <%@ include file="/WEB-INF/include/taglib.jsp"%> -

+<%--

--%> + + +

+ +

+
+
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 7782e1275..53b652168 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 @@ -3,11 +3,18 @@ <spring:message code="${cfgName}"></spring:message> + - + +

@@ -53,6 +89,7 @@ $(function(){ + +
@@ -129,6 +167,53 @@ $(function(){
<%@include file="/WEB-INF/include/form/ipInfo.jsp" %> + + + + + + +

+ + +

+ + + + + + + + +
+ <%@include file="/WEB-INF/views/cfg/complexCfgForm.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 5a8197053..72e848770 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 @@ -37,6 +37,51 @@ $("#searchForm")[0].reset(); $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); }); + //异步获取voip相关信息 + $("span[id^=open]").click(function(){ + var openId=$(this).attr("id"); + var closeId=$(this).attr("id").replace("open","close"); + var index=$(this).attr("id").replace("open",""); + $("#"+openId).hide(); + $("#"+closeId).show(); + //var compileId=$(this).attr("compileId"); + var cfgId=$(this).attr("cfgId"); + if($("#"+openId).parent().parent().next("tr").hasClass("child")){ + $("#"+openId).parent().parent().next("tr").show(); + }else{ + $.ajax({ + type:'post', + async:false, + url:'${ctx}/ntc/av/ajaxAvContIpList', + data:{"cfgId":cfgId,"index":index}, + dataType:"html", + success:function(data){ + var subTab=""+ + ""+ + ""+ + ""+ + ""; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+=""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").get(0).click(); + } + }); + } + + }); + + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); var edit=function(url){ var cked = $('tbody tr td input.i-checks:checkbox:checked'); @@ -325,7 +370,10 @@ - + + + + ${cfg.compileId } ${cfg.cfgDesc } diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp index 1ab972fea..97b95f3c0 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp @@ -3,11 +3,18 @@ <spring:message code="${cfgName}"></spring:message> + @@ -149,12 +177,65 @@ $(function(){
- - + + <%-- <%@include file="/WEB-INF/include/form/complexInfo.jsp" %> - + --%> + + + + +

+ +

+ <%@include file="/WEB-INF/include/form/complexInfo.jsp" %> +
+ + + +

+ + +

+ + + + + + + + +
+ <%@include file="/WEB-INF/views/cfg/complexCfgForm.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/contUrl/contUrlList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp index 6025114ce..c53c0f49a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp @@ -35,6 +35,51 @@ $("#searchForm")[0].reset(); $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); }); + //异步获取voip相关信息 + $("span[id^=open]").click(function(){ + var openId=$(this).attr("id"); + var closeId=$(this).attr("id").replace("open","close"); + var index=$(this).attr("id").replace("open",""); + $("#"+openId).hide(); + $("#"+closeId).show(); + //var compileId=$(this).attr("compileId"); + var cfgId=$(this).attr("cfgId"); + if($("#"+openId).parent().parent().next("tr").hasClass("child")){ + $("#"+openId).parent().parent().next("tr").show(); + }else{ + $.ajax({ + type:'post', + async:false, + url:'${ctx}/ntc/av/ajaxAvContUrlList', + data:{"cfgId":cfgId,"index":index}, + dataType:"html", + success:function(data){ + var subTab=""+ + ""+ + ""+ + ""+ + ""; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+=""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").get(0).click(); + } + }); + } + + }); + + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); var edit=function(url){ var cked = $('tbody tr td input.i-checks:checkbox:checked'); @@ -316,7 +361,10 @@ - + + + + ${cfg.compileId } ${cfg.cfgDesc } 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 61fee0d1e..9650982dc 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 @@ -3,12 +3,19 @@ <spring:message code="${cfgName}"></spring:message> + - + +

@@ -54,6 +90,7 @@ $(function(){ + +
@@ -130,6 +168,51 @@ $(function(){
<%@include file="/WEB-INF/include/form/ipInfo.jsp" %> + + + + + + +

+ + +

+ + + + + + + + +
+ <%@include file="/WEB-INF/views/cfg/complexCfgForm.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/picIp/picIpList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp index 750bf4685..d4e7345b0 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp @@ -37,6 +37,51 @@ $("#searchForm")[0].reset(); $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); }); + //异步获取voip相关信息 + $("span[id^=open]").click(function(){ + var openId=$(this).attr("id"); + var closeId=$(this).attr("id").replace("open","close"); + var index=$(this).attr("id").replace("open",""); + $("#"+openId).hide(); + $("#"+closeId).show(); + //var compileId=$(this).attr("compileId"); + var cfgId=$(this).attr("cfgId"); + if($("#"+openId).parent().parent().next("tr").hasClass("child")){ + $("#"+openId).parent().parent().next("tr").show(); + }else{ + $.ajax({ + type:'post', + async:false, + url:'${ctx}/ntc/av/ajaxAvPicIpList', + data:{"cfgId":cfgId,"index":index}, + dataType:"html", + success:function(data){ + var subTab=""+ + ""+ + ""+ + ""+ + ""; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+=""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").get(0).click(); + } + }); + } + + }); + + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); var edit=function(url){ var cked = $('tbody tr td input.i-checks:checkbox:checked'); @@ -325,7 +370,10 @@ - + + + + ${cfg.compileId } ${cfg.cfgDesc } 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 index 9edc49df0..14884a22f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp @@ -3,10 +3,17 @@ <spring:message code="${cfgName}"></spring:message> + @@ -140,11 +168,57 @@ $(function(){
- - - <%@include file="/WEB-INF/include/form/complexInfo.jsp" %> - - + + + + +

+ +

+ <%@include file="/WEB-INF/include/form/complexInfo.jsp" %> +
+ + + +

+ + +

+ + + + + + + + +
+ <%@include file="/WEB-INF/views/cfg/complexCfgForm.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/picUrlList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp index cb7e33a38..16e36acbf 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp @@ -36,6 +36,51 @@ $("#searchForm")[0].reset(); $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); }); + //异步获取voip相关信息 + $("span[id^=open]").click(function(){ + var openId=$(this).attr("id"); + var closeId=$(this).attr("id").replace("open","close"); + var index=$(this).attr("id").replace("open",""); + $("#"+openId).hide(); + $("#"+closeId).show(); + //var compileId=$(this).attr("compileId"); + var cfgId=$(this).attr("cfgId"); + if($("#"+openId).parent().parent().next("tr").hasClass("child")){ + $("#"+openId).parent().parent().next("tr").show(); + }else{ + $.ajax({ + type:'post', + async:false, + url:'${ctx}/ntc/av/ajaxAvPicUrlList', + data:{"cfgId":cfgId,"index":index}, + dataType:"html", + success:function(data){ + var subTab=""+ + ""+ + ""+ + ""+ + ""; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+=""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").get(0).click(); + } + }); + } + + }); + + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); var edit=function(url){ var cked = $('tbody tr td input.i-checks:checkbox:checked'); @@ -318,7 +363,10 @@ - + + + + ${cfg.compileId } ${cfg.cfgDesc } diff --git a/src/main/webapp/WEB-INF/views/cfg/av/subList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/subList.jsp new file mode 100644 index 000000000..2c4eee0d5 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/av/subList.jsp @@ -0,0 +1,331 @@ +<%@ 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/voip/voipAccountForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountForm.jsp index 30b72f562..c85a72805 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountForm.jsp @@ -36,8 +36,13 @@ submitHandler : function(form) { var flag = true; + var subscribeId=0; + //存在隐藏的subscribeId,不算进域配置 + if($(".boxSolid.hidden").hasClass("subscribeId")){ + subscribeId=1; + } //代表所有业务都隐藏了,提示必须增加一种业务数据 - if($(".boxSolid").length ==$(".boxSolid.hidden").length){ + if(($(".boxSolid").length - 1) == ($(".boxSolid.hidden").length - subscribeId)){ top.$.jBox.tip("", ""); return; } @@ -273,7 +278,7 @@ -
+
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
@@ -289,7 +294,7 @@ -