Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into develop
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 分组地理信息
|
||||
*/
|
||||
public class GroupAreaInfo extends BaseCfg<GroupAreaInfo> implements Serializable{
|
||||
|
||||
private static final long serialVersionUID = 3312689200711339511L;
|
||||
|
||||
private Long id;
|
||||
private Integer groupId;
|
||||
private Integer areaCode;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public Integer getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
public void setGroupId(Integer groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
public Integer getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
public void setAreaCode(Integer areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
public Date getEditTime() {
|
||||
return editTime;
|
||||
}
|
||||
public void setEditTime(Date editTime) {
|
||||
this.editTime = editTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.domain.configuration.GroupAreaInfo;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.service.configuration.GroupAreaService;
|
||||
|
||||
/**
|
||||
* 分组地理信息管理
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/cfg/groupArea")
|
||||
public class GroupAreaController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private GroupAreaService groupAreaService;
|
||||
|
||||
@RequestMapping(value = { "/groupAreaList", "" })
|
||||
public String policyGroupList(GroupAreaInfo cfg, HttpServletRequest request, HttpServletResponse response,
|
||||
Model model) {
|
||||
if (cfg == null)cfg = new GroupAreaInfo();
|
||||
Page<GroupAreaInfo> pageCondition = new Page<GroupAreaInfo>(request, response, "r");
|
||||
Page page = groupAreaService.findGroupAreaInfoList(pageCondition, cfg);
|
||||
// 获取策略分组信息
|
||||
List<PolicyGroupInfo> policyGroups = policyGroupInfoService.findNatPolicyGroups();
|
||||
// 获取区域信息
|
||||
initFormCondition(model);
|
||||
model.addAttribute("cfg", cfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("policyGroups", policyGroups);
|
||||
return "/cfg/manipulation/ipmulitiplex/groupAreaList";
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/groupAreaForm"})
|
||||
public String form(String ids,Model model,String doAction,RedirectAttributes redirectAttributes) {
|
||||
GroupAreaInfo groupArea=new GroupAreaInfo();
|
||||
// 获取未使用的策略分组
|
||||
List<PolicyGroupInfo> groups = policyGroupInfoService.findNatPolicyGroups();
|
||||
groups = groupAreaService.getNotUsedPolicyGroups(groups);
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
groupArea=groupAreaService.getInfoById(Integer.parseInt(ids));
|
||||
groups.add(policyGroupInfoService.getById(groupArea.getGroupId()));
|
||||
}
|
||||
// 获取区域信息
|
||||
initFormCondition(model);
|
||||
model.addAttribute("_cfg", groupArea);
|
||||
model.addAttribute("policyGroups", groups);
|
||||
return "/cfg/manipulation/ipmulitiplex/groupAreaForm";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "saveOrUpdate")
|
||||
public String saveOrUpdate(GroupAreaInfo cfg,Model model,RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
groupAreaService.saveOrUpdate(cfg);
|
||||
addMessage(redirectAttributes, "save_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("新增失败",e);
|
||||
addMessage(redirectAttributes, "save_failed");
|
||||
}
|
||||
return "redirect:" + adminPath + "/cfg/groupArea/groupAreaList";
|
||||
}
|
||||
|
||||
@RequestMapping(value={"delete"})
|
||||
public String delete(RedirectAttributes redirectAttributes, String ids,int isValid) {
|
||||
try {
|
||||
groupAreaService.deldete(ids,isValid);
|
||||
addMessage(redirectAttributes, "delete_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("删除失败",e);
|
||||
addMessage(redirectAttributes, "delete_failed");
|
||||
}
|
||||
return "redirect:" + adminPath + "/cfg/groupArea/groupAreaList";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -293,40 +293,40 @@ public class AvController extends BaseController {
|
||||
}
|
||||
|
||||
//修改标志样例配置审核状态
|
||||
/**
|
||||
* 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids
|
||||
* @param functionId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/sample/auditAvAudioSignSample"})
|
||||
public String auditAvAudioSignSample(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes){
|
||||
/**
|
||||
* 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids
|
||||
* @param functionId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/sample/auditAvAudioSignSample"})
|
||||
public String auditAvAudioSignSample(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes){
|
||||
// avCfgService.auditAvSignSample(isAudit,isValid,ids);
|
||||
AvSignSampleCfg entity = new AvSignSampleCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = avCfgService.getAvSignSampleById(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
try {
|
||||
avCfgService.audioAuditAvSignSample(entity,isAudit);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
if(e instanceof MaatConvertException) {
|
||||
logger.info("音视频标识样例配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
logger.error("auditAvAudioSignSample failed",e);
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
AvSignSampleCfg entity = new AvSignSampleCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = avCfgService.getAvSignSampleById(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
try {
|
||||
avCfgService.audioAuditAvSignSample(entity,isAudit,false);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
if(e instanceof MaatConvertException) {
|
||||
logger.info("音视频标识样例配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
logger.error("auditAvAudioSignSample failed",e);
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/av/sample/audioSignSampleList?functionId="+functionId;
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/av/sample/signSampleList?functionId="+functionId;
|
||||
}
|
||||
//修改标志样例配置审核状态
|
||||
/**
|
||||
* 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次
|
||||
@@ -340,9 +340,11 @@ public class AvController extends BaseController {
|
||||
public String auditAvSignSample(Integer preset,AvSignSampleCfgModel cfg,Integer functionId,RedirectAttributes redirectAttributes){
|
||||
//预置配置
|
||||
try {
|
||||
if(preset!=null&&1==preset){
|
||||
avCfgService.auditAvSignSample();
|
||||
addMessage(redirectAttributes,"audit_success");
|
||||
if(preset!=null&&1==preset){//预置信息需要在数据库中插入一条记录
|
||||
for (AvSignSampleCfg avSignSampleCfg : cfg.getCfgs()) {
|
||||
avCfgService.saveOrUpdateAvSignSample(avSignSampleCfg);
|
||||
}
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
return "redirect:" + adminPath +"/ntc/av/sample/signSampleList?functionId="+functionId;
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
@@ -352,15 +354,15 @@ public class AvController extends BaseController {
|
||||
addMessage(redirectAttributes,"request_service_failed");
|
||||
}else {
|
||||
logger.error("auditAvSignSample failed",e1);
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
}
|
||||
//修改下发配置
|
||||
if(cfg != null && cfg.getCfgs() != null ){
|
||||
for (AvSignSampleCfg avSignSampleCfg : cfg.getCfgs()) {
|
||||
if(StringUtil.isEmpty(avSignSampleCfg.getIsValid())){
|
||||
/*if(StringUtil.isEmpty(avSignSampleCfg.getIsValid())){
|
||||
avSignSampleCfg.setIsValid(0);
|
||||
}
|
||||
}*/
|
||||
if(cfg.getAction()!=null){
|
||||
avSignSampleCfg.setAction(cfg.getAction());
|
||||
}
|
||||
@@ -368,7 +370,7 @@ public class AvController extends BaseController {
|
||||
// if(!avSignSampleCfg.getAction().equals(avSignSampleCfg.getActionOld())||!avSignSampleCfg.getIsValid().equals(avSignSampleCfg.getIsValidOld())){
|
||||
try {
|
||||
avCfgService.auditAvSignSample(avSignSampleCfg);
|
||||
addMessage(redirectAttributes,"audit_success");
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
if(e instanceof MaatConvertException) {
|
||||
@@ -376,7 +378,7 @@ public class AvController extends BaseController {
|
||||
addMessage(redirectAttributes,"request_service_failed");
|
||||
}else {
|
||||
logger.error("auditAvSignSample failed",e);
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,5 +15,5 @@ public interface PolicyGroupInfoDao extends CrudDao<PolicyGroupInfo> {
|
||||
List<PolicyGroupInfo> findHasIPPolicyGroupInfosByType(int groupType);
|
||||
List<PolicyGroupInfo> findPolicyGroupInfosHasIpRegionByType(int groupType);
|
||||
PolicyGroupInfo getById(int id);
|
||||
|
||||
List<PolicyGroupInfo> findNatPolicyGroups();
|
||||
}
|
||||
@@ -67,6 +67,12 @@
|
||||
FROM policy_group_info r
|
||||
where r.is_valid=1
|
||||
</select>
|
||||
<select id="findNatPolicyGroups" resultMap="PolicyGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="PolicyGroupInfoColumns"/>
|
||||
FROM policy_group_info r
|
||||
where r.is_valid=1 AND r.group_type = 2 OR r.group_type = 3
|
||||
</select>
|
||||
<select id="findPolicyGroupInfosByType" resultMap="PolicyGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="PolicyGroupInfoColumns"/>
|
||||
|
||||
@@ -516,6 +516,9 @@
|
||||
update av_sign_sample_cfg
|
||||
<set>
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="serviceId!=null">
|
||||
service_id=#{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.configuration.GroupAreaInfo;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface GroupAreaDao extends CrudDao<GroupAreaInfo>{
|
||||
|
||||
List<GroupAreaInfo> findGroupAreaInfoList(GroupAreaInfo entity);
|
||||
|
||||
GroupAreaInfo getInfoById(int groupId);
|
||||
|
||||
|
||||
}
|
||||
127
src/main/java/com/nis/web/dao/configuration/GroupAreaDao.xml
Normal file
127
src/main/java/com/nis/web/dao/configuration/GroupAreaDao.xml
Normal file
@@ -0,0 +1,127 @@
|
||||
<?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.GroupAreaDao">
|
||||
|
||||
<resultMap id="GroupAreaInfoMap" type="com.nis.domain.configuration.GroupAreaInfo" >
|
||||
<id column="id" property="id" jdbcType="INTEGER" />
|
||||
<result column="group_id" property="groupId" jdbcType="INTEGER" />
|
||||
<result column="area_code" property="areaCode" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" 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" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="GroupAreaInfoColumns">
|
||||
r.id,
|
||||
r.group_id,
|
||||
r.area_code,
|
||||
r.is_valid,
|
||||
r.creator_id,
|
||||
r.create_time,
|
||||
r.editor_id,
|
||||
r.edit_time
|
||||
</sql>
|
||||
|
||||
<!-- 查出所有 有效数据-->
|
||||
<select id="findGroupAreaInfoList" resultMap="GroupAreaInfoMap">
|
||||
SELECT
|
||||
<include refid="GroupAreaInfoColumns"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name
|
||||
,e.name as editor_name
|
||||
</trim>
|
||||
FROM group_area_info r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
AND r.group_id =#{groupId }
|
||||
</if>
|
||||
<if test="areaCode != null">
|
||||
AND r.area_code =#{areaCode }
|
||||
</if>
|
||||
AND r.IS_VALID =1
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND r.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
<!-- ${sqlMap.dsf} -->
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="getInfoById" resultType="com.nis.domain.configuration.GroupAreaInfo">
|
||||
SELECT
|
||||
<include refid="GroupAreaInfoColumns"/>
|
||||
FROM
|
||||
group_area_info r
|
||||
WHERE
|
||||
r.id = #{Id}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.GroupAreaInfo" >
|
||||
insert into group_area_info(
|
||||
ID,
|
||||
GROUP_ID,
|
||||
AREA_CODE,
|
||||
IS_VALID,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME
|
||||
)values (
|
||||
#{id,jdbcType=INTEGER},
|
||||
#{groupId,jdbcType=INTEGER},
|
||||
#{areaCode,jdbcType=INTEGER},
|
||||
#{isValid,jdbcType=INTEGER},
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.nis.domain.configuration.GroupAreaInfo" >
|
||||
update group_area_info
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null" >
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="groupId != null" >
|
||||
group_Id = #{groupId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaCode != null" >
|
||||
area_code = #{areaCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
<if test="id != null" >
|
||||
and id = #{id,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -45,6 +45,10 @@ public class PolicyGroupInfoService extends BaseService{
|
||||
List<PolicyGroupInfo> list=policyGroupInfoDao.findPolicyGroupInfos();
|
||||
return list;
|
||||
}
|
||||
public List<PolicyGroupInfo> findNatPolicyGroups() {
|
||||
List<PolicyGroupInfo> list=policyGroupInfoDao.findNatPolicyGroups();
|
||||
return list;
|
||||
}
|
||||
public List<PolicyGroupInfo> findPolicyGroupInfosByType(int type) {
|
||||
List<PolicyGroupInfo> list=policyGroupInfoDao.findPolicyGroupInfosByType(type);
|
||||
return list;
|
||||
|
||||
@@ -291,7 +291,7 @@ public class AvCfgService extends BaseService{
|
||||
entity.setCreateTime(new Date());
|
||||
//调用服务接口获取compileId
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
/*try {
|
||||
List<Integer> compileIds = ConfigServiceUtil.getId(1,1);
|
||||
if(!StringUtil.isEmpty(compileIds)){
|
||||
compileId = compileIds.get(0);
|
||||
@@ -300,13 +300,13 @@ public class AvCfgService extends BaseService{
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
if(compileId!=0){
|
||||
}*/
|
||||
// if(compileId!=0){
|
||||
entity.setCompileId(compileId);
|
||||
avCfgDao.insertAvSignSample(entity);
|
||||
}else{
|
||||
/*}else{
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
}*/
|
||||
|
||||
}else{
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
@@ -318,7 +318,7 @@ public class AvCfgService extends BaseService{
|
||||
//添加即时生效
|
||||
entity.setIsValid(1);
|
||||
entity.setIsAudit(1);
|
||||
audioAuditAvSignSample(entity,1);
|
||||
audioAuditAvSignSample(entity,1,true);
|
||||
}
|
||||
public void updateAvFileSampleValid(Integer isAudit,Integer isValid,String ids){
|
||||
String[] idArray = ids.split(",");
|
||||
@@ -375,18 +375,28 @@ public class AvCfgService extends BaseService{
|
||||
}
|
||||
}
|
||||
|
||||
public void audioAuditAvSignSample(AvSignSampleCfg entity,Integer isAudit) throws MaatConvertException{
|
||||
public void audioAuditAvSignSample(AvSignSampleCfg entity,Integer isAudit,boolean init) throws MaatConvertException{
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
avCfgDao.auditAvSignSample(entity);
|
||||
List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>();
|
||||
if(isAudit==1){
|
||||
list.add(entity);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(list);
|
||||
logger.info("文件样例下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
logger.info("音视频标志样例配置下发响应信息:"+result.getMsg());
|
||||
|
||||
if(init){//预置配置时初始下发配置
|
||||
list.add(entity);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(list);
|
||||
logger.info("文件样例下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
logger.info("音视频标志样例配置下发响应信息:"+result.getMsg());
|
||||
}else{
|
||||
list.add(entity);
|
||||
String json=gsonToJson(list);
|
||||
logger.info("标志状态变更:"+json);
|
||||
//调用服务接口修改配置内容
|
||||
String result = ConfigServiceUtil.patch(json, 2);
|
||||
logger.info("视频标志样状态变更响应信息:"+result);
|
||||
}
|
||||
}else if(isAudit==3){
|
||||
AvSignSampleCfg cfg = new AvSignSampleCfg();
|
||||
cfg.setIsValid(0);
|
||||
@@ -399,78 +409,57 @@ public class AvCfgService extends BaseService{
|
||||
//调用服务接口取消配置
|
||||
ToMaatResult result = ConfigServiceUtil.put(json, 2);
|
||||
logger.info("音视频标志样例配置取消配置响应信息:"+result.getMsg());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//预置配置下发
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditAvSignSample() throws MaatConvertException{
|
||||
try {
|
||||
AvSignSampleCfg entity = new AvSignSampleCfg();
|
||||
List<AvSignSampleCfg> avSignSampleList = avCfgDao.getAvSignSampleList(entity);
|
||||
if(avSignSampleList!=null&&avSignSampleList.size()>0){
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditAvSignSample() throws MaatConvertException{
|
||||
try {
|
||||
AvSignSampleCfg entity = new AvSignSampleCfg();
|
||||
List<AvSignSampleCfg> avSignSampleList = avCfgDao.getAvSignSampleList(entity);
|
||||
if(avSignSampleList!=null&&avSignSampleList.size()>0){
|
||||
// avCfgDao.updateAvSignSampleValid(entity);
|
||||
// avCfgDao.auditAvSignSample(entity);
|
||||
// List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>();
|
||||
// avSignSampleList.add(entity);
|
||||
for (AvSignSampleCfg av : avSignSampleList) {
|
||||
av.setAuditTime(new Date());
|
||||
av.setAuditorId(UserUtils.getUser().getId());
|
||||
if(av.getIsValid()!=null&&av.getIsValid()!=1){
|
||||
av.setIsValid(1);
|
||||
}
|
||||
avCfgDao.updateAvSignSampleValid(av);
|
||||
for (AvSignSampleCfg av : avSignSampleList) {
|
||||
av.setAuditTime(new Date());
|
||||
av.setAuditorId(UserUtils.getUser().getId());
|
||||
if(av.getIsValid()!=null&&av.getIsValid()!=1){
|
||||
av.setIsValid(1);
|
||||
}
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(avSignSampleList);
|
||||
logger.info("标志状态变更:"+json);
|
||||
//调用服务接口取消配置
|
||||
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
logger.info("音视频标志样状态变更响应信息:"+result.getMsg());
|
||||
}else{
|
||||
logger.info("视频场景预置失败,数据为空");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
avCfgDao.updateAvSignSampleValid(av);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(avSignSampleList);
|
||||
logger.info("标志状态变更:"+json);
|
||||
//调用服务接口取消配置
|
||||
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
logger.info("音视频标志样状态变更响应信息:"+result.getMsg());
|
||||
}else{
|
||||
logger.info("视频场景预置失败,数据为空");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("视频场景预置失败,数据为空");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditAvSignSample(AvSignSampleCfg entity) throws Exception{
|
||||
List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>();
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setDescription("0");
|
||||
list.add(entity);
|
||||
try {
|
||||
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditAvSignSample(AvSignSampleCfg entity) throws Exception{
|
||||
List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>();
|
||||
entity.setEditTime(new Date());
|
||||
entity.setDescription("0");
|
||||
list.add(entity);
|
||||
try {
|
||||
avCfgDao.updateAvSignSampleValid(entity);
|
||||
|
||||
// avCfgDao.auditAvSignSample(entity);
|
||||
//更新配置
|
||||
|
||||
if(entity.getIsValid()!=null&&entity.getIsValid()==Constants.VALID_YES){
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(list);
|
||||
logger.info("标志状态变更:"+json);
|
||||
//调用服务接口取消配置
|
||||
String result = ConfigServiceUtil.patch(json, 2);
|
||||
logger.info("视频标志样状态变更响应信息:"+result);
|
||||
}
|
||||
if(entity.getIsValid()!=null&&entity.getIsValid()==Constants.VALID_NO){
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(list);
|
||||
logger.info("标志状态变更:"+json);
|
||||
//调用服务接口取消配置
|
||||
ToMaatResult result = ConfigServiceUtil.put(json, 2);
|
||||
logger.info("视频标志样状态变更响应信息:"+result.getMsg());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
/*public void auditAvSignSample(AvSignSampleCfg entity,Integer isAudit) throws MaatConvertException{
|
||||
avCfgDao.auditAvSignSample(entity);
|
||||
List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>();
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.domain.configuration.GroupAreaInfo;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.GroupAreaDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
@Service
|
||||
public class GroupAreaService extends BaseService{
|
||||
|
||||
@Autowired
|
||||
private GroupAreaDao groupAreaDao;
|
||||
|
||||
public Page<GroupAreaInfo> findGroupAreaInfoList(Page<GroupAreaInfo> page, GroupAreaInfo entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<GroupAreaInfo> list=groupAreaDao.findGroupAreaInfoList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public GroupAreaInfo getInfoById(int groupId) {
|
||||
GroupAreaInfo GroupAreaInfo=groupAreaDao.getInfoById(groupId);
|
||||
return GroupAreaInfo;
|
||||
}
|
||||
|
||||
public void saveOrUpdate(GroupAreaInfo entity) {
|
||||
entity.setIsValid(1);
|
||||
if(entity.getId()==null){//新增
|
||||
Date createTime=new Date();
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
groupAreaDao.insert(entity);
|
||||
}else{//修改
|
||||
Date editTime=new Date();
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
groupAreaDao.update(entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void deldete(String ids, int isValid) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
GroupAreaInfo entity=new GroupAreaInfo();
|
||||
Date editTime=new Date();
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
entity.setIsValid(isValid);
|
||||
for (String id : ids.split(",")) {
|
||||
if(!StringUtil.isEmpty(id)){
|
||||
entity.setId(Long.parseLong(id));
|
||||
groupAreaDao.update(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取未使用的策略分组
|
||||
public List<PolicyGroupInfo> getNotUsedPolicyGroups(List<PolicyGroupInfo> policyGroups) {
|
||||
List<GroupAreaInfo> groupAreas=groupAreaDao.findGroupAreaInfoList(new GroupAreaInfo());
|
||||
for (GroupAreaInfo groupArea : groupAreas) {
|
||||
for (int i = 0; i < policyGroups.size(); i++) {
|
||||
Integer groupId = policyGroups.get(i).getGroupId();
|
||||
if(groupArea.getGroupId().equals(groupId)){
|
||||
policyGroups.remove(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
return policyGroups;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -85,8 +85,8 @@ ssl_control=SSL
|
||||
ssl_feature_control=SSL Cert Control
|
||||
ssl_sni_control=SSL SNI Control
|
||||
ssl_address_control=SSL IP Control
|
||||
https_website_content_replace=HTTPS Content Replace
|
||||
https_website_control=HTTPS Website Replace
|
||||
HTTP(s)_website_content_replace=HTTPS Website Replace
|
||||
https_website_control=HTTP(s) Website Replace
|
||||
rtp_ip_control=RTP IP Control
|
||||
mms_ip_control=MMS IP Control
|
||||
rtsp_ip_control=RTSP IP Control
|
||||
@@ -864,9 +864,9 @@ replace_zone=Search in
|
||||
replaced_content=Find
|
||||
http_req_uri=HTTP Request URI
|
||||
http_req_header=HTTP Request Header
|
||||
http_req_body=HTTP Request Content
|
||||
http_req_body=HTTP Request Body
|
||||
http_resp_header=HTTP Response Header
|
||||
http_resp_body=HTTP Response Content
|
||||
http_resp_body=HTTP Response Body
|
||||
#=============region_value,config form title=================
|
||||
#=============userregions===============
|
||||
userregion1=Customized Region 1
|
||||
@@ -950,8 +950,8 @@ domain_monit=Domain Intercepter
|
||||
ip_intercepter_whitelist=IP White List
|
||||
domain_monit_whitelist=Domain White List
|
||||
dns_strategy_reject=DNS Response Strategy Control
|
||||
proxy_http_req_body_replace=HTTP Request Content Replace
|
||||
proxy_http_res_body_replace=HTTP Response Content Replace
|
||||
proxy_http_req_body_replace=HTTP Request Body Replace
|
||||
proxy_http_res_body_replace=HTTP Response Body Replace
|
||||
dns_fake_ip_reject=DNS Spoofing IP Control
|
||||
app_strategy_reject=APP Strategy Control
|
||||
app_strategy_ratelimit=APP Strategy Ratelimit
|
||||
@@ -1102,8 +1102,8 @@ new=New
|
||||
basic_protocol_business_type=Basic Identify business classification
|
||||
tunnel_behavior_business_type=Behavior Identify business classification
|
||||
app_business_type=Application business classification
|
||||
pxy_intercept_monit_keyring=Certificate Strategy
|
||||
intercept_file_strategy=Certificate Strategy
|
||||
pxy_intercept_monit_keyring=Key Ring
|
||||
intercept_file_strategy=Key Ring
|
||||
root=Root Certificate
|
||||
intermediate=Intermediate Certificate
|
||||
end_entity=End-entity Certificate
|
||||
@@ -1219,7 +1219,7 @@ NTC_VOIP_ACCOUNT=VoIP Account
|
||||
export_failed=Export Failed
|
||||
user_manage=Client Account Manage
|
||||
ip_reuse_policy_object=IP Reuse Policy Object
|
||||
area_group_manage=Group Area Manage
|
||||
area_group_manage=Grouping Area Manage
|
||||
stream_media_protocol=Stream Media Protocol
|
||||
new_link=New Link
|
||||
active_link=Active Link
|
||||
@@ -1245,7 +1245,4 @@ mail_address_whitelist=Mail Address Whitelist
|
||||
mail_address_monit=Mail Address Monit
|
||||
mail_address_reject=Mail Address Reject
|
||||
ipsec_protocol=IPSEC Protocol
|
||||
intercept_intensity=Intercept Intensity
|
||||
weak_intensity=Weak
|
||||
stronger_intensity=Strong
|
||||
strong_intensity=Stronger
|
||||
intercept_intensity=Intercept Related Domains
|
||||
|
||||
@@ -1265,7 +1265,4 @@ mail_address_whitelist=Mail Address Whitelist
|
||||
mail_address_monit=Mail Address Monit
|
||||
mail_address_reject=Mail Address Reject
|
||||
ipsec_protocol=IPSEC Protocol
|
||||
intercept_intensity=Intercept Intensity
|
||||
weak_intensity=Weak
|
||||
stronger_intensity=Strong
|
||||
strong_intensity=Stronger
|
||||
intercept_intensity=Intercept Related Domains
|
||||
|
||||
@@ -1240,7 +1240,4 @@ mail_address_monit=\u90AE\u4EF6\u5730\u5740\u76D1\u6D4B
|
||||
mail_address_reject=\u90AE\u4EF6\u5730\u5740\u7BA1\u63A7
|
||||
ipsec_protocol=IPSEC\u534F\u8BAE
|
||||
intercept_intensity=\u62E6\u622A\u5F3A\u5EA6
|
||||
weak_intensity=\u5F31
|
||||
stronger_intensity=\u8F83\u5F3A
|
||||
strong_intensity=\u5F3A
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ DELETE FROM byte_features_cfg;
|
||||
DELETE FROM cfg_index_info;
|
||||
DELETE FROM av_sign_sample_cfg;
|
||||
#视频场在数据库预置一条compileId为0数据
|
||||
INSERT INTO `av_sign_sample_cfg` VALUES ('10022', '1', '1', '0', '0', '16', '1', null, '0', '2018-09-06 15:56:53', null, null, '158', '2018-09-13 16:43:54', '266', '0', '0', '0', '0', '0', '0', '0', '33', '0', '0');
|
||||
--INSERT INTO `av_sign_sample_cfg` VALUES ('10022', '1', '1', '0', '0', '16', '1', null, '0', '2018-09-06 15:56:53', null, null, '158', '2018-09-13 16:43:54', '266', '0', '0', '0', '0', '0', '0', '0', '33', '0', '0');
|
||||
DELETE FROM complex_keyword_cfg;
|
||||
#慎重清理config_group_info! 特定服务新增的时候会预制组号,清理之后组号找不到会影响下发
|
||||
DELETE FROM config_group_info;
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
<select name="userRegion1"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('CONTROL_REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<option value="${replaceZoneC.itemCode}" <c:if test="${_cfg.userRegion1==replaceZoneC.itemCode || _cfg.userRegion1==null}">selected</c:if>><spring:message code="${replaceZoneC.itemValue}"/></option>
|
||||
<option value="${replaceZoneC.itemCode}" <c:if test="${_cfg.userRegion1==replaceZoneC.itemCode || (_cfg.userRegion1==null && replaceZoneC.itemCode eq 'http_resp_body')}">selected</c:if>><spring:message code="${replaceZoneC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -60,10 +60,9 @@ $(function(){
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<h3 class="page-title">
|
||||
<spring:message code="av_sample_video_porn_control"></spring:message>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="av_sample_video_porn_control"></spring:message>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -73,108 +72,148 @@ $(function(){
|
||||
<i class="fa fa-gift"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form ">
|
||||
<sys:message content="${message}" />
|
||||
<!-- BEGIN FORM-->
|
||||
<div class="col-md-2">
|
||||
<form id="presetFrom" action="${ctx}/ntc/av/sample/auditAvSignSample" method="get" class="form-horizontal">
|
||||
<div class="portlet-body form">
|
||||
<sys:message content="${message}" />
|
||||
<shiro:hasPermission name="avSignSample:preset">
|
||||
<form id="presetFrom" action="${ctx}/ntc/av/sample/auditAvSignSample" method="get" class="form-horizontal">
|
||||
<input type="hidden" name="functionId" value="${functionId }">
|
||||
<input type="hidden" name="cfgs[0].functionId" value="${functionId }">
|
||||
<input type="hidden" name="cfgs[0].isValid" value="1">
|
||||
<input type="hidden" name="cfgs[0].isAudit" value="1">
|
||||
<input type="hidden" name="cfgs[0].isAreaEffective" value="0">
|
||||
<input type="hidden" name="cfgs[0].description" value="0">
|
||||
<input type="hidden" name="cfgs[0].level" value="0">
|
||||
<input type="hidden" name="preset" value="1">
|
||||
<div class="form-actions" style="background-color: #FFFFFF">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-8 col-md-8">
|
||||
<button id="preset" type="submit" class="btn-danger"><spring:message code="preset"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<c:if test="${fn:length(serviceList)>0 and fn:length(cfgs)eq 0}">
|
||||
<input type="hidden" name="cfgs[0].serviceId" value="${serviceList[0].serviceId}">
|
||||
<input type="hidden" name="cfgs[0].action" value="${serviceList[0].action}">
|
||||
<div class="form-body">
|
||||
<!-- BEGIN FORM-->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="" style="background-color: #FFFFFF">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-8 col-md-8">
|
||||
<button id="preset" type="submit" class="btn-danger"><spring:message code="preset"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</form>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/ntc/av/sample/auditAvSignSample" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="functionId" value="${functionId }">
|
||||
<input type="hidden" name="functionId" value="${functionId}">
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<c:forEach items="${cfgs}" var="_cfg"
|
||||
varStatus="status">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<%-- <label class="control-label col-md-3">
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq _cfg.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</label> --%>
|
||||
<input type="hidden" name="cfgs[${status.index }].cfgId" value="${_cfg.cfgId }">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap hidden">
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(cfgs)>0 }">
|
||||
<c:forEach items="${cfgs}" var="_cfg" varStatus="status">
|
||||
<input type="hidden" name="cfgs[${status.index }].cfgId" value="${_cfg.cfgId }">
|
||||
<input type="hidden" id="serviceId" name="cfgs[${status.index }].serviceId" value="${_cfg.serviceId }">
|
||||
<input type="hidden" name="cfgs[${status.index }].compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="cfgs[${status.index }].isValidOld" value="${_cfg.isValid}">
|
||||
<input type="hidden" id="oldAction" name="cfgs[${status.index }].actionOld" value="${_cfg.action}">
|
||||
<input type="hidden" id="isValid" name="cfgs[${status.index }].isValid" value="${_cfg.isValid}">
|
||||
<%-- <div class="col-md-6">
|
||||
<div class="bootstrap-switch">
|
||||
<input type="checkbox" data-on="danger"
|
||||
data-off="primary"
|
||||
data-on-label="<spring:message code="on"/>"
|
||||
data-off-label="<spring:message code="off"/>"
|
||||
name="cfgs[${status.index }].isValid"
|
||||
value="${_cfg.isValid }"
|
||||
<c:if test="${_cfg.isValid eq 1}">
|
||||
checked
|
||||
</c:if>
|
||||
/>
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="">
|
||||
<c:if test="${_cfg.functionId eq service.functionId}">
|
||||
<input id="actionOn" type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
isValid="${_cfg.isValid}"
|
||||
value="${service.action }" class="required action radio-inline radio-on"
|
||||
<c:if test="${(_cfg.action==service.action || (_cfg.action==null && satus.index==0))&&_cfg.isValid!=0}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
<input type="hidden" id="isValid" name="cfgs[${status.index }].isValid" value="1">
|
||||
<input type="hidden" id="isAudit" name="cfgs[${status.index }].isAudit" value="0">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="is_audit"/></label>
|
||||
<div class="col-md-6" style="margin-top:8px">
|
||||
<c:choose>
|
||||
<c:when test="${_cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${_cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${_cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${_cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
<input id="actionOff" serviceId="${_cfg.serviceId }"
|
||||
isValid="${_cfg.isValid}"
|
||||
type="radio" name="action" class="radio-inline action radio-off" value="${_cfg.action }" <c:if test="${_cfg.isValid == 0}">checked</c:if>> <spring:message code="off"/>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div id="level" class="form-group" hidden="hidden">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="harm_level"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required number" range="[0,100]" type="text" name="cfgs[${status.index }].level" value="${_cfg.level }">
|
||||
</div>
|
||||
</div>
|
||||
<div for="cfgs[${status.index }].level"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<div id="level" class="form-group" hidden="hidden">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="harm_level"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required number" range="[0,100]" type="text" name="cfgs[${status.index }].level" value="${_cfg.level }">
|
||||
</div>
|
||||
</div>
|
||||
<div for="cfgs[${status.index }].level"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<tr>
|
||||
<td><input type="checkbox" checked="true" class="i-checks" id="${_cfg.cfgId}" value="${_cfg.isAudit}"></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody></table>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
<shiro:hasPermission name="avSignSample:config">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="edit"/></button>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="avSignSample:confirm">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/ntc/av/sample/auditAvAudioSignSample?isAudit=1&isValid=1&functionId=${functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/av/sample/auditAvAudioSignSample?isAudit=2&isValid=0&functionId=${functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/av/sample/auditAvAudioSignSample?isAudit=3&isValid=0&functionId=${functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<%-- <button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button> --%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form){
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="area_group_manage"></spring:message>
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.id}"><spring:message code="add"></spring:message></c:if>
|
||||
<c:if test="${not empty _cfg.id}"><spring:message code="edit"></spring:message></c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/cfg/groupArea/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="id" value="${_cfg.id}">
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="group_name"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="groupId" class="selectpicker show-tick form-control required" data-live-search="true" data-live-search-placeholder="search" >
|
||||
<option value="" <c:if test="${empty _cfg.groupId }">selected</c:if>><spring:message code="select"/></option>
|
||||
<c:forEach items="${policyGroups }" var="policyGroup">
|
||||
<option value="${policyGroup.groupId}" <c:if test="${_cfg.groupId==policyGroup.groupId }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="groupId"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="area"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="areaCode" class="selectpicker show-tick form-control required" data-live-search="true" data-live-search-placeholder="search" >
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<c:forEach items="${areas}" var="area">
|
||||
<option value="${area.itemCode}" <c:if test="${_cfg.areaCode == area.itemCode }">selected</c:if> >${area.itemValue}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="areaCode"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,193 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.groupId}"){
|
||||
$("#intype").val("${cfg.groupId}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<%-- <shiro:hasPermission name="avContUrl:config"> --%>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/cfg/groupArea/groupAreaForm'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message>
|
||||
</button>
|
||||
<%--</shiro:hasPermission>--%>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="area_group_manage"/>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/cfg/groupArea/groupAreaList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="areaCode"><spring:message code="area"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="hidden" value="">
|
||||
<div class="input-group-btn">
|
||||
<form:select id="" path="areaCode" class="selectpicker select2 input-medium" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${areas}" var="area">
|
||||
<form:option value="${area.itemCode }"><spring:message code="${area.itemValue }"/></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<%-- <shiro:hasPermission name="avContUrl:config"> --%>
|
||||
<sys:delRow url="${ctx}/cfg/groupArea/groupAreaForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/cfg/groupArea/delete?isValid=-1" id="contentTable" label="delete"></sys:delRow>
|
||||
<%-- </shiro:hasPermission> --%>
|
||||
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<sys:message content="${message}" />
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th><spring:message code="group_name"/></th>
|
||||
<th><spring:message code="area"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.id}" value="0" "></td>
|
||||
<td>
|
||||
<%-- <a href="javascript:;" data-original-title="${cfg.groupName}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(cfg.groupName,20)}
|
||||
</a> --%>
|
||||
<c:forEach items="${policyGroups }" var="policyGroup">
|
||||
<c:if test="${cfg.groupId==policyGroup.groupId }"><spring:message code="${policyGroup.groupName}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${areas}" var="area">
|
||||
<c:if test="${cfg.areaCode==area.itemCode }"><spring:message code="${area.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user