分类性质标签、地域运营商作用域:融合自定义显示,添加排序,优化代码,
特定服务器管理:修正列表分页显示,条件查询,添加自定义显示,添加排序,新增修改页面添加表单校验, 协议ip配置:修正条件查询,添加自定义显示,添加排序,新增修改页面添加表单校验(ipV4\ipV6地址及掩码校验,端口校验)
This commit is contained in:
@@ -101,8 +101,10 @@ public class SpecificServiceCfg extends BaseEntity<SpecificServiceCfg>{
|
|||||||
|
|
||||||
for(int i=0;i<allList.size();i++){
|
for(int i=0;i<allList.size();i++){
|
||||||
SpecificServiceCfg ss = allList.get(i);
|
SpecificServiceCfg ss = allList.get(i);
|
||||||
if(ss!=null&&ss.getParent()!=null&&ss.getParent().getSpecServiceId()!=null&&ss.getParent().getSpecServiceId()==parentId){
|
System.out.println("处理"+ss.getSpecServiceName()+"id:"+ss.getSpecServiceId()+"父ID:"+ss.getParent().getSpecServiceId()+"条件》》"+parentId);
|
||||||
|
if(ss!=null&&ss.getParent()!=null&&ss.getParent().getSpecServiceId()!=null&&ss.getParent().getSpecServiceId().equals(parentId)){
|
||||||
list.add(ss);
|
list.add(ss);
|
||||||
|
System.out.println("list加入"+ss.getSpecServiceName()+"id:"+ss.getSpecServiceId()+"父ID:"+ss.getParent().getSpecServiceId());
|
||||||
if(cascade){
|
if(cascade){
|
||||||
for(int j=0;j<allList.size();j++){
|
for(int j=0;j<allList.size();j++){
|
||||||
SpecificServiceCfg child = allList.get(j);
|
SpecificServiceCfg child = allList.get(j);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class SpecificServiceHostCfg extends BaseEntity<SpecificServiceHostCfg>{
|
|||||||
|
|
||||||
private Integer hostId; //host_id 配置ID bigint N 主键,自增
|
private Integer hostId; //host_id 配置ID bigint N 主键,自增
|
||||||
private Integer specServiceId; //spec_service_id 协议id int N protocol_info_cfg.protocol_id
|
private Integer specServiceId; //spec_service_id 协议id int N protocol_info_cfg.protocol_id
|
||||||
|
private Integer ipType; //ip地址类型 ipV4=4 ipV6=6
|
||||||
private String srcIp; //src_ip 源IP地址 varchar(64) N 缺省0.0.0.0值表示任意
|
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值表示任意;
|
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的指数幂,下同。
|
//IPV6:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF表示无掩码,::(两个半角冒号)表示任意。非0掩码值必须是2的指数幂,下同。
|
||||||
@@ -61,6 +62,12 @@ public class SpecificServiceHostCfg extends BaseEntity<SpecificServiceHostCfg>{
|
|||||||
public void setSpecServiceId(Integer specServiceId) {
|
public void setSpecServiceId(Integer specServiceId) {
|
||||||
this.specServiceId = specServiceId;
|
this.specServiceId = specServiceId;
|
||||||
}
|
}
|
||||||
|
public Integer getIpType() {
|
||||||
|
return ipType;
|
||||||
|
}
|
||||||
|
public void setIpType(Integer ipType) {
|
||||||
|
this.ipType = ipType;
|
||||||
|
}
|
||||||
public String getSrcIp() {
|
public String getSrcIp() {
|
||||||
return srcIp;
|
return srcIp;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,79 +77,7 @@ public class ServiceDictInfoController extends BaseController {
|
|||||||
for(int i=0;i<strArr.length;i++){
|
for(int i=0;i<strArr.length;i++){
|
||||||
intArr[i] = Integer.valueOf(strArr[i]);
|
intArr[i] = Integer.valueOf(strArr[i]);
|
||||||
}
|
}
|
||||||
if(serviceDictInfo.getItemType()!=null){
|
|
||||||
model.addAttribute("selectedType", serviceDictInfo.getItemType());
|
|
||||||
}else{
|
|
||||||
model.addAttribute("selectedType", selectedType);
|
|
||||||
serviceDictInfo.setItemType(selectedType);
|
|
||||||
}
|
|
||||||
//查询符合条件总数
|
|
||||||
List<ServiceDictInfo> showTotalCount = serviceDictInfoService.findAllDictSearchList(serviceDictInfo,intArr);
|
|
||||||
model.addAttribute("showTotalCount", showTotalCount.size());
|
|
||||||
|
|
||||||
//查出顶层分页数据
|
|
||||||
Page<ServiceDictInfo> page = serviceDictInfoService.findTopDictList(new Page<ServiceDictInfo>(request, response), serviceDictInfo,intArr);
|
|
||||||
//植入序号
|
|
||||||
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);
|
|
||||||
//查出所有数据
|
|
||||||
List<ServiceDictInfo> allList = serviceDictInfoService.findAllDictList();
|
|
||||||
//处理数据,保留顶层中的所有下层数据
|
|
||||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
|
||||||
for(int i=allList.size()-1;i>=0;i--){
|
|
||||||
ServiceDictInfo se = allList.get(i);
|
|
||||||
if(se!=null&&se.getParent()!=null&&se.getParent().getServiceDictId()!=null&&se.getParent().getServiceDictId()==0){
|
|
||||||
allList.remove(se);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
allList.addAll(page.getList());
|
|
||||||
ServiceDictInfo.sortList(list,allList,0,true);
|
|
||||||
|
|
||||||
//处理下级序号
|
|
||||||
ServiceDictInfo.addChildrenSeq(list, 0);
|
|
||||||
model.addAttribute("itType", itType);
|
|
||||||
model.addAttribute("intArr", Arrays.asList(intArr));
|
|
||||||
model.addAttribute("list", list);
|
|
||||||
return "/basics/serviceDictList";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询业务辅助表-业务字典信息列表(含条件查询)
|
|
||||||
* @param serviceDictInfo
|
|
||||||
* @param request
|
|
||||||
* @param response
|
|
||||||
* @param model
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("sys:dict:view")
|
|
||||||
@RequestMapping(value = {"searchList"})
|
|
||||||
public String searchList(String itType, ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model,Integer selectedType) {
|
|
||||||
if(StringUtils.strIsBlank(serviceDictInfo.getItemValue())
|
|
||||||
&&StringUtils.strIsBlank(serviceDictInfo.getItemCode())
|
|
||||||
&&serviceDictInfo.getBeginDate()==null
|
|
||||||
&&serviceDictInfo.getEndDate()==null
|
|
||||||
&&serviceDictInfo.getEditBeginDate()==null
|
|
||||||
&&serviceDictInfo.getEditEndDate()==null){
|
|
||||||
if(serviceDictInfo.getItemType()!=null){
|
|
||||||
selectedType = serviceDictInfo.getItemType();
|
|
||||||
return "redirect:"+ adminPath + "/basics/serviceDictInfo/list?itType="+itType+"&selectedType="+selectedType+"&isFilterAction="+serviceDictInfo.getIsFilterAction();
|
|
||||||
}
|
|
||||||
return "redirect:"+ adminPath + "/basics/serviceDictInfo/list?itType="+itType+"&isFilterAction="+serviceDictInfo.getIsFilterAction();
|
|
||||||
}
|
|
||||||
String[] strArr = itType.split("-");
|
|
||||||
Integer[] intArr = new Integer[strArr.length];
|
|
||||||
for(int i=0;i<strArr.length;i++){
|
|
||||||
intArr[i] = Integer.valueOf(strArr[i]);
|
|
||||||
}
|
|
||||||
if(serviceDictInfo.getItemType()!=null){
|
|
||||||
model.addAttribute("selectedType", serviceDictInfo.getItemType());
|
|
||||||
}else{
|
|
||||||
model.addAttribute("selectedType", selectedType);
|
|
||||||
serviceDictInfo.setItemType(selectedType);
|
|
||||||
}
|
|
||||||
String searchType = null;
|
String searchType = null;
|
||||||
String searchContent = null;
|
String searchContent = null;
|
||||||
if(!StringUtils.isBlank(serviceDictInfo.getItemCode())){
|
if(!StringUtils.isBlank(serviceDictInfo.getItemCode())){
|
||||||
@@ -163,46 +91,46 @@ public class ServiceDictInfoController extends BaseController {
|
|||||||
model.addAttribute("searchType", searchType);
|
model.addAttribute("searchType", searchType);
|
||||||
model.addAttribute("searchContent", searchContent);
|
model.addAttribute("searchContent", searchContent);
|
||||||
|
|
||||||
//先查出条件查询所有数据(注意顺序)
|
Page<ServiceDictInfo> pageCondition = new Page<ServiceDictInfo>(request, response);
|
||||||
List<ServiceDictInfo> allList = serviceDictInfoService.findAllDictSearchList(serviceDictInfo,intArr);
|
//查询符合条件总数
|
||||||
|
List<ServiceDictInfo> allList = serviceDictInfoService.findAllServiceDictInfo(serviceDictInfo,intArr,pageCondition.getOrderBy());
|
||||||
model.addAttribute("showTotalCount", allList.size());
|
model.addAttribute("showTotalCount", allList.size());
|
||||||
//查出条件查询顶层分页数据
|
|
||||||
Page<ServiceDictInfo> page = serviceDictInfoService.findDictTopSearchList(new Page<ServiceDictInfo>(request, response), serviceDictInfo,intArr);
|
//查出顶层分页数据
|
||||||
//植入序号
|
Page<ServiceDictInfo> page = serviceDictInfoService.findTopDictList(pageCondition, serviceDictInfo,intArr);
|
||||||
for(int i=0;i<page.getList().size();i++){
|
// 植入序号
|
||||||
page.getList().get(i).setShowSequence(""+(i+1+((page.getPageNo()-1)*page.getPageSize())));
|
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);
|
model.addAttribute("page", page);
|
||||||
|
|
||||||
//处理数据,保留顶层中的所有下层数据
|
// 删除顶层数据、取出id 优化处理
|
||||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
List<Integer> intList = Lists.newArrayList();
|
||||||
//取出主键优化处理
|
|
||||||
List<Integer> tempList = Lists.newArrayList();
|
for(ServiceDictInfo tempSe : page.getList()) {
|
||||||
for(ServiceDictInfo se:page.getList()){
|
if (tempSe != null) {
|
||||||
if(se!=null&&se.getServiceDictId()!=null){
|
intList.add(tempSe.getServiceDictId());
|
||||||
tempList.add(se.getServiceDictId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//删除所有重复
|
|
||||||
for(int i=allList.size()-1;i>=0;i--){
|
|
||||||
ServiceDictInfo se = allList.get(i);
|
|
||||||
if(se!=null&&se.getServiceDictId()!=null){
|
|
||||||
if(tempList.contains(se.getServiceDictId())||se.getParent().getServiceDictId()==0){
|
|
||||||
allList.remove(se);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i = allList.size() - 1; i >= 0; i--) {
|
||||||
|
ServiceDictInfo se = allList.get(i);
|
||||||
|
if(se!=null&&intList.contains(se.getServiceDictId())||(se!=null&&se.getParent().getServiceDictId()==0)){
|
||||||
|
allList.remove(se);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||||
|
|
||||||
allList.addAll(page.getList());
|
allList.addAll(page.getList());
|
||||||
ServiceDictInfo.sortList(list,allList,0,true);
|
ServiceDictInfo.sortList(list,allList,0,true);
|
||||||
|
|
||||||
//处理下级序号
|
//处理下级序号
|
||||||
ServiceDictInfo.addChildrenSeq(list, 0);
|
ServiceDictInfo.addChildrenSeq(list, 0);
|
||||||
//serviceDictInfo.setItemType(selectedType);
|
|
||||||
model.addAttribute("itType", itType);
|
model.addAttribute("itType", itType);
|
||||||
model.addAttribute("intArr", Arrays.asList(intArr));
|
model.addAttribute("intArr", Arrays.asList(intArr));
|
||||||
model.addAttribute("list", list);
|
model.addAttribute("list", list);
|
||||||
|
return "/basics/serviceDictList";
|
||||||
return "/basics/serviceDictInfoSearchList";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -76,30 +76,50 @@ public class SysDictInfoController extends BaseController {
|
|||||||
for(int i=0;i<strArr.length;i++){
|
for(int i=0;i<strArr.length;i++){
|
||||||
intArr[i] = Integer.valueOf(strArr[i]);
|
intArr[i] = Integer.valueOf(strArr[i]);
|
||||||
}
|
}
|
||||||
|
String searchType = null;
|
||||||
|
String searchContent = null;
|
||||||
|
if(!StringUtils.isBlank(sysDictInfo.getItemCode())){
|
||||||
|
searchType = "itemCode";
|
||||||
|
searchContent = sysDictInfo.getItemCode();
|
||||||
|
}
|
||||||
|
if(!StringUtils.isBlank(sysDictInfo.getItemValue())){
|
||||||
|
searchType = "itemValue";
|
||||||
|
searchContent = sysDictInfo.getItemValue();
|
||||||
|
}
|
||||||
|
model.addAttribute("searchType", searchType);
|
||||||
|
model.addAttribute("searchContent", searchContent);
|
||||||
if(sysDictInfo.getItemType()!=null){
|
if(sysDictInfo.getItemType()!=null){
|
||||||
model.addAttribute("selectedType", sysDictInfo.getItemType());
|
model.addAttribute("selectedType", sysDictInfo.getItemType());
|
||||||
}else{
|
}else{
|
||||||
model.addAttribute("selectedType", selectedType);
|
model.addAttribute("selectedType", selectedType);
|
||||||
sysDictInfo.setItemType(selectedType);
|
sysDictInfo.setItemType(selectedType);
|
||||||
}
|
}
|
||||||
|
Page<SysDictInfo> pageCondition = new Page<SysDictInfo>(request, response);
|
||||||
|
|
||||||
//查询符合条件总数
|
//查询符合条件总数
|
||||||
List<SysDictInfo> showTotalCount = sysDictInfoService.findAllDictSearchList(sysDictInfo,intArr);
|
List<SysDictInfo> allList = sysDictInfoService.findAllSysDictInfo(sysDictInfo,intArr,pageCondition.getOrderBy());
|
||||||
model.addAttribute("showTotalCount", showTotalCount.size());
|
model.addAttribute("showTotalCount", allList.size());
|
||||||
|
|
||||||
//查出顶层分页数据
|
//查出顶层分页数据
|
||||||
Page<SysDictInfo> page = sysDictInfoService.findTopDictList(new Page<SysDictInfo>(request, response), sysDictInfo,intArr);
|
Page<SysDictInfo> page = sysDictInfoService.findTopDictList(pageCondition, sysDictInfo,intArr);
|
||||||
//植入序号
|
//植入序号
|
||||||
for(int i=0;i<page.getList().size();i++){
|
for(int i=0;i<page.getList().size();i++){
|
||||||
page.getList().get(i).setShowSequence(""+(i+1+((page.getPageNo()-1)*page.getPageSize())));
|
page.getList().get(i).setShowSequence(""+(i+1+((page.getPageNo()-1)*page.getPageSize())));
|
||||||
}
|
}
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
//查出所有数据
|
|
||||||
List<SysDictInfo> allList = sysDictInfoService.findAllDictList();
|
//处理数据,取出主键优化处理
|
||||||
//处理数据,保留顶层中的所有下层数据
|
List<Integer> intList = Lists.newArrayList();
|
||||||
|
for(SysDictInfo se:page.getList()){
|
||||||
|
if(se!=null){
|
||||||
|
intList.add(se.getSysDictId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<SysDictInfo> list = Lists.newArrayList();
|
List<SysDictInfo> list = Lists.newArrayList();
|
||||||
for(int i=allList.size()-1;i>=0;i--){
|
for(int i=allList.size()-1;i>=0;i--){
|
||||||
SysDictInfo se = allList.get(i);
|
SysDictInfo se = allList.get(i);
|
||||||
if(se!=null&&se.getParent()!=null&&se.getParent().getSysDictId()!=null&&se.getParent().getSysDictId()==0){
|
if(se!=null&&intList.contains(se.getSysDictId())||(se!=null&&se.getParent().getSysDictId()==0)){
|
||||||
allList.remove(se);
|
allList.remove(se);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -114,116 +134,6 @@ public class SysDictInfoController extends BaseController {
|
|||||||
return "/basics/sysDictList";
|
return "/basics/sysDictList";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询业务辅助表-系统字典信息列表(含条件查询)
|
|
||||||
* @param sysDictInfo
|
|
||||||
* @param request
|
|
||||||
* @param response
|
|
||||||
* @param model
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("sys:dict:view")
|
|
||||||
@RequestMapping(value = {"searchList"})
|
|
||||||
public String searchList(String itType, SysDictInfo sysDictInfo,HttpServletRequest request, HttpServletResponse response, Model model, Integer selectedType) {
|
|
||||||
if(StringUtils.strIsBlank(sysDictInfo.getItemValue())
|
|
||||||
&&StringUtils.strIsBlank(sysDictInfo.getItemCode())
|
|
||||||
&&sysDictInfo.getBeginDate()==null
|
|
||||||
&&sysDictInfo.getEndDate()==null
|
|
||||||
&&sysDictInfo.getEditBeginDate()==null
|
|
||||||
&&sysDictInfo.getEditEndDate()==null){
|
|
||||||
if(sysDictInfo.getItemType()!=null){
|
|
||||||
selectedType = sysDictInfo.getItemType();
|
|
||||||
return "redirect:"+ adminPath + "/basics/sysDictInfo/list?itType="+itType+"&selectedType="+selectedType+"&isFilterAction="+sysDictInfo.getIsFilterAction();
|
|
||||||
}
|
|
||||||
return "redirect:"+ adminPath + "/basics/sysDictInfo/list?itType="+itType+"&isFilterAction="+sysDictInfo.getIsFilterAction();
|
|
||||||
}
|
|
||||||
String[] strArr = itType.split("-");
|
|
||||||
Integer[] intArr = new Integer[strArr.length];
|
|
||||||
for(int i=0;i<strArr.length;i++){
|
|
||||||
intArr[i] = Integer.valueOf(strArr[i]);
|
|
||||||
}
|
|
||||||
if(sysDictInfo.getItemType()!=null){
|
|
||||||
model.addAttribute("selectedType", sysDictInfo.getItemType());
|
|
||||||
}else{
|
|
||||||
model.addAttribute("selectedType", selectedType);
|
|
||||||
sysDictInfo.setItemType(selectedType);
|
|
||||||
}
|
|
||||||
String searchType = null;
|
|
||||||
String searchContent = null;
|
|
||||||
if(!StringUtils.isBlank(sysDictInfo.getItemCode())){
|
|
||||||
searchType = "itemCode";
|
|
||||||
searchContent = sysDictInfo.getItemCode();
|
|
||||||
}
|
|
||||||
if(!StringUtils.isBlank(sysDictInfo.getItemValue())){
|
|
||||||
searchType = "itemValue";
|
|
||||||
searchContent = sysDictInfo.getItemValue();
|
|
||||||
}
|
|
||||||
model.addAttribute("searchType", searchType);
|
|
||||||
model.addAttribute("searchContent", searchContent);
|
|
||||||
//先查出条件查询所有数据(注意顺序)
|
|
||||||
List<SysDictInfo> allList = sysDictInfoService.findAllDictSearchList(sysDictInfo,intArr);
|
|
||||||
model.addAttribute("showTotalCount", allList.size());
|
|
||||||
//查出条件查询顶层分页数据
|
|
||||||
Page<SysDictInfo> page = sysDictInfoService.findDictTopSearchList(new Page<SysDictInfo>(request, response), sysDictInfo,intArr);
|
|
||||||
//植入序号
|
|
||||||
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);
|
|
||||||
|
|
||||||
//处理数据,保留顶层中的所有下层数据
|
|
||||||
List<SysDictInfo> list = Lists.newArrayList();
|
|
||||||
//取出主键优化处理
|
|
||||||
List<Integer> tempList = Lists.newArrayList();
|
|
||||||
for(SysDictInfo se:page.getList()){
|
|
||||||
if(se!=null&&se.getSysDictId()!=null){
|
|
||||||
tempList.add(se.getSysDictId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//删除所有重复
|
|
||||||
for(int i=allList.size()-1;i>=0;i--){
|
|
||||||
SysDictInfo se = allList.get(i);
|
|
||||||
//System.out.println("删前顺序"+se.getSysDictId());
|
|
||||||
if(se!=null&&se.getSysDictId()!=null){
|
|
||||||
if(tempList.contains(se.getSysDictId())||se.getParent().getSysDictId()==0){
|
|
||||||
allList.remove(se);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* for(int i=allList.size()-1;i>=0;i--){
|
|
||||||
SysDictInfo se = allList.get(i);
|
|
||||||
System.out.println("删后顺序"+se.getSysDictId());
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
allList.addAll(page.getList());
|
|
||||||
SysDictInfo.sortList(list,allList,0,true);
|
|
||||||
|
|
||||||
|
|
||||||
//处理下级序号
|
|
||||||
SysDictInfo.addChildrenSeq(list, 0);
|
|
||||||
/*for(int i=list.size()-1;i>=0;i--){
|
|
||||||
SysDictInfo se = list.get(i);
|
|
||||||
System.out.println("最终顺序"+se.getSysDictId()+":"+se.getParent().getSysDictId());
|
|
||||||
}*/
|
|
||||||
|
|
||||||
model.addAttribute("itType", itType);
|
|
||||||
model.addAttribute("intArr", Arrays.asList(intArr));
|
|
||||||
model.addAttribute("list", list);
|
|
||||||
|
|
||||||
return "/basics/sysDictInfoSearchList";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进入添加或修改页面
|
* 进入添加或修改页面
|
||||||
* @param sysDictInfo
|
* @param sysDictInfo
|
||||||
|
|||||||
@@ -60,15 +60,24 @@ public class SpecificServiceCfgController extends BaseController {
|
|||||||
searchType = "specServiceName";
|
searchType = "specServiceName";
|
||||||
searchContent = specificServiceCfg.getSpecServiceName();
|
searchContent = specificServiceCfg.getSpecServiceName();
|
||||||
}
|
}
|
||||||
|
if(!StringUtils.isBlank(specificServiceCfg.getSpecServiceDesc())){
|
||||||
|
searchType = "specServiceDesc";
|
||||||
|
searchContent = specificServiceCfg.getSpecServiceDesc();
|
||||||
|
}
|
||||||
|
if(specificServiceCfg.getGroupId()!=null){
|
||||||
|
searchType = "groupId";
|
||||||
|
searchContent = specificServiceCfg.getGroupId().toString();
|
||||||
|
}
|
||||||
model.addAttribute("searchType", searchType);
|
model.addAttribute("searchType", searchType);
|
||||||
model.addAttribute("searchContent", searchContent);
|
model.addAttribute("searchContent", searchContent);
|
||||||
|
|
||||||
|
Page<SpecificServiceCfg> pageCondition = new Page<SpecificServiceCfg>(request, response);
|
||||||
// 取出所有符合条件的数据
|
// 取出所有符合条件的数据
|
||||||
List<SpecificServiceCfg> allList = specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg);
|
List<SpecificServiceCfg> allList = specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg,pageCondition.getOrderBy());
|
||||||
model.addAttribute("showTotalCount", allList.size());
|
model.addAttribute("showTotalCount", allList.size());
|
||||||
// 取出所有符合条件的顶层分页
|
// 取出所有符合条件的顶层分页
|
||||||
Page<SpecificServiceCfg> page = specificServiceCfgService
|
Page<SpecificServiceCfg> page = specificServiceCfgService
|
||||||
.findTopPage(new Page<SpecificServiceCfg>(request, response), specificServiceCfg);
|
.findTopPage(pageCondition, specificServiceCfg);
|
||||||
// 植入序号
|
// 植入序号
|
||||||
for (int i = 0; i < page.getList().size(); i++) {
|
for (int i = 0; i < page.getList().size(); i++) {
|
||||||
page.getList().get(i).setShowSequence("" + (i + 1 + ((page.getPageNo() - 1) * page.getPageSize())));
|
page.getList().get(i).setShowSequence("" + (i + 1 + ((page.getPageNo() - 1) * page.getPageSize())));
|
||||||
@@ -83,12 +92,13 @@ public class SpecificServiceCfgController extends BaseController {
|
|||||||
}
|
}
|
||||||
for (int i = allList.size() - 1; i >= 0; i--) {
|
for (int i = allList.size() - 1; i >= 0; i--) {
|
||||||
SpecificServiceCfg ss = allList.get(i);
|
SpecificServiceCfg ss = allList.get(i);
|
||||||
if ((ss != null && intList.contains(ss.getSpecServiceId())) || (ss != null && ss.getSpecServiceId() == 0)) {
|
if ((ss != null && intList.contains(ss.getSpecServiceId())) || (ss != null && ss.getParent().getSpecServiceId() == 0)) {
|
||||||
allList.remove(ss);
|
allList.remove(ss);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allList.addAll(page.getList());
|
allList.addAll(page.getList());
|
||||||
|
|
||||||
List<SpecificServiceCfg> list = Lists.newArrayList();
|
List<SpecificServiceCfg> list = Lists.newArrayList();
|
||||||
SpecificServiceCfg.sortList(list, allList, 0, true);
|
SpecificServiceCfg.sortList(list, allList, 0, true);
|
||||||
//处理下级序号
|
//处理下级序号
|
||||||
@@ -192,11 +202,11 @@ public class SpecificServiceCfgController extends BaseController {
|
|||||||
map2.put("name","根节点");
|
map2.put("name","根节点");
|
||||||
//map2.put("placeholder","0");
|
//map2.put("placeholder","0");
|
||||||
mapList.add(map2);
|
mapList.add(map2);
|
||||||
List<SpecificServiceCfg> list = specificServiceCfgService.findAllSpecificServiceCfg(new SpecificServiceCfg());
|
List<SpecificServiceCfg> list = specificServiceCfgService.findAllSpecificServiceCfg(new SpecificServiceCfg(),"");
|
||||||
for (int i=0; i<list.size(); i++){
|
for (int i=0; i<list.size(); i++){
|
||||||
SpecificServiceCfg specificServiceCfg = list.get(i);
|
SpecificServiceCfg specificServiceCfg = list.get(i);
|
||||||
if(StringUtils.isBlank(extId)||(extId!=null&&!extId.equals(specificServiceCfg.getSpecServiceId().toString()))){
|
if(StringUtils.isBlank(extId)||(extId!=null&&!extId.equals(specificServiceCfg.getSpecServiceId().toString()))){
|
||||||
if(specificServiceCfg.getIsValid()==0){
|
if(specificServiceCfg.getIsValid().equals(0)&&specificServiceCfg.getIsLeaf().equals(1)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Map<String, Object> map = Maps.newHashMap();
|
Map<String, Object> map = Maps.newHashMap();
|
||||||
@@ -218,10 +228,10 @@ public class SpecificServiceCfgController extends BaseController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value = "isIdRepeat")
|
@RequestMapping(value = "isIdRepeat")
|
||||||
public boolean isIdRepeat(String specServiceId,String oldId){
|
public boolean isIdRepeat(String specServiceId,String oldId){
|
||||||
System.out.println(specServiceId +"--"+specServiceId);
|
if(oldId!=null){
|
||||||
System.out.println(oldId.trim().equals(specServiceId));
|
if(oldId.trim().equals(specServiceId)){
|
||||||
if(oldId.trim().equals(specServiceId)){
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
}
|
||||||
if(specServiceId!=null){
|
if(specServiceId!=null){
|
||||||
SpecificServiceCfg ss = specificServiceCfgService.getBySpecServiceId(Integer.valueOf(specServiceId));
|
SpecificServiceCfg ss = specificServiceCfgService.getBySpecServiceId(Integer.valueOf(specServiceId));
|
||||||
@@ -269,7 +279,7 @@ public class SpecificServiceCfgController extends BaseController {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
List<SpecificServiceCfg> list = specificServiceCfgService.getChildrenById(parent);
|
List<SpecificServiceCfg> list = specificServiceCfgService.getChildrenById(parent);
|
||||||
if(list==null||list.size()>0){
|
if(list==null||list.size()==0){
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
if(newIsLeaf==0){
|
if(newIsLeaf==0){
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.springframework.ui.Model;
|
|||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
@@ -57,13 +58,13 @@ public class SpecificServiceHostCfgController extends BaseController {
|
|||||||
List<String> listSrcIp = Lists.newArrayList();
|
List<String> listSrcIp = Lists.newArrayList();
|
||||||
List<String> listDstIp = Lists.newArrayList();
|
List<String> listDstIp = Lists.newArrayList();
|
||||||
for(SpecificServiceHostCfg ssh:list){
|
for(SpecificServiceHostCfg ssh:list){
|
||||||
if(ssh!=null&ssh.getSpecServiceId()!=null){
|
if(ssh!=null&&ssh.getSpecServiceId()!=null&&(!listSpecServiceId.contains(ssh.getSpecServiceId()))){
|
||||||
listSpecServiceId.add(ssh.getSpecServiceId());
|
listSpecServiceId.add(ssh.getSpecServiceId());
|
||||||
}
|
}
|
||||||
if(ssh!=null&ssh.getSrcIp()!=null){
|
if(ssh!=null&&ssh.getSrcIp()!=null&&(!listSrcIp.contains(ssh.getSrcIp()))){
|
||||||
listSrcIp.add(ssh.getSrcIp());
|
listSrcIp.add(ssh.getSrcIp());
|
||||||
}
|
}
|
||||||
if(ssh!=null&ssh.getDstIp()!=null){
|
if(ssh!=null&&ssh.getDstIp()!=null&&(!listDstIp.contains(ssh.getDstIp()))){
|
||||||
listDstIp.add(ssh.getDstIp());
|
listDstIp.add(ssh.getDstIp());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,7 +106,7 @@ public class SpecificServiceHostCfgController extends BaseController {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
addMessage(redirectAttributes, "保存失败!");
|
addMessage(redirectAttributes, "保存失败!");
|
||||||
}
|
}
|
||||||
return "redirect:"+adminPath+"/specific/specificServiceHostCfgList";
|
return "redirect:"+adminPath+"/specific/specificServiceHostCfg/list";
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
@@ -126,5 +127,23 @@ public class SpecificServiceHostCfgController extends BaseController {
|
|||||||
|
|
||||||
return "redirect:"+adminPath+"/specific/specificServiceHostCfg/list";
|
return "redirect:"+adminPath+"/specific/specificServiceHostCfg/list";
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 校验spec_service_id重复
|
||||||
|
* @param newId
|
||||||
|
* @param oldId
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping(value = "isSpecServiceIdRepeat")
|
||||||
|
public boolean isSpecServiceIdRepeat(String newId,String oldId){
|
||||||
|
if(oldId!=null){
|
||||||
|
oldId.trim().equals(newId);
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
SpecificServiceHostCfg sshc = specificServiceHostCfgService.getBySpecServiceId(Integer.valueOf(newId));
|
||||||
|
if(sshc==null){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,17 +13,32 @@ import com.nis.web.dao.MyBatisDao;
|
|||||||
public interface ServiceDictInfoDao extends CrudDao<ServiceDictInfo> {
|
public interface ServiceDictInfoDao extends CrudDao<ServiceDictInfo> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询顶层字典列表(无条件查询(==))
|
* 查询顶层字典列表(==)
|
||||||
* @param serviceDictInfo
|
* @param serviceDictInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ServiceDictInfo> findTopDictList(ServiceDictInfo serviceDictInfo);
|
List<ServiceDictInfo> findTopDictList(ServiceDictInfo serviceDictInfo);
|
||||||
/**
|
/**
|
||||||
* 查询顶层字典列表(无条件查询(!=))
|
* 查询顶层字典列表(!=)
|
||||||
* @param serviceDictInfo
|
* @param serviceDictInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ServiceDictInfo> findTopDictListN(ServiceDictInfo serviceDictInfo);
|
List<ServiceDictInfo> findTopDictListN(ServiceDictInfo serviceDictInfo);
|
||||||
|
/**
|
||||||
|
* findAllServiceDictInfo
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 查询所有字典列表(==)
|
||||||
|
* @param serviceDictInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ServiceDictInfo> findAllServiceDictInfo(@Param("serviceDictInfo")ServiceDictInfo serviceDictInfo,@Param("orderBy")String orderBy);
|
||||||
|
/**
|
||||||
|
* 查询所有字典列表(!=)
|
||||||
|
* @param serviceDictInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ServiceDictInfo> findAllServiceDictInfoN(@Param("serviceDictInfo")ServiceDictInfo serviceDictInfo,@Param("orderBy")String orderBy);
|
||||||
/**
|
/**
|
||||||
* 查出所有有效数据
|
* 查出所有有效数据
|
||||||
*/
|
*/
|
||||||
@@ -38,32 +53,6 @@ public interface ServiceDictInfoDao extends CrudDao<ServiceDictInfo> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ServiceDictInfo> getDictByParentId(Integer parentId);
|
List<ServiceDictInfo> getDictByParentId(Integer parentId);
|
||||||
/**
|
|
||||||
* 查询条件查询顶层字典列表(含条件查询(==))
|
|
||||||
* @param serviceDictInfo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<ServiceDictInfo> findDictTopSearchList(ServiceDictInfo serviceDictInfo);
|
|
||||||
/**
|
|
||||||
* 查询条件查询顶层字典列表(含条件查询(!=))
|
|
||||||
* @param serviceDictInfo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<ServiceDictInfo> findDictTopSearchListN(ServiceDictInfo serviceDictInfo);
|
|
||||||
/**
|
|
||||||
* 查询条件查询所有字典列表(含条件查询(==))
|
|
||||||
* @param serviceDictInfo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<ServiceDictInfo> findAllDictSearchList(ServiceDictInfo serviceDictInfo);
|
|
||||||
/**
|
|
||||||
* 查询条件查询所有字典列表(含条件查询(!=))
|
|
||||||
* @param serviceDictInfo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<ServiceDictInfo> findAllDictSearchListN(ServiceDictInfo serviceDictInfo);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加字典信息
|
* 添加字典信息
|
||||||
* @param serviceDictInfo
|
* @param serviceDictInfo
|
||||||
|
|||||||
@@ -68,102 +68,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- 查询顶层分页列表 (==)-->
|
<!-- 查询顶层分页列表 (==)-->
|
||||||
<select id="findTopDictList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
<select id="findTopDictList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
||||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND parent_id = 0
|
|
||||||
|
|
||||||
<if test="itemValue != null and itemValue != '' " >
|
|
||||||
AND item_value like '%${itemValue}%'
|
|
||||||
</if>
|
|
||||||
<if test="itemCode != null and itemCode != '' " >
|
|
||||||
AND item_code like '%${itemCode}%'
|
|
||||||
</if>
|
|
||||||
<if test="itemType != null and itemType != '' " >
|
|
||||||
AND item_type = #{itemType}
|
|
||||||
</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>
|
|
||||||
|
|
||||||
<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="findTopDictListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
|
||||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND parent_id = 0
|
|
||||||
|
|
||||||
<if test="itemValue != null and itemValue != '' " >
|
|
||||||
AND item_value like '%${itemValue}%'
|
|
||||||
</if>
|
|
||||||
<if test="itemCode != null and itemCode != '' " >
|
|
||||||
AND item_code like '%${itemCode}%'
|
|
||||||
</if>
|
|
||||||
<if test="itemType != null and itemType != '' " >
|
|
||||||
AND item_type != #{itemType}
|
|
||||||
</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>
|
|
||||||
<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="findAllDictList" resultType="serviceDictInfo">
|
|
||||||
SELECT
|
|
||||||
<include refid="serviceDictInfoColumns"/>
|
|
||||||
FROM service_dict_info s
|
|
||||||
<include refid="menuJoins"/>
|
|
||||||
WHERE s.is_valid =1 AND s.parent_id != 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询所有非叶子配置 -->
|
|
||||||
<select id="findAllNoLeafDictList" resultType="com.nis.domain.basics.ServiceDictInfo" parameterType="java.lang.Integer">
|
|
||||||
SELECT
|
|
||||||
<include refid="serviceDictInfoColumns"/>
|
|
||||||
FROM service_dict_info s
|
|
||||||
WHERE s.is_valid = 1 AND s.is_leaf = 0 AND item_type = #{itemType}
|
|
||||||
ORDER BY s.create_time desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 条件查询顶层分页(==) -->
|
|
||||||
<select id="findDictTopSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
|
||||||
SELECT * FROM service_dict_info s WHERE s.is_valid=1
|
SELECT * FROM service_dict_info s WHERE s.is_valid=1
|
||||||
|
|
||||||
<if test="itemCode != null and itemCode != '' " >
|
<if test="itemCode != null and itemCode != '' " >
|
||||||
@@ -204,12 +109,12 @@
|
|||||||
<if test="endDate !=null" >
|
<if test="endDate !=null" >
|
||||||
AND s2.create_time <= #{endDate,jdbcType=TIMESTAMP}
|
AND s2.create_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editBeginDate !=null" >
|
<if test="editBeginDate !=null" >
|
||||||
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editEndDate !=null" >
|
<if test="editEndDate !=null" >
|
||||||
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
)
|
)
|
||||||
<choose>
|
<choose>
|
||||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||||
@@ -222,8 +127,8 @@
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 条件查询顶层分页(!=) -->
|
<!-- 查询顶层分页列表 (!=)-->
|
||||||
<select id="findDictTopSearchListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
<select id="findTopDictListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
||||||
SELECT * FROM service_dict_info s WHERE s.is_valid=1
|
SELECT * FROM service_dict_info s WHERE s.is_valid=1
|
||||||
|
|
||||||
<if test="itemCode != null and itemCode != '' " >
|
<if test="itemCode != null and itemCode != '' " >
|
||||||
@@ -265,11 +170,11 @@
|
|||||||
AND s2.create_time <= #{endDate,jdbcType=TIMESTAMP}
|
AND s2.create_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editBeginDate !=null" >
|
<if test="editBeginDate !=null" >
|
||||||
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editEndDate !=null" >
|
<if test="editEndDate !=null" >
|
||||||
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
)
|
)
|
||||||
<choose>
|
<choose>
|
||||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||||
@@ -281,62 +186,98 @@
|
|||||||
</choose>
|
</choose>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询所有列表 (==)-->
|
||||||
|
<select id="findAllServiceDictInfo" resultMap="dictResultMap">
|
||||||
<!-- 条件查询所有列表 (==)-->
|
|
||||||
<select id="findAllDictSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
|
||||||
SELECT * FROM service_dict_info WHERE is_valid=1
|
SELECT * FROM service_dict_info WHERE is_valid=1
|
||||||
|
|
||||||
<if test="itemValue != null and itemValue != '' " >
|
<if test="serviceDictInfo.itemValue != null and serviceDictInfo.itemValue != '' " >
|
||||||
AND item_value like '%${itemValue}%'
|
AND item_value like '%${serviceDictInfo.itemValue}%'
|
||||||
</if>
|
</if>
|
||||||
<if test="itemCode != null and itemCode != '' " >
|
<if test="serviceDictInfo.itemCode != null and serviceDictInfo.itemCode != '' " >
|
||||||
AND item_code like '%${itemCode}%'
|
AND item_code like '%${serviceDictInfo.itemCode}%'
|
||||||
</if>
|
</if>
|
||||||
<if test="itemType != null and itemType != '' " >
|
<if test="serviceDictInfo.itemType != null and serviceDictInfo.itemType != '' " >
|
||||||
AND item_type = #{itemType}
|
AND item_type = #{serviceDictInfo.itemType}
|
||||||
</if>
|
</if>
|
||||||
<if test="beginDate !=null" >
|
<if test="serviceDictInfo.beginDate !=null" >
|
||||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
AND create_time >= #{serviceDictInfo.beginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="endDate !=null" >
|
<if test="serviceDictInfo.endDate !=null" >
|
||||||
AND create_time <= #{endDate,jdbcType=TIMESTAMP}
|
AND create_time <= #{serviceDictInfo.endDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editBeginDate !=null" >
|
<if test="serviceDictInfo.editBeginDate !=null" >
|
||||||
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
AND edit_time >= #{serviceDictInfo.editBeginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editEndDate !=null" >
|
<if test="serviceDictInfo.editEndDate !=null" >
|
||||||
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
AND edit_time <= #{serviceDictInfo.editEndDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
|
<choose>
|
||||||
|
<when test="orderBy != null and orderBy != ''">
|
||||||
|
ORDER BY ${orderBy}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
ORDER BY create_time desc
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 条件查询所有列表 (!=)-->
|
<!-- 查询所有列表 (!=)-->
|
||||||
<select id="findAllDictSearchListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
<select id="findAllServiceDictInfoN" resultMap="dictResultMap">
|
||||||
SELECT * FROM service_dict_info WHERE is_valid=1
|
SELECT * FROM service_dict_info WHERE is_valid=1
|
||||||
|
|
||||||
<if test="itemValue != null and itemValue != '' " >
|
<if test="serviceDictInfo.itemValue != null and serviceDictInfo.itemValue != '' " >
|
||||||
AND item_value like '%${itemValue}%'
|
AND item_value like '%${serviceDictInfo.itemValue}%'
|
||||||
</if>
|
</if>
|
||||||
<if test="itemCode != null and itemCode != '' " >
|
<if test="serviceDictInfo.itemCode != null and serviceDictInfo.itemCode != '' " >
|
||||||
AND item_code like '%${itemCode}%'
|
AND item_code like '%${serviceDictInfo.itemCode}%'
|
||||||
</if>
|
</if>
|
||||||
<if test="itemType != null and itemType != '' " >
|
<if test="serviceDictInfo.itemType != null and serviceDictInfo.itemType != '' " >
|
||||||
AND item_type != #{itemType}
|
AND item_type != #{serviceDictInfo.itemType}
|
||||||
</if>
|
</if>
|
||||||
<if test="beginDate !=null" >
|
<if test="serviceDictInfo.beginDate !=null" >
|
||||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
AND create_time >= #{serviceDictInfo.beginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="endDate !=null" >
|
<if test="serviceDictInfo.endDate !=null" >
|
||||||
AND create_time <= #{endDate,jdbcType=TIMESTAMP}
|
AND create_time <= #{serviceDictInfo.endDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editBeginDate !=null" >
|
<if test="serviceDictInfo.editBeginDate !=null" >
|
||||||
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
AND edit_time >= #{serviceDictInfo.editBeginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editEndDate !=null" >
|
<if test="serviceDictInfo.editEndDate !=null" >
|
||||||
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
AND edit_time <= #{serviceDictInfo.editEndDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
|
<choose>
|
||||||
|
<when test="orderBy != null and orderBy != ''">
|
||||||
|
ORDER BY ${orderBy}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
ORDER BY create_time desc
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 查出所有 -->
|
||||||
|
<select id="findAllDictList" resultType="serviceDictInfo">
|
||||||
|
SELECT
|
||||||
|
<include refid="serviceDictInfoColumns"/>
|
||||||
|
FROM service_dict_info s
|
||||||
|
<include refid="menuJoins"/>
|
||||||
|
WHERE s.is_valid =1 AND s.parent_id != 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询所有非叶子配置 -->
|
||||||
|
<select id="findAllNoLeafDictList" resultType="com.nis.domain.basics.ServiceDictInfo" parameterType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
<include refid="serviceDictInfoColumns"/>
|
||||||
|
FROM service_dict_info s
|
||||||
|
WHERE s.is_valid = 1 AND s.is_leaf = 0 AND item_type = #{itemType}
|
||||||
|
ORDER BY s.create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.nis.web.dao.basics;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import com.nis.domain.basics.SysDictInfo;
|
import com.nis.domain.basics.SysDictInfo;
|
||||||
import com.nis.web.dao.CrudDao;
|
import com.nis.web.dao.CrudDao;
|
||||||
import com.nis.web.dao.MyBatisDao;
|
import com.nis.web.dao.MyBatisDao;
|
||||||
@@ -12,48 +14,35 @@ public interface SysDictInfoDao extends CrudDao<SysDictInfo> {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询顶层字典列表(无条件查询(==))
|
* 查询顶层字典列表(==))
|
||||||
* @param sysDictInfo
|
* @param sysDictInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SysDictInfo> findTopDictList(SysDictInfo sysDictInfo);
|
List<SysDictInfo> findTopDictList(SysDictInfo sysDictInfo);
|
||||||
/**
|
/**
|
||||||
* 查询顶层字典列表(无条件查询(!=))
|
* 查询顶层字典列表(!=)
|
||||||
* @param sysDictInfo
|
* @param sysDictInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SysDictInfo> findTopDictListN(SysDictInfo sysDictInfo);
|
List<SysDictInfo> findTopDictListN(SysDictInfo sysDictInfo);
|
||||||
|
/**
|
||||||
|
* 查询所有字典列表(含条件查询(==))
|
||||||
|
* @param sysDictInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SysDictInfo> findAllSysDictInfo(@Param("sysDictInfo")SysDictInfo sysDictInfo,@Param("orderBy")String orderBy);
|
||||||
|
/**
|
||||||
|
* 查询所有字典列表(含条件查询(!=))
|
||||||
|
* @param sysDictInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SysDictInfo> findAllSysDictInfoN(@Param("sysDictInfo")SysDictInfo sysDictInfo,@Param("orderBy")String orderBy);
|
||||||
/**
|
/**
|
||||||
* 查出所有有效数据
|
* 查出所有有效数据
|
||||||
* @param sysDictInfo
|
* @param sysDictInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SysDictInfo> findAllDictList(SysDictInfo sysDictInfo);
|
List<SysDictInfo> findAllDictList(SysDictInfo sysDictInfo);
|
||||||
/**
|
|
||||||
* 查询条件查询顶层字典列表(含条件查询(==))
|
|
||||||
* @param sysDictInfo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<SysDictInfo> findDictTopSearchList(SysDictInfo sysDictInfo);
|
|
||||||
/**
|
|
||||||
* 查询条件查询顶层字典列表(含条件查询(!=))
|
|
||||||
* @param sysDictInfo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<SysDictInfo> findDictTopSearchListN(SysDictInfo sysDictInfo);
|
|
||||||
/**
|
|
||||||
* 查询字典列表(含条件查询(==))
|
|
||||||
* @param sysDictInfo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<SysDictInfo> findAllDictSearchList(SysDictInfo sysDictInfo);
|
|
||||||
/**
|
|
||||||
* 查询字典列表(含条件查询(!=))
|
|
||||||
* @param sysDictInfo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<SysDictInfo> findAllDictSearchListN(SysDictInfo sysDictInfo);
|
|
||||||
/**
|
/**
|
||||||
* 添加字典信息
|
* 添加字典信息
|
||||||
* @param sysDictInfo
|
* @param sysDictInfo
|
||||||
@@ -66,8 +55,6 @@ public interface SysDictInfoDao extends CrudDao<SysDictInfo> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
SysDictInfo getDictById(Integer sysDictId);
|
SysDictInfo getDictById(Integer sysDictId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有的非叶子配置
|
* 查询所有的非叶子配置
|
||||||
* @param itemType
|
* @param itemType
|
||||||
|
|||||||
@@ -50,79 +50,6 @@
|
|||||||
LEFT JOIN sys_dict_info p ON p.sys_dict_id = s.parent_id
|
LEFT JOIN sys_dict_info p ON p.sys_dict_id = s.parent_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 查询顶层分页列表 (==)-->
|
|
||||||
<select id="findTopDictList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
|
|
||||||
SELECT * FROM sys_dict_info WHERE is_valid=1 AND parent_id = 0
|
|
||||||
|
|
||||||
<if test="itemValue != null and itemValue != '' " >
|
|
||||||
AND item_value like '%${itemValue}%'
|
|
||||||
</if>
|
|
||||||
<if test="itemCode != null and itemCode != '' " >
|
|
||||||
AND item_code like '%${itemCode}%'
|
|
||||||
</if>
|
|
||||||
<if test="itemType != null and itemType != '' " >
|
|
||||||
AND item_type = #{itemType}
|
|
||||||
</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>
|
|
||||||
|
|
||||||
<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="findTopDictListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
|
|
||||||
SELECT * FROM sys_dict_info WHERE is_valid=1 AND parent_id = 0
|
|
||||||
|
|
||||||
<if test="itemValue != null and itemValue != '' " >
|
|
||||||
AND item_value like '%${itemValue}%'
|
|
||||||
</if>
|
|
||||||
<if test="itemCode != null and itemCode != '' " >
|
|
||||||
AND item_code like '%${itemCode}%'
|
|
||||||
</if>
|
|
||||||
<if test="itemType != null and itemType != '' " >
|
|
||||||
AND item_type != #{itemType}
|
|
||||||
</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>
|
|
||||||
<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="findAllDictList" resultType="sysDictInfo">
|
<select id="findAllDictList" resultType="sysDictInfo">
|
||||||
SELECT
|
SELECT
|
||||||
@@ -132,8 +59,8 @@
|
|||||||
WHERE s.is_valid =1
|
WHERE s.is_valid =1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 条件查询顶层分页(==) -->
|
<!-- 查询顶层分页(==) -->
|
||||||
<select id="findDictTopSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
|
<select id="findTopDictList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
|
||||||
SELECT * FROM sys_dict_info s WHERE s.is_valid=1
|
SELECT * FROM sys_dict_info s WHERE s.is_valid=1
|
||||||
|
|
||||||
<if test="itemCode != null and itemCode != '' " >
|
<if test="itemCode != null and itemCode != '' " >
|
||||||
@@ -192,8 +119,8 @@
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 条件查询顶层分页(!=) -->
|
<!-- 查询顶层分页(!=) -->
|
||||||
<select id="findDictTopSearchListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
|
<select id="findTopDictListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
|
||||||
SELECT * FROM sys_dict_info s WHERE s.is_valid=1
|
SELECT * FROM sys_dict_info s WHERE s.is_valid=1
|
||||||
|
|
||||||
<if test="itemCode != null and itemCode != '' " >
|
<if test="itemCode != null and itemCode != '' " >
|
||||||
@@ -252,57 +179,73 @@
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 条件查询所有(==) -->
|
<!-- 查询所有(==) -->
|
||||||
<select id="findAllDictSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
|
<select id="findAllSysDictInfo" resultMap="dictResultMap">
|
||||||
SELECT * FROM sys_dict_info WHERE is_valid=1
|
SELECT * FROM sys_dict_info WHERE is_valid=1
|
||||||
|
|
||||||
<if test="itemType != null and itemType != '' " >
|
<if test="sysDictInfo.itemType != null and sysDictInfo.itemType != '' " >
|
||||||
AND item_type = ${itemType}
|
AND item_type = ${sysDictInfo.itemType}
|
||||||
</if>
|
</if>
|
||||||
<if test="itemCode != null and itemCode != '' " >
|
<if test="sysDictInfo.itemCode != null and sysDictInfo.itemCode != '' " >
|
||||||
AND item_code like '%${itemCode}%'
|
AND item_code like '%${sysDictInfo.itemCode}%'
|
||||||
</if>
|
</if>
|
||||||
<if test="itemValue!= null and itemValue != '' " >
|
<if test="sysDictInfo.itemValue!= null and sysDictInfo.itemValue != '' " >
|
||||||
AND item_value like '%${itemValue}%'
|
AND item_value like '%${sysDictInfo.itemValue}%'
|
||||||
</if>
|
</if>
|
||||||
<if test="beginDate !=null" >
|
<if test="sysDictInfo.beginDate !=null" >
|
||||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
AND create_time >= #{sysDictInfo.beginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="endDate !=null" >
|
<if test="sysDictInfo.endDate !=null" >
|
||||||
AND create_time <= #{endDate,jdbcType=TIMESTAMP}
|
AND create_time <= #{sysDictInfo.endDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editBeginDate !=null" >
|
<if test="sysDictInfo.editBeginDate !=null" >
|
||||||
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
AND edit_time >= #{sysDictInfo.editBeginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editEndDate !=null" >
|
<if test="sysDictInfo.editEndDate !=null" >
|
||||||
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
AND edit_time <= #{sysDictInfo.editEndDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
|
<choose>
|
||||||
|
<when test="orderBy != null and orderBy != ''">
|
||||||
|
ORDER BY ${orderBy}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
ORDER BY create_time desc
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</select>
|
</select>
|
||||||
<!-- 条件查询所有(!=) -->
|
<!-- 查询所有(!=) -->
|
||||||
<select id="findAllDictSearchListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
|
<select id="findAllSysDictInfoN" resultMap="dictResultMap">
|
||||||
SELECT * FROM sys_dict_info WHERE is_valid=1
|
SELECT * FROM sys_dict_info WHERE is_valid=1
|
||||||
|
|
||||||
<if test="itemType != null and itemType != '' " >
|
<if test="sysDictInfo.itemType != null and sysDictInfo.itemType != '' " >
|
||||||
AND item_type = ${itemType}
|
AND item_type = ${sysDictInfo.itemType}
|
||||||
</if>
|
</if>
|
||||||
<if test="itemCode != null and itemCode != '' " >
|
<if test="sysDictInfo.itemCode != null and sysDictInfo.itemCode != '' " >
|
||||||
AND item_code like '%${itemCode}%'
|
AND item_code like '%${sysDictInfo.itemCode}%'
|
||||||
</if>
|
</if>
|
||||||
<if test="itemValue!= null and itemValue != '' " >
|
<if test="sysDictInfo.itemValue!= null and sysDictInfo.itemValue != '' " >
|
||||||
AND item_value like '%${itemValue}%'
|
AND item_value like '%${sysDictInfo.itemValue}%'
|
||||||
</if>
|
</if>
|
||||||
<if test="beginDate !=null" >
|
<if test="sysDictInfo.beginDate !=null" >
|
||||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
AND create_time >= #{sysDictInfo.beginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="endDate !=null" >
|
<if test="sysDictInfo.endDate !=null" >
|
||||||
AND create_time <= #{endDate,jdbcType=TIMESTAMP}
|
AND create_time <= #{sysDictInfo.endDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editBeginDate !=null" >
|
<if test="sysDictInfo.editBeginDate !=null" >
|
||||||
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
AND edit_time >= #{sysDictInfo.editBeginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editEndDate !=null" >
|
<if test="sysDictInfo.editEndDate !=null" >
|
||||||
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
AND edit_time <= #{sysDictInfo.editEndDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
|
<choose>
|
||||||
|
<when test="orderBy != null and orderBy != ''">
|
||||||
|
ORDER BY ${orderBy}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
ORDER BY create_time desc
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 根据主键查询字典详细信息 -->
|
<!-- 根据主键查询字典详细信息 -->
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public interface SpecificServiceCfgDao extends CrudDao<SpecificServiceCfg> {
|
|||||||
* @param specificServiceCfg
|
* @param specificServiceCfg
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SpecificServiceCfg> findAllSpecificServiceCfg(SpecificServiceCfg specificServiceCfg);
|
List<SpecificServiceCfg> findAllSpecificServiceCfg(@Param("specificServiceCfg")SpecificServiceCfg specificServiceCfg,@Param("orderBy")String orderBy);
|
||||||
/**
|
/**
|
||||||
* 修改配置信息
|
* 修改配置信息
|
||||||
* @param specificServiceCfg
|
* @param specificServiceCfg
|
||||||
|
|||||||
@@ -48,6 +48,9 @@
|
|||||||
<if test="specServiceDesc != null and specServiceDesc != '' ">
|
<if test="specServiceDesc != null and specServiceDesc != '' ">
|
||||||
AND s.spec_service_desc like '%${specServiceDesc}%'
|
AND s.spec_service_desc like '%${specServiceDesc}%'
|
||||||
</if>
|
</if>
|
||||||
|
<if test="groupId != null and groupId != '' ">
|
||||||
|
AND group_id like '%${groupId}%'
|
||||||
|
</if>
|
||||||
<if test="beginDate != null" >
|
<if test="beginDate != null" >
|
||||||
AND s.op_time >= #{beginDate,jdbcType=TIMESTAMP}
|
AND s.op_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
@@ -65,6 +68,9 @@
|
|||||||
<if test="specServiceDesc != null and specServiceDesc != '' ">
|
<if test="specServiceDesc != null and specServiceDesc != '' ">
|
||||||
AND s2.spec_service_desc like '%${specServiceDesc}%'
|
AND s2.spec_service_desc like '%${specServiceDesc}%'
|
||||||
</if>
|
</if>
|
||||||
|
<if test="groupId != null and groupId != '' ">
|
||||||
|
AND group_id like '%${groupId}%'
|
||||||
|
</if>
|
||||||
<if test="beginDate != null" >
|
<if test="beginDate != null" >
|
||||||
AND s2.op_time >= #{beginDate,jdbcType=TIMESTAMP}
|
AND s2.op_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
@@ -84,26 +90,29 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询符合条件的所有数据 -->
|
<!-- 查询符合条件的所有数据 -->
|
||||||
<select id="findAllSpecificServiceCfg" resultMap="CFGResultMap" parameterType="com.nis.domain.specific.SpecificServiceCfg">
|
<select id="findAllSpecificServiceCfg" resultMap="CFGResultMap" >
|
||||||
SELECT * from specific_service_cfg where is_valid = 1
|
SELECT * from specific_service_cfg where is_valid = 1
|
||||||
<if test="specServiceId != null">
|
<if test="specificServiceCfg.specServiceId != null">
|
||||||
AND spec_service_id like '%${specServiceId}%'
|
AND spec_service_id like '%${specificServiceCfg.specServiceId}%'
|
||||||
</if>
|
</if>
|
||||||
<if test="specServiceName != null and specServiceName != '' ">
|
<if test="specificServiceCfg.specServiceName != null and specificServiceCfg.specServiceName != '' ">
|
||||||
AND spec_service_name like '%${specServiceName}%'
|
AND spec_service_name like '%${specificServiceCfg.specServiceName}%'
|
||||||
</if>
|
</if>
|
||||||
<if test="specServiceDesc != null and specServiceDesc != '' ">
|
<if test="specificServiceCfg.specServiceDesc != null and specificServiceCfg.specServiceDesc != '' ">
|
||||||
AND spec_service_desc like '%${specServiceDesc}%'
|
AND spec_service_desc like '%${specificServiceCfg.specServiceDesc}%'
|
||||||
</if>
|
</if>
|
||||||
<if test="beginDate != null">
|
<if test="specificServiceCfg.groupId != null and specificServiceCfg.groupId != '' ">
|
||||||
AND op_time > #{beginDate}
|
AND group_id like '%${specificServiceCfg.groupId}%'
|
||||||
</if>
|
</if>
|
||||||
<if test="endDate != null" >
|
<if test="specificServiceCfg.beginDate != null">
|
||||||
AND op_time < #{endDate}
|
AND op_time > #{specificServiceCfg.beginDate}
|
||||||
|
</if>
|
||||||
|
<if test="specificServiceCfg.endDate != null" >
|
||||||
|
AND op_time < #{specificServiceCfg.endDate}
|
||||||
</if>
|
</if>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="page != null and page.orderBy != null and page.orderBy != '' ">
|
<when test="orderBy != null and orderBy != '' ">
|
||||||
ORDER BY ${page.orderBy}
|
ORDER BY ${orderBy}
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
ORDER BY op_time desc
|
ORDER BY op_time desc
|
||||||
|
|||||||
@@ -35,6 +35,13 @@ public interface SpecificServiceHostCfgDao extends CrudDao<SpecificServiceHostCf
|
|||||||
* @param hostId
|
* @param hostId
|
||||||
*/
|
*/
|
||||||
void delete(Integer hostId);
|
void delete(Integer hostId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据协议ID查询对象
|
||||||
|
* @param specServiceId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SpecificServiceHostCfg getBySpecServiceId(Integer specServiceId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
<resultMap id="specificServiceHostCfgResultMap"
|
<resultMap id="specificServiceHostCfgResultMap"
|
||||||
type="com.nis.domain.specific.SpecificServiceHostCfg">
|
type="com.nis.domain.specific.SpecificServiceHostCfg">
|
||||||
<id column="host_id" property="hostId" jdbcType="INTEGER" />
|
<id column="host_id" property="hostId" jdbcType="INTEGER" />
|
||||||
<result column="spec_service_id" property="specServiceId"
|
<result column="spec_service_id" property="specServiceId" jdbcType="INTEGER" />
|
||||||
jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="src_ip" property="srcIp" jdbcType="VARCHAR" />
|
<result column="src_ip" property="srcIp" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_mask" property="srcIpMask" jdbcType="VARCHAR" />
|
<result column="src_ip_mask" property="srcIpMask" jdbcType="VARCHAR" />
|
||||||
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
|
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
<sql id="specificServiceHostCfgColumns">
|
<sql id="specificServiceHostCfgColumns">
|
||||||
s.host_id AS hostId,
|
s.host_id AS hostId,
|
||||||
s.spec_service_id AS specServiceId,
|
s.spec_service_id AS specServiceId,
|
||||||
|
s.ip_type AS ipType,
|
||||||
s.src_ip AS srcIp,
|
s.src_ip AS srcIp,
|
||||||
s.src_ip_mask AS srcIpMask,
|
s.src_ip_mask AS srcIpMask,
|
||||||
s.src_port AS srcPort,
|
s.src_port AS srcPort,
|
||||||
@@ -70,35 +71,44 @@
|
|||||||
|
|
||||||
<!-- 查询分页 -->
|
<!-- 查询分页 -->
|
||||||
<select id="findSpecHostList" resultMap="specificServiceHostCfgResultMap" parameterType="com.nis.domain.specific.SpecificServiceHostCfg">
|
<select id="findSpecHostList" resultMap="specificServiceHostCfgResultMap" parameterType="com.nis.domain.specific.SpecificServiceHostCfg">
|
||||||
select * from specific_service_host_cfg where 1 = 1
|
select * from specific_service_host_cfg where is_valid = 1
|
||||||
<if test="isAudit !=null" >
|
<if test="isAudit !=null" >
|
||||||
AND is_audit = #{isAudit}
|
AND is_audit = #{isAudit}
|
||||||
</if>
|
</if>
|
||||||
<if test="specServiceId !=null" >
|
<if test="specServiceId !=null" >
|
||||||
AND spec_service_id = #{specServiceId}
|
AND spec_service_id = #{specServiceId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="ipType !=null" >
|
||||||
|
AND ip_type = #{ipType}
|
||||||
|
</if>
|
||||||
|
<if test="srcIp !=null and srcIp !='' " >
|
||||||
|
AND src_ip = #{srcIp}
|
||||||
|
</if>
|
||||||
|
<if test="dstIp !=null and dstIp !='' " >
|
||||||
|
AND dst_ip = #{dstIp}
|
||||||
|
</if>
|
||||||
<if test="protocol !=null" >
|
<if test="protocol !=null" >
|
||||||
AND protocol = #{protocol}
|
AND protocol = #{protocol}
|
||||||
</if>
|
</if>
|
||||||
<if test="direction !=null" >
|
<if test="direction !=null" >
|
||||||
AND direction = #{direction}
|
AND direction = #{direction}
|
||||||
</if>
|
</if>
|
||||||
<if test="beginDate !=null" >
|
<if test="beginDate !=null and beginDate !='' " >
|
||||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="endDate !=null" >
|
<if test="endDate !=null and endDate !='' " >
|
||||||
AND create_time <= #{endDate,jdbcType=TIMESTAMP}
|
AND create_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editBeginDate !=null" >
|
<if test="editBeginDate !=null and editBeginDate !='' " >
|
||||||
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editEndDate !=null" >
|
<if test="editEndDate !=null and editEndDate !='' " >
|
||||||
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="auditBeginDate !=null" >
|
<if test="auditBeginDate !=null and auditBeginDate !='' " >
|
||||||
AND audit_time >= #{auditBeginDate,jdbcType=TIMESTAMP}
|
AND audit_time >= #{auditBeginDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="auditEndDate !=null" >
|
<if test="auditEndDate !=null and auditEndDate !='' " >
|
||||||
AND audit_time <= #{auditEndDate,jdbcType=TIMESTAMP}
|
AND audit_time <= #{auditEndDate,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<choose>
|
<choose>
|
||||||
@@ -115,17 +125,24 @@ select * from specific_service_host_cfg where 1 = 1
|
|||||||
<!-- 查询所有 -->
|
<!-- 查询所有 -->
|
||||||
<select id="getAll" resultMap="specificServiceHostCfgResultMap">
|
<select id="getAll" resultMap="specificServiceHostCfgResultMap">
|
||||||
select * from specific_service_host_cfg
|
select * from specific_service_host_cfg
|
||||||
|
</select>
|
||||||
|
<!-- 根据协议ID查询对象 -->
|
||||||
|
<select id="getBySpecServiceId" resultType="com.nis.domain.specific.SpecificServiceHostCfg" parameterType="java.lang.Integer">
|
||||||
|
select
|
||||||
|
<include refid="specificServiceHostCfgColumns" />
|
||||||
|
from specific_service_host_cfg s where s.spec_service_id = #{specServiceId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<insert id="insert" parameterType="com.nis.domain.specific.SpecificServiceHostCfg">
|
<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)
|
insert into specific_service_host_cfg (spec_service_id,ip_type,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})
|
values(#{specServiceId},#{ipType},#{srcIp},#{srcIpMask},#{srcPort},#{srcPortMask},#{dstIp},#{dstIpMask},#{dstPort},#{dstPortMask},#{direction},#{protocol},#{isValid},#{isAudit},#{creator.id},#{createTime},#{editor.id},#{editTime},#{auditor.id},#{auditTime})
|
||||||
</insert>
|
</insert>
|
||||||
<!-- 修改 -->
|
<!-- 修改 -->
|
||||||
<update id="update" parameterType="com.nis.domain.specific.SpecificServiceHostCfg">
|
<update id="update" parameterType="com.nis.domain.specific.SpecificServiceHostCfg">
|
||||||
update specific_service_host_cfg s set
|
update specific_service_host_cfg s set
|
||||||
s.spec_service_id = #{specServiceId},
|
s.spec_service_id = #{specServiceId},
|
||||||
|
s.ip_type = #{ipType},
|
||||||
s.src_ip = #{srcIp},
|
s.src_ip = #{srcIp},
|
||||||
s.src_ip_mask = #{srcIpMask},
|
s.src_ip_mask = #{srcIpMask},
|
||||||
s.src_port = #{srcPort},
|
s.src_port = #{srcPort},
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class ServiceDictInfoService extends BaseService{
|
|||||||
private ServiceDictInfoDao serviceDictInfoDao;
|
private ServiceDictInfoDao serviceDictInfoDao;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询业务字典分页(无条件查询)
|
* 查询业务字典顶层分页
|
||||||
* @param page
|
* @param page
|
||||||
* @param serviceDictInfo
|
* @param serviceDictInfo
|
||||||
* @return
|
* @return
|
||||||
@@ -61,11 +61,67 @@ public class ServiceDictInfoService extends BaseService{
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
ServiceDictInfo sd = new ServiceDictInfo();
|
||||||
|
sd.setServiceDictId(0);
|
||||||
|
for(ServiceDictInfo se:parentList){
|
||||||
|
se.setParent(sd);
|
||||||
|
}
|
||||||
|
if(tempType!=0){
|
||||||
|
serviceDictInfo.setItemType(tempType);
|
||||||
|
}else{
|
||||||
|
serviceDictInfo.setItemType(null);
|
||||||
|
}
|
||||||
page.setList(parentList);
|
page.setList(parentList);
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 查询所有数据
|
||||||
|
* @param serviceDictInfo
|
||||||
|
* @param itType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<ServiceDictInfo> findAllServiceDictInfo(ServiceDictInfo serviceDictInfo,Integer[] itType,String orderBy){
|
||||||
|
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||||
|
Integer tempType = 0;
|
||||||
|
if(serviceDictInfo.getItemType()!=null){
|
||||||
|
tempType = serviceDictInfo.getItemType();
|
||||||
|
}
|
||||||
|
if(itType.length==1){
|
||||||
|
serviceDictInfo.setItemType(itType[0]);
|
||||||
|
list = serviceDictInfoDao.findAllServiceDictInfo(serviceDictInfo,orderBy);
|
||||||
|
}
|
||||||
|
if(itType.length==2){
|
||||||
|
if(tempType!=0){
|
||||||
|
list = serviceDictInfoDao.findAllServiceDictInfo(serviceDictInfo,orderBy);
|
||||||
|
}else{
|
||||||
|
List<Integer> tempIntegerList = Lists.newArrayList();
|
||||||
|
tempIntegerList.add(1);tempIntegerList.add(2);tempIntegerList.add(3);
|
||||||
|
//Map<String,String> map = DictUtils.getDictOption("SERVICE_DICT_ITM_TYPE");
|
||||||
|
if(tempIntegerList.contains(itType[0])){
|
||||||
|
tempIntegerList.remove(itType[0]);
|
||||||
|
}
|
||||||
|
if(tempIntegerList.contains(itType[1])){
|
||||||
|
tempIntegerList.remove(itType[1]);
|
||||||
|
}
|
||||||
|
serviceDictInfo.setItemType(tempIntegerList.get(0));
|
||||||
|
list = serviceDictInfoDao.findAllServiceDictInfoN(serviceDictInfo,orderBy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(tempType!=0){
|
||||||
|
serviceDictInfo.setItemType(tempType);
|
||||||
|
}else{
|
||||||
|
serviceDictInfo.setItemType(null);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有有效字典配置
|
* 查询所有有效字典配置
|
||||||
* @return
|
* @return
|
||||||
@@ -91,178 +147,6 @@ public class ServiceDictInfoService extends BaseService{
|
|||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 查询条件查询顶层分页(含条件查询,考虑排序接入可行性)
|
|
||||||
* @param page
|
|
||||||
* @param serviceDictInfo
|
|
||||||
* @param itType
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Page<ServiceDictInfo> findDictTopSearchList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo, Integer[] itType) {
|
|
||||||
// 设置分页参数
|
|
||||||
serviceDictInfo.setPage(page);
|
|
||||||
//根据条件查询符合数据
|
|
||||||
List<ServiceDictInfo> allList = Lists.newArrayList();
|
|
||||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
|
||||||
Integer tempType = 0;
|
|
||||||
if(serviceDictInfo.getItemType()!=null){
|
|
||||||
tempType = serviceDictInfo.getItemType();
|
|
||||||
}
|
|
||||||
if(itType.length==1){
|
|
||||||
serviceDictInfo.setItemType(itType[0]);
|
|
||||||
allList = serviceDictInfoDao.findDictTopSearchList(serviceDictInfo);
|
|
||||||
}
|
|
||||||
if(itType.length==2){
|
|
||||||
if(tempType!=0){
|
|
||||||
allList = serviceDictInfoDao.findDictTopSearchList(serviceDictInfo);
|
|
||||||
}else{
|
|
||||||
List<Integer> tempIntegerList = Lists.newArrayList();
|
|
||||||
tempIntegerList.add(1);tempIntegerList.add(2);tempIntegerList.add(3);
|
|
||||||
//Map<String,String> map = DictUtils.getDictOption("SERVICE_DICT_ITM_TYPE");
|
|
||||||
if(tempIntegerList.contains(itType[0])){
|
|
||||||
tempIntegerList.remove(itType[0]);
|
|
||||||
}
|
|
||||||
if(tempIntegerList.contains(itType[1])){
|
|
||||||
tempIntegerList.remove(itType[1]);
|
|
||||||
}
|
|
||||||
serviceDictInfo.setItemType(tempIntegerList.get(0));
|
|
||||||
allList = serviceDictInfoDao.findDictTopSearchListN(serviceDictInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
ServiceDictInfo tempSe = new ServiceDictInfo();
|
|
||||||
tempSe.setServiceDictId(0);
|
|
||||||
for(ServiceDictInfo se:allList){
|
|
||||||
se.setParent(tempSe);
|
|
||||||
}
|
|
||||||
page.setList(allList);
|
|
||||||
|
|
||||||
|
|
||||||
/*//根据条件查询符合数据
|
|
||||||
List<ServiceDictInfo> allList = Lists.newArrayList();
|
|
||||||
List<Integer> tempList = Lists.newArrayList();
|
|
||||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
|
||||||
List<ServiceDictInfo> listChild = Lists.newArrayList();
|
|
||||||
List<ServiceDictInfo> listParent = Lists.newArrayList();
|
|
||||||
Integer tempType = 0;
|
|
||||||
Integer total = 0;
|
|
||||||
Integer pageCount = 0;
|
|
||||||
Integer lostCount = 0;
|
|
||||||
if(serviceDictInfo.getItemType()!=null){
|
|
||||||
tempType = serviceDictInfo.getItemType();
|
|
||||||
}
|
|
||||||
if(itType.length==1){
|
|
||||||
serviceDictInfo.setItemType(itType[0]);
|
|
||||||
allList = serviceDictInfoDao.findDictSearchList(serviceDictInfo);
|
|
||||||
}
|
|
||||||
if(itType.length==2){
|
|
||||||
if(tempType!=0){
|
|
||||||
allList = serviceDictInfoDao.findDictSearchList(serviceDictInfo);
|
|
||||||
}else{
|
|
||||||
List<Integer> tempIntegerList = Lists.newArrayList();
|
|
||||||
tempIntegerList.add(1);tempIntegerList.add(2);tempIntegerList.add(3);
|
|
||||||
//Map<String,String> map = DictUtils.getDictOption("SERVICE_DICT_ITM_TYPE");
|
|
||||||
if(tempIntegerList.contains(itType[0])){
|
|
||||||
tempIntegerList.remove(itType[0]);
|
|
||||||
}
|
|
||||||
if(tempIntegerList.contains(itType[1])){
|
|
||||||
tempIntegerList.remove(itType[1]);
|
|
||||||
}
|
|
||||||
serviceDictInfo.setItemType(tempIntegerList.get(0));
|
|
||||||
allList = serviceDictInfoDao.findDictSearchListN(serviceDictInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//处理数据
|
|
||||||
//page.list中有多少个不是page.list中的顶层(其上级在page.list)
|
|
||||||
ServiceDictInfo tempSe = new ServiceDictInfo();
|
|
||||||
tempSe.setServiceDictId(0);
|
|
||||||
//取出主键优化处理
|
|
||||||
for(ServiceDictInfo se:allList){
|
|
||||||
if(se!=null&&se.getServiceDictId()!=null){
|
|
||||||
tempList.add(se.getServiceDictId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(ServiceDictInfo se:allList){
|
|
||||||
if(se!=null&&se.getParent()!=null&&se.getParent().getServiceDictId()!=null){
|
|
||||||
//ServiceDictInfo temp = serviceDictInfoDao.getDictById(se.getParent().getServiceDictId());
|
|
||||||
if(tempList.contains(se.getParent().getServiceDictId())){
|
|
||||||
listChild.add(se);
|
|
||||||
lostCount+=lostCount;
|
|
||||||
}else{
|
|
||||||
se.setParent(tempSe);
|
|
||||||
listParent.add(se);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//确定总页数
|
|
||||||
total = allList.size() - lostCount;
|
|
||||||
pageCount = total%page.getPageSize()==0?total%page.getPageSize():(total%page.getPageSize()+1);
|
|
||||||
if(pageCount==0){
|
|
||||||
pageCount=1;
|
|
||||||
}
|
|
||||||
//取出所有的顶层
|
|
||||||
//获取分页 每页数量pageSize、、当前页数pageNo (排序,,,) 每页第一个(pageNo-1)*pageSize+1 最后一个pageNo*pageSize
|
|
||||||
List<ServiceDictInfo> parentShow = Lists.newArrayList();
|
|
||||||
for(int i=0;i<listParent.size();i++){
|
|
||||||
if(i>=((page.getPageNo()-1)*page.getPageSize())&&i<page.getPageNo()*page.getPageSize()){
|
|
||||||
parentShow.add(listParent.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
parentShow.addAll(listChild);
|
|
||||||
|
|
||||||
ServiceDictInfo.sortList(list,parentShow,0,true);
|
|
||||||
|
|
||||||
page.setList(list);*/
|
|
||||||
return page;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 条件查询所有数据
|
|
||||||
* @param serviceDictInfo
|
|
||||||
* @param itType
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<ServiceDictInfo> findAllDictSearchList(ServiceDictInfo serviceDictInfo,Integer[] itType){
|
|
||||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
|
||||||
Integer tempType = 0;
|
|
||||||
if(serviceDictInfo.getItemType()!=null){
|
|
||||||
tempType = serviceDictInfo.getItemType();
|
|
||||||
}
|
|
||||||
if(itType.length==1){
|
|
||||||
serviceDictInfo.setItemType(itType[0]);
|
|
||||||
list = serviceDictInfoDao.findAllDictSearchList(serviceDictInfo);
|
|
||||||
}
|
|
||||||
if(itType.length==2){
|
|
||||||
if(tempType!=0){
|
|
||||||
list = serviceDictInfoDao.findAllDictSearchList(serviceDictInfo);
|
|
||||||
}else{
|
|
||||||
List<Integer> tempIntegerList = Lists.newArrayList();
|
|
||||||
tempIntegerList.add(1);tempIntegerList.add(2);tempIntegerList.add(3);
|
|
||||||
//Map<String,String> map = DictUtils.getDictOption("SERVICE_DICT_ITM_TYPE");
|
|
||||||
if(tempIntegerList.contains(itType[0])){
|
|
||||||
tempIntegerList.remove(itType[0]);
|
|
||||||
}
|
|
||||||
if(tempIntegerList.contains(itType[1])){
|
|
||||||
tempIntegerList.remove(itType[1]);
|
|
||||||
}
|
|
||||||
serviceDictInfo.setItemType(tempIntegerList.get(0));
|
|
||||||
list = serviceDictInfoDao.findAllDictSearchListN(serviceDictInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(tempType!=0){
|
|
||||||
serviceDictInfo.setItemType(tempType);
|
|
||||||
}else{
|
|
||||||
serviceDictInfo.setItemType(null);
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据主键查询字典详细信息
|
* 根据主键查询字典详细信息
|
||||||
* @param serviceDictId
|
* @param serviceDictId
|
||||||
|
|||||||
@@ -24,126 +24,32 @@ public class SysDictInfoService extends BaseService{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询顶层分页(无条件查询)
|
* 查询顶层分页(含条件查询,考虑排序接入可行性)
|
||||||
* @param page
|
* @param page
|
||||||
* @param sysDictInfo
|
* @param sysDictInfo
|
||||||
* @param itType
|
* @param itType
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Page<SysDictInfo> findTopDictList(Page<SysDictInfo> page, SysDictInfo sysDictInfo, Integer[] itType) {
|
public Page<SysDictInfo> findTopDictList(Page<SysDictInfo> page, SysDictInfo sysDictInfo, Integer[] itType) {
|
||||||
// 设置分页参数
|
|
||||||
sysDictInfo.setPage(page);
|
|
||||||
List<SysDictInfo> parentList = Lists.newArrayList();
|
|
||||||
Integer tempType = 0;
|
|
||||||
//预留以后分开用
|
|
||||||
if(sysDictInfo.getItemType()!=null){
|
|
||||||
tempType = sysDictInfo.getItemType();
|
|
||||||
}
|
|
||||||
//查出顶层分页查询
|
|
||||||
if(itType.length==1){
|
|
||||||
sysDictInfo.setItemType(itType[0]);
|
|
||||||
parentList = sysDictInfoDao.findTopDictList(sysDictInfo);
|
|
||||||
}
|
|
||||||
if(itType.length==2){
|
|
||||||
if(tempType!=0){
|
|
||||||
parentList = sysDictInfoDao.findTopDictList(sysDictInfo);
|
|
||||||
}else{
|
|
||||||
List<Integer> tempList = Lists.newArrayList();
|
|
||||||
tempList.add(1);tempList.add(2);tempList.add(3);
|
|
||||||
//Map<String,String> map = DictUtils.getDictOption("SERVICE_DICT_ITM_TYPE");
|
|
||||||
if(tempList.contains(itType[0])){
|
|
||||||
tempList.remove(itType[0]);
|
|
||||||
}
|
|
||||||
if(tempList.contains(itType[1])){
|
|
||||||
tempList.remove(itType[1]);
|
|
||||||
}
|
|
||||||
sysDictInfo.setItemType(tempList.get(0));
|
|
||||||
parentList = sysDictInfoDao.findTopDictListN(sysDictInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
page.setList(parentList);
|
|
||||||
return page;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 查询所有有效字典配置
|
|
||||||
*/
|
|
||||||
public List<SysDictInfo> findAllDictList() {
|
|
||||||
return sysDictInfoDao.findAllDictList(new SysDictInfo());
|
|
||||||
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 条件查询所有数据
|
|
||||||
* @param page
|
|
||||||
* @param sysDictInfo
|
|
||||||
* @param intArr
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<SysDictInfo> findAllDictSearchList(SysDictInfo sysDictInfo, Integer[] itType) {
|
|
||||||
|
|
||||||
List<SysDictInfo> list = Lists.newArrayList();
|
|
||||||
Integer tempType = 0;
|
|
||||||
if(sysDictInfo.getItemType()!=null){
|
|
||||||
tempType = sysDictInfo.getItemType();
|
|
||||||
}
|
|
||||||
if(itType.length==1){
|
|
||||||
sysDictInfo.setItemType(itType[0]);
|
|
||||||
list = sysDictInfoDao.findAllDictSearchList(sysDictInfo);
|
|
||||||
}
|
|
||||||
if(itType.length==2){
|
|
||||||
if(tempType!=0){
|
|
||||||
list = sysDictInfoDao.findAllDictSearchList(sysDictInfo);
|
|
||||||
}else{
|
|
||||||
List<Integer> tempIntegerList = Lists.newArrayList();
|
|
||||||
tempIntegerList.add(1);tempIntegerList.add(2);tempIntegerList.add(3);
|
|
||||||
//Map<String,String> map = DictUtils.getDictOption("SERVICE_DICT_ITM_TYPE");
|
|
||||||
if(tempIntegerList.contains(itType[0])){
|
|
||||||
tempIntegerList.remove(itType[0]);
|
|
||||||
}
|
|
||||||
if(tempIntegerList.contains(itType[1])){
|
|
||||||
tempIntegerList.remove(itType[1]);
|
|
||||||
}
|
|
||||||
sysDictInfo.setItemType(tempIntegerList.get(0));
|
|
||||||
list = sysDictInfoDao.findAllDictSearchListN(sysDictInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(tempType!=0){
|
|
||||||
sysDictInfo.setItemType(tempType);
|
|
||||||
}else{
|
|
||||||
sysDictInfo.setItemType(null);
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 查询条件查询顶层分页(含条件查询,考虑排序接入可行性)
|
|
||||||
* @param page
|
|
||||||
* @param sysDictInfo
|
|
||||||
* @param itType
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Page<SysDictInfo> findDictTopSearchList(Page<SysDictInfo> page, SysDictInfo sysDictInfo, Integer[] itType) {
|
|
||||||
// 设置分页参数
|
// 设置分页参数
|
||||||
sysDictInfo.setPage(page);
|
sysDictInfo.setPage(page);
|
||||||
//根据条件查询符合数据
|
//根据条件查询符合数据
|
||||||
List<SysDictInfo> allList = Lists.newArrayList();
|
List<SysDictInfo> allList = Lists.newArrayList();
|
||||||
List<SysDictInfo> list = Lists.newArrayList();
|
|
||||||
Integer tempType = 0;
|
Integer tempType = 0;
|
||||||
if(sysDictInfo.getItemType()!=null){
|
if(sysDictInfo.getItemType()!=null){
|
||||||
tempType = sysDictInfo.getItemType();
|
tempType = sysDictInfo.getItemType();
|
||||||
}
|
}
|
||||||
if(itType.length==1){
|
if(itType.length==1){
|
||||||
sysDictInfo.setItemType(itType[0]);
|
sysDictInfo.setItemType(itType[0]);
|
||||||
allList = sysDictInfoDao.findDictTopSearchList(sysDictInfo);
|
allList = sysDictInfoDao.findTopDictList(sysDictInfo);
|
||||||
}
|
}
|
||||||
if(itType.length==2){
|
if(itType.length==2){
|
||||||
if(tempType!=0){
|
if(tempType!=0){
|
||||||
allList = sysDictInfoDao.findDictTopSearchList(sysDictInfo);
|
allList = sysDictInfoDao.findTopDictList(sysDictInfo);
|
||||||
}else{
|
}else{
|
||||||
List<Integer> tempIntegerList = Lists.newArrayList();
|
List<Integer> tempIntegerList = Lists.newArrayList();
|
||||||
tempIntegerList.add(1);tempIntegerList.add(2);tempIntegerList.add(3);
|
tempIntegerList.add(1);tempIntegerList.add(2);tempIntegerList.add(3);
|
||||||
//Map<String,String> map = DictUtils.getDictOption("SERVICE_DICT_ITM_TYPE");
|
|
||||||
if(tempIntegerList.contains(itType[0])){
|
if(tempIntegerList.contains(itType[0])){
|
||||||
tempIntegerList.remove(itType[0]);
|
tempIntegerList.remove(itType[0]);
|
||||||
}
|
}
|
||||||
@@ -151,11 +57,16 @@ public class SysDictInfoService extends BaseService{
|
|||||||
tempIntegerList.remove(itType[1]);
|
tempIntegerList.remove(itType[1]);
|
||||||
}
|
}
|
||||||
sysDictInfo.setItemType(tempIntegerList.get(0));
|
sysDictInfo.setItemType(tempIntegerList.get(0));
|
||||||
allList = sysDictInfoDao.findDictTopSearchListN(sysDictInfo);
|
allList = sysDictInfoDao.findTopDictListN(sysDictInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
allList = sysDictInfoDao.findDictTopSearchList(sysDictInfo);
|
//allList = sysDictInfoDao.findDictTopSearchList(sysDictInfo);
|
||||||
|
if(tempType!=0){
|
||||||
|
sysDictInfo.setItemType(tempType);
|
||||||
|
}else{
|
||||||
|
sysDictInfo.setItemType(null);
|
||||||
|
}
|
||||||
SysDictInfo tempSe = new SysDictInfo();
|
SysDictInfo tempSe = new SysDictInfo();
|
||||||
tempSe.setSysDictId(0);
|
tempSe.setSysDictId(0);
|
||||||
for(SysDictInfo se:allList){
|
for(SysDictInfo se:allList){
|
||||||
@@ -166,6 +77,60 @@ public class SysDictInfoService extends BaseService{
|
|||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有数据
|
||||||
|
* @param page
|
||||||
|
* @param sysDictInfo
|
||||||
|
* @param intArr
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<SysDictInfo> findAllSysDictInfo(SysDictInfo sysDictInfo, Integer[] itType,String orderBy) {
|
||||||
|
|
||||||
|
List<SysDictInfo> list = Lists.newArrayList();
|
||||||
|
Integer tempType = 0;
|
||||||
|
if(sysDictInfo.getItemType()!=null){
|
||||||
|
tempType = sysDictInfo.getItemType();
|
||||||
|
}
|
||||||
|
if(itType.length==1){
|
||||||
|
sysDictInfo.setItemType(itType[0]);
|
||||||
|
list = sysDictInfoDao.findAllSysDictInfo(sysDictInfo,orderBy);
|
||||||
|
}
|
||||||
|
if(itType.length==2){
|
||||||
|
if(tempType!=0){
|
||||||
|
list = sysDictInfoDao.findAllSysDictInfo(sysDictInfo,orderBy);
|
||||||
|
}else{
|
||||||
|
List<Integer> tempIntegerList = Lists.newArrayList();
|
||||||
|
tempIntegerList.add(1);tempIntegerList.add(2);tempIntegerList.add(3);
|
||||||
|
if(tempIntegerList.contains(itType[0])){
|
||||||
|
tempIntegerList.remove(itType[0]);
|
||||||
|
}
|
||||||
|
if(tempIntegerList.contains(itType[1])){
|
||||||
|
tempIntegerList.remove(itType[1]);
|
||||||
|
}
|
||||||
|
sysDictInfo.setItemType(tempIntegerList.get(0));
|
||||||
|
list = sysDictInfoDao.findAllSysDictInfoN(sysDictInfo,orderBy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(tempType!=0){
|
||||||
|
sysDictInfo.setItemType(tempType);
|
||||||
|
}else{
|
||||||
|
sysDictInfo.setItemType(null);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有有效字典配置
|
||||||
|
*/
|
||||||
|
public List<SysDictInfo> findAllDictList() {
|
||||||
|
return sysDictInfoDao.findAllDictList(new SysDictInfo());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据主键查询生效范围字典详细信息
|
* 根据主键查询生效范围字典详细信息
|
||||||
|
|||||||
@@ -52,14 +52,17 @@ public class SpecificServiceCfgService extends BaseService{
|
|||||||
* @param specificServiceCfg
|
* @param specificServiceCfg
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<SpecificServiceCfg> findAllSpecificServiceCfg(SpecificServiceCfg specificServiceCfg) {
|
public List<SpecificServiceCfg> findAllSpecificServiceCfg(SpecificServiceCfg specificServiceCfg, String orderBy) {
|
||||||
return specificServiceCfgDao.findAllSpecificServiceCfg(specificServiceCfg);
|
return specificServiceCfgDao.findAllSpecificServiceCfg(specificServiceCfg,orderBy);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 保存或修改
|
* 保存或修改
|
||||||
* @param specificServiceCfg
|
* @param specificServiceCfg
|
||||||
*/
|
*/
|
||||||
public void saveOrUpdate(SpecificServiceCfg specificServiceCfg, Integer oldId) {
|
public void saveOrUpdate(SpecificServiceCfg specificServiceCfg, Integer oldId) {
|
||||||
|
if(specificServiceCfg.getGroupId()==null){
|
||||||
|
specificServiceCfg.setGroupId(0);
|
||||||
|
}
|
||||||
if(oldId==null){//新增
|
if(oldId==null){//新增
|
||||||
specificServiceCfg.setIsValid(1);
|
specificServiceCfg.setIsValid(1);
|
||||||
specificServiceCfg.setOpTime(new Date());
|
specificServiceCfg.setOpTime(new Date());
|
||||||
@@ -94,7 +97,7 @@ public class SpecificServiceCfgService extends BaseService{
|
|||||||
List<SpecificServiceCfg> list = Lists.newArrayList();
|
List<SpecificServiceCfg> list = Lists.newArrayList();
|
||||||
//找出所有下级
|
//找出所有下级
|
||||||
if(specificServiceCfg!=null){
|
if(specificServiceCfg!=null){
|
||||||
SpecificServiceCfg.sortList(list, specificServiceCfgDao.findAllSpecificServiceCfg(new SpecificServiceCfg()), specificServiceCfg.getSpecServiceId(), true);
|
SpecificServiceCfg.sortList(list, specificServiceCfgDao.findAllSpecificServiceCfg(new SpecificServiceCfg(),""), specificServiceCfg.getSpecServiceId(), true);
|
||||||
list.add(specificServiceCfg);
|
list.add(specificServiceCfg);
|
||||||
for(SpecificServiceCfg ss:list){
|
for(SpecificServiceCfg ss:list){
|
||||||
ss.setIsValid(0);
|
ss.setIsValid(0);
|
||||||
|
|||||||
@@ -55,16 +55,20 @@ public class SpecificServiceHostCfgService extends BaseService{
|
|||||||
specificServiceHostCfg.setCreateTime(date);
|
specificServiceHostCfg.setCreateTime(date);
|
||||||
specificServiceHostCfg.setEditor(user);
|
specificServiceHostCfg.setEditor(user);
|
||||||
specificServiceHostCfg.setEditTime(date);
|
specificServiceHostCfg.setEditTime(date);
|
||||||
|
specificServiceHostCfg.setAuditor(user);
|
||||||
|
specificServiceHostCfg.setAuditTime(date);
|
||||||
specificServiceHostCfgDao.insert(specificServiceHostCfg);
|
specificServiceHostCfgDao.insert(specificServiceHostCfg);
|
||||||
}else{//修改
|
}else{//修改
|
||||||
//是否进行了审核操作
|
//是否进行了审核操作
|
||||||
SpecificServiceHostCfg ssh = specificServiceHostCfgDao.getByHostId(specificServiceHostCfg.getHostId());
|
//SpecificServiceHostCfg ssh = specificServiceHostCfgDao.getByHostId(specificServiceHostCfg.getHostId());
|
||||||
if(ssh.getIsAudit()!=specificServiceHostCfg.getIsAudit()){
|
/*if(ssh.getIsAudit()!=specificServiceHostCfg.getIsAudit()){
|
||||||
specificServiceHostCfg.setAuditor(user);
|
specificServiceHostCfg.setAuditor(user);
|
||||||
specificServiceHostCfg.setAuditTime(date);
|
specificServiceHostCfg.setAuditTime(date);
|
||||||
}
|
}*/
|
||||||
specificServiceHostCfg.setEditor(user);
|
specificServiceHostCfg.setEditor(user);
|
||||||
specificServiceHostCfg.setEditTime(date);
|
specificServiceHostCfg.setEditTime(date);
|
||||||
|
specificServiceHostCfg.setAuditor(user);
|
||||||
|
specificServiceHostCfg.setAuditTime(date);
|
||||||
specificServiceHostCfgDao.update(specificServiceHostCfg);
|
specificServiceHostCfgDao.update(specificServiceHostCfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,6 +94,16 @@ public class SpecificServiceHostCfgService extends BaseService{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据协议ID查询对象
|
||||||
|
* @param specServiceId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public SpecificServiceHostCfg getBySpecServiceId(Integer specServiceId) {
|
||||||
|
|
||||||
|
return specificServiceHostCfgDao.getBySpecServiceId(specServiceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ sysService_manage=system service manage
|
|||||||
service_manage=service type manage
|
service_manage=service type manage
|
||||||
system_service_manage=system service type manage
|
system_service_manage=system service type manage
|
||||||
specific_service_cfg=specific service cfg
|
specific_service_cfg=specific service cfg
|
||||||
specific_service_host_cfg=specific service host cfg
|
|
||||||
#============menu end======================
|
#============menu end======================
|
||||||
|
|
||||||
#============yewu begin======================
|
#============yewu begin======================
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ sysService_manage=system service manage
|
|||||||
service_manage=service type manage
|
service_manage=service type manage
|
||||||
system_service_manage=system service type manage
|
system_service_manage=system service type manage
|
||||||
specific_service_cfg=specific service cfg
|
specific_service_cfg=specific service cfg
|
||||||
specific_service_host_cfg=specific service host cfg
|
|
||||||
#============menu end======================
|
#============menu end======================
|
||||||
|
|
||||||
#============yewu begin======================
|
#============yewu begin======================
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ sysService_manage=\u7cfb\u7edf\u4e1a\u52a1\u7ba1\u7406
|
|||||||
service_manage=\u4e1a\u52a1\u7c7b\u578b\u7ba1\u7406
|
service_manage=\u4e1a\u52a1\u7c7b\u578b\u7ba1\u7406
|
||||||
system_service_manage=\u7cfb\u7edf\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_cfg=\u7279\u5b9a\u670d\u52a1\u7ba1\u7406
|
||||||
specific_service_host_cfg=\u7279\u5b9a\u670d\u52a1\u670d\u52a1\u5668IP\u7ba1\u7406
|
|
||||||
#==========menu end=====================
|
#==========menu end=====================
|
||||||
|
|
||||||
#==========yewu zidian begin=====================
|
#==========yewu zidian begin=====================
|
||||||
|
|||||||
@@ -58,14 +58,6 @@
|
|||||||
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/list?itType=${itType}");
|
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/list?itType=${itType}");
|
||||||
$("#searchForm").submit();
|
$("#searchForm").submit();
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
function page2(n,s){
|
|
||||||
$("#intype").attr("name",$("#seltype").val());
|
|
||||||
$("#pageNo").val(n);
|
|
||||||
$("#pageSize").val(s);
|
|
||||||
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/searchList?itType=${itType}");
|
|
||||||
$("#searchForm").submit();
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
@@ -77,6 +69,11 @@
|
|||||||
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
||||||
$("#intype").val('${searchContent}');
|
$("#intype").val('${searchContent}');
|
||||||
|
|
||||||
|
//reset
|
||||||
|
$("#resetBtn").on("click",function(){
|
||||||
|
$(".Wdate").attr("value",'');
|
||||||
|
$("#searchForm")[0].reset();
|
||||||
|
});
|
||||||
|
|
||||||
//筛选功能初始化
|
//筛选功能初始化
|
||||||
filterActionInit();
|
filterActionInit();
|
||||||
@@ -123,13 +120,13 @@
|
|||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
|
|
||||||
<div class="row" >
|
<div class="row" >
|
||||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/searchList?itType=${itType}" method="post" class="form-search">
|
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/list?itType=${itType}" method="post" class="form-search">
|
||||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||||
|
|
||||||
<!-- 筛选按钮展开状态-->
|
<!-- 筛选按钮展开状态-->
|
||||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${serviceDictInfo.isFilterAction}"/>
|
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${serviceDictInfo.isFilterAction}"/>
|
||||||
|
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
|
||||||
<!-- 搜索内容与操作按钮栏 -->
|
<!-- 搜索内容与操作按钮栏 -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
@@ -160,7 +157,7 @@
|
|||||||
<input id="intype" class="form-control input-medium" placeholder="请输入配置编码" type="text">
|
<input id="intype" class="form-control input-medium" placeholder="请输入配置编码" type="text">
|
||||||
|
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<button class="btn btn-default btn-search" type="button" onclick="page2()"><i class="fa fa-search"></i></button>
|
<button class="btn btn-default btn-search" type="button" onclick="page()"><i class="fa fa-search"></i></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -229,8 +226,8 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<button type="button" class="btn blue" onclick="page2()"> <i class="fa fa-search"></i> 搜索 </button>
|
<button type="button" class="btn blue" onclick="page()"> <i class="fa fa-search"></i> 搜索 </button>
|
||||||
<button type="button" class="btn btn-default" onclick="reset()"> <i class="fa fa-refresh"></i> 重置 </button>
|
<button type="button" class="btn btn-default" onclick="reset()" id="resetBtn"> <i class="fa fa-refresh"></i> 重置 </button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -247,9 +244,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="table-responsive"> -->
|
<div class="table-responsive">
|
||||||
<sys:message content="${message}"/>
|
<sys:message content="${message}"/>
|
||||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
<table id="treeTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
|
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
|
||||||
@@ -260,9 +257,9 @@
|
|||||||
<th><spring:message code="item_type"/></th>
|
<th><spring:message code="item_type"/></th>
|
||||||
<th><spring:message code="is_leaf"/></th>
|
<th><spring:message code="is_leaf"/></th>
|
||||||
<th><spring:message code="creator"/></th>
|
<th><spring:message code="creator"/></th>
|
||||||
<th><spring:message code="create_time"/>
|
<th class="sort-column create_time"><spring:message code="create_time"/>
|
||||||
</th><th><spring:message code="editor"/></th>
|
</th><th><spring:message code="editor"/></th>
|
||||||
<th><spring:message code="edit_time"/></th>
|
<th class="sort-column edit_time"><spring:message code="edit_time"/></th>
|
||||||
<shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
|
<shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -305,6 +302,7 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="page">${page}</div>
|
<div class="page">${page}</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -64,14 +64,6 @@
|
|||||||
$("#searchForm").submit();
|
$("#searchForm").submit();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function page2(n,s){
|
|
||||||
$("#intype").attr("name",$("#seltype").val());
|
|
||||||
$("#pageNo").val(n);
|
|
||||||
$("#pageSize").val(s);
|
|
||||||
$("#searchForm").attr("action","${ctx}/basics/sysDictInfo/searchList?itType=${itType}");
|
|
||||||
$("#searchForm").submit();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
//设定显示总条数
|
//设定显示总条数
|
||||||
$("#showTotalCount").text('${showTotalCount}');
|
$("#showTotalCount").text('${showTotalCount}');
|
||||||
@@ -79,8 +71,13 @@
|
|||||||
|
|
||||||
$("#seltype").find("option[value='${searchType==null?11:searchType}']").attr("selected",true);
|
$("#seltype").find("option[value='${searchType==null?11:searchType}']").attr("selected",true);
|
||||||
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
||||||
$("#intype").val('${sysDictInfo.itemValue}');
|
$("#intype").val('${searchContent}');
|
||||||
|
|
||||||
|
//reset
|
||||||
|
$("#resetBtn").on("click",function(){
|
||||||
|
$(".Wdate").attr("value",'');
|
||||||
|
$("#searchForm")[0].reset();
|
||||||
|
});
|
||||||
|
|
||||||
//筛选功能初始化
|
//筛选功能初始化
|
||||||
filterActionInit();
|
filterActionInit();
|
||||||
@@ -126,13 +123,13 @@
|
|||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
|
|
||||||
<div class="row" >
|
<div class="row" >
|
||||||
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/searchList?itType=${itType}" method="post" class="form-search">
|
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/list?itType=${itType}" method="post" class="form-search">
|
||||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||||
|
|
||||||
<!-- 筛选按钮展开状态-->
|
<!-- 筛选按钮展开状态-->
|
||||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${sysDictInfo.isFilterAction}"/>
|
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${sysDictInfo.isFilterAction}"/>
|
||||||
|
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
|
||||||
<!-- 搜索内容与操作按钮栏 -->
|
<!-- 搜索内容与操作按钮栏 -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
@@ -163,7 +160,7 @@
|
|||||||
<input id="intype" class="form-control input-medium" placeholder="请输入配置编码" type="text">
|
<input id="intype" class="form-control input-medium" placeholder="请输入配置编码" type="text">
|
||||||
|
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<button class="btn btn-default btn-search" type="button" onclick="page2()"><i class="fa fa-search"></i></button>
|
<button class="btn btn-default btn-search" type="button" onclick="page()"><i class="fa fa-search"></i></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -232,8 +229,8 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<button type="button" class="btn blue" onclick="page2()"> <i class="fa fa-search"></i> 搜索 </button>
|
<button type="button" class="btn blue" onclick="page()"> <i class="fa fa-search"></i> 搜索 </button>
|
||||||
<button type="button" class="btn btn-default" onclick="reset()"> <i class="fa fa-refresh"></i> 重置 </button>
|
<button type="button" class="btn btn-default" onclick="reset()" id="resetBtn"> <i class="fa fa-refresh"></i> 重置 </button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -250,9 +247,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="table-responsive"> -->
|
<div class="table-responsive">
|
||||||
<sys:message content="${message}"/>
|
<sys:message content="${message}"/>
|
||||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
<table id="treeTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><input type="checkbox" id="selAll" class="ckboxs" onclick="selectAll()"></th>
|
<th><input type="checkbox" id="selAll" class="ckboxs" onclick="selectAll()"></th>
|
||||||
@@ -263,9 +260,9 @@
|
|||||||
<th><spring:message code="item_type"/></th>
|
<th><spring:message code="item_type"/></th>
|
||||||
<th><spring:message code="is_leaf"/></th>
|
<th><spring:message code="is_leaf"/></th>
|
||||||
<th><spring:message code="creator"/></th>
|
<th><spring:message code="creator"/></th>
|
||||||
<th><spring:message code="create_time"/>
|
<th class="sort-column create_time"><spring:message code="create_time"/>
|
||||||
</th><th><spring:message code="editor"/></th>
|
</th><th><spring:message code="editor"/></th>
|
||||||
<th><spring:message code="edit_time"/></th>
|
<th class="sort-column edit_time"><spring:message code="edit_time"/></th>
|
||||||
<shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
|
<shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -308,6 +305,7 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="page">${page}</div>
|
<div class="page">${page}</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" type="text/css" href="${ctxStatic}/pages/css/dictInfo.css" />
|
<link rel="stylesheet" type="text/css" href="${ctxStatic}/pages/css/dictInfo.css" />
|
||||||
<script type="text/javascript" src="${ctxStatic}/pages/scripts/dict.js"></script>
|
<script type="text/javascript" src="${ctxStatic}/pages/scripts/specificServiceForm/specificServiceFormCfg.js"></script>
|
||||||
<title></title>
|
<title></title>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
jQuery.validator.addMethod("maxValue", function(value, element) {
|
jQuery.validator.addMethod("maxValue", function(value, element) {
|
||||||
return value >=0&&value<10000000;
|
return value >=0&&value<210000000;
|
||||||
}, "请填写正确的协议id");
|
}, "请填写正确的协议id");
|
||||||
//校验叶子节点无上级不得选为叶子节点
|
//校验叶子节点无上级不得选为叶子节点
|
||||||
jQuery.validator.addMethod("leafHasTree",function(value,element){
|
jQuery.validator.addMethod("leafHasTree",function(value,element){
|
||||||
@@ -52,6 +52,10 @@
|
|||||||
'specServiceName':{
|
'specServiceName':{
|
||||||
required:true
|
required:true
|
||||||
},
|
},
|
||||||
|
'groupId':{
|
||||||
|
digits:true,
|
||||||
|
maxValue:true
|
||||||
|
},
|
||||||
'specServiceDesc':{
|
'specServiceDesc':{
|
||||||
required:true
|
required:true
|
||||||
},
|
},
|
||||||
@@ -64,12 +68,16 @@
|
|||||||
'specServiceId':{
|
'specServiceId':{
|
||||||
required:'请填写协议ID',
|
required:'请填写协议ID',
|
||||||
digits:"请填写整数数字",
|
digits:"请填写整数数字",
|
||||||
maxValue: "请填写正确的协议ID",
|
maxValue: "请填写正确的协议ID(0~210000000)",
|
||||||
remote:'该协议ID已存在'
|
remote:'该协议ID已存在'
|
||||||
},
|
},
|
||||||
'specServiceName':{
|
'specServiceName':{
|
||||||
required:'请填写协议名称'
|
required:'请填写协议名称'
|
||||||
},
|
},
|
||||||
|
'groupId':{
|
||||||
|
digits:'请填写整数数值',
|
||||||
|
maxValue:'请填写正确的分组Id(0~210000000)'
|
||||||
|
},
|
||||||
'specServiceDesc':{
|
'specServiceDesc':{
|
||||||
required:'请填写协议描述'
|
required:'请填写协议描述'
|
||||||
},
|
},
|
||||||
@@ -112,7 +120,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<h3 class="page-title">
|
<h3 class="page-title">
|
||||||
<spring:message code="configuration_manage"/>
|
<spring:message code="specific_service_cfg"/>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -159,9 +167,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font>maat端配置分组id:</label>
|
<label class="col-md-3 control-label">maat端配置分组id:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form:input path="groupId" htmlEscape="false" maxlength="50" class="form-control"/>
|
<form:input path="groupId" htmlEscape="false" maxlength="50" class="form-control" placeholder="0"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -173,7 +181,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label">协议描述:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font>协议描述:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form:textarea path="specServiceDesc" htmlEscape="false" maxlength="2000" class="form-control"/>
|
<form:textarea path="specServiceDesc" htmlEscape="false" maxlength="2000" class="form-control"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<h3 class="page-title">
|
<h3 class="page-title">
|
||||||
<spring:message code="configuration_manage"/>
|
<spring:message code="specific_service_cfg"/>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
|
<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}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
|
||||||
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
|
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
|
||||||
|
<style type="text/css">
|
||||||
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function reset(){
|
function reset(){
|
||||||
$("#searchForm").reset();
|
$("#searchForm").reset();
|
||||||
@@ -50,12 +52,31 @@
|
|||||||
alert("至少选择一条数据记录");
|
alert("至少选择一条数据记录");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function casec(){
|
||||||
|
if($("#intype").attr("name")=="specServiceId"||$("#intype").attr("name")=="groupId"){
|
||||||
|
if(isNaN($("#intype").val())){
|
||||||
|
$("#showError").show();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
$("#showError").hide();
|
||||||
|
//alert(11);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$("#showError").hide();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//查询
|
//查询
|
||||||
function page(n,s){
|
function page(n,s){
|
||||||
//$("#intype").attr("name",$("#seltype").val());
|
//$("#intype").attr("name",$("#seltype").val());
|
||||||
$("#pageNo").val(n);
|
$("#pageNo").val(n);
|
||||||
$("#pageSize").val(s);
|
$("#pageSize").val(s);
|
||||||
$("#searchForm").attr("action","${ctx}/specific/specificServiceCfg/list");
|
$("#searchForm").attr("action","${ctx}/specific/specificServiceCfg/list");
|
||||||
|
if(!casec()){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$("#searchForm").submit();
|
$("#searchForm").submit();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -75,16 +96,13 @@
|
|||||||
$("#intype").val('${searchContent}');
|
$("#intype").val('${searchContent}');
|
||||||
//筛选功能初始化
|
//筛选功能初始化
|
||||||
filterActionInit();
|
filterActionInit();
|
||||||
$("#isAudit").change(function(){
|
|
||||||
page();
|
|
||||||
});
|
|
||||||
$("#seltype").change(function(){
|
$("#seltype").change(function(){
|
||||||
$("#intype").val("");
|
$("#intype").val("");
|
||||||
$("#intype").attr("placeholder","请输入"+$(this).find("option:selected").text());
|
$("#intype").attr("placeholder","请输入"+$(this).find("option:selected").text());
|
||||||
$("#intype").attr("name",$(this).find("option:selected").val());
|
$("#intype").attr("name",$(this).find("option:selected").val());
|
||||||
|
$("#showError").hide();
|
||||||
});
|
});
|
||||||
$("#treeTable").treeTable({expandLevel : 3}).show();
|
$("#treeTable").treeTable({expandLevel : 3}).show();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -104,7 +122,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 class="page-title">
|
<h3 class="page-title">
|
||||||
特定服务信息
|
<spring:message code="specific_service_cfg"/>
|
||||||
<small><spring:message code="date_list"/></small>
|
<small><spring:message code="date_list"/></small>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -122,28 +140,33 @@
|
|||||||
|
|
||||||
<!-- 筛选按钮展开状态-->
|
<!-- 筛选按钮展开状态-->
|
||||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${specificServiceCfg.isFilterAction}"/>
|
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${specificServiceCfg.isFilterAction}"/>
|
||||||
|
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
|
||||||
|
|
||||||
<!-- 搜索内容与操作按钮栏 -->
|
<!-- 搜索内容与操作按钮栏 -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<select id="seltype" class="selectpicker select2 input-small" >
|
<select id="seltype" class="selectpicker select2 input-middle" >
|
||||||
<option value="specServiceId">协议ID</option>
|
<option value="specServiceId">协议ID</option>
|
||||||
<option value="specServiceName">协议名称</option>
|
<option value="specServiceName">协议名称</option>
|
||||||
|
<option value="groupId">maat端配置分组ID</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<input id="intype" class="form-control input-medium" placeholder="请输入协议ID" type="text">
|
<input id="intype" class="form-control input-medium" placeholder="请输入协议ID" type="text" onchange="casec()">
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<button class="btn btn-default btn-search" type="button" onclick="page()"><i class="fa fa-search"></i></button>
|
<button class="btn btn-default btn-search" type="button" onclick="page()"><i class="fa fa-search"></i></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="pull-left" style="margin-top:10px;display:none" id="showError">
|
||||||
|
<label class="error">请填写整数</label>
|
||||||
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
|
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
|
||||||
@@ -206,9 +229,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="table-responsive"> -->
|
<div class="table-responsive">
|
||||||
<sys:message content="${message}"/>
|
<sys:message content="${message}"/>
|
||||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
<table id="treeTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
|
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
|
||||||
@@ -218,9 +241,9 @@
|
|||||||
<th>协议描述</th>
|
<th>协议描述</th>
|
||||||
<th>maat端配置分组id</th>
|
<th>maat端配置分组id</th>
|
||||||
<th><spring:message code="is_leaf"/></th>
|
<th><spring:message code="is_leaf"/></th>
|
||||||
<th>操作时间</th>
|
<th class="sort-column op_time">操作时间</th>
|
||||||
<shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
|
<%-- <shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
|
||||||
</tr>
|
--%> </tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<c:forEach items="${list}" var="specificServiceCfg" varStatus="ss">
|
<c:forEach items="${list}" var="specificServiceCfg" varStatus="ss">
|
||||||
@@ -233,7 +256,7 @@
|
|||||||
<td>${specificServiceCfg.groupId }</td>
|
<td>${specificServiceCfg.groupId }</td>
|
||||||
<td>${fns:getDictLabel("SYS_YES_NO",specificServiceCfg.isLeaf,"0")}</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><fmt:formatDate value="${specificServiceCfg.opTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||||
<td>
|
<%-- <td>
|
||||||
<div class="btn-group btn-xs">
|
<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>
|
<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">
|
<ul class="dropdown-menu btn-xs">
|
||||||
@@ -247,13 +270,14 @@
|
|||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td> --%>
|
||||||
</tr>
|
</tr>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="page">${page}</div>
|
<div class="page">${page}</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,57 +7,106 @@
|
|||||||
<script type="text/javascript" src="${ctxStatic}/pages/scripts/dict.js"></script>
|
<script type="text/javascript" src="${ctxStatic}/pages/scripts/dict.js"></script>
|
||||||
<title></title>
|
<title></title>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(
|
$(document).ready(function() {
|
||||||
function() {
|
$("[data-toogle='tooltip']").tooltip();
|
||||||
|
$("select[name='ipType']").on("change",function(){
|
||||||
|
var type=$(this).val();
|
||||||
|
if(4==type){
|
||||||
|
$("input[name='srcIpMask']").attr("placeholder","任意掩码请填0.0.0.0,无掩码请填255.255.255.255");
|
||||||
|
$("input[name='dstIpMask']").attr("placeholder","任意掩码请填0.0.0.0,无掩码请填255.255.255.255");
|
||||||
|
$("input[name='srcIp']").attr("placeholder","任意ip请填0.0.0.0");
|
||||||
|
$("input[name='dstIp']").attr("placeholder","任意ip请填0.0.0.0");
|
||||||
|
$("input[name='srcIpMask']").attr("title","任意掩码请填0.0.0.0,无掩码请填255.255.255.255");
|
||||||
|
$("input[name='dstIpMask']").attr("title","任意掩码请填0.0.0.0,无掩码请填255.255.255.255");
|
||||||
|
$("input[name='srcIp']").attr("title","任意ip请填0.0.0.0");
|
||||||
|
$("input[name='dstIp']").attr("title","任意ip请填0.0.0.0");
|
||||||
|
}
|
||||||
|
if(6==type){
|
||||||
|
$("input[name='srcIpMask']").attr("placeholder","若无请填FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF,任意请填 ::");
|
||||||
|
$("input[name='dstIpMask']").attr("placeholder","若无请填FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF,任意请填 ::");
|
||||||
|
$("input[name='srcIp']").attr("placeholder","任意ip请填 ::");
|
||||||
|
$("input[name='dstIp']").attr("placeholder","任意ip请填 ::");
|
||||||
|
$("input[name='srcIpMask']").attr("title","若无请填FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF,任意请填 ::");
|
||||||
|
$("input[name='dstIpMask']").attr("title","若无请填FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF,任意请填 ::");
|
||||||
|
$("input[name='srcIp']").attr("title","任意ip请填 ::");
|
||||||
|
$("input[name='dstIp']").attr("title","任意ip请填 ::");
|
||||||
|
}
|
||||||
|
});
|
||||||
jQuery.validator.addMethod("maxValue",
|
jQuery.validator.addMethod("maxValue",
|
||||||
function(value, element) {
|
function(value, element) {
|
||||||
return value >= 0 && value < 10000000;
|
return value >= 0 && value < 210000000;
|
||||||
}, "请填写正确的协议id");
|
}, "请填写正确的协议id");
|
||||||
//ip地址校验
|
//ip地址校验
|
||||||
jQuery.validator.addMethod("ip",function(value, element) {
|
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));
|
var typeInt=$("select[name='ipType']").val();
|
||||||
}, "请填写正确的IP地址,如192.168.0.1");
|
if(typeInt==4){
|
||||||
|
return this.optional(element)||(/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(value) && (RegExp.$1 <256 && RegExp.$2<256 && RegExp.$3<256 && RegExp.$4<256));
|
||||||
|
}else if(typeInt==6){
|
||||||
|
return this.optional(element)||/^\s*((([0-9A-Fa-f]{1,4}:){7}(([0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]{1,4}:){6}(:|((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})|(:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}:){5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){4}(:[0-9A-Fa-f]{1,4}){0,1}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){3}(:[0-9A-Fa-f]{1,4}){0,2}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){2}(:[0-9A-Fa-f]{1,4}){0,3}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:)(:[0-9A-Fa-f]{1,4}){0,4}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(:(:[0-9A-Fa-f]{1,4}){0,5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})))(%.+)?\s*$/.test(value);
|
||||||
|
}}, "请填写正确的IP地址");
|
||||||
|
//ip地址掩码校验
|
||||||
|
jQuery.validator.addMethod("ipMask",function(value, element) {
|
||||||
|
obj=value;
|
||||||
|
var typeInt=$("select[name='ipType']").val();
|
||||||
|
if(typeInt==4){
|
||||||
|
if(obj=="255.255.255.255"){
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
var exp=/^(254|252|248|240|224|192|128|0)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)$/;
|
||||||
|
var reg = obj.match(exp);
|
||||||
|
if(reg==null){return false;}else{return true}
|
||||||
|
}
|
||||||
|
}else if(typeInt==6){
|
||||||
|
if(obj=="FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"||obj==0||obj=="::"){
|
||||||
|
return true;
|
||||||
|
}else{return (obj > 0) && ((obj & (obj - 1)) == 0)};
|
||||||
|
}
|
||||||
|
}, "请填写正确的IP地址掩码");
|
||||||
$("#name").focus();
|
$("#name").focus();
|
||||||
$("#inputForm")
|
$("#inputForm")
|
||||||
.validate(
|
.validate(
|
||||||
{
|
{
|
||||||
rules : {
|
rules : {
|
||||||
'specServiceId':{
|
specServiceId:{
|
||||||
required:true
|
required:true,
|
||||||
|
digits:true,
|
||||||
|
maxValue:true
|
||||||
},
|
},
|
||||||
'srcIp':{
|
srcIp:{
|
||||||
required:true,
|
required:true,
|
||||||
ip:true
|
ip:true
|
||||||
},
|
},
|
||||||
'dstIp':{
|
dstIp:{
|
||||||
required:true,
|
required:true,
|
||||||
ip:true
|
ip:true
|
||||||
},
|
},
|
||||||
'srcIpMask':{
|
srcIpMask:{
|
||||||
required:true
|
required:true,
|
||||||
|
ipMask:true
|
||||||
},
|
},
|
||||||
'dstIpMask':{
|
dstIpMask:{
|
||||||
required:true
|
required:true,
|
||||||
|
ipMask:true
|
||||||
},
|
},
|
||||||
'srcPort':{
|
srcPort:{
|
||||||
required:true,
|
required:true,
|
||||||
digits:true,
|
digits:true,
|
||||||
max: 65535,
|
max: 65535,
|
||||||
min: 0
|
min: 0
|
||||||
},
|
},
|
||||||
'dstPort':{
|
dstPort:{
|
||||||
required:true,
|
required:true,
|
||||||
digits:true,
|
digits:true,
|
||||||
max: 65535,
|
max: 65535,
|
||||||
min: 0
|
min: 0
|
||||||
},
|
},
|
||||||
'srcPortMask':{
|
srcPortMask:{
|
||||||
required:true,
|
required:true,
|
||||||
digits:true,
|
digits:true,
|
||||||
max: 65535,
|
max: 65535,
|
||||||
min: 0
|
min: 0
|
||||||
},
|
},
|
||||||
'dstPortMask':{
|
dstPortMask:{
|
||||||
required:true,
|
required:true,
|
||||||
digits:true,
|
digits:true,
|
||||||
max: 65535,
|
max: 65535,
|
||||||
@@ -65,42 +114,44 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
messages : {
|
messages : {
|
||||||
'specServiceId':{
|
specServiceId:{
|
||||||
required:'<spring:message code="required"/>'
|
required:'<spring:message code="required"/>',
|
||||||
|
digits:'请填写整数数值',
|
||||||
|
maxValue:'请填写合适的值(0~210000000)'
|
||||||
},
|
},
|
||||||
'srcIp':{
|
srcIp:{
|
||||||
required:'<spring:message code="required"/>',
|
required:'<spring:message code="required"/>',
|
||||||
ip:'请填写正确的ip'
|
ip:'请填写正确的ip'
|
||||||
},
|
},
|
||||||
'dstIp':{
|
dstIp:{
|
||||||
required:'<spring:message code="required"/>',
|
required:'<spring:message code="required"/>',
|
||||||
ip:'请填写正确的ip'
|
ip:'请填写正确的ip'
|
||||||
},
|
},
|
||||||
'srcIpMask':{
|
srcIpMask:{
|
||||||
required:'<spring:message code="required"/>'
|
required:'<spring:message code="required"/>'
|
||||||
},
|
},
|
||||||
'dstIpMask':{
|
dstIpMask:{
|
||||||
required:'<spring:message code="required"/>'
|
required:'<spring:message code="required"/>'
|
||||||
},
|
},
|
||||||
'srcPort':{
|
srcPort:{
|
||||||
required:'<spring:message code="required"/>',
|
required:'<spring:message code="required"/>',
|
||||||
digits:'请填写整数',
|
digits:'请填写整数',
|
||||||
max: '数值不得大于65535',
|
max: '数值不得大于65535',
|
||||||
min: '数值不得小于0'
|
min: '数值不得小于0'
|
||||||
},
|
},
|
||||||
'dstPort':{
|
dstPort:{
|
||||||
required:'<spring:message code="required"/>',
|
required:'<spring:message code="required"/>',
|
||||||
digits:'请填写整数',
|
digits:'请填写整数',
|
||||||
max: '数值不得大于65535',
|
max: '数值不得大于65535',
|
||||||
min: '数值不得小于0'
|
min: '数值不得小于0'
|
||||||
},
|
},
|
||||||
'srcPortMask':{
|
srcPortMask:{
|
||||||
required:'<spring:message code="required"/>',
|
required:'<spring:message code="required"/>',
|
||||||
digits:'请填写整数',
|
digits:'请填写整数',
|
||||||
max: '数值不得大于65535',
|
max: '数值不得大于65535',
|
||||||
min: '数值不得小于0'
|
min: '数值不得小于0'
|
||||||
},
|
},
|
||||||
'dstPortMask':{
|
dstPortMask:{
|
||||||
required:'<spring:message code="required"/>',
|
required:'<spring:message code="required"/>',
|
||||||
digits:'请填写整数',
|
digits:'请填写整数',
|
||||||
max: '数值不得大于65535',
|
max: '数值不得大于65535',
|
||||||
@@ -148,7 +199,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<h3 class="page-title">
|
<h3 class="page-title">
|
||||||
<spring:message code="configuration_manage" />
|
<spring:message code="agreement_ip_configuration" />
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -202,7 +253,6 @@
|
|||||||
<label class="col-md-3 control-label"><font color="red">*</font>协议:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font>协议:</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form:select path="protocol" class="selectpicker select2 form-control" >
|
<form:select path="protocol" class="selectpicker select2 form-control" >
|
||||||
<form:option value="">-请选择协议类型-</form:option>
|
|
||||||
<c:forEach items="${fns:getDictList('SPEC_PROTOCOL')}" var="dict">
|
<c:forEach items="${fns:getDictList('SPEC_PROTOCOL')}" var="dict">
|
||||||
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
|
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
@@ -212,13 +262,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font>是否审核:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font>ip类型:</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form:select path="isAudit" class="selectpicker select2 form-control" >
|
<form:select path="ipType" class="selectpicker select2 form-control" >
|
||||||
<c:if test="${hostId == null}">
|
<c:forEach items="${fns:getDictList('SPEC_IP_TYPE')}" var="dict">
|
||||||
<form:option value="0">${fns:getDictLabel("SPEC_AUDIT","0","0")}</form:option>
|
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
|
||||||
</c:if>
|
</c:forEach>
|
||||||
</form:select>
|
</form:select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6" style="display:none;">
|
||||||
|
<input name="isAudit" value="1"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -229,7 +282,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font>源IP地址:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font>源IP地址:</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form:input path="srcIp" htmlEscape="false" maxlength="50" class="form-control" placeholder="0.0.0.0"/>
|
<form:input path="srcIp" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意ip请填0.0.0.0" placeholder="任意ip请填0.0.0.0"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -237,7 +290,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font>目的IP地址:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font>目的IP地址:</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form:input path="dstIp" htmlEscape="false" maxlength="50" class="form-control" placeholder="0.0.0.0"/>
|
<form:input path="dstIp" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意ip请填0.0.0.0" placeholder="任意ip请填0.0.0.0"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -248,7 +301,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font>源地址掩码:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font>源地址掩码:</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form:input path="srcIpMask" htmlEscape="false" maxlength="50" class="form-control" placeholder="255.255.255.255"/>
|
<form:input path="srcIpMask" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" title="任意掩码请填0.0.0.0,无掩码请填255.255.255.255" data-placement="top" placeholder="任意掩码请填0.0.0.0,无掩码请填255.255.255.255"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -256,7 +309,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font>目的地址掩码:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font>目的地址掩码:</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form:input path="dstIpMask" htmlEscape="false" maxlength="50" class="form-control" placeholder="255.255.255.255"/>
|
<form:input path="dstIpMask" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意掩码请填0.0.0.0,无掩码请填255.255.255.255" placeholder="任意掩码请填0.0.0.0,无掩码请填255.255.255.255"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -267,7 +320,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font>源端口:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font>源端口:</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form:input path="srcPort" htmlEscape="false" maxlength="50" class="form-control" placeholder="0"/>
|
<form:input path="srcPort" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意端口请填0" placeholder="任意端口请填0"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -275,7 +328,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font>目的端口:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font>目的端口:</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form:input path="dstPort" htmlEscape="false" maxlength="50" class="form-control" placeholder="0"/>
|
<form:input path="dstPort" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意端口请填0" placeholder="任意端口请填0"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -285,7 +338,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font>源端口掩码:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font>源端口掩码:</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form:input path="srcPortMask" htmlEscape="false" maxlength="50" class="form-control" placeholder="65535"/>
|
<form:input path="srcPortMask" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意掩码请填0,无掩码请填65535" placeholder="任意掩码请填0,无掩码请填65535"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -293,7 +346,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font>目的端口掩码:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font>目的端口掩码:</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form:input path="dstPortMask" htmlEscape="false" maxlength="50" class="form-control" placeholder="65535"/>
|
<form:input path="dstPortMask" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意掩码请填0,无掩码请填65535" placeholder="任意掩码请填0,无掩码请填65535"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,23 +2,7 @@
|
|||||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>特定服务服务器IP管理</title>
|
<title><spring:message code="agreement_ip_configuration" /></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>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
//筛选功能初始化
|
//筛选功能初始化
|
||||||
@@ -33,6 +17,9 @@
|
|||||||
$("#protocol").change(function(){
|
$("#protocol").change(function(){
|
||||||
page();
|
page();
|
||||||
});
|
});
|
||||||
|
$("#ipType").change(function(){
|
||||||
|
page();
|
||||||
|
});
|
||||||
//全选及取消
|
//全选及取消
|
||||||
$("#checkAll").change(function(){
|
$("#checkAll").change(function(){
|
||||||
if($("#checkAll").prop("checked")){
|
if($("#checkAll").prop("checked")){
|
||||||
@@ -60,17 +47,17 @@
|
|||||||
}
|
}
|
||||||
//编辑
|
//编辑
|
||||||
function edit(){
|
function edit(){
|
||||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
var mulitId="";
|
||||||
if(cked.val()==1){
|
jQuery("#contentTable").find(":checkbox:checked[name='check']").each(function(){
|
||||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
if(jQuery(this).val()!=""){
|
||||||
return;
|
mulitId+=jQuery(this).val()+",";
|
||||||
}
|
}
|
||||||
if(cked.length==1){
|
});
|
||||||
window.location = "${ctx}/specific/specificServiceHostCfg/form?hostId="+cked.attr("id");
|
if(mulitId!=""){
|
||||||
}else{
|
confirmx('您确认要执行该操作?', '${ctx}/specific/specificServiceHostCfg/form?hostId='+mulitId.split(",", 1)[0]);
|
||||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
}else{
|
||||||
return;
|
alert("至少选择一条数据记录");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//删除
|
//删除
|
||||||
function delAll(){
|
function delAll(){
|
||||||
@@ -108,7 +95,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 class="page-title">
|
<h3 class="page-title">
|
||||||
特定服务服务器IP管理
|
<spring:message code="agreement_ip_configuration" />
|
||||||
<small><spring:message code="date_list"/></small>
|
<small><spring:message code="date_list"/></small>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -126,17 +113,18 @@
|
|||||||
|
|
||||||
<!-- 筛选按钮展开状态-->
|
<!-- 筛选按钮展开状态-->
|
||||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${specificServiceHostCfg.isFilterAction }"/>
|
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${specificServiceHostCfg.isFilterAction }"/>
|
||||||
|
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
|
||||||
|
|
||||||
<!-- 搜索内容与操作按钮栏 -->
|
<!-- 搜索内容与操作按钮栏 -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="pull-left">
|
<%-- <div class="pull-left">
|
||||||
<form:select path="isAudit" class="selectpicker select2 input-small" >
|
<form:select path="isAudit" class="selectpicker select2 input-small" >
|
||||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||||
<c:forEach items="${fns:getDictList('SPEC_AUDIT')}" var="dict">
|
<c:forEach items="${fns:getDictList('SPEC_AUDIT')}" var="dict">
|
||||||
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
|
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</form:select>
|
</form:select>
|
||||||
</div>
|
</div> --%>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<c:set var="spec_service_id">协议ID</c:set>
|
<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">
|
<form:select path="specServiceId" class="selectpicker select2 input-small" title="${spec_service_id}" data-live-search="true" data-live-search-placeholder="search">
|
||||||
@@ -144,6 +132,14 @@
|
|||||||
<form:option value="${specServiceId}">${specServiceId}</form:option>
|
<form:option value="${specServiceId}">${specServiceId}</form:option>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</form:select>
|
</form:select>
|
||||||
|
</div>
|
||||||
|
<div class="pull-left" style="margin-right:0px;">
|
||||||
|
<form:select path="ipType" class="selectpicker select2 input-small" >
|
||||||
|
<form:option value="">-请选择ip类型-</form:option>
|
||||||
|
<c:forEach items="${fns:getDictList('SPEC_IP_TYPE')}" var="dict">
|
||||||
|
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
|
||||||
|
</c:forEach>
|
||||||
|
</form:select>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<c:set var="src_ip">源Ip地址</c:set>
|
<c:set var="src_ip">源Ip地址</c:set>
|
||||||
@@ -156,7 +152,7 @@
|
|||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<c:set var="dst_ip">目的Ip地址</c:set>
|
<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">
|
<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" >
|
<c:forEach items="${listDstIp}" var="dstIp" >
|
||||||
<form:option value="${dstIp}">${dstIp}</form:option>
|
<form:option value="${dstIp}">${dstIp}</form:option>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</form:select>
|
</form:select>
|
||||||
@@ -191,7 +187,7 @@
|
|||||||
<i class="fa fa-edit"></i> <spring:message code="edit"></spring:message></button>
|
<i class="fa fa-edit"></i> <spring:message code="edit"></spring:message></button>
|
||||||
<button type="button" class="btn btn-default" onclick="delAll()">
|
<button type="button" class="btn btn-default" onclick="delAll()">
|
||||||
<i class="fa fa-trash"></i> 删除</button>
|
<i class="fa fa-trash"></i> 删除</button>
|
||||||
<div class="btn-group" >
|
<%-- <div class="btn-group" >
|
||||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
<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-wrench"></i> <spring:message code="examine"></spring:message>
|
||||||
<i class="fa fa-angle-down"></i>
|
<i class="fa fa-angle-down"></i>
|
||||||
@@ -201,7 +197,7 @@
|
|||||||
<li><sys:delRow url="" id="contentTable" label="unapproved"></sys:delRow></li>
|
<li><sys:delRow url="" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||||
<li><sys:delRow url="" id="contentTable" label="cancelPass"></sys:delRow></li>
|
<li><sys:delRow url="" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div> --%>
|
||||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||||
data-container="body" data-placement="top" data-original-title="自定义列字段" href="javascript:;">
|
data-container="body" data-placement="top" data-original-title="自定义列字段" href="javascript:;">
|
||||||
<i class="icon-wrench"></i>
|
<i class="icon-wrench"></i>
|
||||||
@@ -269,7 +265,7 @@
|
|||||||
<input id="auditEndDate" name="auditEndDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
<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});"/>
|
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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h5 class="page-header"></h5>
|
<h5 class="page-header"></h5>
|
||||||
@@ -294,9 +290,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="table-responsive"> -->
|
<div class="table-responsive">
|
||||||
<sys:message content="${message}"/>
|
<sys:message content="${message}"/>
|
||||||
<table id="contentTable" class="table table-striped table-bordered table-condensed">
|
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||||
@@ -313,24 +309,24 @@
|
|||||||
<th>协议</th>
|
<th>协议</th>
|
||||||
<th>是否审核</th>
|
<th>是否审核</th>
|
||||||
<th>创建人员</th>
|
<th>创建人员</th>
|
||||||
<th>配置时间</th>
|
<th class="sort-column create_time">配置时间</th>
|
||||||
<th>修改人员</th>
|
<th>修改人员</th>
|
||||||
<th>修改时间</th>
|
<th class="sort-column edit_time">修改时间</th>
|
||||||
<th>审核人员</th>
|
<th isVisible="false">审核人员</th>
|
||||||
<th>审核时间</th>
|
<th isVisible="false" class="sort-column audit_time">审核时间</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<c:forEach items="${page.list}" var="specificServiceHostCfg">
|
<c:forEach items="${page.list}" var="specificServiceHostCfg">
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" class="i-checks" name="check" id="${specificServiceHostCfg.hostId}" value="${specificServiceHostCfg.isAudit}"></td>
|
<td><input type="checkbox" class="i-checks" name="check" id="${specificServiceHostCfg.hostId}" value="${specificServiceHostCfg.hostId}"></td>
|
||||||
<td>${specificServiceHostCfg.specServiceId }</td>
|
<td>${specificServiceHostCfg.specServiceId }</td>
|
||||||
<td>${specificServiceHostCfg.srcIp }</td>
|
<td title="${specificServiceHostCfg.srcIp}">${fns:abbr(specificServiceHostCfg.srcIp,15)}</td>
|
||||||
<td>${specificServiceHostCfg.srcIpMask }</td>
|
<td title="${specificServiceHostCfg.srcIpMask}">${fns:abbr(specificServiceHostCfg.srcIpMask,15) }</td>
|
||||||
<td>${specificServiceHostCfg.srcPort }</td>
|
<td>${specificServiceHostCfg.srcPort}</td>
|
||||||
<td>${specificServiceHostCfg.srcPortMask }</td>
|
<td>${specificServiceHostCfg.srcPortMask}</td>
|
||||||
<td>${specificServiceHostCfg.dstIp }</td>
|
<td title="${specificServiceHostCfg.dstIp}">${fns:abbr(specificServiceHostCfg.dstIp,15) }</td>
|
||||||
<td>${specificServiceHostCfg.dstIpMask }</td>
|
<td title="${specificServiceHostCfg.dstIpMask}">${fns:abbr(specificServiceHostCfg.dstIpMask,15) }</td>
|
||||||
<td>${specificServiceHostCfg.dstPort }</td>
|
<td>${specificServiceHostCfg.dstPort }</td>
|
||||||
<td>${specificServiceHostCfg.dstPortMask }</td>
|
<td>${specificServiceHostCfg.dstPortMask }</td>
|
||||||
<td>${fns:getDictLabel("SPEC_DIRECTION",specificServiceHostCfg.direction,"0")}</td>
|
<td>${fns:getDictLabel("SPEC_DIRECTION",specificServiceHostCfg.direction,"0")}</td>
|
||||||
@@ -348,6 +344,7 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="page">${page}</div>
|
<div class="page">${page}</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user