voip修改和删除功能
This commit is contained in:
@@ -54,9 +54,12 @@ public class AvContentController extends BaseController {
|
|||||||
|
|
||||||
//保存voip信息
|
//保存voip信息
|
||||||
@RequestMapping(value = {"/saveVoip"})
|
@RequestMapping(value = {"/saveVoip"})
|
||||||
public String saveVoip(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg){
|
public String saveVoip(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||||
|
@ModelAttribute("cfg")CfgIndexInfo cfg,
|
||||||
|
@ModelAttribute("voipIpIds")String voipIpIds,
|
||||||
|
@ModelAttribute("voipAccountIds")String voipAccountIds){
|
||||||
try{
|
try{
|
||||||
avContentCfgService.saveOrUpdateAvVoip(cfg);
|
avContentCfgService.saveOrUpdateAvVoip(cfg,voipIpIds,voipAccountIds);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error("voip信息保存失败",e);
|
logger.error("voip信息保存失败",e);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -75,7 +78,7 @@ public class AvContentController extends BaseController {
|
|||||||
if(entity.getVoipAccount()== null){
|
if(entity.getVoipAccount()== null){
|
||||||
entity.setVoipAccount(new AvVoipAccountCfg());
|
entity.setVoipAccount(new AvVoipAccountCfg());
|
||||||
}
|
}
|
||||||
Page<CfgIndexInfo> page = avContentCfgService.findPage(new Page<CfgIndexInfo>(request, response,"a"), entity);
|
Page<CfgIndexInfo> page = avContentCfgService.findPage(new Page<CfgIndexInfo>(request, response,"r"), entity);
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
initPageCondition(model);
|
initPageCondition(model);
|
||||||
return "/cfg/av/voip/voipList";
|
return "/cfg/av/voip/voipList";
|
||||||
@@ -83,9 +86,9 @@ public class AvContentController extends BaseController {
|
|||||||
|
|
||||||
|
|
||||||
//修改VOIP例配置状态
|
//修改VOIP例配置状态
|
||||||
@RequestMapping(value = {"/updateAvVoip"})
|
@RequestMapping(value = {"/updateAvVoipValid"})
|
||||||
public String updateVoipValid(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
public String updateVoipValid(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||||
//avCfgService.updateAvFileSampleValid(isAudit,isValid,ids);
|
avContentCfgService.updateAvVoipValid(isAudit,isValid,ids,functionId);
|
||||||
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+functionId;
|
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+functionId;
|
||||||
}
|
}
|
||||||
//修改VOIP配置审核状态
|
//修改VOIP配置审核状态
|
||||||
|
|||||||
@@ -24,4 +24,7 @@ public interface AvContentCfgDao extends CrudDao<BaseIpCfg>{
|
|||||||
public void insertCfgIndexInfo(@Param("cfg")CfgIndexInfo entity);
|
public void insertCfgIndexInfo(@Param("cfg")CfgIndexInfo entity);
|
||||||
public void insertAvVoipIp(@Param("cfg")CfgIndexInfo entity);
|
public void insertAvVoipIp(@Param("cfg")CfgIndexInfo entity);
|
||||||
public void insertAvVoipAccount(@Param("cfg")CfgIndexInfo entity);
|
public void insertAvVoipAccount(@Param("cfg")CfgIndexInfo entity);
|
||||||
|
public void updateCfgIndexInfo(@Param("cfg")CfgIndexInfo entity);
|
||||||
|
public void updateAvVoipIp(@Param("cfg")CfgIndexInfo entity);
|
||||||
|
public void updateAvVoipAccount(@Param("cfg")CfgIndexInfo entity);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,24 +90,24 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="AvVoip_Column" >
|
<sql id="AvVoip_Column" >
|
||||||
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
r.CFG_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT,
|
||||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
||||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY,
|
||||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id
|
r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.function_id
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="AvVoipIp_Column" >
|
<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
|
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.ip_pattern,r.port_pattern,r.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
||||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
||||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
||||||
a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable
|
r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable
|
||||||
,a.area_effective_ids,a.function_id,a.cfg_region_code
|
,r.area_effective_ids,r.function_id,r.cfg_region_code
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="AvVoipAccount_Column" >
|
<sql id="AvVoipAccount_Column" >
|
||||||
a.cfg_id,a.cfg_desc,a.district,a.cfg_keywords,a.cfg_type,
|
r.cfg_id,r.cfg_desc,r.district,r.cfg_keywords,r.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,
|
r.action,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id,r.edit_time, r.auditor_id,
|
||||||
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
r.audit_time,r.service_id,r.request_id,r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
|
||||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,r.cfg_region_code
|
||||||
</sql>
|
</sql>
|
||||||
<!-- 条件查询列表信息 -->
|
<!-- 条件查询列表信息 -->
|
||||||
<select id="findVoipList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
<select id="findVoipList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||||
@@ -117,90 +117,90 @@
|
|||||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||||
,ri.request_title as requestName
|
,ri.request_title as requestName
|
||||||
</trim>
|
</trim>
|
||||||
FROM cfg_index_info a
|
FROM cfg_index_info r
|
||||||
left join sys_user s on a.creator_id=s.id
|
left join sys_user s on r.creator_id=s.id
|
||||||
left join sys_user e on a.editor_id=e.id
|
left join sys_user e on r.editor_id=e.id
|
||||||
left join sys_user u on a.auditor_id=u.id
|
left join sys_user u on r.auditor_id=u.id
|
||||||
left join request_info ri on a.request_id=ri.id
|
left join request_info ri on r.request_id=ri.id
|
||||||
|
|
||||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||||
<if test="cfg.page !=null and cfg.page.where != null and cfg.page.where != ''">
|
<if test="cfg.page !=null and cfg.page.where != null and cfg.page.where != ''">
|
||||||
AND ${cfg.page.where}
|
AND ${cfg.page.where}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.cfgId != null">
|
<if test="cfg.cfgId != null">
|
||||||
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''">
|
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''">
|
||||||
AND a.CFG_DESC like concat(concat('%',#{cfg.cfgDesc,jdbcType=VARCHAR}),'%')
|
AND r.CFG_DESC like concat(concat('%',#{cfg.cfgDesc,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.action != null">
|
<if test="cfg.action != null">
|
||||||
AND a.ACTION=#{cfg.action,jdbcType=INTEGER}
|
AND r.ACTION=#{cfg.action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.isValid != null">
|
<if test="cfg.isValid != null">
|
||||||
AND a.IS_VALID=#{cfg.isValid,jdbcType=INTEGER}
|
AND r.IS_VALID=#{cfg.isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.isValid == null">
|
<if test="cfg.isValid == null">
|
||||||
AND a.IS_VALID != -1
|
AND r.IS_VALID != -1
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.isAudit != null">
|
<if test="cfg.isAudit != null">
|
||||||
AND a.IS_AUDIT=#{cfg.isAudit,jdbcType=INTEGER}
|
AND r.IS_AUDIT=#{cfg.isAudit,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.creatorName != null and cfg.creatorName != ''">
|
<if test="cfg.creatorName != null and cfg.creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{cfg.creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{cfg.creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<!-- <if test="cfg.search_create_time_start != null and cfg.search_create_time_start != ''">
|
<!-- <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}]]>
|
<![CDATA[AND r.CREATE_TIME >= #{cfg.search_create_time_start,jdbcType=TIMESTAMP}]]>
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.search_create_time_end != null and cfg.search_create_time_end != ''">
|
<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}]]>
|
<![CDATA[AND r.CREATE_TIME <= #{cfg.search_create_time_end,jdbcType=TIMESTAMP}]]>
|
||||||
</if> -->
|
</if> -->
|
||||||
<if test="cfg.editorName != null and cfg.editorName != ''">
|
<if test="cfg.editorName != null and cfg.editorName != ''">
|
||||||
AND EDITOR_NAME like concat(concat('%',#{cfg.editorName,jdbcType=VARCHAR}),'%')
|
AND r.EDITOR_NAME like concat(concat('%',#{cfg.editorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<!-- <if test="cfg.search_edit_time_start != null and cfg.search_edit_time_start != ''">
|
<!-- <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}]]>
|
<![CDATA[AND r.EDIT_TIME >= #{cfg.search_edit_time_start,jdbcType=TIMESTAMP}]]>
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.search_edit_time_end != null and cfg.search_edit_time_end != ''">
|
<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}]]>
|
<![CDATA[AND r.EDIT_TIME <= #{cfg.search_edit_time_end,jdbcType=TIMESTAMP}]]>
|
||||||
</if> -->
|
</if> -->
|
||||||
<if test="cfg.auditorName != null and cfg.auditorName != ''">
|
<if test="cfg.auditorName != null and cfg.auditorName != ''">
|
||||||
AND AUDITOR_NAME like concat(concat('%',#{cfg.auditorName,jdbcType=VARCHAR}),'%')
|
AND AUDITOR_NAME like concat(concat('%',#{cfg.auditorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<!-- <if test="cfg.search_audit_time_start != null and cfg.search_audit_time_start != ''">
|
<!-- <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}]]>
|
<![CDATA[AND r.AUDIT_TIME >= #{cfg.search_audit_time_start,jdbcType=TIMESTAMP}]]>
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.search_audit_time_end != null and cfg.search_audit_time_end != ''">
|
<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}]]>
|
<![CDATA[AND r.AUDIT_TIME <= #{cfg.search_audit_time_end,jdbcType=TIMESTAMP}]]>
|
||||||
</if> -->
|
</if> -->
|
||||||
<if test="cfg.serviceId != null">
|
<if test="cfg.serviceId != null">
|
||||||
AND a.SERVICE_ID=#{cfg.serviceId,jdbcType=INTEGER}
|
AND r.SERVICE_ID=#{cfg.serviceId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.requestId != null">
|
<if test="cfg.requestId != null">
|
||||||
AND a.REQUEST_ID=#{cfg.requestId,jdbcType=INTEGER}
|
AND r.REQUEST_ID=#{cfg.requestId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.compileId != null">
|
<if test="cfg.compileId != null">
|
||||||
AND a.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
|
AND r.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.isAreaEffective != null">
|
<if test="cfg.isAreaEffective != null">
|
||||||
AND a.IS_AREA_EFFECTIVE=#{cfg.isAreaEffective,jdbcType=INTEGER}
|
AND r.IS_AREA_EFFECTIVE=#{cfg.isAreaEffective,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.classify != null and cfg.classify != ''">
|
<if test="cfg.classify != null and cfg.classify != ''">
|
||||||
AND a.classify like concat(concat('%',#{cfg.classify,jdbcType=VARCHAR}),'%')
|
AND r.classify like concat(concat('%',#{cfg.classify,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.attribute != null and cfg.attribute != ''">
|
<if test="cfg.attribute != null and cfg.attribute != ''">
|
||||||
AND a.attribute like concat(concat('%',#{cfg.attribute,jdbcType=VARCHAR}),'%')
|
AND r.attribute like concat(concat('%',#{cfg.attribute,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.lable != null and cfg.lable != ''">
|
<if test="cfg.lable != null and cfg.lable != ''">
|
||||||
AND a.lable like concat(concat('%',#{cfg.lable,jdbcType=VARCHAR}),'%')
|
AND r.lable like concat(concat('%',#{cfg.lable,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.areaEffectiveIds != null and cfg.areaEffectiveIds != ''">
|
<if test="cfg.areaEffectiveIds != null and cfg.areaEffectiveIds != ''">
|
||||||
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{cfg.areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{cfg.areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="cfg.functionId != null">
|
<if test="cfg.functionId != null">
|
||||||
AND a.function_id=#{cfg.functionId,jdbcType=INTEGER}
|
AND r.function_id=#{cfg.functionId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="(cfg.voipIp.srcIpAddress != null and cfg.voipIp.srcIpAddress != '') or (cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != '')">
|
<if test="(cfg.voipIp.srcIpAddress != null and cfg.voipIp.srcIpAddress != '') or (cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != '')">
|
||||||
AND a.compile_id in (select t.compile_id from av_voip_ip_cfg t
|
AND r.compile_id in (select t.compile_id from av_voip_ip_cfg t
|
||||||
<where>
|
<where>
|
||||||
<if test="cfg.voipIp.srcIpAddress != null and cfg.voipIp.srcIpAddress != ''">
|
<if test="cfg.voipIp.srcIpAddress != null and cfg.voipIp.srcIpAddress != ''">
|
||||||
and t.src_ip_address =#{cfg.voipIp.srcIpAddress,jdbcType=VARCHAR}
|
and t.src_ip_address =#{cfg.voipIp.srcIpAddress,jdbcType=VARCHAR}
|
||||||
@@ -212,7 +212,7 @@
|
|||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="(cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != '') or (cfg.voipAccount.district != null and cfg.voipAccount.district != '') ">
|
<if test="(cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != '') or (cfg.voipAccount.district != null and cfg.voipAccount.district != '') ">
|
||||||
AND a.compile_id in (select f.compile_id from av_voip_account_cfg f
|
AND r.compile_id in (select f.compile_id from av_voip_account_cfg f
|
||||||
<where>
|
<where>
|
||||||
<if test="cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != ''">
|
<if test="cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != ''">
|
||||||
and f.cfg_keywords like concat(concat('%',#{cfg.voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%')
|
and f.cfg_keywords like concat(concat('%',#{cfg.voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
ORDER BY ${cfg.page.orderBy}
|
ORDER BY ${cfg.page.orderBy}
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
ORDER BY a.CFG_ID desc
|
ORDER BY r.CFG_ID desc
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
</select>
|
</select>
|
||||||
@@ -243,22 +243,24 @@
|
|||||||
<select id="findVoipIpCfgList" resultMap="AvVoipIpCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
<select id="findVoipIpCfgList" resultMap="AvVoipIpCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||||
select
|
select
|
||||||
<include refid="AvVoipIp_Column" />
|
<include refid="AvVoipIp_Column" />
|
||||||
from av_voip_ip_cfg a
|
from av_voip_ip_cfg r
|
||||||
<where>
|
<where>
|
||||||
<if test="cfg.compileId != null">
|
<if test="cfg.compileId != null">
|
||||||
and a.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
|
and r.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
and r.is_valid !=-1
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<!-- 根据compileId获取avVoipAccountCfg信息 -->
|
<!-- 根据compileId获取avVoipAccountCfg信息 -->
|
||||||
<select id="findVoipAccountCfgList" resultMap="AvVoipAccountCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
<select id="findVoipAccountCfgList" resultMap="AvVoipAccountCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||||
select
|
select
|
||||||
<include refid="AvVoipAccount_Column" />
|
<include refid="AvVoipAccount_Column" />
|
||||||
from av_voip_account_cfg a
|
from av_voip_account_cfg r
|
||||||
<where>
|
<where>
|
||||||
<if test="cfg.compileId != null">
|
<if test="cfg.compileId != null">
|
||||||
and a.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
|
and r.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
and r.is_valid != -1
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
@@ -274,6 +276,7 @@
|
|||||||
<if test="cfg.compileId != null">
|
<if test="cfg.compileId != null">
|
||||||
and a.compile_Id=#{cfg.compileId,jdbcType=INTEGER}
|
and a.compile_Id=#{cfg.compileId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
and a.is_valid != -1
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<!-- insert cfgIndexInfox -->
|
<!-- insert cfgIndexInfox -->
|
||||||
@@ -455,4 +458,274 @@
|
|||||||
#{cfg.voipAccount.isHexbin,jdbcType=INTEGER}
|
#{cfg.voipAccount.isHexbin,jdbcType=INTEGER}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
<!-- update cfg_index_info表信息 -->
|
||||||
|
<update id="updateCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||||
|
update cfg_index_info
|
||||||
|
<set >
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''" >
|
||||||
|
cfg_desc = #{cfg.cfgDesc,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.action != null" >
|
||||||
|
action = #{cfg.action,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.isValid != null" >
|
||||||
|
is_valid = #{cfg.isValid,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.isAudit != null" >
|
||||||
|
is_audit = #{cfg.isAudit,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.editorId != null" >
|
||||||
|
editor_id = #{cfg.editorId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.editTime != null and cfg.editTime != ''" >
|
||||||
|
edit_time = #{cfg.editTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.auditorId != null" >
|
||||||
|
AUDITOR_ID = #{cfg.auditorId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.auditTime != null and cfg.auditTime != ''" >
|
||||||
|
AUDIT_TIME = #{cfg.auditTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.compileId != null" >
|
||||||
|
COMPILE_ID = #{cfg.compileId,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.requestId != null" >
|
||||||
|
request_id = #{cfg.requestId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.isAreaEffective != null" >
|
||||||
|
is_area_effective = #{cfg.isAreaEffective,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.classify != null and cfg.classify != ''" >
|
||||||
|
classify = #{cfg.classify,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.attribute != null and cfg.attribute != ''" >
|
||||||
|
attribute = #{cfg.attribute,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.lable != null and cfg.lable != ''" >
|
||||||
|
lable = #{cfg.lable,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.areaEffectiveIds != null" >
|
||||||
|
area_effective_ids = #{cfg.areaEffectiveIds,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.functionId != null" >
|
||||||
|
function_id = #{cfg.functionId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.serviceId != null" >
|
||||||
|
service_id = #{cfg.serviceId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</set>
|
||||||
|
<where>
|
||||||
|
<if test="cfg.cfgId != null" >
|
||||||
|
and cfg_id = #{cfg.cfgId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="cfg.compileId != null" >
|
||||||
|
and compile_id = #{cfg.compileId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="cfg.functionId != null" >
|
||||||
|
and function_id = #{cfg.functionId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</update>
|
||||||
|
<!-- update av_voip_ip_cfg表信息 -->
|
||||||
|
<update id="updateAvVoipIp" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||||
|
update av_voip_ip_cfg
|
||||||
|
<set >
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''" >
|
||||||
|
cfg_desc = #{cfg.cfgDesc,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.action != null" >
|
||||||
|
action = #{cfg.action,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.isValid != null" >
|
||||||
|
is_valid = #{cfg.isValid,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.isAudit != null" >
|
||||||
|
is_audit = #{cfg.isAudit,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.editorId != null" >
|
||||||
|
editor_id = #{cfg.editorId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.editTime != null and cfg.editTime != ''" >
|
||||||
|
edit_time = #{cfg.editTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.auditorId != null" >
|
||||||
|
AUDITOR_ID = #{cfg.auditorId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.auditTime != null and cfg.auditTime != ''" >
|
||||||
|
AUDIT_TIME = #{cfg.auditTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.compileId != null" >
|
||||||
|
COMPILE_ID = #{cfg.compileId,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.requestId != null" >
|
||||||
|
request_id = #{cfg.requestId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.isAreaEffective != null" >
|
||||||
|
is_area_effective = #{cfg.isAreaEffective,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.classify != null and cfg.classify != ''" >
|
||||||
|
classify = #{cfg.classify,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.attribute != null and cfg.attribute != ''" >
|
||||||
|
attribute = #{cfg.attribute,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.lable != null and cfg.lable != ''" >
|
||||||
|
lable = #{cfg.lable,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.areaEffectiveIds != null" >
|
||||||
|
area_effective_ids = #{cfg.areaEffectiveIds,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.functionId != null" >
|
||||||
|
function_id = #{cfg.functionId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.serviceId != null" >
|
||||||
|
service_id = #{cfg.serviceId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.ipType != null" >
|
||||||
|
ip_type = #{cfg.voipIp.ipType,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.srcIpAddress != null and cfg.voipIp.srcIpAddress != ''" >
|
||||||
|
src_ip_address = #{cfg.voipIp.srcIpAddress,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.ipPattern != null" >
|
||||||
|
ip_pattern = #{cfg.voipIp.ipPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.portPattern != null" >
|
||||||
|
port_pattern = #{cfg.voipIp.portPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != ''" >
|
||||||
|
src_port = #{cfg.voipIp.srcPort,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.protocol != null" >
|
||||||
|
protocol = #{cfg.voipIp.protocol,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.protocolId != null" >
|
||||||
|
protocol_id = #{cfg.voipIp.protocolId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.direction != null" >
|
||||||
|
direction = #{cfg.voipIp.direction,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.destPort != null and cfg.voipIp.destPort != ''" >
|
||||||
|
dest_port = #{cfg.voipIp.destPort,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.destIpAddress != null and cfg.voipIp.destIpAddress != ''" >
|
||||||
|
dest_ip_address = #{cfg.voipIp.destIpAddress,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.cfgType != null and cfg.voipIp.cfgType != ''" >
|
||||||
|
cfg_type = #{cfg.voipIp.cfgType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.cfgRegionCode != null " >
|
||||||
|
cfg_region_code = #{cfg.voipIp.cfgRegionCode,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</set>
|
||||||
|
<where>
|
||||||
|
<if test="cfg.voipIp != null and cfg.voipIp.cfgId != null" >
|
||||||
|
and cfg_id = #{cfg.voipIp.cfgId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="cfg.compileId != null" >
|
||||||
|
and compile_id = #{cfg.compileId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="cfg.functionId != null" >
|
||||||
|
and function_id = #{cfg.functionId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</update>
|
||||||
|
<!-- update av_voip_account_cfg表信息 -->
|
||||||
|
<update id="updateAvVoipAccount" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||||
|
update av_voip_account_cfg
|
||||||
|
<set >
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''" >
|
||||||
|
cfg_desc = #{cfg.cfgDesc,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.action != null" >
|
||||||
|
action = #{cfg.action,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.isValid != null" >
|
||||||
|
is_valid = #{cfg.isValid,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.isAudit != null" >
|
||||||
|
is_audit = #{cfg.isAudit,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.editorId != null" >
|
||||||
|
editor_id = #{cfg.editorId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.editTime != null and cfg.editTime != ''" >
|
||||||
|
edit_time = #{cfg.editTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.auditorId != null" >
|
||||||
|
AUDITOR_ID = #{cfg.auditorId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.auditTime != null and cfg.auditTime != ''" >
|
||||||
|
AUDIT_TIME = #{cfg.auditTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.compileId != null" >
|
||||||
|
COMPILE_ID = #{cfg.compileId,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.requestId != null" >
|
||||||
|
request_id = #{cfg.requestId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.isAreaEffective != null" >
|
||||||
|
is_area_effective = #{cfg.isAreaEffective,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.classify != null and cfg.classify != ''" >
|
||||||
|
classify = #{cfg.classify,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.attribute != null and cfg.attribute != ''" >
|
||||||
|
attribute = #{cfg.attribute,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.lable != null and cfg.lable != ''" >
|
||||||
|
lable = #{cfg.lable,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.areaEffectiveIds != null" >
|
||||||
|
area_effective_ids = #{cfg.areaEffectiveIds,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.functionId != null" >
|
||||||
|
function_id = #{cfg.functionId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.serviceId != null" >
|
||||||
|
service_id = #{cfg.serviceId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipAccount != null and cfg.voipAccount.district != null and cfg.voipAccount.district != ''" >
|
||||||
|
district = #{cfg.voipAccount.district,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipAccount != null and cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != ''" >
|
||||||
|
cfg_keywords = #{cfg.voipAccount.cfgKeywords,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipAccount != null and cfg.voipAccount.cfgType != null and cfg.voipAccount.cfgType != ''" >
|
||||||
|
cfg_type = #{cfg.voipAccount.cfgType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipAccount != null and cfg.voipAccount.cfgRegionCode != null " >
|
||||||
|
cfg_region_code = #{cfg.voipAccount.cfgRegionCode,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipAccount != null and cfg.voipAccount.exprType != null " >
|
||||||
|
expr_type = #{cfg.voipAccount.exprType,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipAccount != null and cfg.voipAccount.matchMethod != null " >
|
||||||
|
match_method = #{cfg.voipAccount.matchMethod,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="cfg.voipAccount != null and cfg.voipAccount.isHexbin != null " >
|
||||||
|
is_hexbin = #{cfg.voipAccount.isHexbin,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</set>
|
||||||
|
<where>
|
||||||
|
<if test="cfg.voipAccount != null and cfg.voipAccount.cfgId != null" >
|
||||||
|
and cfg_id = #{cfg.voipAccount.cfgId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="cfg.compileId != null" >
|
||||||
|
and compile_id = #{cfg.compileId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="cfg.functionId != null" >
|
||||||
|
and function_id = #{cfg.functionId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -16,12 +16,14 @@ import com.google.gson.Gson;
|
|||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.configuration.AvFileSampleCfg;
|
import com.nis.domain.configuration.AvFileSampleCfg;
|
||||||
|
import com.nis.domain.configuration.AvSignSampleCfg;
|
||||||
import com.nis.domain.configuration.AvVoipAccountCfg;
|
import com.nis.domain.configuration.AvVoipAccountCfg;
|
||||||
import com.nis.domain.configuration.AvVoipIpCfg;
|
import com.nis.domain.configuration.AvVoipIpCfg;
|
||||||
import com.nis.domain.configuration.CfgIndexInfo;
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
import com.nis.util.FileUtils;
|
import com.nis.util.FileUtils;
|
||||||
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.dao.FunctionRegionDictDao;
|
import com.nis.web.dao.FunctionRegionDictDao;
|
||||||
import com.nis.web.dao.FunctionServiceDictDao;
|
import com.nis.web.dao.FunctionServiceDictDao;
|
||||||
import com.nis.web.dao.configuration.AvCfgDao;
|
import com.nis.web.dao.configuration.AvCfgDao;
|
||||||
@@ -50,7 +52,7 @@ public class AvContentCfgService extends BaseService{
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Page<CfgIndexInfo> findPage(Page<CfgIndexInfo> page, CfgIndexInfo entity) {
|
public Page<CfgIndexInfo> findPage(Page<CfgIndexInfo> page, CfgIndexInfo entity) {
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
List<CfgIndexInfo> list=avContentCfgDao.findVoipList(entity);
|
List<CfgIndexInfo> list=avContentCfgDao.findVoipList(entity);
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
@@ -155,12 +157,14 @@ public class AvContentCfgService extends BaseService{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void saveOrUpdateAvVoip(CfgIndexInfo entity){
|
public void saveOrUpdateAvVoip(CfgIndexInfo entity,String voipIpIds,String voipAccountIds){
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
//新增
|
//新增
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
entity.setCreatorId(UserUtils.getUser().getId());
|
entity.setCreatorId(UserUtils.getUser().getId());
|
||||||
entity.setCreateTime(createTime);
|
entity.setCreateTime(createTime);
|
||||||
|
entity.setIsValid(0);
|
||||||
|
entity.setIsAudit(0);
|
||||||
//调用服务接口获取compileId
|
//调用服务接口获取compileId
|
||||||
List<Integer> compileIds = new ArrayList<Integer>();
|
List<Integer> compileIds = new ArrayList<Integer>();
|
||||||
try {
|
try {
|
||||||
@@ -196,12 +200,110 @@ public class AvContentCfgService extends BaseService{
|
|||||||
|
|
||||||
//修改
|
//修改
|
||||||
}else{
|
}else{
|
||||||
//entity.setEditorId(UserUtils.getUser().getId());
|
Date editTime=new Date();
|
||||||
//entity.setEditTime(new Date());
|
entity.setIsValid(0);
|
||||||
//entity.setIsValid(0);
|
entity.setIsAudit(0);
|
||||||
//entity.setIsAudit(0);
|
|
||||||
//avCfgDao.updateAvFileSample(entity);
|
voipIpIds=!StringUtil.isEmpty(voipIpIds)? voipIpIds+",":"";
|
||||||
|
voipAccountIds=!StringUtil.isEmpty(voipAccountIds)? voipAccountIds+",":"";
|
||||||
|
|
||||||
|
//判断voip信息为新增还是修改,清楚voipIpIds修改的voipId记录,剩下即为需要删除的voipId
|
||||||
|
if(!StringUtil.isEmpty(entity.getVoipIps())){
|
||||||
|
for (AvVoipIpCfg voipIp : entity.getVoipIps()) {
|
||||||
|
if(!StringUtil.isEmpty(voipIp.getCfgId())){
|
||||||
|
if(voipIpIds.contains(","+voipIp.getCfgId()+",")){
|
||||||
|
voipIpIds=voipIpIds.replace(voipIp.getCfgId()+",", "");
|
||||||
|
}
|
||||||
|
//修改
|
||||||
|
entity.setEditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setEditTime(editTime);
|
||||||
|
entity.setVoipIp(voipIp);
|
||||||
|
avContentCfgDao.updateAvVoipIp(entity);
|
||||||
|
}else{
|
||||||
|
//新增
|
||||||
|
entity.setCreatorId(UserUtils.getUser().getId());
|
||||||
|
entity.setCreateTime(createTime);
|
||||||
|
entity.setVoipIp(voipIp);
|
||||||
|
avContentCfgDao.insertAvVoipIp(entity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!StringUtil.isEmpty(entity.getVoipAccounts())){
|
||||||
|
for (AvVoipAccountCfg voipAccount : entity.getVoipAccounts()) {
|
||||||
|
if(!StringUtil.isEmpty(voipAccount.getCfgId())){
|
||||||
|
if(voipAccountIds.contains(","+voipAccount.getCfgId()+",")){
|
||||||
|
voipAccountIds=voipAccountIds.replace(voipAccount.getCfgId()+",", "");
|
||||||
|
}
|
||||||
|
//修改
|
||||||
|
entity.setEditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setEditTime(editTime);
|
||||||
|
entity.setVoipAccount(voipAccount);
|
||||||
|
avContentCfgDao.updateAvVoipAccount(entity);
|
||||||
|
}else{
|
||||||
|
//新增
|
||||||
|
entity.setCreatorId(UserUtils.getUser().getId());
|
||||||
|
entity.setCreateTime(createTime);
|
||||||
|
entity.setVoipAccount(voipAccount);
|
||||||
|
avContentCfgDao.insertAvVoipAccount(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//将删除后的ACCOUNT置为删除,1,1,1,
|
||||||
|
if(!StringUtil.isEmpty(voipAccountIds.replaceAll(",", ""))){
|
||||||
|
voipAccountIds=voipAccountIds.substring(1,voipAccountIds.length());
|
||||||
|
for (String cfgId : voipAccountIds.split(",")) {
|
||||||
|
CfgIndexInfo cfg=new CfgIndexInfo();
|
||||||
|
cfg.setEditorId(UserUtils.getUser().getId());
|
||||||
|
cfg.setEditTime(editTime);
|
||||||
|
cfg.setIsValid(-1);
|
||||||
|
AvVoipAccountCfg voipAccountCfg=new AvVoipAccountCfg();
|
||||||
|
voipAccountCfg.setCfgId(Long.parseLong(cfgId));
|
||||||
|
cfg.setVoipAccount(voipAccountCfg);
|
||||||
|
avContentCfgDao.updateAvVoipAccount(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//将删除后的IP置为删除 [is_valid=-1]
|
||||||
|
if(!StringUtil.isEmpty(voipIpIds.replaceAll(",", ""))){
|
||||||
|
voipIpIds=voipIpIds.substring(1,voipIpIds.length());
|
||||||
|
for (String cfgId : voipIpIds.split(",")) {
|
||||||
|
CfgIndexInfo cfg=new CfgIndexInfo();
|
||||||
|
cfg.setEditorId(UserUtils.getUser().getId());
|
||||||
|
cfg.setEditTime(editTime);
|
||||||
|
cfg.setIsValid(-1);
|
||||||
|
AvVoipIpCfg voipIpCfg=new AvVoipIpCfg();
|
||||||
|
voipIpCfg.setCfgId(Long.parseLong(cfgId));
|
||||||
|
cfg.setVoipIp(voipIpCfg);
|
||||||
|
avContentCfgDao.updateAvVoipIp(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//修改
|
||||||
|
entity.setEditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setEditTime(editTime);
|
||||||
|
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param isAudit
|
||||||
|
* @param isValid
|
||||||
|
* @param ids compileIds
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
|
public void updateAvVoipValid(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||||
|
CfgIndexInfo entity = new CfgIndexInfo();
|
||||||
|
String[] idArray = ids.split(",");
|
||||||
|
for(String id :idArray){
|
||||||
|
entity.setCompileId(Integer.parseInt(id));
|
||||||
|
entity.setFunctionId(functionId);
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setIsValid(isValid);
|
||||||
|
entity.setEditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setEditTime(new Date());
|
||||||
|
avContentCfgDao.updateAvVoipIp(entity);
|
||||||
|
avContentCfgDao.updateAvVoipAccount(entity);
|
||||||
|
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,11 @@ $(function(){
|
|||||||
/* $("span[title='add']").on("click",function(){
|
/* $("span[title='add']").on("click",function(){
|
||||||
$(".voipIp0").removeClass("hidden");
|
$(".voipIp0").removeClass("hidden");
|
||||||
}); */
|
}); */
|
||||||
|
$(".disabled").each(function(){
|
||||||
|
$(this).find("input,select,div,button").each(function(){
|
||||||
|
$(this).attr("disabled","true");
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -81,6 +86,9 @@ var addContent=function(obj,contentClassName){
|
|||||||
$("."+contentClassName+"0").find("input,select").each(function(){
|
$("."+contentClassName+"0").find("input,select").each(function(){
|
||||||
$(this).removeAttr("disabled");
|
$(this).removeAttr("disabled");
|
||||||
});
|
});
|
||||||
|
$("."+contentClassName+"0").find(".disabled").each(function(){
|
||||||
|
$(this).removeClass("disabled");
|
||||||
|
});
|
||||||
$(obj).addClass("hidden");
|
$(obj).addClass("hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,6 +98,7 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
$("."+contentClassName).find("input,select").each(function(){
|
$("."+contentClassName).find("input,select").each(function(){
|
||||||
$(this).attr("disabled","true");
|
$(this).attr("disabled","true");
|
||||||
});
|
});
|
||||||
|
|
||||||
$("."+addBtnClassName).removeClass("hidden");
|
$("."+addBtnClassName).removeClass("hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,6 +125,20 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
|
<c:set var="voipIpCfgId" value=""/>
|
||||||
|
<c:forEach items="${_cfg.voipIps}" var="voipIp" varStatus="status">
|
||||||
|
<c:if test="${not empty voipIp.cfgId}">
|
||||||
|
<c:set var="voipIpCfgId" value="${voipIpCfgId},${voipIp.cfgId}"/>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
<input type="hidden" name="voipIpIds" value="${voipIpCfgId}">
|
||||||
|
<c:set var="voipAccountCfgId" value=""/>
|
||||||
|
<c:forEach items="${_cfg.voipAccounts}" var="voipAccount" varStatus="status">
|
||||||
|
<c:if test="${not empty voipAccount.cfgId}">
|
||||||
|
<c:set var="voipAccountCfgId" value="${voipAccountCfgId},${voipAccount.cfgId}"/>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
<input type="hidden" name="voipAccountIds" value="${voipAccountCfgId}">
|
||||||
<div class="form-body">
|
<div class="form-body">
|
||||||
<!-- desc and action -->
|
<!-- desc and action -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -155,7 +178,8 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
</small>
|
</small>
|
||||||
</h4>
|
</h4>
|
||||||
<c:forEach items="${_cfg.voipIps}" var="voipIp" varStatus="status">
|
<c:forEach items="${_cfg.voipIps}" var="voipIp" varStatus="status">
|
||||||
<c:if test="${not empty _cfg.cfgId}">
|
<c:choose>
|
||||||
|
<c:when test="${not empty _cfg.cfgId}">
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${empty voipIp.cfgId}">
|
<c:when test="${empty voipIp.cfgId}">
|
||||||
<div class="row boxSolid hidden disabled voipIp${status.index }">
|
<div class="row boxSolid hidden disabled voipIp${status.index }">
|
||||||
@@ -164,7 +188,11 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
<div class="row boxSolid voipIp${status.index }">
|
<div class="row boxSolid voipIp${status.index }">
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</c:if>
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<div class="row boxSolid voipIp${status.index }">
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
|
||||||
<input type="hidden" name="voipIps[${status.index }].cfgId" value="${voipIp.cfgId}">
|
<input type="hidden" name="voipIps[${status.index }].cfgId" value="${voipIp.cfgId}">
|
||||||
<!-- 配置域类型 -->
|
<!-- 配置域类型 -->
|
||||||
@@ -219,7 +247,7 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
</div>
|
</div>
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${voipIp.cfgId==null}">
|
<c:when test="${voipIp.cfgId==null}">
|
||||||
<div class="row hidden disabled port">
|
<div class="row hidden port">
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<div class="row port">
|
<div class="row port">
|
||||||
@@ -249,7 +277,7 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
</div>
|
</div>
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${voipIp.cfgId==null}">
|
<c:when test="${voipIp.cfgId==null}">
|
||||||
<div class="row hidden disabled destIpPort">
|
<div class="row hidden destIpPort">
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<div class="row destIpPort">
|
<div class="row destIpPort">
|
||||||
@@ -276,7 +304,7 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
</div>
|
</div>
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${voipIp.cfgId==null}">
|
<c:when test="${voipIp.cfgId==null}">
|
||||||
<div class="row hidden disabled protocol">
|
<div class="row hidden protocol">
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<div class="row protocol">
|
<div class="row protocol">
|
||||||
@@ -324,8 +352,8 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
<!--account info-->
|
<!--account info-->
|
||||||
<h4 class="form-section"> <spring:message code="av_voip_account_title"/><small> <span class="glyphicon glyphicon-plus voipAccountAdd" onClick="addContent(this,'voipAccount')" title="add"></span></small></h4>
|
<h4 class="form-section"> <spring:message code="av_voip_account_title"/><small> <span class="glyphicon glyphicon-plus voipAccountAdd" onClick="addContent(this,'voipAccount')" title="add"></span></small></h4>
|
||||||
<c:forEach items="${_cfg.voipAccounts}" var="voipAccount" varStatus="status">
|
<c:forEach items="${_cfg.voipAccounts}" var="voipAccount" varStatus="status">
|
||||||
|
<c:choose>
|
||||||
<c:if test="${not empty _cfg.cfgId}">
|
<c:when test="${not empty _cfg.cfgId}">
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${empty voipAccount.cfgId}">
|
<c:when test="${empty voipAccount.cfgId}">
|
||||||
<div class="row boxSolid hidden disabled voipAccount${status.index }">
|
<div class="row boxSolid hidden disabled voipAccount${status.index }">
|
||||||
@@ -334,7 +362,11 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
<div class="row boxSolid voipAccount${status.index }">
|
<div class="row boxSolid voipAccount${status.index }">
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</c:if>
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<div class="row boxSolid voipAccount${status.index }">
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<input type="hidden" name="voipAccounts[${status.index }].cfgId" value="${voipAccount.cfgId}">
|
<input type="hidden" name="voipAccounts[${status.index }].cfgId" value="${voipAccount.cfgId}">
|
||||||
<!-- 配置域类型 -->
|
<!-- 配置域类型 -->
|
||||||
<c:forEach items="${regionList}" var="region">
|
<c:forEach items="${regionList}" var="region">
|
||||||
@@ -368,7 +400,7 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font>关键词</label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input class="form-control required" type="text" name="voipAccounts[${status.index }].cfgKeywords" value="${voipAccount.cfgKeywords}">
|
<input class="form-control required" type="text" name="voipAccounts[${status.index }].cfgKeywords" value="${voipAccount.cfgKeywords}">
|
||||||
</div>
|
</div>
|
||||||
@@ -434,7 +466,7 @@ var delContent=function(contentClassName,addBtnClassName){
|
|||||||
<br>
|
<br>
|
||||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||||
<input type="hidden" name="isAreaEffective" value="0">
|
<input type="hidden" name="isAreaEffective" value="0">
|
||||||
<br>
|
<%--<br>--%>
|
||||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
|
|||||||
@@ -464,7 +464,7 @@
|
|||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<shiro:hasPermission name="avVoip:audit">
|
<shiro:hasPermission name="avVoip:audit">
|
||||||
<sys:delRow url="${ctx}/ntc/av/voipForm" id="contentTable" label="update"></sys:delRow>
|
<sys:delRow url="${ctx}/ntc/av/voipForm" id="contentTable" label="update"></sys:delRow>
|
||||||
<sys:delRow url="${ctx}/ntc/av/updateAvVoip?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
<sys:delRow url="${ctx}/ntc/av/updateAvVoipValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||||
</shiro:hasPermission>
|
</shiro:hasPermission>
|
||||||
<shiro:hasPermission name="avVoip:audit">
|
<shiro:hasPermission name="avVoip:audit">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
|||||||
Reference in New Issue
Block a user