voip 区域信息增加,voipAccount修改为字符串类型配置
区域信息单选切换移至common.js
This commit is contained in:
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AvContIpCfg;
|
||||
import com.nis.domain.configuration.AvVoipAccountCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.AvVoipIpCfg;
|
||||
@@ -36,6 +37,7 @@ public class AvContentController extends BaseController {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg.setCompileId(Integer.parseInt(ids));
|
||||
cfg = avContentCfgService.getCfgIndexInfo(cfg);
|
||||
initUpdateFormCondition(model, cfg);
|
||||
}else{
|
||||
List<AvVoipAccountCfg> avVoipAccountCfgs=new ArrayList<AvVoipAccountCfg>();
|
||||
avVoipAccountCfgs.add(new AvVoipAccountCfg());
|
||||
@@ -43,9 +45,9 @@ public class AvContentController extends BaseController {
|
||||
List<AvVoipIpCfg> avVoipIpCfgs=new ArrayList<AvVoipIpCfg>();
|
||||
avVoipIpCfgs.add(new AvVoipIpCfg());
|
||||
cfg.setVoipIps(avVoipIpCfgs);
|
||||
initFormCondition(model,cfg);
|
||||
}
|
||||
|
||||
initFormCondition(model,cfg);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/av/voip/voipForm";
|
||||
}
|
||||
@@ -55,10 +57,11 @@ public class AvContentController extends BaseController {
|
||||
@RequestMapping(value = {"/saveVoip"})
|
||||
public String saveVoip(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")CfgIndexInfo cfg,
|
||||
@ModelAttribute("areaCfgIds")String areaCfgIds,
|
||||
@ModelAttribute("voipIpIds")String voipIpIds,
|
||||
@ModelAttribute("voipAccountIds")String voipAccountIds){
|
||||
try{
|
||||
avContentCfgService.saveOrUpdateAvVoip(cfg,voipIpIds,voipAccountIds);
|
||||
avContentCfgService.saveOrUpdateAvVoip(cfg,voipIpIds,voipAccountIds,areaCfgIds);
|
||||
addMessage(model,"save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("voip信息保存失败",e);
|
||||
@@ -117,18 +120,37 @@ public class AvContentController extends BaseController {
|
||||
}
|
||||
|
||||
//视频文本内容配置列表
|
||||
@RequestMapping(value = {"/contIpList"})
|
||||
public String contIpList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo entity){
|
||||
if(entity.getVoipIp()== null){
|
||||
entity.setVoipIp(new AvVoipIpCfg());
|
||||
}
|
||||
if(entity.getVoipAccount()== null){
|
||||
entity.setVoipAccount(new AvVoipAccountCfg());
|
||||
}
|
||||
Page<CfgIndexInfo> page = avContentCfgService.findPage(new Page<CfgIndexInfo>(request, response,"r"), entity);
|
||||
@RequestMapping(value = {"/contentIpList"})
|
||||
public String contIpList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")AvContIpCfg entity){
|
||||
Page<AvContIpCfg> page = avContentCfgService.findContIpPage(new Page<AvContIpCfg>(request, response,"r"), entity);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model);
|
||||
return "/cfg/av/voip/voipList";
|
||||
return "/cfg/av/contIp/contIpList";
|
||||
}
|
||||
//音视频文本内容新增界面
|
||||
@RequestMapping(value = {"/contentIpForm"})
|
||||
public String contIpForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")AvContIpCfg cfg){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg = avContentCfgService.getContIpCfgById(cfg);
|
||||
}
|
||||
initFormCondition(model,cfg);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/av/contIp/contIpForm";
|
||||
}
|
||||
|
||||
//保存voip信息
|
||||
@RequestMapping(value = {"/saveContIp"})
|
||||
public String saveContIp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")AvContIpCfg cfg){
|
||||
try{
|
||||
avContentCfgService.saveOrUpdateAvContIp(cfg);
|
||||
addMessage(model,"save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(model,"save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/ntc/av/contentIpList?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user