Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: AvVoipAccountCfg.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月6日 上午8:18:55
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AvVoipAccountCfg extends ComplexkeywordCfg{
|
||||
|
||||
|
||||
private static final long serialVersionUID = -7398698517584394431L;
|
||||
|
||||
}
|
||||
19
src/main/java/com/nis/domain/configuration/AvVoipIpCfg.java
Normal file
19
src/main/java/com/nis/domain/configuration/AvVoipIpCfg.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: AvVoipIpCfg.java
|
||||
* @Description: 音视频VOIP
|
||||
* @author (dell)
|
||||
* @date 2018年2月6日 上午8:29:26
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AvVoipIpCfg extends BaseIpCfg {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -942354218504312548L;
|
||||
|
||||
|
||||
|
||||
}
|
||||
60
src/main/java/com/nis/domain/configuration/CfgIndexInfo.java
Normal file
60
src/main/java/com/nis/domain/configuration/CfgIndexInfo.java
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
*@Title: CfgIndexInfo.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description 索引公共表
|
||||
*@author dell
|
||||
*@date 2018年5月17日 下午16:59:17
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName: CfgIndexInfo.java
|
||||
* @author (dell)
|
||||
* @date 2018年5月17日 下午16:59:17
|
||||
* @version V1.0
|
||||
*/
|
||||
public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 2796500715438264119L;
|
||||
|
||||
private List<AvVoipAccountCfg> voipAccounts;//Add表单使用
|
||||
private List<AvVoipIpCfg> voipIps; //Add表单使用
|
||||
private AvVoipAccountCfg voipAccount;//Search使用
|
||||
private AvVoipIpCfg voipIp;//Search使用
|
||||
|
||||
|
||||
public AvVoipAccountCfg getVoipAccount() {
|
||||
return voipAccount;
|
||||
}
|
||||
public void setVoipAccount(AvVoipAccountCfg voipAccount) {
|
||||
this.voipAccount = voipAccount;
|
||||
}
|
||||
public List<AvVoipAccountCfg> getVoipAccounts() {
|
||||
return voipAccounts;
|
||||
}
|
||||
public void setVoipAccounts(List<AvVoipAccountCfg> voipAccounts) {
|
||||
this.voipAccounts = voipAccounts;
|
||||
}
|
||||
public AvVoipIpCfg getVoipIp() {
|
||||
return voipIp;
|
||||
}
|
||||
public void setVoipIp(AvVoipIpCfg voipIp) {
|
||||
this.voipIp = voipIp;
|
||||
}
|
||||
public void setVoipIps(List<AvVoipIpCfg> voipIps) {
|
||||
this.voipIps = voipIps;
|
||||
}
|
||||
public List<AvVoipIpCfg> getVoipIps() {
|
||||
return voipIps;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class ComplexkeywordCfg extends BaseCfg<ComplexkeywordCfg>{
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("keywords")
|
||||
protected String keywords;
|
||||
protected String cfgKeywords;
|
||||
protected String keywordsShowName;
|
||||
/**
|
||||
* 表达式类型
|
||||
@@ -72,19 +72,11 @@ public class ComplexkeywordCfg extends BaseCfg<ComplexkeywordCfg>{
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
/**
|
||||
* keywords
|
||||
* @return keywords
|
||||
*/
|
||||
|
||||
public String getKeywords() {
|
||||
return keywords;
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
/**
|
||||
* @param keywords the keywords to set
|
||||
*/
|
||||
public void setKeywords(String keywords) {
|
||||
this.keywords = keywords;
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
/**
|
||||
* exprType
|
||||
|
||||
@@ -48,6 +48,7 @@ import com.nis.web.service.basics.ServiceDictInfoService;
|
||||
import com.nis.web.service.basics.SysDictInfoService;
|
||||
import com.nis.web.service.configuration.AppCfgService;
|
||||
import com.nis.web.service.configuration.AvCfgService;
|
||||
import com.nis.web.service.configuration.AvContentCfgService;
|
||||
import com.nis.web.service.configuration.ComplexStringCfgService;
|
||||
import com.nis.web.service.configuration.DnsIpCfgService;
|
||||
import com.nis.web.service.configuration.FtpCfgService;
|
||||
@@ -146,6 +147,8 @@ public class BaseController {
|
||||
protected SpecificServiceHostCfgService specificServiceHostCfgService;
|
||||
@Autowired
|
||||
protected AvCfgService avCfgService;
|
||||
@Autowired
|
||||
protected AvContentCfgService avContentCfgService;
|
||||
/**
|
||||
* 管理基础路径
|
||||
*/
|
||||
@@ -157,7 +160,6 @@ public class BaseController {
|
||||
*/
|
||||
@Value("${frontPath}")
|
||||
protected String frontPath;
|
||||
|
||||
/**
|
||||
* 前端URL后缀
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.nis.web.controller.configuration.ntc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AvVoipAccountCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.AvVoipIpCfg;
|
||||
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
/**
|
||||
* 处理音视频文本业务
|
||||
* @author ddm
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/ntc/av")
|
||||
public class AvContentController extends BaseController {
|
||||
|
||||
|
||||
//音视频VOIP配置新增界面
|
||||
@RequestMapping(value = {"/voipForm"})
|
||||
public String voipFrom(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
entity.setCfgId(Long.parseLong(ids));
|
||||
entity = avContentCfgService.getCfgIndexInfo(entity);
|
||||
}else{
|
||||
List<AvVoipAccountCfg> avVoipAccountCfgs=new ArrayList<AvVoipAccountCfg>();
|
||||
avVoipAccountCfgs.add(new AvVoipAccountCfg());
|
||||
entity.setVoipAccounts(avVoipAccountCfgs);
|
||||
List<AvVoipIpCfg> avVoipIpCfgs=new ArrayList<AvVoipIpCfg>();
|
||||
avVoipIpCfgs.add(new AvVoipIpCfg());
|
||||
entity.setVoipIps(avVoipIpCfgs);
|
||||
}
|
||||
|
||||
initFormCondition(model,entity);
|
||||
model.addAttribute("_cfg", entity);
|
||||
return "/cfg/av/voip/voipForm";
|
||||
}
|
||||
//视频文本VOIP配置列表
|
||||
@RequestMapping(value = {"/voipList"})
|
||||
public String voipCfgList(@ModelAttribute("cfg")CfgIndexInfo entity,Model model,HttpServletRequest request,HttpServletResponse response){
|
||||
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,"a"), entity);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model);
|
||||
return "/cfg/av/voip/voipList";
|
||||
}
|
||||
|
||||
|
||||
//修改VOIP例配置状态
|
||||
@RequestMapping(value = {"/updateAvVoip"})
|
||||
public String updateVoipValid(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
//avCfgService.updateAvFileSampleValid(isAudit,isValid,ids);
|
||||
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+functionId;
|
||||
}
|
||||
//修改VOIP配置审核状态
|
||||
@RequestMapping(value = {"/auditAvVoip"})
|
||||
public String auditVoip(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
//avContentCfgService.auditAvVoip(isAudit,isValid,ids);
|
||||
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+functionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据索引表信息异步获取子表信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "ajaxVoipAndAccountInfo")
|
||||
public Map getVoipAndAccountInfo(CfgIndexInfo cfgIndexInfo) {
|
||||
Map<String, Object> voipAndAccountInfoMap=new HashMap<String, Object>();
|
||||
//获取voipIpCfg信息
|
||||
List<AvVoipIpCfg> voipIpCfgList=new ArrayList<AvVoipIpCfg>();
|
||||
List<AvVoipAccountCfg> voipAccountCfgList=new ArrayList<AvVoipAccountCfg>();
|
||||
voipIpCfgList = avContentCfgService.getVoipIpCfgList(cfgIndexInfo);
|
||||
voipAccountCfgList = avContentCfgService.getVoipAccountCfgList(cfgIndexInfo);
|
||||
voipAndAccountInfoMap.put("ip", voipIpCfgList);
|
||||
voipAndAccountInfoMap.put("account", voipAccountCfgList);
|
||||
return voipAndAccountInfoMap;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
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.CfgIndexInfo;
|
||||
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 extends CrudDao<BaseIpCfg>{
|
||||
public List<CfgIndexInfo> findVoipList(@Param("cfg")CfgIndexInfo entity) ;
|
||||
public List<AvVoipIpCfg> findVoipIpCfgList(@Param("cfg")CfgIndexInfo entity);
|
||||
public List<AvVoipAccountCfg> findVoipAccountCfgList(@Param("cfg")CfgIndexInfo entity);
|
||||
public CfgIndexInfo getCfgIndexInfo(@Param("cfg")CfgIndexInfo entity);
|
||||
}
|
||||
275
src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml
Normal file
275
src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml
Normal file
@@ -0,0 +1,275 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.AvContentCfgDao" >
|
||||
|
||||
<resultMap id="CfgIndexInfoMap" type="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="AvVoipIpCfgMap" type="com.nis.domain.configuration.AvVoipIpCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
|
||||
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
||||
<result column="direction" property="direction" jdbcType="INTEGER" />
|
||||
<result column="protocol" property="protocol" jdbcType="INTEGER" />
|
||||
<result column="protocol_id" property="protocolId" jdbcType="INTEGER" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="AvVoipAccountCfgMap" type="com.nis.domain.configuration.AvVoipAccountCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="district" property="district" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="AvVoip_Column" >
|
||||
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id
|
||||
</sql>
|
||||
<sql id="AvVoipIp_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||
a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable
|
||||
,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
<sql id="AvVoipAccount_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.district,a.cfg_keywords,a.cfg_type,
|
||||
a.action,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id,a.edit_time, a.auditor_id,
|
||||
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
<select id="findVoipList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
SELECT
|
||||
<include refid="AvVoip_Column" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM cfg_index_info a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfg.page !=null and cfg.page.where != null and cfg.page.where != ''">
|
||||
AND ${cfg.page.where}
|
||||
</if>
|
||||
<if test="cfg.cfgId != null">
|
||||
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''">
|
||||
AND a.CFG_DESC like concat(concat('%',#{cfg.cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfg.action != null">
|
||||
AND a.ACTION=#{cfg.action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfg.isValid != null">
|
||||
AND a.IS_VALID=#{cfg.isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfg.isValid == null">
|
||||
AND a.IS_VALID != -1
|
||||
</if>
|
||||
<if test="cfg.isAudit != null">
|
||||
AND a.IS_AUDIT=#{cfg.isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfg.creatorName != null and cfg.creatorName != ''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{cfg.creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- <if test="cfg.search_create_time_start != null and cfg.search_create_time_start != ''">
|
||||
<![CDATA[AND a.CREATE_TIME >= #{cfg.search_create_time_start,jdbcType=TIMESTAMP}]]>
|
||||
</if>
|
||||
<if test="cfg.search_create_time_end != null and cfg.search_create_time_end != ''">
|
||||
<![CDATA[AND a.CREATE_TIME <= #{cfg.search_create_time_end,jdbcType=TIMESTAMP}]]>
|
||||
</if> -->
|
||||
<if test="cfg.editorName != null and cfg.editorName != ''">
|
||||
AND EDITOR_NAME like concat(concat('%',#{cfg.editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- <if test="cfg.search_edit_time_start != null and cfg.search_edit_time_start != ''">
|
||||
<![CDATA[AND a.EDIT_TIME >= #{cfg.search_edit_time_start,jdbcType=TIMESTAMP}]]>
|
||||
</if>
|
||||
<if test="cfg.search_edit_time_end != null and cfg.search_edit_time_end != ''">
|
||||
<![CDATA[AND a.EDIT_TIME <= #{cfg.search_edit_time_end,jdbcType=TIMESTAMP}]]>
|
||||
</if> -->
|
||||
<if test="cfg.auditorName != null and cfg.auditorName != ''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{cfg.auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- <if test="cfg.search_audit_time_start != null and cfg.search_audit_time_start != ''">
|
||||
<![CDATA[AND a.AUDIT_TIME >= #{cfg.search_audit_time_start,jdbcType=TIMESTAMP}]]>
|
||||
</if>
|
||||
<if test="cfg.search_audit_time_end != null and cfg.search_audit_time_end != ''">
|
||||
<![CDATA[AND a.AUDIT_TIME <= #{cfg.search_audit_time_end,jdbcType=TIMESTAMP}]]>
|
||||
</if> -->
|
||||
<if test="cfg.serviceId != null">
|
||||
AND a.SERVICE_ID=#{cfg.serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfg.requestId != null">
|
||||
AND a.REQUEST_ID=#{cfg.requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfg.compileId != null">
|
||||
AND a.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfg.isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{cfg.isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfg.classify != null and cfg.classify != ''">
|
||||
AND a.classify like concat(concat('%',#{cfg.classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfg.attribute != null and cfg.attribute != ''">
|
||||
AND a.attribute like concat(concat('%',#{cfg.attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfg.lable != null and cfg.lable != ''">
|
||||
AND a.lable like concat(concat('%',#{cfg.lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfg.areaEffectiveIds != null and cfg.areaEffectiveIds != ''">
|
||||
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{cfg.areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfg.functionId != null">
|
||||
AND a.function_id=#{cfg.functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="(cfg.voipIp.srcIpAddress != null and (cfg.voipIp.srcIpAddress != '') or cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != '')">
|
||||
AND a.compile_id = (select t.compile_id from av_voip_ip_cfg t
|
||||
<where>
|
||||
<if test="cfg.voipIp.ipAddress != null and cfg.voipIp.ipAddress != ''">
|
||||
and t.src_ip_address =#{(cfg.voipIp.srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != ''">
|
||||
and t.src_port =#{cfg.voipIp.srcPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="(cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != '') or (cfg.voipAccount.district != null and cfg.voipAccount.district != '') ">
|
||||
AND a.compile_id = (select f.compile_id from av_voip_account_cfg f
|
||||
<where>
|
||||
<if test="cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != ''">
|
||||
and f.cfg_keywords like concat(concat('%',#{cfg.voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfg.voipAccount.district != null and cfg.voipAccount.district != ''">
|
||||
and f.district =#{cfg.voipAccount.district,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
|
||||
<!-- 数据范围过滤 -->
|
||||
${cfg.sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="cfg.page !=null and cfg.page.orderBy != null and cfg.page.orderBy != ''">
|
||||
ORDER BY ${cfg.page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="findVoipIpCfgList" resultMap="AvVoipIpCfgMap">
|
||||
select
|
||||
<include refid="AvVoipIp_Column" />
|
||||
from av_voip_ip_cfg a
|
||||
<where>
|
||||
<if test="cfg.compileId != null">
|
||||
and a.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findVoipAccountCfgList" resultMap="AvVoipAccountCfgMap">
|
||||
select
|
||||
<include refid="AvVoipAccount_Column" />
|
||||
from av_voip_account_cfg a
|
||||
<where>
|
||||
<if test="cfg.compileId != null">
|
||||
and a.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="getCfgIndexInfo" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
*
|
||||
FROM cfg_index_info a
|
||||
<where>
|
||||
<if test="cfg.cfgId != null">
|
||||
and a.CFG_ID=#{cfg.cfgId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<!-- <if test="cfg.compileId != null">
|
||||
and a.compileId=#{cfg.compileId,jdbcType=INTEGER}
|
||||
</if> -->
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AvFileSampleCfg;
|
||||
import com.nis.domain.configuration.AvVoipAccountCfg;
|
||||
import com.nis.domain.configuration.AvVoipIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.web.dao.FunctionRegionDictDao;
|
||||
import com.nis.web.dao.FunctionServiceDictDao;
|
||||
import com.nis.web.dao.configuration.AvCfgDao;
|
||||
import com.nis.web.dao.configuration.AvContentCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
|
||||
/**
|
||||
* 音视频文本
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class AvContentCfgService extends BaseService{
|
||||
@Autowired
|
||||
protected AvContentCfgDao avContentCfgDao;
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<CfgIndexInfo> findPage(Page<CfgIndexInfo> page, CfgIndexInfo entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
List<CfgIndexInfo> list=avContentCfgDao.findVoipList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 根据索引表信息获取voipIpCfg信息
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public List<AvVoipIpCfg> getVoipIpCfgList(CfgIndexInfo entity) {
|
||||
return avContentCfgDao.findVoipIpCfgList(entity);
|
||||
}
|
||||
/**
|
||||
* 根据索引表信息获取voipAccountCfg信息
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public List<AvVoipAccountCfg> getVoipAccountCfgList(CfgIndexInfo entity) {
|
||||
return avContentCfgDao.findVoipAccountCfgList(entity);
|
||||
}
|
||||
/**
|
||||
* 根据索引表信息获取voipAccountCfg信息
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity) {
|
||||
CfgIndexInfo cfg=avContentCfgDao.getCfgIndexInfo(entity);
|
||||
cfg.setVoipAccounts(getVoipAccountCfgList(entity));
|
||||
cfg.setVoipIps(getVoipIpCfgList(entity));
|
||||
|
||||
return cfg;
|
||||
}
|
||||
/**
|
||||
* 审核
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids **编译Id
|
||||
* @param functionId 业务id
|
||||
*/
|
||||
public void auditAvVoip(Integer isAudit,Integer isValid,String ids){
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
List<CfgIndexInfo> list = new ArrayList();
|
||||
Gson gson=new GsonBuilder().disableHtmlEscaping()
|
||||
.excludeFieldsWithoutExposeAnnotation()
|
||||
.create();
|
||||
//多域配置审核时间为同一个时间
|
||||
Date auditTime=new Date();
|
||||
|
||||
for(String id :idArray){
|
||||
CfgIndexInfo cfgSearch=new CfgIndexInfo();
|
||||
cfgSearch.setCfgId(Long.parseLong(id));
|
||||
entity = avContentCfgDao.getCfgIndexInfo(cfgSearch);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(auditTime);
|
||||
|
||||
/*avCfgDao.auditAvFileSample(entity);
|
||||
list.add(entity);*/
|
||||
|
||||
}
|
||||
/*if(isAudit==1){
|
||||
//调用服务接口下发配置数据
|
||||
String json=gson.toJson(list);
|
||||
logger.info("音视频文件样例下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
try {
|
||||
String result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
logger.info("音视频文件样例配置下发响应信息:"+result);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("音视频文件样例配置下发失败");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
}else if(isAudit==3){
|
||||
//调用服务接口取消配置
|
||||
String json=gson.toJson(list);
|
||||
logger.info("音视频文件样例下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
try {
|
||||
String result = ConfigServiceUtil.put(json,2);
|
||||
logger.info("音视频文件样例取消配置响应信息:"+result);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("音视频文件样取消配置失败");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user