解决冲突 提交本地
This commit is contained in:
152
src/main/java/com/nis/domain/specific/SpecificServiceCfg.java
Normal file
152
src/main/java/com/nis/domain/specific/SpecificServiceCfg.java
Normal file
@@ -0,0 +1,152 @@
|
||||
package com.nis.domain.specific;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.util.Configurations;
|
||||
|
||||
/**
|
||||
* 系统特定服务信息表-记录特定服务信息(specific_service_cfg)
|
||||
* @author zsl
|
||||
*
|
||||
*/
|
||||
public class SpecificServiceCfg extends BaseEntity<SpecificServiceCfg>{
|
||||
|
||||
private static final long serialVersionUID = -1133644323636425766L;
|
||||
|
||||
private Integer specServiceId; //spec_service_id 协议ID int N 主键,初始化
|
||||
//private Integer specServiceCode; //协议编码 int N 暂定,以后可扩展 1000:微信 , 1001:QQ
|
||||
private String specServiceName; //spec_service_name 协议名称 varchar(64) N
|
||||
private String specServiceDesc; //spec_service_desc 协议描述 varchar2(64) N
|
||||
private Integer isValid; //is_valid 有效标志 int N 1-有效 0-无效
|
||||
private Date opTime; //op_time 操作时间 date N
|
||||
private SpecificServiceCfg parent; //parent_id 父节点id int N 0表示一级节点
|
||||
private Integer isLeaf; //is_leaf 是否是叶子节点 int N 0否,1是,只有一级填0
|
||||
private Integer groupId; //group_id maat端配置分组id int N 缺省0,表示未与maat分组同步
|
||||
|
||||
private Date beginDate; // 开始日期
|
||||
private Date endDate; // 结束日期
|
||||
private String showSequence; //显示序号
|
||||
|
||||
public Integer getSpecServiceId() {
|
||||
return specServiceId;
|
||||
}
|
||||
public void setSpecServiceId(Integer specServiceId) {
|
||||
this.specServiceId = specServiceId;
|
||||
}
|
||||
public String getSpecServiceName() {
|
||||
return specServiceName;
|
||||
}
|
||||
public void setSpecServiceName(String specServiceName) {
|
||||
this.specServiceName = specServiceName;
|
||||
}
|
||||
public String getSpecServiceDesc() {
|
||||
return specServiceDesc;
|
||||
}
|
||||
public void setSpecServiceDesc(String specServiceDesc) {
|
||||
this.specServiceDesc = specServiceDesc;
|
||||
}
|
||||
public Integer getIsValid() {
|
||||
return isValid;
|
||||
}
|
||||
public void setIsValid(Integer isValid) {
|
||||
this.isValid = isValid;
|
||||
}
|
||||
public Date getOpTime() {
|
||||
return opTime;
|
||||
}
|
||||
public void setOpTime(Date opTime) {
|
||||
this.opTime = opTime;
|
||||
}
|
||||
public SpecificServiceCfg getParent() {
|
||||
return parent;
|
||||
}
|
||||
public void setParent(SpecificServiceCfg parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
public Integer getIsLeaf() {
|
||||
return isLeaf;
|
||||
}
|
||||
public void setIsLeaf(Integer isLeaf) {
|
||||
this.isLeaf = isLeaf;
|
||||
}
|
||||
public Integer getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
public void setGroupId(Integer groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
public Date getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
public void setBeginDate(Date beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
public Date getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
public void setEndDate(Date endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
public String getShowSequence() {
|
||||
return showSequence;
|
||||
}
|
||||
public void setShowSequence(String showSequence) {
|
||||
this.showSequence = showSequence;
|
||||
}
|
||||
@JsonIgnore
|
||||
public static void sortList(List<SpecificServiceCfg> list, List<SpecificServiceCfg> allList, Integer parentId, boolean cascade) {
|
||||
|
||||
for(int i=0;i<allList.size();i++){
|
||||
SpecificServiceCfg ss = allList.get(i);
|
||||
if(ss!=null&&ss.getParent()!=null&&ss.getParent().getSpecServiceId()!=null&&ss.getParent().getSpecServiceId()==parentId){
|
||||
list.add(ss);
|
||||
if(cascade){
|
||||
for(int j=0;j<allList.size();j++){
|
||||
SpecificServiceCfg child = allList.get(j);
|
||||
if(child!=null&&child.getParent()!=null&&child.getParent().getSpecServiceId()!=null&&child.getParent().getSpecServiceId().equals(ss.getSpecServiceId())){
|
||||
sortList(list,allList,ss.getSpecServiceId(),true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
//处理下级序号
|
||||
public static void addChildrenSeq(List<SpecificServiceCfg> list,Integer parentId){
|
||||
int countNo = 1;
|
||||
for(int i=0; i<list.size(); i++){
|
||||
SpecificServiceCfg ss = list.get(i);
|
||||
if(ss.getParent()!=null && ss.getParent().getSpecServiceId()!=null
|
||||
&& ss.getParent().getSpecServiceId().equals(parentId)){
|
||||
//找出该父类
|
||||
for(SpecificServiceCfg se:list){
|
||||
if(se.getSpecServiceId()==parentId){
|
||||
ss.setShowSequence(se.getShowSequence()+Configurations.getStringProperty("childrenMark", ".")+countNo);
|
||||
countNo++;
|
||||
}
|
||||
}
|
||||
//继续获取子节点
|
||||
for (int j=0; j<list.size(); j++){
|
||||
SpecificServiceCfg child = list.get(j);
|
||||
if (child.getParent()!=null && child.getParent().getSpecServiceId()!=null
|
||||
&& child.getParent().getSpecServiceId().equals(ss.getSpecServiceId())){
|
||||
addChildrenSeq(list, ss.getSpecServiceId());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
package com.nis.domain.specific;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.domain.SysUser;
|
||||
|
||||
/**
|
||||
* 系统特定服务信息表-记录特定服务信息(specific_service_cfg)
|
||||
* @author zsl
|
||||
*
|
||||
*/
|
||||
public class SpecificServiceHostCfg extends BaseEntity<SpecificServiceHostCfg>{
|
||||
|
||||
private static final long serialVersionUID = -301627652860717175L;
|
||||
|
||||
private Integer hostId; //host_id 配置ID bigint N 主键,自增
|
||||
private Integer specServiceId; //spec_service_id 协议id int N protocol_info_cfg.protocol_id
|
||||
private String srcIp; //src_ip 源IP地址 varchar(64) N 缺省0.0.0.0值表示任意
|
||||
private String srcIpMask; //src_ip_mask 源地址掩码 varchar(64) N IPV4:255.255.255.255表示无掩码,即精确IP匹配,0.0.0.0值表示任意;
|
||||
//IPV6:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF表示无掩码,::(两个半角冒号)表示任意。非0掩码值必须是2的指数幂,下同。
|
||||
private String srcPort; //src_port 源端口 varchar(6) N 0表示任意值
|
||||
private String srcPortMask; //src_port_mask 源端口掩码 varchar(6) N 65535表示无掩码,即精确端口匹配,0表示任意
|
||||
private String dstIp; //dst_ip 目的IP地址 varchar(64) N 缺省0.0.0.0值表示任意
|
||||
private String dstIpMask; //dst_ip_mask 目的地址掩码 varchar(64) N 同源ip地址掩码
|
||||
private String dstPort; //dst_port 目的端口 varchar(6) N 目的端口,0表示任意值
|
||||
private String dstPortMask; //dst_port_mask 目的端口掩码 varchar(6) N 同源端口掩码
|
||||
private Integer direction;; //direction 方向 int N 0双向,1单向,默认缺省为双向。
|
||||
private Integer protocol; //protocol 协议 int N 6表示tcp,17表示udp,0表示任意
|
||||
private Integer isValid; //is_valid 有效标识 int N 0无效,1有效
|
||||
private Integer isAudit; //is_audit 是否审核 int N 0未审核,1审核通过,2审核未通过,3取消审核通过(即删除)
|
||||
private SysUser creator; //creator_id 创建人员 int N 取自sys_user.id
|
||||
private Date createTime; //create_time 配置时间 date N
|
||||
private SysUser editor; //editor_id 修改人员 int Y 取自sys_user.id
|
||||
private Date editTime; //edit_time 修改时间 date Y
|
||||
private SysUser auditor; //auditor_id 审核人员 int Y 取自sys_user.id
|
||||
private Date auditTime; //audit_time 审核时间 date Y
|
||||
|
||||
|
||||
|
||||
|
||||
private Date beginDate;
|
||||
private Date endDate;
|
||||
private Date editBeginDate;
|
||||
private Date editEndDate;
|
||||
private Date auditBeginDate;
|
||||
private Date auditEndDate;
|
||||
|
||||
|
||||
public Integer getHostId() {
|
||||
return hostId;
|
||||
}
|
||||
public void setHostId(Integer hostId) {
|
||||
this.hostId = hostId;
|
||||
}
|
||||
public Integer getSpecServiceId() {
|
||||
return specServiceId;
|
||||
}
|
||||
public void setSpecServiceId(Integer specServiceId) {
|
||||
this.specServiceId = specServiceId;
|
||||
}
|
||||
public String getSrcIp() {
|
||||
return srcIp;
|
||||
}
|
||||
public void setSrcIp(String srcIp) {
|
||||
this.srcIp = srcIp;
|
||||
}
|
||||
public String getSrcIpMask() {
|
||||
return srcIpMask;
|
||||
}
|
||||
public void setSrcIpMask(String srcIpMask) {
|
||||
this.srcIpMask = srcIpMask;
|
||||
}
|
||||
public String getSrcPort() {
|
||||
return srcPort;
|
||||
}
|
||||
public void setSrcPort(String srcPort) {
|
||||
this.srcPort = srcPort;
|
||||
}
|
||||
public String getSrcPortMask() {
|
||||
return srcPortMask;
|
||||
}
|
||||
public void setSrcPortMask(String srcPortMask) {
|
||||
this.srcPortMask = srcPortMask;
|
||||
}
|
||||
public String getDstIp() {
|
||||
return dstIp;
|
||||
}
|
||||
public void setDstIp(String dstIp) {
|
||||
this.dstIp = dstIp;
|
||||
}
|
||||
public String getDstIpMask() {
|
||||
return dstIpMask;
|
||||
}
|
||||
public void setDstIpMask(String dstIpMask) {
|
||||
this.dstIpMask = dstIpMask;
|
||||
}
|
||||
public String getDstPort() {
|
||||
return dstPort;
|
||||
}
|
||||
public void setDstPort(String dstPort) {
|
||||
this.dstPort = dstPort;
|
||||
}
|
||||
public String getDstPortMask() {
|
||||
return dstPortMask;
|
||||
}
|
||||
public void setDstPortMask(String dstPortMask) {
|
||||
this.dstPortMask = dstPortMask;
|
||||
}
|
||||
public Integer getDirection() {
|
||||
return direction;
|
||||
}
|
||||
public void setDirection(Integer direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
public Integer getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
public void setProtocol(Integer protocol) {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
public Integer getIsValid() {
|
||||
return isValid;
|
||||
}
|
||||
public void setIsValid(Integer isValid) {
|
||||
this.isValid = isValid;
|
||||
}
|
||||
public Integer getIsAudit() {
|
||||
return isAudit;
|
||||
}
|
||||
public void setIsAudit(Integer isAudit) {
|
||||
this.isAudit = isAudit;
|
||||
}
|
||||
public SysUser getCreator() {
|
||||
return creator;
|
||||
}
|
||||
public void setCreator(SysUser creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
public SysUser getEditor() {
|
||||
return editor;
|
||||
}
|
||||
public void setEditor(SysUser editor) {
|
||||
this.editor = editor;
|
||||
}
|
||||
public Date getEditTime() {
|
||||
return editTime;
|
||||
}
|
||||
public void setEditTime(Date editTime) {
|
||||
this.editTime = editTime;
|
||||
}
|
||||
public SysUser getAuditor() {
|
||||
return auditor;
|
||||
}
|
||||
public void setAuditor(SysUser auditor) {
|
||||
this.auditor = auditor;
|
||||
}
|
||||
public Date getAuditTime() {
|
||||
return auditTime;
|
||||
}
|
||||
public void setAuditTime(Date auditTime) {
|
||||
this.auditTime = auditTime;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Date getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
public void setBeginDate(Date beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
public Date getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
public void setEndDate(Date endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
public Date getEditBeginDate() {
|
||||
return editBeginDate;
|
||||
}
|
||||
public void setEditBeginDate(Date editBeginDate) {
|
||||
this.editBeginDate = editBeginDate;
|
||||
}
|
||||
public Date getEditEndDate() {
|
||||
return editEndDate;
|
||||
}
|
||||
public void setEditEndDate(Date editEndDate) {
|
||||
this.editEndDate = editEndDate;
|
||||
}
|
||||
public Date getAuditBeginDate() {
|
||||
return auditBeginDate;
|
||||
}
|
||||
public void setAuditBeginDate(Date auditBeginDate) {
|
||||
this.auditBeginDate = auditBeginDate;
|
||||
}
|
||||
public Date getAuditEndDate() {
|
||||
return auditEndDate;
|
||||
}
|
||||
public void setAuditEndDate(Date auditEndDate) {
|
||||
this.auditEndDate = auditEndDate;
|
||||
}
|
||||
/**
|
||||
* 处理数据
|
||||
* @param list
|
||||
* @param sourceList
|
||||
* @param ParentId
|
||||
* @param cascade
|
||||
*/
|
||||
@JsonIgnore
|
||||
public static void sort(List<SpecificServiceHostCfg> list, List<SpecificServiceHostCfg> sourceList, Integer ParentId, boolean cascade){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -11,9 +11,11 @@ import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.SysDataDictionaryName;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.basics.SysDictInfo;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.web.dao.SysDictDao;
|
||||
import com.nis.web.dao.basics.ServiceDictInfoDao;
|
||||
import com.nis.web.dao.basics.SysDictInfoDao;
|
||||
import com.nis.web.dao.specific.SpecificServiceCfgDao;
|
||||
import com.nis.web.service.SpringContextHolder;
|
||||
|
||||
|
||||
@@ -29,6 +31,7 @@ public class ConfigDictUtils {
|
||||
|
||||
private final static ServiceDictInfoDao serviceDictInfoDao = SpringContextHolder.getBean(ServiceDictInfoDao.class);
|
||||
private final static SysDictInfoDao sysDictInfoDao = SpringContextHolder.getBean(SysDictInfoDao.class);
|
||||
private final static SpecificServiceCfgDao specificServiceCfgDao = SpringContextHolder.getBean(SpecificServiceCfgDao.class);
|
||||
|
||||
/**
|
||||
* 根据主键查询配置详情
|
||||
@@ -47,6 +50,15 @@ public class ConfigDictUtils {
|
||||
public static SysDictInfo getSysDictInfoById(Integer sysDictId){
|
||||
return sysDictInfoDao.getDictById(sysDictId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键查询配置详情
|
||||
* @param sysDictId
|
||||
* @return
|
||||
*/
|
||||
public static SpecificServiceCfg getBySpecServiceId(Integer specServiceId){
|
||||
return specificServiceCfgDao.getBySpecServiceId(specServiceId);
|
||||
}
|
||||
/**
|
||||
* 根据计算公式计算数据结果
|
||||
* @param sysDictId
|
||||
|
||||
@@ -39,6 +39,8 @@ import com.nis.web.service.configuration.SslCfgService;
|
||||
import com.nis.web.service.configuration.StringCfgService;
|
||||
import com.nis.web.service.configuration.TunnelCfgService;
|
||||
import com.nis.web.service.configuration.WebCfgService;
|
||||
import com.nis.web.service.specific.SpecificServiceCfgService;
|
||||
import com.nis.web.service.specific.SpecificServiceHostCfgService;
|
||||
import com.nis.web.service.systemService.ServiceConfigInfoService;
|
||||
import com.nis.web.service.systemService.SystemServiceService;
|
||||
|
||||
@@ -117,6 +119,10 @@ public class BaseController {
|
||||
protected NumCfgService numCfgService;
|
||||
@Autowired
|
||||
protected ComplexStringCfgService complexStringCfgService;
|
||||
@Autowired
|
||||
protected SpecificServiceCfgService specificServiceCfgService;
|
||||
@Autowired
|
||||
protected SpecificServiceHostCfgService specificServiceHostCfgService;
|
||||
/**
|
||||
* 管理基础路径
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,282 @@
|
||||
package com.nis.web.controller.specific;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/specific/specificServiceCfg")
|
||||
public class SpecificServiceCfgController extends BaseController {
|
||||
|
||||
/* @ModelAttribute
|
||||
public SpecificServiceCfg get(@RequestParam(required=false)Integer specServiceId) {
|
||||
if (!StringUtil.isEmpty(specServiceId)) {
|
||||
SpecificServiceCfg ss = specificServiceCfgService.getBySpecServiceId(specServiceId);
|
||||
return ss==null?new SpecificServiceCfg():ss;
|
||||
} else {
|
||||
return new SpecificServiceCfg();
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 查出分页列表
|
||||
*
|
||||
* @param specificServiceCfg
|
||||
* @param request
|
||||
* @param response
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:dict:view")
|
||||
@RequestMapping(value = "list")
|
||||
public String list(SpecificServiceCfg specificServiceCfg, HttpServletRequest request, HttpServletResponse response,
|
||||
Model model) {
|
||||
String searchType = null;
|
||||
String searchContent = null;
|
||||
if(specificServiceCfg.getSpecServiceId()!=null){
|
||||
searchType = "specServiceId";
|
||||
searchContent = specificServiceCfg.getSpecServiceId().toString();
|
||||
}
|
||||
if(!StringUtils.isBlank(specificServiceCfg.getSpecServiceName())){
|
||||
searchType = "specServiceName";
|
||||
searchContent = specificServiceCfg.getSpecServiceName();
|
||||
}
|
||||
model.addAttribute("searchType", searchType);
|
||||
model.addAttribute("searchContent", searchContent);
|
||||
|
||||
// 取出所有符合条件的数据
|
||||
List<SpecificServiceCfg> allList = specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg);
|
||||
model.addAttribute("showTotalCount", allList.size());
|
||||
// 取出所有符合条件的顶层分页
|
||||
Page<SpecificServiceCfg> page = specificServiceCfgService
|
||||
.findTopPage(new Page<SpecificServiceCfg>(request, response), specificServiceCfg);
|
||||
// 植入序号
|
||||
for (int i = 0; i < page.getList().size(); i++) {
|
||||
page.getList().get(i).setShowSequence("" + (i + 1 + ((page.getPageNo() - 1) * page.getPageSize())));
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
// 删除顶层数据、取出id 优化处理
|
||||
List<Integer> intList = Lists.newArrayList();
|
||||
for (SpecificServiceCfg tempSS : page.getList()) {
|
||||
if (tempSS != null) {
|
||||
intList.add(tempSS.getSpecServiceId());
|
||||
}
|
||||
}
|
||||
for (int i = allList.size() - 1; i >= 0; i--) {
|
||||
SpecificServiceCfg ss = allList.get(i);
|
||||
if ((ss != null && intList.contains(ss.getSpecServiceId())) || (ss != null && ss.getSpecServiceId() == 0)) {
|
||||
allList.remove(ss);
|
||||
}
|
||||
}
|
||||
|
||||
allList.addAll(page.getList());
|
||||
List<SpecificServiceCfg> list = Lists.newArrayList();
|
||||
SpecificServiceCfg.sortList(list, allList, 0, true);
|
||||
//处理下级序号
|
||||
SpecificServiceCfg.addChildrenSeq(list, 0);
|
||||
|
||||
model.addAttribute("list", list);
|
||||
|
||||
return "/specific/specificServiceCfgList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入查看或新增、修改页面
|
||||
*
|
||||
* @param specificServiceCfg
|
||||
* @param model
|
||||
* @param doAction
|
||||
* @param mulitId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = { "form" })
|
||||
public String form(SpecificServiceCfg specificServiceCfg, Model model, String doAction, String mulitId) {
|
||||
|
||||
Integer id = 0;
|
||||
if (mulitId != null) {
|
||||
String[] ids = mulitId.split(",");
|
||||
id = Integer.valueOf(ids[0]);
|
||||
}
|
||||
if (id != 0) {
|
||||
specificServiceCfg = specificServiceCfgService.getBySpecServiceId(id);
|
||||
}
|
||||
if (specificServiceCfg == null || specificServiceCfg.getParent() == null
|
||||
|| specificServiceCfg.getParent().getSpecServiceId() == 0) {
|
||||
SpecificServiceCfg parent = new SpecificServiceCfg();
|
||||
parent.setSpecServiceId(0);
|
||||
parent.setSpecServiceName("根节点");
|
||||
specificServiceCfg.setParent(parent);
|
||||
}
|
||||
model.addAttribute("specificServiceCfg", specificServiceCfg);
|
||||
if (doAction != null && doAction.equals("0")) {
|
||||
return "/specific/specificServiceCfgInfo";
|
||||
}
|
||||
return "/specific/specificServiceCfgForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或保存
|
||||
* @param specificServiceCfg
|
||||
* @param model
|
||||
* @param redirectAttributes
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:dict:edit")
|
||||
@RequestMapping(value="saveOrUpdate")
|
||||
public String saveOrUpdate(SpecificServiceCfg specificServiceCfg, Model model,
|
||||
RedirectAttributes redirectAttributes,Integer oldId) {
|
||||
try {
|
||||
specificServiceCfgService.saveOrUpdate(specificServiceCfg,oldId);
|
||||
addMessage(redirectAttributes, "保存成功");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "保存失败!");
|
||||
}
|
||||
return "redirect:" + adminPath + "/specific/specificServiceCfg/list";
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param specificServiceCfg
|
||||
* @param redirectAttributes
|
||||
* @param mulitId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="delete")
|
||||
public String delete(SpecificServiceCfg specificServiceCfg, RedirectAttributes redirectAttributes, String mulitId){
|
||||
try{
|
||||
specificServiceCfgService.delete(mulitId);
|
||||
addMessage(redirectAttributes,"删除成功");
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes,"删除失败");
|
||||
}
|
||||
|
||||
return "redirect:"+adminPath+"/specific/specificServiceCfg/list";
|
||||
}
|
||||
|
||||
/**
|
||||
* 父节点选择树形结构
|
||||
* @param extId
|
||||
* @param isShowHide
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("user")
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "treeData")
|
||||
public List<Map<String, Object>> treeData(@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide, HttpServletResponse response){
|
||||
List<Map<String, Object>> mapList = Lists.newArrayList();
|
||||
Map<String, Object> map2 = Maps.newHashMap();
|
||||
map2.put("id", 0);
|
||||
map2.put("pId", 0);
|
||||
map2.put("name","根节点");
|
||||
//map2.put("placeholder","0");
|
||||
mapList.add(map2);
|
||||
List<SpecificServiceCfg> list = specificServiceCfgService.findAllSpecificServiceCfg(new SpecificServiceCfg());
|
||||
for (int i=0; i<list.size(); i++){
|
||||
SpecificServiceCfg specificServiceCfg = list.get(i);
|
||||
if(StringUtils.isBlank(extId)||(extId!=null&&!extId.equals(specificServiceCfg.getSpecServiceId().toString()))){
|
||||
if(specificServiceCfg.getIsValid()==0){
|
||||
continue;
|
||||
}
|
||||
Map<String, Object> map = Maps.newHashMap();
|
||||
map.put("id", specificServiceCfg.getSpecServiceId());
|
||||
map.put("pId", specificServiceCfg.getParent().getSpecServiceId());
|
||||
map.put("name",specificServiceCfg.getSpecServiceName());
|
||||
mapList.add(map);
|
||||
}
|
||||
}
|
||||
return mapList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验协议id是否重复
|
||||
* @param specServiceId
|
||||
* @param oldId
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "isIdRepeat")
|
||||
public boolean isIdRepeat(String specServiceId,String oldId){
|
||||
System.out.println(specServiceId +"--"+specServiceId);
|
||||
System.out.println(oldId.trim().equals(specServiceId));
|
||||
if(oldId.trim().equals(specServiceId)){
|
||||
return true;
|
||||
}
|
||||
if(specServiceId!=null){
|
||||
SpecificServiceCfg ss = specificServiceCfgService.getBySpecServiceId(Integer.valueOf(specServiceId));
|
||||
if(ss==null){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 校验叶子节点无上级不得选为叶子节点
|
||||
* @param specServiceId
|
||||
* @param oldId
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "ajaxLeafHasTree")
|
||||
public boolean ajaxLeafHasTree(Integer parentId, Integer newIsLeaf){
|
||||
if(parentId==null||parentId==0){
|
||||
if(newIsLeaf==0){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(parentId!=null&parentId!=0){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 校验叶子节点有下级不得更改为叶子节点
|
||||
* @param parent
|
||||
* @param newIsLeaf
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "ajaxLeafChange")
|
||||
public boolean ajaxLeafChange(Integer parent,Integer newIsLeaf){
|
||||
if(parent==null){
|
||||
return true;
|
||||
}
|
||||
List<SpecificServiceCfg> list = specificServiceCfgService.getChildrenById(parent);
|
||||
if(list==null||list.size()>0){
|
||||
return true;
|
||||
}else{
|
||||
if(newIsLeaf==0){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
package com.nis.web.controller.specific;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.specific.SpecificServiceHostCfg;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/specific/specificServiceHostCfg")
|
||||
public class SpecificServiceHostCfgController extends BaseController {
|
||||
|
||||
|
||||
@ModelAttribute
|
||||
public SpecificServiceHostCfg get(@RequestParam(required=false) Integer hostId) {
|
||||
if (!StringUtil.isEmpty(hostId)){
|
||||
return specificServiceHostCfgService.getDictByHostId(hostId);
|
||||
}else{
|
||||
return new SpecificServiceHostCfg();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param specificServiceHostCfg
|
||||
* @param request
|
||||
* @param response
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:dict:view")
|
||||
@RequestMapping(value = "list")
|
||||
public String list(SpecificServiceHostCfg specificServiceHostCfg, HttpServletRequest request, HttpServletResponse response,
|
||||
Model model) {
|
||||
|
||||
//查出分页数据
|
||||
Page<SpecificServiceHostCfg> page = specificServiceHostCfgService.findSpecHostList(new Page<SpecificServiceHostCfg>(request, response), specificServiceHostCfg);
|
||||
model.addAttribute("page", page);
|
||||
//查出所有
|
||||
List<SpecificServiceHostCfg> list = specificServiceHostCfgService.getAll();
|
||||
List<Integer> listSpecServiceId = Lists.newArrayList();
|
||||
List<String> listSrcIp = Lists.newArrayList();
|
||||
List<String> listDstIp = Lists.newArrayList();
|
||||
for(SpecificServiceHostCfg ssh:list){
|
||||
if(ssh!=null&ssh.getSpecServiceId()!=null){
|
||||
listSpecServiceId.add(ssh.getSpecServiceId());
|
||||
}
|
||||
if(ssh!=null&ssh.getSrcIp()!=null){
|
||||
listSrcIp.add(ssh.getSrcIp());
|
||||
}
|
||||
if(ssh!=null&ssh.getDstIp()!=null){
|
||||
listDstIp.add(ssh.getDstIp());
|
||||
}
|
||||
}
|
||||
model.addAttribute("listSpecServiceId", listSpecServiceId);
|
||||
model.addAttribute("listSrcIp", listSrcIp);
|
||||
model.addAttribute("listDstIp", listDstIp);
|
||||
return "/specific/specificServiceHostCfgList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入查看、修改或新增页面
|
||||
* @param specificServiceHostCfg
|
||||
* @param request
|
||||
* @param response
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:dict:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(SpecificServiceHostCfg specificServiceHostCfg, HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
|
||||
return "/specific/specificServiceHostCfgForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
* @param specificServiceHostCfg
|
||||
* @param model
|
||||
* @param redirectAttributes
|
||||
* @param mulitId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "saveOrUpdate")
|
||||
public String saveOrUpdate(SpecificServiceHostCfg specificServiceHostCfg,Model model,RedirectAttributes redirectAttributes){
|
||||
try {
|
||||
specificServiceHostCfgService.saveOrUpdate(specificServiceHostCfg);
|
||||
addMessage(redirectAttributes, "保存成功");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "保存失败!");
|
||||
}
|
||||
return "redirect:"+adminPath+"/specific/specificServiceHostCfgList";
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
* @param specificServiceHostCfg
|
||||
* @param redirectAttributes
|
||||
* @param mulitId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="delete")
|
||||
public String delete(SpecificServiceHostCfg specificServiceHostCfg, RedirectAttributes redirectAttributes, String mulitId){
|
||||
try{
|
||||
specificServiceHostCfgService.delete(mulitId);
|
||||
addMessage(redirectAttributes,"删除成功");
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes,"删除失败");
|
||||
}
|
||||
|
||||
return "redirect:"+adminPath+"/specific/specificServiceHostCfg/list";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.nis.web.dao.specific;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface SpecificServiceCfgDao extends CrudDao<SpecificServiceCfg> {
|
||||
|
||||
/**
|
||||
* 根据id查出对象
|
||||
* @param specServiceId
|
||||
* @return
|
||||
*/
|
||||
SpecificServiceCfg getBySpecServiceId(Integer specServiceId);
|
||||
/**
|
||||
* 查询所有符合条件顶层分页列表
|
||||
* @param specificServiceCfg
|
||||
*/
|
||||
List<SpecificServiceCfg> findTopPage(SpecificServiceCfg specificServiceCfg);
|
||||
/**
|
||||
* 查询所有符合条件的数据
|
||||
* @param specificServiceCfg
|
||||
* @return
|
||||
*/
|
||||
List<SpecificServiceCfg> findAllSpecificServiceCfg(SpecificServiceCfg specificServiceCfg);
|
||||
/**
|
||||
* 修改配置信息
|
||||
* @param specificServiceCfg
|
||||
* @param oldId
|
||||
*/
|
||||
void update(@Param("specificServiceCfg")SpecificServiceCfg specificServiceCfg, @Param("oldId")Integer oldId);
|
||||
/**
|
||||
* 根据specServiceId查询所有下级
|
||||
* @param specServiceId
|
||||
* @return
|
||||
*/
|
||||
List<SpecificServiceCfg> getChildrenById(Integer specServiceId);
|
||||
|
||||
|
||||
|
||||
}
|
||||
142
src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml
Normal file
142
src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml
Normal file
@@ -0,0 +1,142 @@
|
||||
<?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.specific.SpecificServiceCfgDao" >
|
||||
|
||||
<resultMap id="CFGResultMap" type="com.nis.domain.specific.SpecificServiceCfg" >
|
||||
<id column="spec_service_id" property="specServiceId" jdbcType="INTEGER" />
|
||||
<result column="spec_service_name" property="specServiceName" jdbcType="VARCHAR" />
|
||||
<result column="spec_service_desc" property="specServiceDesc" jdbcType="VARCHAR" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="op_time" property="opTime" jdbcType="TIMESTAMP" />
|
||||
<result column="is_leaf" property="isLeaf" jdbcType="INTEGER" />
|
||||
<result column="group_id" property="groupId" jdbcType="INTEGER" />
|
||||
<!-- 父id -->
|
||||
<association property="parent" javaType="com.nis.domain.specific.SpecificServiceCfg">
|
||||
<id column="parent_id" property="specServiceId" jdbcType="INTEGER" />
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<sql id="specificServiceCfgColumns">
|
||||
s.spec_service_id AS specServiceId,
|
||||
s.spec_service_name AS specServiceName,
|
||||
s.spec_service_desc AS specServiceDesc,
|
||||
s.is_valid AS isValid,
|
||||
s.op_time AS opTime,
|
||||
s.parent_id AS "parent.specServiceId",
|
||||
s.is_leaf AS isLeaf,
|
||||
s.group_id AS groupId
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 根据id查出对象 -->
|
||||
<select id="getBySpecServiceId" resultType="com.nis.domain.specific.SpecificServiceCfg" parameterType="java.lang.Integer">
|
||||
select <include refid="specificServiceCfgColumns" />
|
||||
from specific_service_cfg s where s.spec_service_id = #{specServiceId}
|
||||
</select>
|
||||
|
||||
<!-- 查出所有符合条件的顶层数据 -->
|
||||
|
||||
<select id="findTopPage" resultMap="CFGResultMap" parameterType="com.nis.domain.specific.SpecificServiceCfg">
|
||||
SELECT * FROM specific_service_cfg s WHERE s.is_valid=1
|
||||
|
||||
<if test="specServiceId != null">
|
||||
AND s.spec_service_id like '%${specServiceId}%'
|
||||
</if>
|
||||
<if test="specServiceName != null and specServiceName != '' ">
|
||||
AND s.spec_service_name like '%${specServiceName}%'
|
||||
</if>
|
||||
<if test="specServiceDesc != null and specServiceDesc != '' ">
|
||||
AND s.spec_service_desc like '%${specServiceDesc}%'
|
||||
</if>
|
||||
<if test="beginDate != null" >
|
||||
AND s.op_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate != null" >
|
||||
AND s.op_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
AND s.parent_id not in (
|
||||
SELECT s2.spec_service_id FROM specific_service_cfg s2 WHERE s2.is_valid=1
|
||||
<if test="specServiceId != null">
|
||||
AND s2.spec_service_id like '%${specServiceId}%'
|
||||
</if>
|
||||
<if test="specServiceName != null and specServiceName != '' ">
|
||||
AND s2.spec_service_name like '%${specServiceName}%'
|
||||
</if>
|
||||
<if test="specServiceDesc != null and specServiceDesc != '' ">
|
||||
AND s2.spec_service_desc like '%${specServiceDesc}%'
|
||||
</if>
|
||||
<if test="beginDate != null" >
|
||||
AND s2.op_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate != null" >
|
||||
AND s2.op_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
)
|
||||
<choose>
|
||||
<when test="page != null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY s.${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY s.op_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询符合条件的所有数据 -->
|
||||
<select id="findAllSpecificServiceCfg" resultMap="CFGResultMap" parameterType="com.nis.domain.specific.SpecificServiceCfg">
|
||||
SELECT * from specific_service_cfg where is_valid = 1
|
||||
<if test="specServiceId != null">
|
||||
AND spec_service_id like '%${specServiceId}%'
|
||||
</if>
|
||||
<if test="specServiceName != null and specServiceName != '' ">
|
||||
AND spec_service_name like '%${specServiceName}%'
|
||||
</if>
|
||||
<if test="specServiceDesc != null and specServiceDesc != '' ">
|
||||
AND spec_service_desc like '%${specServiceDesc}%'
|
||||
</if>
|
||||
<if test="beginDate != null">
|
||||
AND op_time > #{beginDate}
|
||||
</if>
|
||||
<if test="endDate != null" >
|
||||
AND op_time < #{endDate}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="page != null and page.orderBy != null and page.orderBy != '' ">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY op_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<!-- 新增 -->
|
||||
<insert id="insert" parameterType="com.nis.domain.specific.SpecificServiceCfg" useGeneratedKeys="true">
|
||||
insert into specific_service_cfg (spec_service_id,spec_service_name,spec_service_desc,is_valid, op_time, parent_id,is_leaf,group_id)
|
||||
values(#{specServiceId},#{specServiceName},#{specServiceDesc},#{isValid},#{opTime},#{parent.specServiceId},#{isLeaf},#{groupId})
|
||||
</insert>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="update" parameterType="com.nis.domain.specific.SpecificServiceCfg">
|
||||
UPDATE specific_service_cfg s SET
|
||||
s.spec_service_id = #{specificServiceCfg.specServiceId},
|
||||
s.spec_service_name = #{specificServiceCfg.specServiceName},
|
||||
s.spec_service_desc = #{specificServiceCfg.specServiceDesc},
|
||||
s.is_valid = #{specificServiceCfg.isValid},
|
||||
s.op_time = #{specificServiceCfg.opTime},
|
||||
s.parent_id = #{specificServiceCfg.parent.specServiceId},
|
||||
s.is_leaf = #{specificServiceCfg.isLeaf},
|
||||
s.group_id = #{specificServiceCfg.groupId}
|
||||
WHERE s.spec_service_id = #{oldId}
|
||||
</update>
|
||||
|
||||
<!-- 删除 -->
|
||||
<update id="delete" parameterType="com.nis.domain.specific.SpecificServiceCfg">
|
||||
UPDATE specific_service_cfg s set s.is_valid = #{isValid} where s.spec_service_id = #{specServiceId}
|
||||
</update>
|
||||
<!-- getChildrenById -->
|
||||
<select id="getChildrenById" resultMap="CFGResultMap" parameterType="java.lang.Integer">
|
||||
SELECT * FROM specific_service_cfg s WHERE s.is_valid = 1 and s.parent_id = #{specServiceId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.nis.web.dao.specific;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.specific.SpecificServiceHostCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
|
||||
@MyBatisDao
|
||||
public interface SpecificServiceHostCfgDao extends CrudDao<SpecificServiceHostCfg> {
|
||||
|
||||
/**
|
||||
* 根据主键查询数据对象
|
||||
* @param hostId
|
||||
* @return
|
||||
*/
|
||||
SpecificServiceHostCfg getByHostId(Integer hostId);
|
||||
|
||||
/**
|
||||
* 查询分页
|
||||
* @param specificServiceHostCfg
|
||||
* @return
|
||||
*/
|
||||
List<SpecificServiceHostCfg> findSpecHostList(SpecificServiceHostCfg specificServiceHostCfg);
|
||||
|
||||
/**
|
||||
* 查出所有
|
||||
* @return
|
||||
*/
|
||||
List<SpecificServiceHostCfg> getAll();
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param hostId
|
||||
*/
|
||||
void delete(Integer hostId);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
<?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.specific.SpecificServiceHostCfgDao">
|
||||
|
||||
<resultMap id="specificServiceHostCfgResultMap"
|
||||
type="com.nis.domain.specific.SpecificServiceHostCfg">
|
||||
<id column="host_id" property="hostId" jdbcType="INTEGER" />
|
||||
<result column="spec_service_id" property="specServiceId"
|
||||
jdbcType="INTEGER" />
|
||||
<result column="src_ip" property="srcIp" jdbcType="VARCHAR" />
|
||||
<result column="src_ip_mask" property="srcIpMask" jdbcType="VARCHAR" />
|
||||
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
|
||||
<result column="src_port_mask" property="srcPortMask" jdbcType="VARCHAR" />
|
||||
<result column="dst_ip" property="dstIp" jdbcType="VARCHAR" />
|
||||
<result column="dst_ip_mask" property="dstIpMask" jdbcType="VARCHAR" />
|
||||
<result column="dst_port" property="dstPort" jdbcType="VARCHAR" />
|
||||
<result column="dst_port_mask" property="dstPortMask" jdbcType="VARCHAR" />
|
||||
<result column="direction" property="direction" jdbcType="INTEGER" />
|
||||
<result column="protocol" property="protocol" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<!-- 创建人员 -->
|
||||
<association property="creator" javaType="com.nis.domain.SysUser">
|
||||
<id property="id" column="creator_id" />
|
||||
</association>
|
||||
<!-- 修改人员 -->
|
||||
<association property="editor" javaType="com.nis.domain.SysUser">
|
||||
<id property="id" column="editor_id" />
|
||||
</association>
|
||||
<!-- 审核人员 -->
|
||||
<association property="auditor" javaType="com.nis.domain.SysUser">
|
||||
<id property="id" column="auditor_id" />
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<sql id="specificServiceHostCfgColumns">
|
||||
s.host_id AS hostId,
|
||||
s.spec_service_id AS specServiceId,
|
||||
s.src_ip AS srcIp,
|
||||
s.src_ip_mask AS srcIpMask,
|
||||
s.src_port AS srcPort,
|
||||
s.src_port_mask AS srcPortMask,
|
||||
s.dst_ip AS dstIp,
|
||||
s.dst_ip_mask AS dstIpMask,
|
||||
s.dst_port AS dstPort,
|
||||
s.dst_port_mask AS dstPortMask,
|
||||
s.direction AS direction,
|
||||
s.protocol AS protocol,
|
||||
s.is_valid AS isValid,
|
||||
s.is_audit AS isAudit,
|
||||
s.creator_id AS "creator.id",
|
||||
s.create_time AS createTime,
|
||||
s.editor_id AS "editor.id",
|
||||
s.edit_time AS editTime,
|
||||
s.auditor_id AS "auditor.id",
|
||||
s.audit_time AS auditTime
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 根据id查出对象 -->
|
||||
<select id="getByHostId" resultType="com.nis.domain.specific.SpecificServiceHostCfg"
|
||||
parameterType="java.lang.Integer">
|
||||
select
|
||||
<include refid="specificServiceHostCfgColumns" />
|
||||
from specific_service_host_cfg s where s.host_id = #{hostId}
|
||||
</select>
|
||||
|
||||
<!-- 查询分页 -->
|
||||
<select id="findSpecHostList" resultMap="specificServiceHostCfgResultMap" parameterType="com.nis.domain.specific.SpecificServiceHostCfg">
|
||||
select * from specific_service_host_cfg where 1 = 1
|
||||
<if test="isAudit !=null" >
|
||||
AND is_audit = #{isAudit}
|
||||
</if>
|
||||
<if test="specServiceId !=null" >
|
||||
AND spec_service_id = #{specServiceId}
|
||||
</if>
|
||||
<if test="protocol !=null" >
|
||||
AND protocol = #{protocol}
|
||||
</if>
|
||||
<if test="direction !=null" >
|
||||
AND direction = #{direction}
|
||||
</if>
|
||||
<if test="beginDate !=null" >
|
||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate !=null" >
|
||||
AND create_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editBeginDate !=null" >
|
||||
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editEndDate !=null" >
|
||||
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditBeginDate !=null" >
|
||||
AND audit_time >= #{auditBeginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditEndDate !=null" >
|
||||
AND audit_time <= #{auditEndDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询所有 -->
|
||||
<select id="getAll" resultMap="specificServiceHostCfgResultMap">
|
||||
select * from specific_service_host_cfg
|
||||
</select>
|
||||
|
||||
<!-- 新增 -->
|
||||
<insert id="insert" parameterType="com.nis.domain.specific.SpecificServiceHostCfg">
|
||||
insert into specific_service_host_cfg (spec_service_id,src_ip,src_ip_mask,src_port,src_port_mask,dst_ip,dst_ip_mask,dst_port,dst_port_mask,direction,protocol,is_valid,is_audit,creator_id,create_time,editor_id,edit_time,auditor_id,audit_time)
|
||||
values(#{specServiceId},#{srcIp},#{srcIpMask},#{srcPort},#{srcPortMask},#{dstIp},#{dstIpMask},#{dstPort},#{dstPortMask},#{direction},#{protocol},#{isValid},#{isAudit},#{creator.id},#{createTime},#{editor.id},#{editTime},#{auditor.id},#{auditTime})
|
||||
</insert>
|
||||
<!-- 修改 -->
|
||||
<update id="update" parameterType="com.nis.domain.specific.SpecificServiceHostCfg">
|
||||
update specific_service_host_cfg s set
|
||||
s.spec_service_id = #{specServiceId},
|
||||
s.src_ip = #{srcIp},
|
||||
s.src_ip_mask = #{srcIpMask},
|
||||
s.src_port = #{srcPort},
|
||||
s.src_port_mask = #{srcPortMask},
|
||||
s.dst_ip = #{dstIp},
|
||||
s.dst_ip_mask = #{dstIpMask},
|
||||
s.dst_port = #{dstPort},
|
||||
s.dst_port_mask = #{dstPortMask},
|
||||
s.direction = #{direction},
|
||||
s.protocol = #{protocol},
|
||||
s.is_valid = #{isValid},
|
||||
s.is_audit = #{isAudit},
|
||||
s.creator_id = #{creator.id},
|
||||
s.create_time = #{createTime},
|
||||
s.editor_id = #{editor.id},
|
||||
s.edit_time = #{editTime},
|
||||
s.auditor_id = #{auditor.id},
|
||||
s.audit_time = #{auditTime}
|
||||
where s.host_id = #{hostId}
|
||||
</update>
|
||||
<!-- 删除 -->
|
||||
<update id="delete" parameterType="java.lang.Integer">
|
||||
update specific_service_host_cfg s set
|
||||
s.is_valid = 0
|
||||
where s.host_id = #{hostId}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.nis.web.service.specific;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.beust.jcommander.internal.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.specific.SpecificServiceCfgDao;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
@Service
|
||||
public class SpecificServiceCfgService extends BaseService{
|
||||
|
||||
@Autowired
|
||||
private SpecificServiceCfgDao specificServiceCfgDao;
|
||||
|
||||
/**
|
||||
* 根据id查询对象
|
||||
* @param specServiceId
|
||||
* @return
|
||||
*/
|
||||
public SpecificServiceCfg getBySpecServiceId(Integer specServiceId) {
|
||||
return specificServiceCfgDao.getBySpecServiceId(specServiceId);
|
||||
}
|
||||
/**
|
||||
* 查询所有符合条件的顶层分页
|
||||
* @param page
|
||||
* @param specificServiceCfg
|
||||
* @return
|
||||
*/
|
||||
public Page<SpecificServiceCfg> findTopPage(Page<SpecificServiceCfg> page, SpecificServiceCfg specificServiceCfg){
|
||||
// 设置分页参数
|
||||
specificServiceCfg.setPage(page);
|
||||
// 执行分页查询
|
||||
List<SpecificServiceCfg> list = Lists.newArrayList();
|
||||
list = specificServiceCfgDao.findTopPage(specificServiceCfg);
|
||||
SpecificServiceCfg ss = new SpecificServiceCfg();
|
||||
ss.setSpecServiceId(0);
|
||||
for(SpecificServiceCfg ssc:list){
|
||||
ssc.setParent(ss);
|
||||
}
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询所有符合条件的数据
|
||||
* @param specificServiceCfg
|
||||
* @return
|
||||
*/
|
||||
public List<SpecificServiceCfg> findAllSpecificServiceCfg(SpecificServiceCfg specificServiceCfg) {
|
||||
return specificServiceCfgDao.findAllSpecificServiceCfg(specificServiceCfg);
|
||||
}
|
||||
/**
|
||||
* 保存或修改
|
||||
* @param specificServiceCfg
|
||||
*/
|
||||
public void saveOrUpdate(SpecificServiceCfg specificServiceCfg, Integer oldId) {
|
||||
if(oldId==null){//新增
|
||||
specificServiceCfg.setIsValid(1);
|
||||
specificServiceCfg.setOpTime(new Date());
|
||||
specificServiceCfgDao.insert(specificServiceCfg);
|
||||
}else{//修改
|
||||
specificServiceCfg.setOpTime(new Date());
|
||||
//修改id则将其子类的parent_id一并修改
|
||||
if(oldId!=specificServiceCfg.getSpecServiceId()){
|
||||
//找出所有子类
|
||||
List<SpecificServiceCfg> list = specificServiceCfgDao.getChildrenById(oldId);
|
||||
SpecificServiceCfg se =new SpecificServiceCfg();
|
||||
se.setSpecServiceId(specificServiceCfg.getSpecServiceId());
|
||||
for(SpecificServiceCfg ss:list){
|
||||
if(ss!=null){
|
||||
ss.setParent(se);
|
||||
specificServiceCfgDao.update(ss,ss.getSpecServiceId());
|
||||
}
|
||||
}
|
||||
}
|
||||
specificServiceCfgDao.update(specificServiceCfg,oldId);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
* @param specificServiceCfg
|
||||
*/
|
||||
public void delete(String mulitId) {
|
||||
String[] ids = mulitId.split(",");
|
||||
for(String id:ids){
|
||||
if (!id.equals("")) {
|
||||
SpecificServiceCfg specificServiceCfg = specificServiceCfgDao.getBySpecServiceId(Integer.valueOf(id));
|
||||
List<SpecificServiceCfg> list = Lists.newArrayList();
|
||||
//找出所有下级
|
||||
if(specificServiceCfg!=null){
|
||||
SpecificServiceCfg.sortList(list, specificServiceCfgDao.findAllSpecificServiceCfg(new SpecificServiceCfg()), specificServiceCfg.getSpecServiceId(), true);
|
||||
list.add(specificServiceCfg);
|
||||
for(SpecificServiceCfg ss:list){
|
||||
ss.setIsValid(0);
|
||||
specificServiceCfgDao.delete(ss);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据specServiceId查询所有下级
|
||||
* @param specServiceId
|
||||
* @return
|
||||
*/
|
||||
public List<SpecificServiceCfg> getChildrenById(Integer specServiceId) {
|
||||
return specificServiceCfgDao.getChildrenById(specServiceId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.nis.web.service.specific;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.specific.SpecificServiceHostCfg;
|
||||
import com.nis.web.dao.specific.SpecificServiceHostCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
@Service
|
||||
public class SpecificServiceHostCfgService extends BaseService{
|
||||
|
||||
@Autowired
|
||||
private SpecificServiceHostCfgDao specificServiceHostCfgDao;
|
||||
|
||||
/**
|
||||
* 根据主键查询数据对象
|
||||
* @param hostId
|
||||
* @return
|
||||
*/
|
||||
public SpecificServiceHostCfg getDictByHostId(Integer hostId) {
|
||||
return specificServiceHostCfgDao.getByHostId(hostId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查出分页
|
||||
* @param page
|
||||
* @param specificServiceHostCfg
|
||||
* @return
|
||||
*/
|
||||
public Page<SpecificServiceHostCfg> findSpecHostList(Page<SpecificServiceHostCfg> page,
|
||||
SpecificServiceHostCfg specificServiceHostCfg) {
|
||||
specificServiceHostCfg.setPage(page);
|
||||
page.setList(specificServiceHostCfgDao.findSpecHostList(specificServiceHostCfg));
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
* @param specificServiceHostCfg
|
||||
*/
|
||||
public void saveOrUpdate(SpecificServiceHostCfg specificServiceHostCfg) {
|
||||
SysUser user = UserUtils.getUser();
|
||||
Date date = new Date();
|
||||
if(specificServiceHostCfg.getHostId()==null){//新增
|
||||
specificServiceHostCfg.setIsValid(1);
|
||||
specificServiceHostCfg.setCreator(user);
|
||||
specificServiceHostCfg.setCreateTime(date);
|
||||
specificServiceHostCfg.setEditor(user);
|
||||
specificServiceHostCfg.setEditTime(date);
|
||||
specificServiceHostCfgDao.insert(specificServiceHostCfg);
|
||||
}else{//修改
|
||||
//是否进行了审核操作
|
||||
SpecificServiceHostCfg ssh = specificServiceHostCfgDao.getByHostId(specificServiceHostCfg.getHostId());
|
||||
if(ssh.getIsAudit()!=specificServiceHostCfg.getIsAudit()){
|
||||
specificServiceHostCfg.setAuditor(user);
|
||||
specificServiceHostCfg.setAuditTime(date);
|
||||
}
|
||||
specificServiceHostCfg.setEditor(user);
|
||||
specificServiceHostCfg.setEditTime(date);
|
||||
specificServiceHostCfgDao.update(specificServiceHostCfg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查出所有
|
||||
* @return
|
||||
*/
|
||||
public List<SpecificServiceHostCfg> getAll() {
|
||||
|
||||
return specificServiceHostCfgDao.getAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param mulitId
|
||||
*/
|
||||
public void delete(String mulitId) {
|
||||
String[] ids = mulitId.split(",");
|
||||
for(String hostId:ids){
|
||||
if (!StringUtils.isEmpty(hostId)) {
|
||||
specificServiceHostCfgDao.delete(Integer.valueOf(hostId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -64,7 +64,7 @@ website_keyword_control=website keyword control
|
||||
mail_control=mail control
|
||||
recipient_control=recipient control
|
||||
sender_control=sender control
|
||||
theme_control=theme control
|
||||
subject_control=subject control
|
||||
mail_keyword_control=mail keyword control
|
||||
mail_attachment_name_control=mail attachment name control
|
||||
mail_attachment_content_control=mail attachment content control
|
||||
@@ -95,6 +95,8 @@ log_search=log search
|
||||
sysService_manage=system service manage
|
||||
service_manage=service type manage
|
||||
system_service_manage=system service type manage
|
||||
specific_service_cfg=specific service cfg
|
||||
specific_service_host_cfg=specific service host cfg
|
||||
#============menu end======================
|
||||
|
||||
#============yewu begin======================
|
||||
@@ -172,6 +174,7 @@ has_approved=It has been approved and can not be operated on !
|
||||
hasnot_approved=It has not been approved and can not be operated on !
|
||||
check_one=choose one please !
|
||||
one_more=please choose at least one !
|
||||
custom_columns=custom columns
|
||||
#==========message end=====================
|
||||
|
||||
#==========yewuliexingguanli begin=====================
|
||||
|
||||
@@ -64,7 +64,7 @@ website_keyword_control=website keyword control
|
||||
mail_control=mail control
|
||||
recipient_control=recipient control
|
||||
sender_control=sender control
|
||||
theme_control=theme control
|
||||
subject_control=subject control
|
||||
mail_keyword_control=mail keyword control
|
||||
mail_attachment_name_control=mail attachment name control
|
||||
mail_attachment_content_control=mail attachment content control
|
||||
@@ -95,6 +95,8 @@ log_search=log search
|
||||
sysService_manage=system service manage
|
||||
service_manage=service type manage
|
||||
system_service_manage=system service type manage
|
||||
specific_service_cfg=specific service cfg
|
||||
specific_service_host_cfg=specific service host cfg
|
||||
#============menu end======================
|
||||
|
||||
#============yewu begin======================
|
||||
|
||||
@@ -62,7 +62,7 @@ website_keyword_control=\u7f51\u9875\u5185\u5bb9\u5173\u952e\u5b57\u7ba1\u63a7
|
||||
mail_control=\u90ae\u4ef6\u7ba1\u63a7
|
||||
recipient_control=\u6536\u4ef6\u4eba\u7ba1\u63a7
|
||||
sender_control=\u53d1\u4ef6\u4eba\u7ba1\u63a7
|
||||
theme_control=\u4e3b\u9898\u7ba1\u63a7
|
||||
subject_control=\u4e3b\u9898\u7ba1\u63a7
|
||||
mail_keyword_control=\u90ae\u4ef6\u5185\u5bb9\u5173\u952e\u5b57\u7ba1\u63a7
|
||||
mail_attachment_name_control=\u90ae\u4ef6\u9644\u4ef6\u540d\u5173\u952e\u5b57\u7ba1\u63a7
|
||||
mail_attachment_content_control=\u90ae\u4ef6\u9644\u4ef6\u5185\u5bb9\u5173\u952e\u5b57\u7ba1\u63a7
|
||||
@@ -95,6 +95,8 @@ text_monitor=\u6587\u672c\u5e38\u89c4\u76d1\u6d4b
|
||||
sysService_manage=\u7cfb\u7edf\u4e1a\u52a1\u7ba1\u7406
|
||||
service_manage=\u4e1a\u52a1\u7c7b\u578b\u7ba1\u7406
|
||||
system_service_manage=\u7cfb\u7edf\u4e1a\u52a1\u7c7b\u578b\u7ba1\u7406
|
||||
specific_service_cfg=\u7279\u5b9a\u670d\u52a1\u7ba1\u7406
|
||||
specific_service_host_cfg=\u7279\u5b9a\u670d\u52a1\u670d\u52a1\u5668IP\u7ba1\u7406
|
||||
#==========menu end=====================
|
||||
|
||||
#==========yewu zidian begin=====================
|
||||
@@ -106,7 +108,7 @@ desc=\u63cf\u8ff0\u4fe1\u606f
|
||||
parent_id=\u7236ID
|
||||
is_leaf=\u662f\u5426\u53f6\u5b50\u8282\u70b9
|
||||
is_valid=\u6709\u6548\u6807\u5fd7
|
||||
create_time=\u914d\u7f6e\u65f6\u95f4
|
||||
create_time=\u521b\u5efa\u65f6\u95f4
|
||||
edit_time=\u4fee\u6539\u65f6\u95f4
|
||||
superior_config=\u4e0a\u7ea7\u914d\u7f6e
|
||||
config_content=\u914d\u7f6e\u5185\u5bb9
|
||||
@@ -171,6 +173,7 @@ has_approved=\u5df2\u7ecf\u901a\u8fc7\u5ba1\u6838\uff0c\u65e0\u6cd5\u8fdb\u884c\
|
||||
hasnot_approved=\u672a\u901a\u8fc7\u5ba1\u6838\uff0c\u65e0\u6cd5\u8fdb\u884c\u8be5\u64cd\u4f5c\uff01
|
||||
check_one=\u8bf7\u9009\u62e9\u4e00\u6761\u6570\u636e\uff01
|
||||
one_more=\u8bf7\u81f3\u5c11\u9009\u62e9\u4e00\u6761\u6570\u636e!
|
||||
custom_columns=\u81ea\u5b9a\u4e49\u5217\u5b57\u6bb5
|
||||
#==========message end=====================
|
||||
|
||||
#==========yewuliexingguanli begin=====================
|
||||
|
||||
@@ -311,6 +311,14 @@
|
||||
<example>${fns:getSysDictInfoById(id)}</example>
|
||||
</function>
|
||||
|
||||
<function>
|
||||
<description>根据id获取特定服务配置</description>
|
||||
<name>getBySpecServiceId</name>
|
||||
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
||||
<function-signature>java.lang.String getBySpecServiceId(java.lang.Integer)</function-signature>
|
||||
<example>${fns:getBySpecServiceId(id)}</example>
|
||||
</function>
|
||||
|
||||
<!-- 计算序号 -->
|
||||
<function>
|
||||
<description>计算序号</description>
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
<li><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)"><spring:message code="edit"/></a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/basics/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
|
||||
<li><a href="${ctx}/basics/serviceDictInfo/delete?mulitId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
<li><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)"><spring:message code="edit"/></a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/basics/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
|
||||
<li><a href="${ctx}/basics/serviceDictInfo/delete?mulitId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)"><spring:message code="edit"/></a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/basics/sysDictInfo/delete?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
|
||||
<li><a href="${ctx}/basics/sysDictInfo/delete?mulitId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)"><spring:message code="edit"/></a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/basics/sysDictInfo/delete?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
|
||||
<li><a href="${ctx}/basics/sysDictInfo/delete?mulitId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="${ctxStatic}/pages/css/dictInfo.css" />
|
||||
<script type="text/javascript" src="${ctxStatic}/pages/scripts/dict.js"></script>
|
||||
<title></title>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
jQuery.validator.addMethod("maxValue", function(value, element) {
|
||||
return value >=0&&value<10000000;
|
||||
}, "请填写正确的协议id");
|
||||
//校验叶子节点无上级不得选为叶子节点
|
||||
jQuery.validator.addMethod("leafHasTree",function(value,element){
|
||||
var flagLeafHasTree=false;
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/specific/specificServiceCfg/ajaxLeafHasTree',
|
||||
data:{parentId:$("#specificServiceCfgId").val(),newIsLeaf:$("#isLeaf option:selected").val()},
|
||||
success:function(data){
|
||||
flagLeafHasTree=data;
|
||||
}
|
||||
});
|
||||
return flagLeafHasTree;
|
||||
},"该配置上级为根节点,不得设为叶子节点");
|
||||
|
||||
//校验叶子节点有下级不得更改为叶子节点
|
||||
jQuery.validator.addMethod("leafChange",function(value,element){
|
||||
var flagLeafChange=false;
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/specific/specificServiceCfg/ajaxLeafChange',
|
||||
data:{parent:"${specificServiceCfg.specServiceId}",newIsLeaf:$("#isLeaf option:selected").val()},
|
||||
success:function(data){
|
||||
flagLeafChange=data;
|
||||
}
|
||||
});
|
||||
return flagLeafChange;
|
||||
},"该配置包含下级配置,不得改为叶子节点");
|
||||
|
||||
$("#name").focus();
|
||||
$("#inputForm").validate({
|
||||
rules:{
|
||||
'specServiceId':{
|
||||
required:true,
|
||||
digits:true,
|
||||
maxValue: true,
|
||||
remote:'${ctx}/specific/specificServiceCfg/isIdRepeat?oldId=${specificServiceCfg.specServiceId}'
|
||||
},
|
||||
'specServiceName':{
|
||||
required:true
|
||||
},
|
||||
'specServiceDesc':{
|
||||
required:true
|
||||
},
|
||||
'isLeaf':{
|
||||
leafHasTree:true,
|
||||
leafChange:true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
'specServiceId':{
|
||||
required:'请填写协议ID',
|
||||
digits:"请填写整数数字",
|
||||
maxValue: "请填写正确的协议ID",
|
||||
remote:'该协议ID已存在'
|
||||
},
|
||||
'specServiceName':{
|
||||
required:'请填写协议名称'
|
||||
},
|
||||
'specServiceDesc':{
|
||||
required:'请填写协议描述'
|
||||
},
|
||||
'isLeaf':{
|
||||
leafHasTree:'该配置上级为根节点,不得设为叶子节点',
|
||||
leafChange:'该配置包含下级配置,不得改为叶子节点'
|
||||
}
|
||||
},
|
||||
|
||||
submitHandler: function(form){
|
||||
if(!validateItem()) {
|
||||
return false;
|
||||
}
|
||||
loading('正在提交,请稍等...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
errorPlacement: function(error, element) {
|
||||
$("#messageBox").text("输入有误,请先更正。");
|
||||
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
||||
error.appendTo(element.parent().parent());
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<button type="button" class="btn btn-default" onclick="history.go(-1)"><spring:message code="back"/></button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="configuration_manage"/>
|
||||
</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><shiro:hasPermission name="sys:menu:edit">${not empty specificServiceCfg.specServiceId?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:menu:edit"><spring:message code="show"/></shiro:lacksPermission></div>
|
||||
<div class="tools">
|
||||
<!-- <a href="javascript:;" class="collapse"> </a>
|
||||
<a href="#portlet-config" data-toggle="modal" class="config"> </a>
|
||||
<a href="javascript:;" class="reload"> </a>
|
||||
<a href="javascript:;" class="remove"> </a> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
|
||||
<div class="form-body">
|
||||
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="inputForm" modelAttribute="specificServiceCfg" action="${ctx}/specific/specificServiceCfg/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<input name="oldId" type="hidden" value="${specificServiceCfg.specServiceId}"/>
|
||||
<form:hidden path="isValid" class="form-control"/>
|
||||
<sys:message content="${message}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code="superior_config"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<sys:treeselect id="specificServiceCfg" name="parent.specServiceId" value="${specificServiceCfg.parent.specServiceId}" labelName="parent.specServiceName" labelValue="${specificServiceCfg.parent.specServiceName eq '根节点'?'根节点':fns:getBySpecServiceId(specificServiceCfg.parent.specServiceId).specServiceName}"
|
||||
title="菜单" url="/specific/specificServiceCfg/treeData" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>协议ID:</label>
|
||||
<div class="col-md-4">
|
||||
<input id="specServiceId" name="specServiceId" maxlength="50" class="form-control" value="${specificServiceCfg.specServiceId}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>协议名称:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="specServiceName" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>maat端配置分组id:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="groupId" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<form:select path="isLeaf" class="form-control">
|
||||
<form:options items="${fns:getDictList('SYS_YES_NO')}" itemLabel="itemValue" itemValue="itemCode" htmlEscape="false"/>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">协议描述:</label>
|
||||
<div class="col-md-4">
|
||||
<form:textarea path="specServiceDesc" htmlEscape="false" maxlength="2000" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<shiro:hasPermission name="sys:menu:edit"><button type="submit" class="btn btn-circle blue"><spring:message code="submit"/></button></shiro:hasPermission>
|
||||
<button type="button" class="btn btn-circle grey-salsa btn-outline" onclick="history.go(-1)"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,97 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="${ctxStatic}/pages/css/dictInfo.css" />
|
||||
<script type="text/javascript" src="${ctxStatic}/pages/scripts/dict.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<button type="button" class="btn btn-default" onclick="history.go(-1)"><spring:message code="back"/></button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="configuration_manage"/>
|
||||
</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><spring:message code="show"/></div>
|
||||
<div class="tools">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
|
||||
<div class="form-body">
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="inputForm" modelAttribute="specificServiceCfg" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code="superior_config"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<input value="${specificServiceCfg.parent.specServiceId == 0?'根节点':fns:getBySpecServiceId(specificServiceCfg.parent.specServiceId).specServiceName}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>协议ID:</label>
|
||||
<div class="col-md-4">
|
||||
<input id="specServiceId" name="specServiceId" maxlength="50" class="form-control" value="${specificServiceCfg.specServiceId}" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>协议名称:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="specServiceName" htmlEscape="false" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>maat端配置分组id:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="groupId" htmlEscape="false" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<input value="${fns:getDictLabel('SYS_YES_NO',specificServiceCfg.isLeaf,'0')}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<input value="<fmt:formatDate value='${specificServiceCfg.opTime}' pattern='yyyy-MM-dd HH:mm:ss'/>" maxlength="50" class="form-control" readonly="readonly" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">协议描述:</label>
|
||||
<div class="col-md-4">
|
||||
<form:textarea path="specServiceDesc" htmlEscape="false" maxlength="2000" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,262 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
|
||||
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
function reset(){
|
||||
$("#searchForm").reset();
|
||||
}
|
||||
|
||||
/**
|
||||
处理全选、全取消
|
||||
**/
|
||||
function selectAll(){
|
||||
//alert($("#selAll").prop("checked"));
|
||||
if($("#selAll").prop("checked")){
|
||||
//$("#treeTable").find(":checkbox[name='check']").attr("checked","checked");
|
||||
//$("#treeTable").find(":checkbox[name='check']").each(function(){
|
||||
$("input[name='check']:checkbox").each(function(){
|
||||
$(this).prop("checked",true);
|
||||
});
|
||||
|
||||
|
||||
}else{
|
||||
//$("#treeTable").find(":checkbox[name='check']").attr("checked",false);
|
||||
//$("#treeTable").find(":checkbox[name='check']").each(function(){
|
||||
$("input[name='check']:checkbox").each(function(){
|
||||
//$(this).attr("checked",false);
|
||||
$(this).removeProp("checked");
|
||||
});
|
||||
}
|
||||
}
|
||||
/*
|
||||
系统通用方法,根据参数来决定处理的url和参数
|
||||
*/
|
||||
function cmd(){
|
||||
var url=arguments[0];
|
||||
var mulitId="";
|
||||
jQuery("#treeTable").find(":checkbox:checked[name='check']").each(function(){
|
||||
if(jQuery(this).val()!=""){
|
||||
mulitId+=jQuery(this).val()+",";
|
||||
}
|
||||
});
|
||||
if(mulitId!=""){
|
||||
confirmx('您确认要执行该操作?', url+"?mulitId="+mulitId);
|
||||
}else{
|
||||
alert("至少选择一条数据记录");
|
||||
}
|
||||
}
|
||||
//查询
|
||||
function page(n,s){
|
||||
//$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/specific/specificServiceCfg/list");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
$(document).ready(function() {
|
||||
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
|
||||
//设定显示总条数
|
||||
$("#showTotalCount").text('${showTotalCount}');
|
||||
//条件回传
|
||||
$("#seltype").find("option[value=${searchType==null?11:searchType}]").attr("selected",true);
|
||||
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
||||
$("#intype").val('${searchContent}');
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").val("");
|
||||
$("#intype").attr("placeholder","请输入"+$(this).find("option:selected").text());
|
||||
$("#intype").attr("name",$(this).find("option:selected").val());
|
||||
});
|
||||
$("#treeTable").treeTable({expandLevel : 3}).show();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.dropdown-menu {
|
||||
min-width: 70px;
|
||||
}
|
||||
</style>
|
||||
</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}/specific/specificServiceCfg/form'">
|
||||
<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="specificServiceCfg" action="${ctx}/specific/specificServiceCfg/list" 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}"/>
|
||||
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${specificServiceCfg.isFilterAction}"/>
|
||||
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<select id="seltype" class="selectpicker select2 input-small" >
|
||||
<option value="specServiceId">协议ID</option>
|
||||
<option value="specServiceName">协议名称</option>
|
||||
</select>
|
||||
</div>
|
||||
<input id="intype" class="form-control input-medium" placeholder="请输入协议ID" type="text">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default btn-search" type="button" onclick="page()"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
|
||||
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/specific/specificServiceCfg/form')">
|
||||
<i class="fa fa-edit"></i> 编辑</button>
|
||||
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/specific/specificServiceCfg/delete')">
|
||||
<i class="fa fa-trash"></i> 删除</button>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title="自定义列字段" 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-6">
|
||||
<div class="pull-left">
|
||||
<label>操作时间:</label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${specificServiceCfg.beginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<label>到</label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${specificServiceCfg.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onclick="page()"> <i class="fa fa-search"></i> 搜索 </button>
|
||||
<button type="button" id="resetBtn" class="btn btn-default" onclick="reset()"> <i class="fa fa-refresh"></i> 重置 </button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <div class="table-responsive"> -->
|
||||
<sys:message content="${message}"/>
|
||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
|
||||
<th>序号</th>
|
||||
<th>协议ID</th>
|
||||
<th>协议名称</th>
|
||||
<th>协议描述</th>
|
||||
<th>maat端配置分组id</th>
|
||||
<th><spring:message code="is_leaf"/></th>
|
||||
<th>操作时间</th>
|
||||
<shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${list}" var="specificServiceCfg" varStatus="ss">
|
||||
<tr id="${specificServiceCfg.specServiceId}" pId="${specificServiceCfg.parent.specServiceId ne 0?specificServiceCfg.parent.specServiceId:0}">
|
||||
<td><input type="checkbox" class="ckbox" name="check" value="${specificServiceCfg.specServiceId}"></td>
|
||||
<td>${specificServiceCfg.showSequence}</td>
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/specific/specificServiceCfg/form?specServiceId=${specificServiceCfg.specServiceId}&doAction=0">${specificServiceCfg.specServiceId}</a></td>
|
||||
<td title="${specificServiceCfg.specServiceName}">${specificServiceCfg.specServiceName}</td>
|
||||
<td title="${specificServiceCfg.specServiceDesc}">${fns:abbr(specificServiceCfg.specServiceDesc,15)}</td>
|
||||
<td>${specificServiceCfg.groupId }</td>
|
||||
<td>${fns:getDictLabel("SYS_YES_NO",specificServiceCfg.isLeaf,"0")}</td>
|
||||
<td><fmt:formatDate value="${specificServiceCfg.opTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"/><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<li><a href="${ctx}/specific/specificServiceCfg/form?mulitId=${specificServiceCfg.specServiceId}&doAction=0"><spring:message code="show"/></a></li>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/specific/specificServiceCfg/form?mulitId=${specificServiceCfg.specServiceId}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)"><spring:message code="edit"/></a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/specific/specificServiceCfg/delete?mulitId=${specificServiceCfg.specServiceId}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,383 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="${ctxStatic}/pages/css/dictInfo.css" />
|
||||
<script type="text/javascript" src="${ctxStatic}/pages/scripts/dict.js"></script>
|
||||
<title></title>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(
|
||||
function() {
|
||||
jQuery.validator.addMethod("maxValue",
|
||||
function(value, element) {
|
||||
return value >= 0 && value < 10000000;
|
||||
}, "请填写正确的协议id");
|
||||
//ip地址校验
|
||||
jQuery.validator.addMethod("ip",function(value, element) {
|
||||
return this.optional(element)||(/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(value) && (RegExp.$1 <256 && RegExp.$2<256 && RegExp.$3<256 && RegExp.$4<256));
|
||||
}, "请填写正确的IP地址,如192.168.0.1");
|
||||
$("#name").focus();
|
||||
$("#inputForm")
|
||||
.validate(
|
||||
{
|
||||
rules : {
|
||||
'specServiceId':{
|
||||
required:true
|
||||
},
|
||||
'srcIp':{
|
||||
required:true,
|
||||
ip:true
|
||||
},
|
||||
'dstIp':{
|
||||
required:true,
|
||||
ip:true
|
||||
},
|
||||
'srcIpMask':{
|
||||
required:true
|
||||
},
|
||||
'dstIpMask':{
|
||||
required:true
|
||||
},
|
||||
'srcPort':{
|
||||
required:true,
|
||||
digits:true,
|
||||
max: 65535,
|
||||
min: 0
|
||||
},
|
||||
'dstPort':{
|
||||
required:true,
|
||||
digits:true,
|
||||
max: 65535,
|
||||
min: 0
|
||||
},
|
||||
'srcPortMask':{
|
||||
required:true,
|
||||
digits:true,
|
||||
max: 65535,
|
||||
min: 0
|
||||
},
|
||||
'dstPortMask':{
|
||||
required:true,
|
||||
digits:true,
|
||||
max: 65535,
|
||||
min: 0
|
||||
}
|
||||
},
|
||||
messages : {
|
||||
'specServiceId':{
|
||||
required:'<spring:message code="required"/>'
|
||||
},
|
||||
'srcIp':{
|
||||
required:'<spring:message code="required"/>',
|
||||
ip:'请填写正确的ip'
|
||||
},
|
||||
'dstIp':{
|
||||
required:'<spring:message code="required"/>',
|
||||
ip:'请填写正确的ip'
|
||||
},
|
||||
'srcIpMask':{
|
||||
required:'<spring:message code="required"/>'
|
||||
},
|
||||
'dstIpMask':{
|
||||
required:'<spring:message code="required"/>'
|
||||
},
|
||||
'srcPort':{
|
||||
required:'<spring:message code="required"/>',
|
||||
digits:'请填写整数',
|
||||
max: '数值不得大于65535',
|
||||
min: '数值不得小于0'
|
||||
},
|
||||
'dstPort':{
|
||||
required:'<spring:message code="required"/>',
|
||||
digits:'请填写整数',
|
||||
max: '数值不得大于65535',
|
||||
min: '数值不得小于0'
|
||||
},
|
||||
'srcPortMask':{
|
||||
required:'<spring:message code="required"/>',
|
||||
digits:'请填写整数',
|
||||
max: '数值不得大于65535',
|
||||
min: '数值不得小于0'
|
||||
},
|
||||
'dstPortMask':{
|
||||
required:'<spring:message code="required"/>',
|
||||
digits:'请填写整数',
|
||||
max: '数值不得大于65535',
|
||||
min: '数值不得小于0'
|
||||
}
|
||||
},
|
||||
|
||||
submitHandler : function(form) {
|
||||
if (!validateItem()) {
|
||||
return false;
|
||||
}
|
||||
loading('正在提交,请稍等...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer : "#messageBox",
|
||||
errorPlacement : function(error, element) {
|
||||
$("#messageBox").text("输入有误,请先更正。");
|
||||
if (element.is(":checkbox")
|
||||
|| element.is(":radio")
|
||||
|| element.parent().is(
|
||||
".input-append")) {
|
||||
error.appendTo(element.parent()
|
||||
.parent());
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<button type="button" class="btn btn-default"
|
||||
onclick="history.go(-1)">
|
||||
<spring:message code="back" />
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="configuration_manage" />
|
||||
</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>
|
||||
<shiro:hasPermission name="sys:menu:edit">${not empty specificServiceHostCfg.hostId?'修改':'添加'}</shiro:hasPermission>
|
||||
<shiro:lacksPermission name="sys:menu:edit">
|
||||
<spring:message code="show" />
|
||||
</shiro:lacksPermission>
|
||||
</div>
|
||||
<div class="tools"></div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-body">
|
||||
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="inputForm" modelAttribute="specificServiceHostCfg" action="${ctx}/specific/specificServiceHostCfg/saveOrUpdate" method="post" class="form-horizontal" >
|
||||
<form:hidden path="hostId" class="form-control" />
|
||||
<sys:message content="${message}" />
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>协议ID:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="specServiceId" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>方向:</label>
|
||||
<div class="col-md-6">
|
||||
<form:select path="direction" class="selectpicker select2 form-control" >
|
||||
<c:forEach items="${fns:getDictList('SPEC_DIRECTION')}" var="dict">
|
||||
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>协议:</label>
|
||||
<div class="col-md-6">
|
||||
<form:select path="protocol" class="selectpicker select2 form-control" >
|
||||
<form:option value="">-请选择协议类型-</form:option>
|
||||
<c:forEach items="${fns:getDictList('SPEC_PROTOCOL')}" var="dict">
|
||||
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>是否审核:</label>
|
||||
<div class="col-md-6">
|
||||
<form:select path="isAudit" class="selectpicker select2 form-control" >
|
||||
<c:if test="${hostId == null}">
|
||||
<form:option value="0">${fns:getDictLabel("SPEC_AUDIT","0","0")}</form:option>
|
||||
</c:if>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>源IP地址:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="srcIp" htmlEscape="false" maxlength="50" class="form-control" placeholder="0.0.0.0"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>目的IP地址:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="dstIp" htmlEscape="false" maxlength="50" class="form-control" placeholder="0.0.0.0"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>源地址掩码:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="srcIpMask" htmlEscape="false" maxlength="50" class="form-control" placeholder="255.255.255.255"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>目的地址掩码:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="dstIpMask" htmlEscape="false" maxlength="50" class="form-control" placeholder="255.255.255.255"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>源端口:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="srcPort" htmlEscape="false" maxlength="50" class="form-control" placeholder="0"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>目的端口:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="dstPort" htmlEscape="false" maxlength="50" class="form-control" placeholder="0"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>源端口掩码:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="srcPortMask" htmlEscape="false" maxlength="50" class="form-control" placeholder="65535"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>目的端口掩码:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="dstPortMask" htmlEscape="false" maxlength="50" class="form-control" placeholder="65535"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- <div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>创建人员:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="creator.id" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>配置时间:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="createTime" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>修改人员:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="editor.id" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>修改时间:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="editTime" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>审核人员:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="auditor.id" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>审核时间:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="auditTime" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<shiro:hasPermission name="sys:menu:edit"><button type="submit" class="btn btn-circle blue"><spring:message code="submit" /></button></shiro:hasPermission>
|
||||
<button type="button" class="btn btn-circle grey-salsa btn-outline" onclick="history.go(-1)"> <spring:message code="cancel" /></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,356 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>特定服务服务器IP管理</title>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
|
||||
<c:choose>
|
||||
<c:when test="${cookie.Language.value eq 'zh_CN'}">
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-zh_CN.min.js"></script>
|
||||
</c:when>
|
||||
<c:when test="${cookie.Language.value eq 'en'}">
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
|
||||
</c:when>
|
||||
<c:when test="${cookie.Language.value eq 'ru_RU'}">
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-ru_RU.min.js"></script>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
$("#direction").change(function(){
|
||||
page();
|
||||
});
|
||||
$("#protocol").change(function(){
|
||||
page();
|
||||
});
|
||||
//全选及取消
|
||||
$("#checkAll").change(function(){
|
||||
if($("#checkAll").prop("checked")){
|
||||
$("input.i-checks").prop("checked",true);
|
||||
}else{
|
||||
$("input.i-checks").prop("checked",false);
|
||||
}
|
||||
});
|
||||
});
|
||||
function resetx(){
|
||||
$(':input','#searchForm')
|
||||
.not(':button,:submit,:reset,:hidden')
|
||||
.val('')
|
||||
.removeAttr('checked')
|
||||
.removeAttr('selected');
|
||||
$("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);
|
||||
});
|
||||
$("#specServiceId").attr("value","");
|
||||
$("#srcIp").attr("value","");
|
||||
$("#dstIp").attr("value","");
|
||||
|
||||
}
|
||||
//编辑
|
||||
function edit(){
|
||||
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 = "${ctx}/specific/specificServiceHostCfg/form?hostId="+cked.attr("id");
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
//删除
|
||||
function delAll(){
|
||||
var mulitId="";
|
||||
jQuery("#contentTable").find(":checkbox:checked[name='check']").each(function(){
|
||||
if(jQuery(this).val()!=""){
|
||||
mulitId+=jQuery(this).val()+",";
|
||||
}
|
||||
});
|
||||
if(mulitId!=""){
|
||||
confirmx('您确认要执行该操作?', '${ctx}/specific/specificServiceHostCfg/delete?mulitId='+mulitId);
|
||||
}else{
|
||||
alert("至少选择一条数据记录");
|
||||
}
|
||||
}
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/specific/specificServiceHostCfg/list");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
</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}/specific/specificServiceHostCfg/form'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"/></button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
特定服务服务器IP管理
|
||||
<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="specificServiceHostCfg" action="${ctx}/specific/specificServiceHostCfg/list" 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}"/>
|
||||
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${specificServiceHostCfg.isFilterAction }"/>
|
||||
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<c:forEach items="${fns:getDictList('SPEC_AUDIT')}" var="dict">
|
||||
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<c:set var="spec_service_id">协议ID</c:set>
|
||||
<form:select path="specServiceId" class="selectpicker select2 input-small" title="${spec_service_id}" data-live-search="true" data-live-search-placeholder="search">
|
||||
<c:forEach items="${listSpecServiceId}" var="specServiceId" >
|
||||
<form:option value="${specServiceId}">${specServiceId}</form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<c:set var="src_ip">源Ip地址</c:set>
|
||||
<form:select path="srcIp" class="selectpicker select2 input-small" title="${src_ip}" data-live-search="true" data-live-search-placeholder="search">
|
||||
<c:forEach items="${listSrcIp}" var="srcIp" >
|
||||
<form:option value="${srcIp}">${srcIp}</form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<c:set var="dst_ip">目的Ip地址</c:set>
|
||||
<form:select path="dstIp" class="selectpicker select2 input-small" title="${dst_ip}" data-live-search="true" data-live-search-placeholder="search">
|
||||
<c:forEach items="${listSrcIp}" var="dstIp" >
|
||||
<form:option value="${dstIp}">${dstIp}</form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<form:select path="direction" class="selectpicker select2 input-small" >
|
||||
<form:option value="">-请选择方向-</form:option>
|
||||
<c:forEach items="${fns:getDictList('SPEC_DIRECTION')}" var="dict">
|
||||
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left" style="margin-right:0px;">
|
||||
<form:select path="protocol" class="selectpicker select2 input-small" >
|
||||
<form:option value="">-请选择协议-</form:option>
|
||||
<c:forEach items="${fns:getDictList('SPEC_PROTOCOL')}" var="dict">
|
||||
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button class="btn btn-default btn-search" type="button" onclick="return page()"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="pull-right">
|
||||
<button type="button" class="btn btn-default" onclick="edit()">
|
||||
<i class="fa fa-edit"></i> <spring:message code="edit"></spring:message></button>
|
||||
<button type="button" class="btn btn-default" onclick="delAll()">
|
||||
<i class="fa fa-trash"></i> 删除</button>
|
||||
<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}/cfg/request/requestExamine" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/cfg/request/requestExamineNo" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/cfg/request/requestCancelExamine" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title="自定义列字段" 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-6">
|
||||
<div class="pull-left">
|
||||
<label>配置时间:</label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate" data-options="buttons:buttons"
|
||||
value="<fmt:formatDate value="${specificServiceHostCfg.beginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<label><spring:message code="to"/></label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${specificServiceHostCfg.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="pull-left">
|
||||
<label>修改时间:</label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="editBeginDate" name="editBeginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${specificServiceHostCfg.editBeginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<label><spring:message code="to"/></label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="editEndDate" name="editEndDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${specificServiceHostCfg.editEndDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="pull-left">
|
||||
<label>审核时间:</label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="auditBeginDate" name="auditBeginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${specificServiceHostCfg.auditBeginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<label><spring:message code="to"/></label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="auditEndDate" name="auditEndDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${specificServiceHostCfg.auditEndDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onclick="page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" onclick="resetx()"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <div class="table-responsive"> -->
|
||||
<sys:message content="${message}"/>
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th>协议id</th>
|
||||
<th>源IP地址</th>
|
||||
<th>源地址掩码</th>
|
||||
<th>源端口</th>
|
||||
<th>源端口掩码</th>
|
||||
<th>目的IP地址</th>
|
||||
<th>目的地址掩码</th>
|
||||
<th>目的端口</th>
|
||||
<th>目的端口掩码</th>
|
||||
<th>方向</th>
|
||||
<th>协议</th>
|
||||
<th>是否审核</th>
|
||||
<th>创建人员</th>
|
||||
<th>配置时间</th>
|
||||
<th>修改人员</th>
|
||||
<th>修改时间</th>
|
||||
<th>审核人员</th>
|
||||
<th>审核时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="specificServiceHostCfg">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" name="check" id="${specificServiceHostCfg.hostId}" value="${specificServiceHostCfg.isAudit}"></td>
|
||||
<td>${specificServiceHostCfg.specServiceId }</td>
|
||||
<td>${specificServiceHostCfg.srcIp }</td>
|
||||
<td>${specificServiceHostCfg.srcIpMask }</td>
|
||||
<td>${specificServiceHostCfg.srcPort }</td>
|
||||
<td>${specificServiceHostCfg.srcPortMask }</td>
|
||||
<td>${specificServiceHostCfg.dstIp }</td>
|
||||
<td>${specificServiceHostCfg.dstIpMask }</td>
|
||||
<td>${specificServiceHostCfg.dstPort }</td>
|
||||
<td>${specificServiceHostCfg.dstPortMask }</td>
|
||||
<td>${fns:getDictLabel("SPEC_DIRECTION",specificServiceHostCfg.direction,"0")}</td>
|
||||
<td>${fns:getDictLabel("SPEC_PROTOCOL",specificServiceHostCfg.protocol,"0")}</td>
|
||||
<td>${fns:getDictLabel("SPEC_AUDIT",specificServiceHostCfg.isAudit,"0")}</td>
|
||||
<td>${fns:getUserById(specificServiceHostCfg.creator.id).name}</td>
|
||||
<td><fmt:formatDate value="${specificServiceHostCfg.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${fns:getUserById(specificServiceHostCfg.editor.id).name}</td>
|
||||
<td><fmt:formatDate value="${specificServiceHostCfg.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${fns:getUserById(specificServiceHostCfg.auditor.id==null?0:specificServiceHostCfg.auditor.id).name}</td>
|
||||
<td><fmt:formatDate value="${specificServiceHostCfg.auditTime}" 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