Merge branch 'develop' of https://git.mesalab.cn/K18_NTCS_WEB/NTC.git into develop
This commit is contained in:
@@ -614,6 +614,9 @@ public class Page<T> {
|
|||||||
public boolean isLastPage() {
|
public boolean isLastPage() {
|
||||||
return lastPage;
|
return lastPage;
|
||||||
}
|
}
|
||||||
|
public void setLastPage(boolean lastPage) {
|
||||||
|
this.lastPage = lastPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2354,6 +2354,10 @@ public class BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public void auditAll(Page page,Integer auditType,Object entity)throws Exception {
|
public void auditAll(Page page,Integer auditType,Object entity)throws Exception {
|
||||||
|
page.setOrderBy("");
|
||||||
|
page.setPageSize(Constants.MAAT_JSON_SEND_SIZE);
|
||||||
|
page.setPageNo(1);
|
||||||
|
page.setLastPage(false);
|
||||||
//携带审核状态信息的BaseCfg
|
//携带审核状态信息的BaseCfg
|
||||||
BaseCfg auditBatchCfg=new BaseCfg();
|
BaseCfg auditBatchCfg=new BaseCfg();
|
||||||
//携带审核条件的BaseCfg
|
//携带审核条件的BaseCfg
|
||||||
@@ -2615,7 +2619,7 @@ public class BaseController {
|
|||||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg, cfgIndexList, hasData);
|
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg, cfgIndexList, hasData);
|
||||||
}
|
}
|
||||||
if(hasData) {
|
if(hasData) {
|
||||||
page.setPageNo(1);
|
page.setPageNo(page.getNext());
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
hasData = false;
|
hasData = false;
|
||||||
@@ -2642,7 +2646,7 @@ public class BaseController {
|
|||||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,baseCfgList, hasData);
|
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,baseCfgList, hasData);
|
||||||
}
|
}
|
||||||
if(hasData) {
|
if(hasData) {
|
||||||
page.setPageNo(1);
|
page.setPageNo(page.getNext());
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
hasData = false;
|
hasData = false;
|
||||||
@@ -2669,7 +2673,7 @@ public class BaseController {
|
|||||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgAppList, hasData);
|
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgAppList, hasData);
|
||||||
}
|
}
|
||||||
if(hasData) {
|
if(hasData) {
|
||||||
page.setPageNo(1);
|
page.setPageNo(page.getNext());
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
hasData = false;
|
hasData = false;
|
||||||
@@ -2696,7 +2700,7 @@ public class BaseController {
|
|||||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgFeatrureList, hasData);
|
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgFeatrureList, hasData);
|
||||||
}
|
}
|
||||||
if(hasData) {
|
if(hasData) {
|
||||||
page.setPageNo(1);
|
page.setPageNo(page.getNext());
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
hasData = false;
|
hasData = false;
|
||||||
@@ -2727,20 +2731,26 @@ public class BaseController {
|
|||||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,newList, hasData);
|
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,newList, hasData);
|
||||||
}
|
}
|
||||||
if(hasData) {
|
if(hasData) {
|
||||||
page.setPageNo(1);
|
page.setPageNo(page.getNext());
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
hasData = false;
|
hasData = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//批量下发时,未下发过的app需要下发正常配置;已下发过的app需要下发ip复用配置(为保证事物,分两种方式下发)
|
|
||||||
//1028 app_ip_cfg
|
//1028 app_ip_cfg
|
||||||
|
//TODO 批量审核通过APP IP需要处理的问题:一批中存在一个APP 所有IP均未下发过的问题?待解决
|
||||||
|
//批量下发时,未下发过的app需要下发正常配置;已下发过的app需要下发ip复用配置(为保证事物,分两种方式下发)
|
||||||
if(auditBatchCfg.getServiceId().equals(1028)) {
|
if(auditBatchCfg.getServiceId().equals(1028)) {
|
||||||
if(true) {
|
/*if(true) {
|
||||||
|
page.setOrderBy("");
|
||||||
|
page.setPageSize(Constants.MAAT_JSON_SEND_SIZE);
|
||||||
|
page.setPageNo(1);
|
||||||
|
page.setLastPage(false);
|
||||||
|
|
||||||
boolean hasData = true;
|
boolean hasData = true;
|
||||||
while(hasData){
|
while(hasData){
|
||||||
/************预先获取已下发的groupid和compileid,且每批次重新获取,避免上一批次有新的compileId下发*************/
|
*//************预先获取已下发的groupid和compileid,且每批次重新获取,避免上一批次有新的compileId下发*************//*
|
||||||
Map<Integer, Integer> isIssuedCompileIds=new HashMap<>();
|
Map<Integer, Integer> isIssuedCompileIds=new HashMap<>();
|
||||||
//分组复用组信息1:app ip,2:内容,3:区域 ,4 asn
|
//分组复用组信息1:app ip,2:内容,3:区域 ,4 asn
|
||||||
ConfigGroupInfo groupInfo=new ConfigGroupInfo();
|
ConfigGroupInfo groupInfo=new ConfigGroupInfo();
|
||||||
@@ -2764,7 +2774,7 @@ public class BaseController {
|
|||||||
hasData=configSynchronizationService.auditAppIpData(userRegionList,
|
hasData=configSynchronizationService.auditAppIpData(userRegionList,
|
||||||
page,auditBatchCfg,list,hasData,true);
|
page,auditBatchCfg,list,hasData,true);
|
||||||
if(hasData) {
|
if(hasData) {
|
||||||
page.setPageNo(1);
|
page.setPageNo(page.getNext());
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
hasData = false;
|
hasData = false;
|
||||||
@@ -2775,9 +2785,14 @@ public class BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(auditBatchCfg.getIsValid().equals(1)) {
|
if(auditBatchCfg.getIsValid().equals(1)) {
|
||||||
|
page.setOrderBy("");
|
||||||
|
page.setPageSize(Constants.MAAT_JSON_SEND_SIZE);
|
||||||
|
page.setPageNo(1);
|
||||||
|
page.setLastPage(false);
|
||||||
|
|
||||||
boolean hasData = true;
|
boolean hasData = true;
|
||||||
while(hasData){
|
while(hasData){
|
||||||
/************预先获取未下发的groupid和compileid,********************/
|
*//************预先获取未下发的groupid和compileid,********************//*
|
||||||
//获取已下发的appcompileid
|
//获取已下发的appcompileid
|
||||||
Map<Integer, Integer> notIssuedCompileIds=new HashMap<>();
|
Map<Integer, Integer> notIssuedCompileIds=new HashMap<>();
|
||||||
//分组复用组信息1:app ip,2:内容,3:区域 ,4 asn
|
//分组复用组信息1:app ip,2:内容,3:区域 ,4 asn
|
||||||
@@ -2802,7 +2817,7 @@ public class BaseController {
|
|||||||
hasData=configSynchronizationService.auditAppIpData(userRegionList,
|
hasData=configSynchronizationService.auditAppIpData(userRegionList,
|
||||||
page,auditBatchCfg,list,hasData,true);
|
page,auditBatchCfg,list,hasData,true);
|
||||||
if(hasData) {
|
if(hasData) {
|
||||||
page.setPageNo(1);
|
page.setPageNo(page.getNext());
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
hasData = false;
|
hasData = false;
|
||||||
@@ -2811,7 +2826,7 @@ public class BaseController {
|
|||||||
hasData = false;
|
hasData = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}else {
|
}else {
|
||||||
boolean hasData = true;
|
boolean hasData = true;
|
||||||
while(hasData){
|
while(hasData){
|
||||||
@@ -2851,7 +2866,7 @@ public class BaseController {
|
|||||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,newList, hasData);
|
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,newList, hasData);
|
||||||
}
|
}
|
||||||
if(hasData) {
|
if(hasData) {
|
||||||
page.setPageNo(1);
|
page.setPageNo(page.getNext());
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
hasData = false;
|
hasData = false;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
from config_group_info
|
from config_group_info
|
||||||
where group_type =#{groupType}
|
where group_type =#{groupType}
|
||||||
</select>
|
</select>
|
||||||
<select id="findAllListByGroupIno" resultMap="configGroupInfoMap">
|
<select id="findAllListByGroupInfo" resultMap="configGroupInfoMap">
|
||||||
select
|
select
|
||||||
<include refid="columns"></include>
|
<include refid="columns"></include>
|
||||||
from config_group_info
|
from config_group_info
|
||||||
|
|||||||
@@ -42,6 +42,12 @@ $(function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//不可见字符校验[内含字符大小校验]
|
||||||
|
if(flag){
|
||||||
|
flag=validateInvisibleCharTag();
|
||||||
|
}
|
||||||
|
|
||||||
if(flag){
|
if(flag){
|
||||||
$("input[name$='exprType']").attr("disabled",false);
|
$("input[name$='exprType']").attr("disabled",false);
|
||||||
$("#appCode").val($("#specServiceIdId").val());
|
$("#appCode").val($("#specServiceIdId").val());
|
||||||
|
|||||||
@@ -42,6 +42,11 @@ $(function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//不可见字符校验[内含字符大小校验]
|
||||||
|
if(flag){
|
||||||
|
flag=validateInvisibleCharTag();
|
||||||
|
}
|
||||||
|
|
||||||
if(flag){
|
if(flag){
|
||||||
$("input[name$='exprType']").attr("disabled",false);
|
$("input[name$='exprType']").attr("disabled",false);
|
||||||
$("#appCode").val($("#specServiceIdId").val());
|
$("#appCode").val($("#specServiceIdId").val());
|
||||||
|
|||||||
@@ -128,6 +128,12 @@ $(function(){
|
|||||||
$("div[for=upBoundary]").html("<label for=\"upBoundary\" class=\"error\" id=\"upBoundary-error\">"+message+"</label>");
|
$("div[for=upBoundary]").html("<label for=\"upBoundary\" class=\"error\" id=\"upBoundary-error\">"+message+"</label>");
|
||||||
flag=false;
|
flag=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//不可见字符校验[内含字符大小校验]
|
||||||
|
if(flag){
|
||||||
|
flag=validateInvisibleCharTag();
|
||||||
|
}
|
||||||
|
|
||||||
if(flag){
|
if(flag){
|
||||||
//将disable属性的元素删除
|
//将disable属性的元素删除
|
||||||
$(".disabled").each(function(){
|
$(".disabled").each(function(){
|
||||||
|
|||||||
@@ -80,6 +80,12 @@ $(function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//不可见字符校验[内含字符大小校验]
|
||||||
|
if(flag){
|
||||||
|
flag=validateInvisibleCharTag();
|
||||||
|
}
|
||||||
|
|
||||||
if(flag){
|
if(flag){
|
||||||
//将disable属性的元素删除
|
//将disable属性的元素删除
|
||||||
$(".disabled").each(function(){
|
$(".disabled").each(function(){
|
||||||
|
|||||||
@@ -42,6 +42,12 @@ $(function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//不可见字符校验[内含字符大小校验]
|
||||||
|
if(flag){
|
||||||
|
flag=validateInvisibleCharTag();
|
||||||
|
}
|
||||||
|
|
||||||
if(flag){
|
if(flag){
|
||||||
$("input[name$='exprType']").attr("disabled",false);
|
$("input[name$='exprType']").attr("disabled",false);
|
||||||
$("#appCode").val($("#specServiceIdId").val());
|
$("#appCode").val($("#specServiceIdId").val());
|
||||||
|
|||||||
@@ -1521,18 +1521,15 @@ var validateTagInputKeyword=function(){
|
|||||||
}
|
}
|
||||||
var validCharLength=function(){
|
var validCharLength=function(){
|
||||||
var flag=true;
|
var flag=true;
|
||||||
$(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
|
$(".tagsinput:visible").each(function(){
|
||||||
var value=$(this).val()
|
var text='';
|
||||||
if(value!=''){
|
$(this).find(".tag").each(function(){
|
||||||
value=value.replace("***and***","");
|
text+=$(this).children("span").text().trim();
|
||||||
if(value.length < 4 || value.length > 1024){
|
});
|
||||||
$(this).parents(".form-group").find(
|
if(text.length < 4 || text.length > 1024){
|
||||||
"div[for='"
|
$(this).parents(".col-md-6").next("div").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
|
||||||
+ $(this).attr("name")
|
if(flag){
|
||||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
|
flag=false;
|
||||||
if(flag){
|
|
||||||
flag=false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1540,23 +1537,32 @@ var validCharLength=function(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
var validateInvisibleCharTag=function(){
|
var validateInvisibleCharTag=function(){
|
||||||
var hasInvisibleCharTags=[];
|
var flag=true;
|
||||||
var reg = new RegExp(/\t|\r|\n/);
|
var reg = new RegExp(/\t|\r|\n/);
|
||||||
$(".tagsinput").find(".tag").each(function(){
|
$(".tagsinput:visible").each(function(){
|
||||||
var text=$(this).children("span").text();
|
var hasInvisibleCharTags=[];
|
||||||
if (text.match(reg)) {
|
$(this).find(".tag").each(function(){
|
||||||
hasInvisibleCharTags.push("'"+text.trim()+"'");
|
var text=$(this).children("span").text().trim();
|
||||||
|
if (text.match(reg)) {
|
||||||
|
hasInvisibleCharTags.push("'"+text+"'");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if(hasInvisibleCharTags.length==1){
|
||||||
|
$(this).parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.hasInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>");
|
||||||
|
if(flag){
|
||||||
|
flag= false;
|
||||||
|
}
|
||||||
|
}else if(hasInvisibleCharTags.length>=1){
|
||||||
|
$(this).parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.haveInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>");
|
||||||
|
if(flag){
|
||||||
|
flag= false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(hasInvisibleCharTags.length==1){
|
if(flag){
|
||||||
$(".tagsinput").parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.hasInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>");
|
flag=validCharLength();
|
||||||
return false;
|
|
||||||
}else if(hasInvisibleCharTags.length>=1){
|
|
||||||
$(".tagsinput").parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.haveInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>");
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
var charLengthValid=validCharLength();
|
return flag;
|
||||||
return charLengthValid;
|
|
||||||
}
|
}
|
||||||
var setHexCaseSenstive=function(){
|
var setHexCaseSenstive=function(){
|
||||||
$("input[name$='configHex']").each(function(){
|
$("input[name$='configHex']").each(function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user