1、voip合并,2、subscribeId新增时提交的问题
This commit is contained in:
@@ -3,7 +3,6 @@ package com.nis.web.controller.configuration.ntc;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
@@ -13,7 +12,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
@@ -22,27 +20,22 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.basics.SysDictInfo;
|
||||
import com.nis.domain.configuration.AreaBean;
|
||||
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;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.util.Configurations;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.excel.ExportExcel;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
/**
|
||||
* 处理音视频文本业务
|
||||
@@ -55,11 +48,11 @@ public class AvContentController extends BaseController {
|
||||
/*****************************voip业务***************/
|
||||
//音视频VOIP IP配置新增界面
|
||||
@RequestMapping(value = {"/voipForm"})
|
||||
@RequiresPermissions(value={"avVoipIp:config"})
|
||||
@RequiresPermissions(value={"avVoip:config"})
|
||||
public String voipFrom(Model model,HttpServletRequest request ,HttpServletResponse response
|
||||
,String compileIds,String ids, CfgIndexInfo cfg ,RedirectAttributes redirectAttributes){
|
||||
if(!StringUtil.isEmpty(compileIds)){
|
||||
cfg.setCompileId(Integer.parseInt(compileIds));
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg.setCfgId(Long.parseLong(ids));
|
||||
cfg = avContentCfgService.getCfgIndexInfo(cfg);
|
||||
initUpdateFormCondition(model, cfg);
|
||||
}else{
|
||||
@@ -70,7 +63,7 @@ public class AvContentController extends BaseController {
|
||||
return "/cfg/av/voip/voipForm";
|
||||
}
|
||||
//音视频VOIP Account配置新增界面
|
||||
@RequestMapping(value = {"/voipAccountForm"})
|
||||
/* @RequestMapping(value = {"/voipAccountForm"})
|
||||
@RequiresPermissions(value={"avVoipAccount:config"})
|
||||
public String voipAccountForm(Model model,HttpServletRequest request ,HttpServletResponse response
|
||||
,String compileIds,String ids, CfgIndexInfo cfg ,RedirectAttributes redirectAttributes){
|
||||
@@ -85,7 +78,7 @@ public class AvContentController extends BaseController {
|
||||
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/av/voip/voipAccountForm";
|
||||
}
|
||||
}*/
|
||||
|
||||
//保存voip ip信息
|
||||
@RequestMapping(value = {"/saveVoip"})
|
||||
@@ -97,18 +90,18 @@ public class AvContentController extends BaseController {
|
||||
}catch(Exception e){
|
||||
if(e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
logger.error("voip IP信息保存失败",e);
|
||||
logger.error("voip 信息保存失败",e);
|
||||
addMessage(redirectAttributes,"request_service_failed");
|
||||
}else {
|
||||
e.printStackTrace();
|
||||
logger.error("voip IP信息保存失败",e);
|
||||
logger.error("voip 信息保存失败",e);
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
//保存voip Account信息
|
||||
@RequestMapping(value = {"/saveAccountVoip"})
|
||||
/* @RequestMapping(value = {"/saveAccountVoip"})
|
||||
public String saveAccountVoip(Model model,HttpServletRequest request,HttpServletResponse response,String ids,
|
||||
CfgIndexInfo cfg ,RedirectAttributes redirectAttributes){
|
||||
try{
|
||||
@@ -126,12 +119,10 @@ public class AvContentController extends BaseController {
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/av/voipAccountList?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
//视频文本VOIP IP配置列表
|
||||
}*/
|
||||
//视频文本VOIP 配置列表
|
||||
@RequestMapping(value = {"/voipList"})
|
||||
public String voipCfgList(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response
|
||||
,@ModelAttribute("cfg")CfgIndexInfo entity
|
||||
public String voipCfgList(Model model,HttpServletRequest request ,HttpServletResponse response ,@ModelAttribute("cfg")CfgIndexInfo entity
|
||||
,RedirectAttributes redirectAttributes){
|
||||
if(entity.getVoipIp()== null){
|
||||
entity.setVoipIp(new AvVoipIpCfg());
|
||||
@@ -148,7 +139,7 @@ public class AvContentController extends BaseController {
|
||||
return "/cfg/av/voip/voipList";
|
||||
}
|
||||
//视频文本VOIP Account配置列表
|
||||
@RequestMapping(value = {"/voipAccountList"})
|
||||
/* @RequestMapping(value = {"/voipAccountList"})
|
||||
public String voipCfgAccountList(Model model,HttpServletRequest request ,HttpServletResponse response
|
||||
,@ModelAttribute("cfg")CfgIndexInfo entity ,RedirectAttributes redirectAttributes){
|
||||
if(entity.getVoipAccount()== null){
|
||||
@@ -161,12 +152,12 @@ public class AvContentController extends BaseController {
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model,entity);
|
||||
return "/cfg/av/voip/voipAccountList";
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
//修改VOIP IP配置状态
|
||||
@RequestMapping(value = {"/updateAvVoipValid"})
|
||||
@RequiresPermissions(value={"avVoipIp:config"})
|
||||
@RequiresPermissions(value={"avVoip:config"})
|
||||
public String updateVoipValid(Integer isAudit,String compileIds,Integer isValid,String ids,Integer functionId
|
||||
,RedirectAttributes redirectAttributes
|
||||
) {
|
||||
@@ -175,18 +166,18 @@ public class AvContentController extends BaseController {
|
||||
} catch (Exception e) {
|
||||
if(e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
logger.error("voip IP信息审核失败",e);
|
||||
logger.error("voip 信息审核失败",e);
|
||||
addMessage(redirectAttributes,"request_service_failed");
|
||||
}else {
|
||||
e.printStackTrace();
|
||||
logger.error("voip IP信息审核失败",e);
|
||||
logger.error("voip 信息审核失败",e);
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+functionId;
|
||||
}
|
||||
//修改VOIP account配置状态
|
||||
@RequestMapping(value = {"/updateAvVoipAccountValid"})
|
||||
/* @RequestMapping(value = {"/updateAvVoipAccountValid"})
|
||||
@RequiresPermissions(value={"avVoipAccount:config"})
|
||||
public String updateVoipAccountValid(Integer isAudit,String compileIds,Integer isValid,String ids,Integer functionId
|
||||
,RedirectAttributes redirectAttributes
|
||||
@@ -205,15 +196,13 @@ public class AvContentController extends BaseController {
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/av/voipAccountList?functionId="+functionId;
|
||||
}
|
||||
}*/
|
||||
//修改VOIP IP配置审核状态
|
||||
@RequestMapping(value = {"/auditAvVoip"})
|
||||
@RequiresPermissions(value={"avVoipIp:confirm"})
|
||||
public String auditVoip(Integer isAudit,Integer isValid,String ids
|
||||
,String compileIds,Integer functionId
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
if(!StringUtil.isEmpty(compileIds)){
|
||||
String[] idArray = compileIds.split(",");
|
||||
@RequiresPermissions(value={"avVoip:confirm"})
|
||||
public String auditVoip(Integer isAudit,Integer isValid,String ids ,String compileIds,Integer functionId ,RedirectAttributes redirectAttributes) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
Date auditTime=new Date();
|
||||
for(String id :idArray){
|
||||
try {
|
||||
@@ -221,7 +210,7 @@ public class AvContentController extends BaseController {
|
||||
} catch (MaatConvertException e) {
|
||||
if(e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
logger.info("VOIP配置下发失败:"+e.getMessage());;
|
||||
logger.error("VOIP配置下发失败:"+e.getMessage());;
|
||||
addMessage(redirectAttributes,"request_service_failed");
|
||||
}else {
|
||||
e.printStackTrace();
|
||||
@@ -236,7 +225,7 @@ public class AvContentController extends BaseController {
|
||||
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+functionId;
|
||||
}
|
||||
//修改VOIP IP配置审核状态
|
||||
@RequestMapping(value = {"/auditAvVoipAccount"})
|
||||
/* @RequestMapping(value = {"/auditAvVoipAccount"})
|
||||
@RequiresPermissions(value={"avVoipAccount:confirm"})
|
||||
public String auditVoipAccount(Integer isAudit,Integer isValid,String ids
|
||||
,String compileIds,Integer functionId
|
||||
@@ -262,14 +251,14 @@ public class AvContentController extends BaseController {
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/av/voipAccountList?functionId="+functionId;
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 账号account
|
||||
* 根据索引表信息异步获取子表信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
/*@ResponseBody
|
||||
@RequestMapping(value = "ajaxVoipAccountInfo")
|
||||
public Map getVoipAccountInfo(CfgIndexInfo cfgIndexInfo) {
|
||||
Map<String, Object> voipAndAccountInfoMap=new HashMap<String, Object>();
|
||||
@@ -282,25 +271,50 @@ public class AvContentController extends BaseController {
|
||||
voipAndAccountInfoMap.put("account", voipAccountCfgList);
|
||||
voipAndAccountInfoMap.put("subscribe", ntcSubscribeIdCfgList);
|
||||
return voipAndAccountInfoMap;
|
||||
}
|
||||
}*/
|
||||
/**
|
||||
* 根据索引表信息异步获取子表信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "ajaxVoipIpInfo")
|
||||
public Map getVoipIpInfo(CfgIndexInfo cfgIndexInfo) {
|
||||
Map<String, Object> voipAndAccountInfoMap=new HashMap<String, Object>();
|
||||
@RequestMapping(value = {"/ajaxVoipIpInfo"})
|
||||
public String getVoipIpInfo(Model model,Long cfgId,Integer index) {
|
||||
CfgIndexInfo cfgIndexInfo = new CfgIndexInfo();
|
||||
cfgIndexInfo.setCfgId(cfgId);
|
||||
CfgIndexInfo cfg = avContentCfgService.getCfgIndexInfo(cfgIndexInfo);
|
||||
List<String[]> tabList = new ArrayList();
|
||||
//获取voipIpCfg信息
|
||||
List<AvVoipIpCfg> voipIpCfgList=new ArrayList<AvVoipIpCfg>();
|
||||
List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList=new ArrayList<NtcSubscribeIdCfg>();
|
||||
|
||||
voipIpCfgList = avContentCfgService.getVoipIpCfgList(cfgIndexInfo);
|
||||
ntcSubscribeIdCfgList=avContentCfgService.getSubscribeIdCfgList(cfgIndexInfo);
|
||||
|
||||
voipAndAccountInfoMap.put("ip", voipIpCfgList);
|
||||
voipAndAccountInfoMap.put("subscribe", ntcSubscribeIdCfgList);
|
||||
return voipAndAccountInfoMap;
|
||||
if(cfg.getVoipIps()!=null){
|
||||
String cfgType = null;
|
||||
for(AvVoipIpCfg ip:cfg.getVoipIps()){
|
||||
if(!ip.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"1",ip.getCfgType()});
|
||||
cfgType = ip.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(cfg.getVoipAccounts()!=null){
|
||||
String cfgType = null;
|
||||
for(AvVoipAccountCfg account:cfg.getVoipAccounts()){
|
||||
if(account!=null&&!account.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"2",account.getCfgType()});
|
||||
cfgType = account.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
//查询关键字
|
||||
if(cfg.getNtcSubscribeIdCfgList()!=null){
|
||||
String cfgType = null;
|
||||
for(NtcSubscribeIdCfg ntc:cfg.getNtcSubscribeIdCfgList()){
|
||||
if(!ntc.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"2",ntc.getCfgType()});
|
||||
cfgType = ntc.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/av/voip/voipSubList";
|
||||
}
|
||||
/*****************************voip业务***************/
|
||||
|
||||
|
||||
@@ -78,13 +78,13 @@ public class AvContentCfgService extends BaseService{
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<CfgIndexInfo> findAccountPage(Page<CfgIndexInfo> page, CfgIndexInfo entity) {
|
||||
/*public Page<CfgIndexInfo> findAccountPage(Page<CfgIndexInfo> page, CfgIndexInfo entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<CfgIndexInfo> list=avContentCfgDao.findAccountList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
}*/
|
||||
/**
|
||||
* 根据索引表信息获取voipIpCfg信息
|
||||
* @param entity
|
||||
@@ -116,20 +116,16 @@ public class AvContentCfgService extends BaseService{
|
||||
*/
|
||||
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity) {
|
||||
CfgIndexInfo cfg=avContentCfgDao.getCfgIndexInfo(entity);
|
||||
List<NtcSubscribeIdCfg> ntcSubscribeList=getSubscribeIdCfgList(entity);
|
||||
if(ntcSubscribeList ==null || ntcSubscribeList.size() <=0){
|
||||
ntcSubscribeList.add(new NtcSubscribeIdCfg());
|
||||
}
|
||||
List<AvVoipIpCfg> voipIps=getVoipIpCfgList(entity);
|
||||
if(voipIps ==null || voipIps.size() <=0){
|
||||
voipIps.add(new AvVoipIpCfg());
|
||||
}
|
||||
List<NtcSubscribeIdCfg> ntcSubscribeList=getSubscribeIdCfgList(cfg);
|
||||
List<AvVoipIpCfg> voipIps=getVoipIpCfgList(cfg);
|
||||
List<AvVoipAccountCfg> voipAccounts=getVoipAccountCfgList(cfg);
|
||||
cfg.setNtcSubscribeIdCfgList(ntcSubscribeList);
|
||||
cfg.setVoipIps(voipIps);
|
||||
cfg.setVoipAccounts(voipAccounts);
|
||||
|
||||
return cfg;
|
||||
}
|
||||
public CfgIndexInfo getCfgIndexInfo2(CfgIndexInfo entity) {
|
||||
/* public CfgIndexInfo getCfgIndexInfo2(CfgIndexInfo entity) {
|
||||
CfgIndexInfo cfg=avContentCfgDao.getCfgIndexInfo(entity);
|
||||
List<AvVoipAccountCfg> voipAccounts=new ArrayList<>();
|
||||
voipAccounts=getVoipAccountCfgList(entity);
|
||||
@@ -145,7 +141,7 @@ public class AvContentCfgService extends BaseService{
|
||||
cfg.setNtcSubscribeIdCfgList(ntcSubscribeList);
|
||||
|
||||
return cfg;
|
||||
}
|
||||
}*/
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdateAvVoip(CfgIndexInfo entity){
|
||||
@@ -178,6 +174,12 @@ public class AvContentCfgService extends BaseService{
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getVoipAccounts()!=null&&entity.getVoipAccounts().size()>0){
|
||||
for(AvVoipAccountCfg voipAccount : entity.getVoipAccounts()){
|
||||
entity.setVoipAccount(voipAccount);
|
||||
avContentCfgDao.insertAvVoipAccountCfg(entity);
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
@@ -199,6 +201,7 @@ public class AvContentCfgService extends BaseService{
|
||||
//无效子配置后,再新增子配置
|
||||
avContentCfgDao.deleteAvVoipIp(entity);
|
||||
stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity);
|
||||
avContentCfgDao.deleteAvVoipAccountCfg(entity);
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
area.setCompileId(entity.getCompileId());
|
||||
area.setFunctionId(entity.getFunctionId());
|
||||
@@ -219,6 +222,12 @@ public class AvContentCfgService extends BaseService{
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getVoipAccounts()!=null&&entity.getVoipAccounts().size()>0){
|
||||
for (AvVoipAccountCfg voipAccount : entity.getVoipAccounts()) {
|
||||
entity.setVoipAccount(voipAccount);
|
||||
avContentCfgDao.insertAvVoipAccountCfg(entity);
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
@@ -230,7 +239,7 @@ public class AvContentCfgService extends BaseService{
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
/*@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdateAvVoipAccount(CfgIndexInfo entity){
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
@@ -311,7 +320,7 @@ public class AvContentCfgService extends BaseService{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
/**
|
||||
@@ -333,6 +342,7 @@ public class AvContentCfgService extends BaseService{
|
||||
entity.setEditTime(new Date());
|
||||
avContentCfgDao.updateAvVoipIp(entity);
|
||||
avContentCfgDao.updateAvVoipKeywordCfgt(entity);
|
||||
avContentCfgDao.updateAvVoipAccount(entity);
|
||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, areaIpCfg);
|
||||
@@ -345,7 +355,7 @@ public class AvContentCfgService extends BaseService{
|
||||
* @param isValid
|
||||
* @param ids compileIds
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
/* @Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void updateAvVoipAccountValid(Integer isAudit,Integer isValid,String compileIds,Integer functionId){
|
||||
String[] idArray = compileIds.split(",");
|
||||
for(String id :idArray){
|
||||
@@ -363,7 +373,7 @@ public class AvContentCfgService extends BaseService{
|
||||
BeanUtils.copyProperties(entity, areaIpCfg);
|
||||
areaIpCfgDao.updateAreaIpCfgValid(areaIpCfg);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
@@ -372,16 +382,17 @@ public class AvContentCfgService extends BaseService{
|
||||
* @param functionId
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditAvVoip(Integer isAudit,Integer isValid,Integer functionId,String compileId,Date auditTime){
|
||||
public void auditAvVoip(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
|
||||
List<CfgIndexInfo> list = new ArrayList();
|
||||
List<AvVoipIpCfg> voipIpList = new ArrayList();
|
||||
List <NtcSubscribeIdCfg> ntcList = new ArrayList();
|
||||
List<AvVoipAccountCfg> accountList = new ArrayList();
|
||||
List<AreaIpCfg> areaIpCfgList = new ArrayList();
|
||||
|
||||
CfgIndexInfo searchCfg=new CfgIndexInfo();
|
||||
searchCfg.setCompileId(Integer.parseInt(compileId));
|
||||
searchCfg.setCfgId(Long.parseLong(id));
|
||||
|
||||
entity = avContentCfgDao.getCfgIndexInfo(searchCfg);
|
||||
entity.setIsAudit(isAudit);
|
||||
@@ -390,6 +401,7 @@ public class AvContentCfgService extends BaseService{
|
||||
entity.setAuditTime(auditTime);
|
||||
|
||||
avContentCfgDao.updateAvVoipIp(entity);
|
||||
avContentCfgDao.updateAvVoipAccount(entity);
|
||||
avContentCfgDao.updateAvVoipKeywordCfgt(entity);
|
||||
|
||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||
@@ -398,6 +410,7 @@ public class AvContentCfgService extends BaseService{
|
||||
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
||||
|
||||
voipIpList=avContentCfgDao.findVoipIpCfgList(entity);
|
||||
accountList=avContentCfgDao.findVoipAccountCfgList(entity);
|
||||
ntcList=stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
|
||||
areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||
|
||||
@@ -423,6 +436,11 @@ public class AvContentCfgService extends BaseService{
|
||||
groupRelationList=ntcMap.get("groupList");
|
||||
strRegionList=ntcMap.get("dstList");
|
||||
}
|
||||
if(!StringUtil.isEmpty(accountList)){
|
||||
Map<String,List> accountMap = cfgConvert(strRegionList,accountList,2,entity,groupRelationList);
|
||||
groupRelationList=accountMap.get("groupList");
|
||||
strRegionList=accountMap.get("dstList");
|
||||
}
|
||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||
Map<String,List> areaMap = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
|
||||
groupRelationList=areaMap.get("groupList");
|
||||
@@ -452,10 +470,10 @@ public class AvContentCfgService extends BaseService{
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("voip IP配置下发配置参数:"+json);
|
||||
logger.info("voip 配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
logger.info("voip IP配置下发响应信息:"+result.getMsg());
|
||||
logger.info("voip 配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
@@ -469,15 +487,15 @@ public class AvContentCfgService extends BaseService{
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("voip IP配置下发配置参数:"+json);
|
||||
logger.info("voip 配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||
logger.info("voip IP配置取消配置响应信息:"+result.getMsg());
|
||||
logger.info("voip 配置取消配置响应信息:"+result.getMsg());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/********************************voip业务*********************************/
|
||||
/********************************voip account业务*********************************/
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
@@ -485,7 +503,7 @@ public class AvContentCfgService extends BaseService{
|
||||
* @param ids 编译Id
|
||||
* @param functionId
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
/* @Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditAvVoipAccount(Integer isAudit,Integer isValid,Integer functionId,String compileId,Date auditTime){
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
|
||||
@@ -591,7 +609,7 @@ public class AvContentCfgService extends BaseService{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}*/
|
||||
/********************************voip业务*********************************/
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user