1、配置操作tag增加修改操作;2、音视频文件样例配置列表、表单界面、新增、修改功能涉及到functionService与functionRegion字典使用部分提交。

This commit is contained in:
zhangwei
2018-05-18 16:46:46 +08:00
parent ecb332df64
commit bee5dd6c05
22 changed files with 1684 additions and 594 deletions

View File

@@ -1,18 +1,19 @@
package com.nis.domain;
import java.util.Date;
import com.nis.domain.configuration.BaseCfg;
public class FunctionRegionDict {
public class FunctionRegionDict extends BaseCfg<FunctionRegionDict> {
/**
*
*/
private static final long serialVersionUID = 8813625022212298550L;
private Integer dictId;
private Integer functionId;
private String configRegion;
private Integer configRegionCode;
private String configRegionValue;
private String configDistrict;
private String configDesc;
private Integer isValid;
private Integer creatorId;
private Date creatTime;
private Integer editorId;
private Date editTime;
public Integer getDictId() {
return dictId;
}
@@ -25,11 +26,17 @@ public class FunctionRegionDict {
public void setFunctionId(Integer functionId) {
this.functionId = functionId;
}
public String getConfigRegion() {
return configRegion;
public Integer getConfigRegionCode() {
return configRegionCode;
}
public void setConfigRegion(String configRegion) {
this.configRegion = configRegion;
public void setConfigRegionCode(Integer configRegionCode) {
this.configRegionCode = configRegionCode;
}
public String getConfigRegionValue() {
return configRegionValue;
}
public void setConfigRegionValue(String configRegionValue) {
this.configRegionValue = configRegionValue;
}
public String getConfigDistrict() {
return configDistrict;
@@ -43,35 +50,5 @@ public class FunctionRegionDict {
public void setConfigDesc(String configDesc) {
this.configDesc = configDesc;
}
public Integer getIsValid() {
return isValid;
}
public void setIsValid(Integer isValid) {
this.isValid = isValid;
}
public Integer getCreatorId() {
return creatorId;
}
public void setCreatorId(Integer creatorId) {
this.creatorId = creatorId;
}
public Date getCreatTime() {
return creatTime;
}
public void setCreatTime(Date creatTime) {
this.creatTime = creatTime;
}
public Integer getEditorId() {
return editorId;
}
public void setEditorId(Integer editorId) {
this.editorId = editorId;
}
public Date getEditTime() {
return editTime;
}
public void setEditTime(Date editTime) {
this.editTime = editTime;
}
}

View File

@@ -1,8 +1,13 @@
package com.nis.domain;
import java.util.Date;
import com.nis.domain.configuration.BaseCfg;
public class FunctionServiceDict {
public class FunctionServiceDict extends BaseCfg<FunctionServiceDict> {
/**
*
*/
private static final long serialVersionUID = 1453401375628742549L;
private Integer dictId;
private Integer functionId;
private Integer protocolId;
@@ -10,11 +15,7 @@ public class FunctionServiceDict {
private Integer serviceId;
private String serviceName;
private String serviceDesc;
private Integer isValid;
private Integer creatorId;
private Date creatTime;
private Integer editorId;
private Date editTime;
private String actionCode;
public Integer getDictId() {
return dictId;
}
@@ -63,29 +64,12 @@ public class FunctionServiceDict {
public void setIsValid(Integer isValid) {
this.isValid = isValid;
}
public Integer getCreatorId() {
return creatorId;
public String getActionCode() {
return actionCode;
}
public void setCreatorId(Integer creatorId) {
this.creatorId = creatorId;
}
public Date getCreatTime() {
return creatTime;
}
public void setCreatTime(Date creatTime) {
this.creatTime = creatTime;
}
public Integer getEditorId() {
return editorId;
}
public void setEditorId(Integer editorId) {
this.editorId = editorId;
}
public Date getEditTime() {
return editTime;
}
public void setEditTime(Date editTime) {
this.editTime = editTime;
public void setActionCode(String actionCode) {
this.actionCode = actionCode;
}
}

View File

@@ -0,0 +1,44 @@
package com.nis.domain.configuration;
public class AvFileSampleCfg extends BaseCfg<AvFileSampleCfg> {
/**
*
*/
private static final long serialVersionUID = -2356472662189941874L;
private String srcUrl;
private String sampleUrl;
private String srcMd5;
private String sampleMd5;
private Integer level;
public String getSrcUrl() {
return srcUrl;
}
public void setSrcUrl(String srcUrl) {
this.srcUrl = srcUrl;
}
public String getSampleUrl() {
return sampleUrl;
}
public void setSampleUrl(String sampleUrl) {
this.sampleUrl = sampleUrl;
}
public String getSrcMd5() {
return srcMd5;
}
public void setSrcMd5(String srcMd5) {
this.srcMd5 = srcMd5;
}
public String getSampleMd5() {
return sampleMd5;
}
public void setSampleMd5(String sampleMd5) {
this.sampleMd5 = sampleMd5;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
}

View File

@@ -0,0 +1,23 @@
package com.nis.domain.configuration;
public class AvSignSampleCfg extends BaseCfg<AvSignSampleCfg> {
/**
*
*/
private static final long serialVersionUID = 8002327858986390761L;
private String description;
private Integer level;
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
}

View File

@@ -47,6 +47,16 @@ public final class Constants {
* 特征域字典key
*/
public static final String CACHE_FEATURES_DICT_MAP = "featuresDictMap";
/**
* 功能业务字典key
*/
public static final String CACHE_FUNCTION_SERVICE_DICT = "functionServiceDict";
/**
* 功能配置域字典key
*/
public static final String CACHE_FUNCTION_REGION_DICT = "functionRegionDict";
/**
* 词典数据分类
*/

View File

@@ -8,9 +8,13 @@ import org.apache.commons.lang3.StringUtils;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.nis.domain.FunctionRegionDict;
import com.nis.domain.FunctionServiceDict;
import com.nis.domain.SysDataDictionaryItem;
import com.nis.domain.SysDataDictionaryName;
import com.nis.domain.basics.SysDictInfo;
import com.nis.web.dao.FunctionRegionDictDao;
import com.nis.web.dao.FunctionServiceDictDao;
import com.nis.web.dao.SysDictDao;
import com.nis.web.dao.basics.SysDictInfoDao;
import com.nis.web.service.SpringContextHolder;
@@ -28,6 +32,8 @@ public class DictUtils {
private final static SysDictDao dictDao = SpringContextHolder.getBean(SysDictDao.class);
private final static SysDictInfoDao sysDictInfoDao = SpringContextHolder.getBean(SysDictInfoDao.class);
private final static FunctionRegionDictDao functionRegionDictDao = SpringContextHolder.getBean(FunctionRegionDictDao.class);
private final static FunctionServiceDictDao functionServiceDictDao = SpringContextHolder.getBean(FunctionServiceDictDao.class);
public static Map<String, List<SysDataDictionaryItem>> getDictData() {
@@ -170,4 +176,44 @@ public class DictUtils {
return dictMap.get(itemCode);
}
/**
* 功能业务字典,获取相应功能菜单对应的业务信息
* @param functionId
* @return
*/
public static List<FunctionServiceDict> getFunctionServiceDictList(Integer functionId){
List<FunctionServiceDict> allDictList = (List<FunctionServiceDict>)CacheUtils.get(Constants.CACHE_FUNCTION_SERVICE_DICT);
List<FunctionServiceDict> dictList = new ArrayList();
if(StringUtil.isEmpty(allDictList)){
FunctionServiceDict entity = new FunctionServiceDict();
allDictList = functionServiceDictDao.getList(entity);
CacheUtils.put(Constants.CACHE_FUNCTION_SERVICE_DICT, dictList);
}
for(FunctionServiceDict entity:allDictList){
if(entity.getFunctionId()==functionId){
dictList.add(entity);
}
}
return dictList;
}
/**
* 功能配置域字典,获取相应功能菜单对应的配置域信息
* @param functionId
* @return
*/
public static List<FunctionRegionDict> getFunctionRegionDictList(Integer functionId){
List<FunctionRegionDict> allDictList = (List<FunctionRegionDict>)CacheUtils.get(Constants.CACHE_FUNCTION_REGION_DICT);
List<FunctionRegionDict> dictList = new ArrayList();
if(StringUtil.isEmpty(allDictList)){
FunctionRegionDict entity = new FunctionRegionDict();
allDictList = functionRegionDictDao.getList(entity);
CacheUtils.put(Constants.CACHE_FUNCTION_REGION_DICT, dictList);
}
for(FunctionRegionDict entity:allDictList){
if(entity.getFunctionId()==functionId){
dictList.add(entity);
}
}
return dictList;
}
}

View File

@@ -17,6 +17,8 @@ import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.nis.domain.FunctionRegionDict;
import com.nis.domain.FunctionServiceDict;
import com.nis.domain.ServiceConfigInfo;
import com.nis.domain.basics.ServiceDictInfo;
import com.nis.domain.basics.SysDictInfo;
@@ -28,9 +30,10 @@ import com.nis.domain.configuration.BaseStringCfg;
import com.nis.domain.configuration.ComplexkeywordCfg;
import com.nis.domain.configuration.NumBoundaryCfg;
import com.nis.domain.configuration.RequestInfo;
import com.nis.main.ConvertTool;
//import com.nis.main.ConvertTool;
import com.nis.util.Constants;
import com.nis.util.DateUtils;
import com.nis.util.DictUtils;
import com.nis.util.JsonMapper;
import com.nis.web.service.ArchiveServcie;
import com.nis.web.service.AreaService;
@@ -44,6 +47,7 @@ import com.nis.web.service.UserService;
import com.nis.web.service.basics.ServiceDictInfoService;
import com.nis.web.service.basics.SysDictInfoService;
import com.nis.web.service.configuration.AppCfgService;
import com.nis.web.service.configuration.AvCfgService;
import com.nis.web.service.configuration.ComplexStringCfgService;
import com.nis.web.service.configuration.DnsIpCfgService;
import com.nis.web.service.configuration.FtpCfgService;
@@ -140,6 +144,8 @@ public class BaseController {
protected SpecificServiceCfgService specificServiceCfgService;
@Autowired
protected SpecificServiceHostCfgService specificServiceHostCfgService;
@Autowired
protected AvCfgService avCfgService;
/**
* 管理基础路径
*/
@@ -272,6 +278,32 @@ public class BaseController {
areaIpCfg.initDefaultValue();
model.addAttribute("_areaCfg", areaIpCfg);
}
protected void initFormCondition(Model model,BaseCfg cfg){
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
model.addAttribute("requestInfos", requestInfos);
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
model.addAttribute("fls", fls);
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
model.addAttribute("xzs", xzs);
List<ServiceDictInfo> lables=serviceDictInfoService.findLableDict();
model.addAttribute("lables", lables);
List<Integer> itTypeList=new ArrayList<Integer>();
itTypeList.add(Constants.ITEM_TYPE_AREA);
List<SysDictInfo> areas = sysDictInfoService.findAllSysDictInfo(new SysDictInfo(),itTypeList,null);
model.addAttribute("areas", areas);
itTypeList.clear();
itTypeList.add(Constants.ITEM_TYPE_ISP);
List<SysDictInfo> isps = sysDictInfoService.findAllSysDictInfo(new SysDictInfo(),itTypeList,null);
model.addAttribute("isps", isps);
//初始化一个默认的地域ip给界面
AreaIpCfg areaIpCfg=new AreaIpCfg();
areaIpCfg.initDefaultValue();
model.addAttribute("_areaCfg", areaIpCfg);
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId());
model.addAttribute("regionList", regionList);
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(cfg.getFunctionId());
model.addAttribute("serviceList", serviceList);
}
protected void initUpdateFormCondition(Model model,BaseCfg cfg){
//查询配置对应的地域ip
List<AreaIpCfg> areaCfgs=ipCfgService.getAreaCfgByCompileId(cfg.getCompileId());
@@ -319,6 +351,10 @@ public class BaseController {
itTypeList.add(Constants.ITEM_TYPE_ISP);
List<SysDictInfo> isps = sysDictInfoService.findAllSysDictInfo(new SysDictInfo(),itTypeList,null);
model.addAttribute("isps", isps);
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId());
model.addAttribute("regionList", regionList);
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(cfg.getFunctionId());
model.addAttribute("serviceList", serviceList);
}
protected void setSaveOrUpdateProps(Model model,BaseCfg cfg,String areaCfgIds) throws Exception{
String tableName=cfg.getTableName();
@@ -363,7 +399,7 @@ public class BaseController {
}
}
if(cfg.getCompileId()==null){
int compileId=new ConvertTool().getCompileId().intValue();
int compileId=0;
cfg.setCompileId(compileId);
}
Date date=new Date();

View File

@@ -5,8 +5,16 @@ import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import com.nis.domain.Page;
import com.nis.domain.configuration.AppIdCfg;
import com.nis.domain.configuration.AvFileSampleCfg;
import com.nis.domain.configuration.AvSignSampleCfg;
import com.nis.util.StringUtil;
import com.nis.web.controller.BaseController;
/**
* 处理音视频业务
* @author zhangwei
@@ -14,36 +22,55 @@ import org.springframework.web.bind.annotation.RequestMapping;
*/
@Controller
@RequestMapping("${adminPath}/ntc/av")
public class AvController {
public class AvController extends BaseController {
//音样例配置列表
@RequestMapping(value = {"/sample/audioList"})
public String audioList(Model model,HttpServletRequest request,HttpServletResponse response){
return "/cfg/av/sample/audioList";
//音视频文件样例配置列表
@RequestMapping(value = {"/sample/fileSampleList"})
public String fileSampleList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")AvFileSampleCfg entity){
Page<AvFileSampleCfg> page = avCfgService.getAvFileSampleList(new Page<AvFileSampleCfg>(request, response), entity);
model.addAttribute("page", page);
initPageCondition(model);
return "/cfg/av/fileSampleList";
}
//视频样例配置列表
@RequestMapping(value = {"/sample/vedioList"})
public String vedioList(Model model,HttpServletRequest request,HttpServletResponse response){
return "/cfg/av/sample/vedioList";
//视频标志样例配置列表
@RequestMapping(value = {"/sample/signSampleList"})
public String signSampleList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")AvSignSampleCfg entity){
Page<AvSignSampleCfg> page = avCfgService.getAvSignSampleList(new Page<AvSignSampleCfg>(request, response), entity);
model.addAttribute("page", page);
initPageCondition(model);
return "/cfg/av/signSampleList";
}
//图片样例配置列表
@RequestMapping(value = {"/sample/pictureList"})
public String pictureList(Model model,HttpServletRequest request,HttpServletResponse response){
return "/cfg/av/sample/pictureList";
//文件样例配置界面
@RequestMapping(value = {"/sample/fileSampleForm"})
public String fileSampleForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,AvFileSampleCfg entity){
if(!StringUtil.isEmpty(ids)){
entity = avCfgService.getAvFileSampleById(Long.parseLong(ids));
}
//voip样例配置列表
@RequestMapping(value = {"/sample/voipList"})
public String voipList(Model model,HttpServletRequest request,HttpServletResponse response){
return "/cfg/av/sample/voipList";
initFormCondition(model,entity);
model.addAttribute("_cfg", entity);
return "/cfg/av/fileSampleForm";
}
//色情场景样例配置列表
@RequestMapping(value = {"/sample/pornList"})
public String pornList(Model model,HttpServletRequest request,HttpServletResponse response){
return "/cfg/av/sample/pornList";
//标志样例配置界面
@RequestMapping(value = {"/sample/signSampleForm"})
public String signSampleForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,AvSignSampleCfg entity){
if(!StringUtil.isEmpty(ids)){
entity = avCfgService.getAvSignSampleById(Long.parseLong(ids));
}
initFormCondition(model,entity);
model.addAttribute("_cfg", entity);
return "/cfg/av/signSampleForm";
}
//保存文件样例配置
@RequestMapping(value = {"/sample/saveFileSample"})
public String saveFileSample(Model model,HttpServletRequest request,HttpServletResponse response,String ids,AvFileSampleCfg entity){
avCfgService.saveOrUpdateAvFileSample(entity);
return "redirect:" + adminPath +"/ntc/av/sample/fileSampleList?functionId="+entity.getFunctionId();
}
//保存标志样例配置
@RequestMapping(value = {"/sample/saveSignSample"})
public String saveSignSample(Model model,HttpServletRequest request,HttpServletResponse response,String ids,AvSignSampleCfg entity){
avCfgService.saveOrUpdateAvSignSample(entity);
return "redirect:" + adminPath +"/ntc/av/sample/signSampleList?functionId="+entity.getFunctionId();
}
}

View File

@@ -6,5 +6,5 @@ import com.nis.domain.FunctionRegionDict;
@MyBatisDao
public interface FunctionRegionDictDao {
List<FunctionRegionDict> getListByFunctionId(Integer functionId);
List<FunctionRegionDict> getList(FunctionRegionDict entity);
}

View File

@@ -4,22 +4,29 @@
<resultMap id="BaseResultMap" type="com.nis.domain.FunctionRegionDict" >
<id column="dict_id" property="dictId" jdbcType="INTEGER" />
<result column="function_id" property="functionId" jdbcType="INTEGER" />
<result column="config_region" property="configRegion" jdbcType="VARCHAR" />
<result column="config_region_value" property="configRegionValue" jdbcType="VARCHAR" />
<result column="config_region_code" property="configRegionCode" jdbcType="INTEGER" />
<result column="config_district" property="configDistrict" jdbcType="VARCHAR" />
<result column="config_desc" property="configDesc" jdbcType="VARCHAR" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
dict_id, function_id, config_region, config_district, config_desc, is_valid
dict_id, function_id, config_region_value,config_region_code, config_district, config_desc, is_valid
</sql>
<select id="getListByFunctionId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="getList" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List" />
from function_region_dict
where function_id = #{functionId,jdbcType=INTEGER} and is_valid=1
<if test="configRegion != null and configRegion!=''">
AND config_district=#{configRegion,jdbcType=VARCHAR}
where is_valid=1
<if test="functionId != null">
AND function_id = #{functionId,jdbcType=INTEGER}
</if>
<if test="configRegionValue != null and configRegionValue!=''">
AND config_region_value=#{configRegionValue,jdbcType=VARCHAR}
</if>
<if test="configRegionCode != null">
AND config_region_code=#{configRegionCode,jdbcType=VARCHAR}
</if>
</select>

View File

@@ -7,5 +7,5 @@ import com.nis.domain.FunctionServiceDict;
@MyBatisDao
public interface FunctionServiceDictDao {
List<FunctionServiceDict> getListByFunctionId(Integer functionId);
List<FunctionServiceDict> getList(FunctionServiceDict entity);
}

View File

@@ -6,6 +6,7 @@
<result column="function_id" property="functionId" jdbcType="INTEGER" />
<result column="protocol_id" property="protocolId" jdbcType="INTEGER" />
<result column="action" property="action" jdbcType="INTEGER" />
<result column="action_code" property="actionCode" jdbcType="VARCHAR" />
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
<result column="service_name" property="serviceName" jdbcType="VARCHAR" />
<result column="service_desc" property="serviceDesc" jdbcType="VARCHAR" />
@@ -13,13 +14,16 @@
</resultMap>
<sql id="Base_Column_List" >
dict_id, function_id, protocol_id, action, service_id, service_name,service_desc,is_valid
dict_id, function_id, protocol_id, action,action_code, service_id, service_name,service_desc,is_valid
</sql>
<select id="getListByFunctionId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="getList" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List" />
from function_service_dict
where function_id = #{functionId,jdbcType=INTEGER} and is_valid=1
where is_valid=1
<if test="functionId != null">
AND function_id = #{functionId,jdbcType=INTEGER}
</if>
<if test="protocolId != null">
AND (protocol_id=#{protocolId,jdbcType=INTEGER} or protocol_id=0)
</if>

View File

@@ -1,8 +1,20 @@
package com.nis.web.dao.configuration;
import java.util.List;
import com.nis.domain.configuration.AvFileSampleCfg;
import com.nis.domain.configuration.AvSignSampleCfg;
import com.nis.web.dao.MyBatisDao;
@MyBatisDao
public interface AvCfgDao {
public AvFileSampleCfg getAvFileSampleById(Long cfgId);
public AvSignSampleCfg getAvSignSampleById(Long cfgId);
public List<AvFileSampleCfg> getAvFileSampleList(AvFileSampleCfg entity);
public List<AvSignSampleCfg> getAvSignSampleList(AvSignSampleCfg entity);
public void insertAvFileSample(AvFileSampleCfg entity);
public void insertAvSignSample(AvSignSampleCfg entity);
public void updateAvFileSample(AvFileSampleCfg entity);
public void updateAvSignSample(AvSignSampleCfg entity);
}

View File

@@ -1,5 +1,249 @@
<?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.AvCfgDao" >
<resultMap id="AvFileSampleMap" type="com.nis.domain.configuration.AvFileSampleCfg" >
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
<result column="src_url" property="srcUrl" jdbcType="VARCHAR" />
<result column="sample_url" property="sampleUrl" jdbcType="VARCHAR" />
<result column="src_md5" property="srcMd5" jdbcType="VARCHAR" />
<result column="sample_md5" property="sampleMd5" jdbcType="VARCHAR" />
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
<result column="action" property="action" jdbcType="INTEGER" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
<result column="request_id" property="requestId" jdbcType="INTEGER" />
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
<result column="classify" property="classify" jdbcType="VARCHAR" />
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
<result column="lable" property="lable" jdbcType="VARCHAR" />
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
<result column="function_id" property="functionId" jdbcType="INTEGER" />
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
</resultMap>
<sql id="AvFileSample_Column" >
a.CFG_ID, a.SRC_URL,a.SAMPLE_URL, a.SRC_MD5,a.SAMPLE_MD5,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.cfg_type,a.cfg_region_code,a.LEVEL
</sql>
<select id="getAvFileSampleById" resultMap="AvFileSampleMap" parameterType="java.lang.Long" >
SELECT
<include refid="AvFileSample_Column" />
FROM av_file_sample_cfg a
WHERE a.CFG_ID = #{cfgId,jdbcType=BIGINT}
</select>
<select id="getAvFileSampleList" resultMap="AvFileSampleMap" >
SELECT
<include refid="AvFileSample_Column" />
<trim prefix="," prefixOverrides=",">
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
,ri.request_title as requestName
</trim>
FROM av_file_sample_cfg a
left join sys_user s on a.creator_id=s.id
left join sys_user e on a.editor_id=e.id
left join sys_user u on a.auditor_id=u.id
left join request_info ri on a.request_id=ri.id
left join service_dict_info sdic on a.classify=sdic.item_code and sdic.item_type=1 and sdic.is_leaf=0
left join service_dict_info sdia on a.attribute=sdia.item_code and sdia.item_type=2 and sdia.is_leaf=0
left join service_dict_info sdil on a.lable=sdil.item_code and sdil.item_type=3 and sdil.is_leaf=0
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="page !=null and page.where != null and page.where != ''">
AND ${page.where}
</if>
<if test="cfgId != null">
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfgDesc != null and cfgDesc != ''">
AND a.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if>
<if test="action != null">
AND a.ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="isValid != null">
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isValid == null">
AND a.IS_VALID != -1
</if>
<if test="isAudit != null">
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
<if test="creatorName != null and creatorName != ''">
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
</if>
<if test="createTime != null and createTime != ''">
AND a.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
</if>
<if test="editorName != null and editorName != ''">
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
</if>
<if test="editTime != null and editTime != ''">
AND a.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
</if>
<if test="auditorName != null and auditorName != ''">
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
</if>
<if test="auditTime != null and auditTime != ''">
AND a.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
</if>
<if test="serviceId != null">
AND a.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="requestId != null">
AND a.REQUEST_ID=#{requestId,jdbcType=INTEGER}
</if>
<if test="compileId != null">
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if>
<if test="classify != null and classify != ''">
AND a.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
</if>
<if test="attribute != null and attribute != ''">
AND a.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
</if>
<if test="lable != null and lable != ''">
AND a.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
</if>
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if>
<if test="functionId != null">
AND a.function_id=#{functionId,jdbcType=INTEGER}
</if>
</trim>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY CFG_ID desc
</otherwise>
</choose>
</select>
<insert id="insertAvFileSample" parameterType="com.nis.domain.configuration.AvFileSampleCfg" >
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
SELECT LAST_INSERT_ID()
</selectKey>
insert into av_file_sample_cfg (
SRC_URL,SAMPLE_URL, SRC_MD5,SAMPLE_MD5,LEVEL,CFG_DESC,ACTION,IS_VALID,IS_AUDIT,
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,function_id,cfg_type,cfg_region_code,level
)values (
#{srcUrl,jdbcType=VARCHAR},#{sampleUrl,jdbcType=VARCHAR},#{srcMd5,jdbcType=VARCHAR},
#{sampleMd5,jdbcType=VARCHAR},#{level,jdbcType=INTEGER},#{cfgDesc,jdbcType=VARCHAR},#{action,jdbcType=INTEGER},
0,0,#{creatorId,jdbcType=INTEGER},
now(),#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER},
#{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},#{functionId,jdbcType=INTEGER},
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{level,jdbcType=INTEGER}
)
</insert>
<update id="updateAvFileSample" parameterType="com.nis.domain.configuration.AvFileSampleCfg" >
update av_file_sample_cfg
<set >
<trim suffixOverrides=",">
<if test="cfgDesc != null and cfgDesc != ''" >
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
</if>
<if test="srcUrl != null and srcUrl != ''">
src_url = #{srcUrl,jdbcType=VARCHAR},
</if>
<if test="sampleUrl != null and sampleUrl != ''">
sample_url = #{sampleUrl,jdbcType=VARCHAR},
</if>
<if test="action != null" >
action = #{action,jdbcType=INTEGER},
</if>
<if test="isValid != null" >
is_valid = #{isValid,jdbcType=INTEGER},
</if>
<if test="isAudit != null" >
is_audit = #{isAudit,jdbcType=INTEGER},
</if>
<if test="creatorId != null" >
creator_id = #{creatorId,jdbcType=INTEGER},
</if>
<if test="createTime != null and createTime != ''" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="editorId != null" >
editor_id = #{editorId,jdbcType=INTEGER},
</if>
edit_time = now(),
<if test="serviceId != null" >
service_id = #{serviceId,jdbcType=INTEGER},
</if>
<if test="requestId != null" >
request_id = #{requestId,jdbcType=INTEGER},
</if>
<if test="isAreaEffective != null" >
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
</if>
<if test="classify != null and classify != ''" >
classify = #{classify,jdbcType=VARCHAR},
</if>
<if test="attribute != null and attribute != ''" >
attribute = #{attribute,jdbcType=VARCHAR},
</if>
<if test="lable != null and lable != ''" >
lable = #{lable,jdbcType=VARCHAR},
</if>
<if test="areaEffectiveIds != null" >
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
</if>
<if test="functionId != null" >
function_id = #{functionId,jdbcType=INTEGER},
</if>
<if test="cfgRegionCode != null" >
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
</if>
<if test="cfgType != null" >
cfg_type = #{cfgType,jdbcType=VARCHAR},
</if>
<if test="level != null" >
level = #{level,jdbcType=INTEGER},
</if>
</trim>
</set>
where cfg_id = #{cfgId,jdbcType=BIGINT}
</update>
<update id="updateAvFileSampleValid" parameterType="com.nis.domain.configuration.AvFileSampleCfg" >
update av_file_sample_cfg set is_valid = #{isValid,jdbcType=INTEGER},
editor_id = #{editorId,jdbcType=INTEGER} ,
edit_time = #{editTime,jdbcType=TIMESTAMP} where cfg_id = #{cfgId,jdbcType=BIGINT}
</update>
<update id="auditAvFileSample" parameterType="com.nis.domain.configuration.AvFileSampleCfg" >
update av_file_sample_cfg set is_audit = #{isAudit,jdbcType=INTEGER},
auditor_id = #{auditorId,jdbcType=INTEGER},
audit_time = #{auditTime,jdbcType=TIMESTAMP}
<if test="isValid != null" >
,is_valid = #{isValid,jdbcType=INTEGER}
</if>
where cfg_id = #{cfgId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -1,27 +1,69 @@
package com.nis.web.service.configuration;
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.configuration.AppIdCfg;
import com.nis.domain.configuration.AvFileSampleCfg;
import com.nis.domain.configuration.AvSignSampleCfg;
import com.nis.web.dao.FunctionRegionDictDao;
import com.nis.web.dao.FunctionServiceDictDao;
import com.nis.web.dao.configuration.AvCfgDao;
import com.nis.web.service.BaseService;
import com.nis.web.security.UserUtils;
import com.nis.web.service.CrudService;
/**
* 特定协议相关配置事务类
* 音视频配置相关事务类
* @author dell
*
*/
@Service
public class AvCfgService extends BaseService {
@Autowired
protected FunctionRegionDictDao functionRegionDictDao;
@Autowired
protected FunctionServiceDictDao functionServiceDictDao;
public class AvCfgService {
// @Autowired
// protected FunctionRegionDictDao functionRegionDictDao;
// @Autowired
// protected FunctionServiceDictDao functionServiceDictDao;
@Autowired
protected AvCfgDao avCfgDao;
public AvFileSampleCfg getAvFileSampleById(Long cfgId){
return avCfgDao.getAvFileSampleById(cfgId);
}
public AvSignSampleCfg getAvSignSampleById(Long cfgId){
return avCfgDao.getAvSignSampleById(cfgId);
}
public Page<AvFileSampleCfg> getAvFileSampleList(Page<AvFileSampleCfg> page, AvFileSampleCfg entity){
entity.setPage(page);
List<AvFileSampleCfg> list = avCfgDao.getAvFileSampleList(entity);
page.setList(list);
return page;
}
public Page<AvSignSampleCfg> getAvSignSampleList(Page<AvSignSampleCfg> page, AvSignSampleCfg entity){
entity.setPage(page);
List<AvSignSampleCfg> list = avCfgDao.getAvSignSampleList(entity);
page.setList(list);
return page;
}
public void saveOrUpdateAvFileSample(AvFileSampleCfg entity){
if(entity.getCfgId()==null){
entity.setCreatorId(UserUtils.getUser().getId());
entity.setCompileId(0);
avCfgDao.insertAvFileSample(entity);
}else{
entity.setEditorId(UserUtils.getUser().getId());
avCfgDao.updateAvFileSample(entity);
}
}
public void saveOrUpdateAvSignSample(AvSignSampleCfg entity){
if(entity.getCfgId()==null){
avCfgDao.insertAvSignSample(entity);
}else{
avCfgDao.updateAvSignSample(entity);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -76,6 +76,46 @@ function delAreaIsp(obj){
}
}
</script>
<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="whether_area_block"/></label>
<div class="col-md-6">
<label class="radio-inline">
<input type="radio" name="isAreaEffective" value="1" class="required"
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
<c:if test="${action==2}">disabled</c:if>
><spring:message code="yes"/>
</label>
<label class="radio-inline">
<input type="radio" name="isAreaEffective" value="0" class="required"
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
<c:if test="${action==2}">disabled</c:if>
><spring:message code="no"/>
</label>
<c:if test="${action==2}">
<input class="form-control" type="hidden" name="isAreaEffective" value="${_cfg.isAreaEffective}">
</c:if>
</div>
<div for="isAreaEffective"></div>
</div>
</div>
<div class="hidden areaType col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="area_control_type"/></label>
<div class="col-md-6">
<label class="radio-inline">
<input type="radio" name="areaType" value="1" class="required"><spring:message code="area"/> <spring:message code="isp"/>
</label>
<label class="radio-inline">
<input type="radio" name="areaType" value="0" class="required"><spring:message code="area"/> ip
</label>
</div>
<div for="areaType"></div>
<input class="form-control" type="hidden" name="areaEffectiveIds" value="${_cfg.areaEffectiveIds}">
</div>
</div>
</div>
<div class="hidden" id="areaIsp">
<h4 class="form-section"><spring:message code="area"/> <spring:message code="isp"/><small><span class="glyphicon glyphicon-plus" title="add"></span></small></h4>
<div class="container-fluid hidden">

View File

@@ -17,7 +17,7 @@
<a class="nav-link nav-toggle"
<c:if test="${secondMenu.href != null && secondMenu.href != ''}" var="secondHref">
href="javascript:;" onclick="page_turn('${secondMenu.id }','1','','${ctx}/${secondMenu.href }',this)" target="mainFrame" >
href="javascript:;" onclick="page_turn('${secondMenu.id }','${secondMenu.functionId }','1','','${ctx}/${secondMenu.href }',this)" target="mainFrame" >
</c:if>
<c:if test="${!secondHref }">
href="javascript:;" class="nav-link nav-toggle">
@@ -42,7 +42,7 @@
<a class="nav-link nav-toggle"
<c:if test="${thirdMenu.href != null && thirdMenu.href != ''}" var="thirdHref">
href="javascript:;" onclick="page_turn('${thirdMenu.id }','2','','${ctx}/${thirdMenu.href }',this)" target="mainFrame" >
href="javascript:;" onclick="page_turn('${thirdMenu.id }','${thirdMenu.functionId }','2','','${ctx}/${thirdMenu.href }',this)" target="mainFrame" >
</c:if>
<c:if test="${!thirdHref }">
@@ -61,7 +61,7 @@
<c:forEach items="${thirdMenu.children}" var="fourthMenu">
<li class="nav-item" id="menu_${fourthMenu.id }" menu-id="${fourthMenu.id }" menu-name="<spring:message code="${fourthMenu.code}"></spring:message>" >
<a href="javascript:;"
onclick="page_turn('${fourthMenu.id }','3','','${ctx}/${fourthMenu.href }',this)" target="mainFrame"
onclick="page_turn('${fourthMenu.id }','${fourthMenu.functionId }','3','','${ctx}/${fourthMenu.href }',this)" target="mainFrame"
class="nav-link ">
<%-- ${fourthMenu.name } --%> <spring:message code="${fourthMenu.code}"></spring:message>
<!-- <span class="badge badge-danger">1</span> -->

View File

@@ -9,7 +9,11 @@
<i class="fa fa-trash"> <spring:message code="delete"/></i>
</a>
</c:when>
<c:when test="${label eq 'update'}">
<a href="javascript:void(0);" onclick="update('${url}')" class="btn btn-default" data-toggle="tooltip" data-placement="top">
<i class="fa fa-check"></i> <spring:message code="edit"/>
</a>
</c:when>
<c:when test="${label eq 'approved'}">
<a href="javascript:void(0);" onclick="passOpt('${url}')"><i class="fa fa-check"></i> <spring:message code="approved"/></a>
</c:when>
@@ -47,6 +51,24 @@ function del(url){
return;
}
}
//修改配置
function update(url){
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
var cked = $("tbody tr td input.i-checks:checkbox:checked");
if($(checkboxes).filter(":checked").length==1){
if(cked.val()==1){
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
return;
}else if(cked.val()==3){
top.$.jBox.tip("<spring:message code='cancel_approved'/>", "<spring:message code='info'/>");
return;
}
doAll(checkboxes,url);
}else{
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
return;
}
}
//通过
function passOpt(url){
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");

View File

@@ -0,0 +1,173 @@
<%@ 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(){
switchIpType($("select[name$='ipType']"));
areaControlInit();
$("input[name='isAreaEffective']").on('change',function(){
var val=$(this).val();
if(val==1){
$(".areaType").removeClass("hidden");
if($("input[name='areaType']:checked").val()==1){//areaISP
$("#areaIsp").removeClass("hidden");
}else if($("input[name='areaType']:checked").val()==0){//areaIp
$("#areaIp").removeClass("hidden");
}
}else{
$(".areaType").addClass("hidden");
$("#areaIp").addClass("hidden");
$("#areaIsp").addClass("hidden");
}
});
$("select[name$='ipType']").on("change",function(){
switchIpType($(this));
});
$("input[name='areaType']").on('change',function(){
var val=$(this).val();
if($(this).is(":visible")){
if(val==0){
$("#areaIp").removeClass("hidden");
$("#areaIsp").addClass("hidden");
}else{
$("#areaIsp").removeClass("hidden");
$("#areaIp").addClass("hidden");
}
}else{
$("#areaIsp").addClass("hidden");
$("#areaIp").addClass("hidden");
}
});
$("#cancel").on("click",function(){
window.history.back();
});
$(".action").on("change",function(){
$("#serviceId").val($(this).attr("serviceId"));
});
$("#cfgFrom").validate({
errorPlacement: function(error,element){
$(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="${add}"></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.cfgId}"><spring:message code="add"></spring:message></c:if>
<c:if test="${not empty _cfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
</div>
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="cfgFrom" action="${ctx}/ntc/av/sample/saveFileSample" method="post" class="form-horizontal">
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
<input type="hidden" name="compileId" value="${_cfg.compileId}">
<input type="hidden" name="functionId" value="${_cfg.functionId}">
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
<!-- 配置域类型 -->
<c:forEach items="${regionList}" var="region">
<c:if test="${_cfg.functionId eq region.functionId}">
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
</c:if>
</c:forEach>
<div class="form-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
<div class="col-md-6">
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
</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="src_url"/></label>
<div class="col-md-6">
<input class="form-control required" type="text" name="srcUrl" value="${_cfg.srcUrl }">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="sample_url"/></label>
<div class="col-md-6">
<input class="form-control required" type="text" name="sampleUrl" value="${_cfg.sampleUrl}">
</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="harm_level"/></label>
<div class="col-md-6">
<input class="form-control required" type="text" name="level" value="${_cfg.level }">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="action"/></label>
<div class="col-md-6">
<c:forEach items="${serviceList}" var="service">
<label class="radio-inline">
<c:if test="${_cfg.functionId eq service.functionId}">
<input type="radio" name="action" serviceId="${service.serviceId }" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action}">checked</c:if>>
<spring:message code="${service.actionCode }"/>
</c:if>
</label>
</c:forEach>
</div>
</div>
</div>
</div>
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
</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>

View File

@@ -0,0 +1,366 @@
<%@ 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.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}");
} 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();
$("#isAudit").change(function(){
page();
});
//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",'');
$("#keywords").attr("value",'');
$("#searchForm")[0].reset();
});
});
var edit=function(url){
var cked = $('tbody tr td input.i-checks:checkbox:checked');
if(cked.val()==1){
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
return;
}
if(cked.length==1){
window.location = url+"&compileId="+cked.attr("id");
}else{
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
return;
}
}
</script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/ntc/av/sample/fileSampleForm?functionId=${cfg.functionId}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message></button>
</div>
<h3 class="page-title">
<small><spring:message code="date_list"/></small>
</h3>
<h5 class="page-header"></h5>
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/av/sample/fileSamplelist" method="post" class="form-search">
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
<input id="audit" name="audit" type="hidden" value="${audit}"/>
<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">
<c:set var="state"><spring:message code='state'/></c:set>
<form:select path="isAudit" class="selectpicker select2 input-small">
<form:option value=""><spring:message code="all_states"/></form:option>
<form:option value="0"><spring:message code="created"></spring:message></form:option>
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
</form:select>
</div>
<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="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
</form:select>
</div>
<input id="intype" class="form-control input-medium" type="text" value="">
</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="avFileSample:config">
<sys:delRow url="${ctx}/ntc/av/sample/fileSampleForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/av/sample/saveFileSample?isValid=-1" id="contentTable" label="delete"></sys:delRow>
</shiro:hasPermission>
<shiro:hasPermission name="avFileSample:audit">
<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/saveFileSample?isAudit=1&isValid=1" id="contentTable" label="approved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/av/sample/saveFileSample?isAudit=2&isValid=0" id="contentTable" label="unapproved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/av/sample/saveFileSample?isAudit=3&isValid=0" id="contentTable" label="cancelPass"></sys:delRow></li>
</ul>
</div>
</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-3">
<div class="form-group">
<label class="control-label"><spring:message code='request_number'/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${requestInfos}" var="requestInfo" >
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='type'/></label>
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${fls}" var="fl" >
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='attribute'/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${xzs}" var="xz" >
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='label'/></label>
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${lables}" var="lable" >
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
</div>
<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>&nbsp;</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>&nbsp;</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 class="col-md-2">
<div class="form-group">
<label><spring:message code="audit_time"/></label>
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_audit_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>&nbsp;</label>
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_audit_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>
<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="seq"/></th> --%>
<th><spring:message code="src_url"/></th>
<th><spring:message code="sample_url"/></th>
<th><spring:message code="harm_level"/></th>
<th><spring:message code="config_describe"/></th>
<th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th>
<th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th>
<th><spring:message code="is_audit"/></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>
<th><spring:message code="auditor"/></th>
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
<%-- <th><spring:message code="operation"></spring:message></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.cfgId}" value="${cfg.isAudit}"></td>
<td>${cfg.srcUrl }</td>
<td>${cfg.sampleUrl }</td>
<td>${cfg.level }</td>
<td>${cfg.cfgDesc }</td>
<td>
<c:if test="${1 eq cfg.action }"><spring:message code="block"/></c:if>
<c:if test="${2 eq cfg.action }"><spring:message code="monitor"/></c:if>
<c:if test="${5 eq cfg.action }"><spring:message code="block_white_list"/></c:if>
<c:if test="${6 eq cfg.action }"><spring:message code="monitor_white_list"/></c:if>
<c:if test="${7 eq cfg.action }"><spring:message code="block_monitor_white_list"/></c:if>
<c:if test="${8 eq cfg.action }"><spring:message code="grey_list"/></c:if>
</td>
<td>
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
<c:if test="${cfg.isAreaEffective==1}"><spring:message code="yes"/></c:if>
</td>
<td>${cfg.requestName }</td>
<td>
<c:forEach items="${fn:split(cfg.classify,',')}" var="classifyId">
<c:forEach items="${fls}" var="fl">
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
${fl.itemValue},
</c:if>
</c:forEach>
</c:forEach>
${classifyName[status]}
</td>
<td>
<c:forEach items="${fn:split(cfg.attribute,',')}" var="attributeId">
<c:forEach items="${xzs}" var="xz">
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">${xz.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<td>
<c:forEach items="${fn:split(cfg.lable,',')}" var="lableId">
<c:forEach items="${lables}" var="lable">
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">${lable.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<%-- <td>${cfg.areaEffectiveIds }</td> --%>
<td>
<c:if test="${cfg.isValid==0}"><spring:message code="no"/></c:if>
<c:if test="${cfg.isValid==1}"><spring:message code="yes"/></c:if>
<c:if test="${cfg.isValid==-1}"><spring:message code="deleted"/></c:if>
</td>
<td>
<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>
</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>
<td>${cfg.auditorName }</td>
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -67,7 +67,7 @@
});
//页面跳转函数 level:级别1顶级2有子级。name:菜单名称,有多级#间隔。url访问路径。object点击元素对象。
function page_turn(id, level, name, url,obj){
function page_turn(id, functionId,level, name, url,obj){
var $object = $("#menu_"+id);//点击当前级别
$(".page-sidebar li").filter(".active,.open").removeClass("active open");//删除选中样式
@@ -110,6 +110,11 @@ function page_turn(id, level, name, url,obj){
App.startPageLoading({animate:true});
//调入页面
if(url.indexOf("?")>0){
url = url+"&functionId="+functionId;
}else{
url = url+"?functionId="+functionId;
}
window.frames['mainFrame'].location=url;
$("#mainFrame").load(function(){
@@ -208,8 +213,6 @@ window.onresize=function(){
<div class="hor-menu hidden-sm hidden-xs">
<ul class="nav navbar-nav mega-menu">
<c:forEach items="${fns:getMenuTreeList()}" var="menu" varStatus="idxStatus">
<c:if test="${menu.isTop eq 1 && menu.isShow eq 1}">