asn ip去掉导入模板中的cfgDesc
; 修复主表中未存储commonGroupIds的bug; asn ip导入时,asn_group_info的regionid
This commit is contained in:
@@ -13,7 +13,7 @@ public class AsnIpTemplate extends BasicTemplate{
|
|||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private String cfgDesc;
|
/*private String cfgDesc;*/
|
||||||
private String userRegion1;
|
private String userRegion1;
|
||||||
private String destIpAddress;
|
private String destIpAddress;
|
||||||
private String organization;
|
private String organization;
|
||||||
@@ -21,12 +21,12 @@ public class AsnIpTemplate extends BasicTemplate{
|
|||||||
private String detail;
|
private String detail;
|
||||||
|
|
||||||
// @ExcelField(title="config_describe",align=2,sort=1)
|
// @ExcelField(title="config_describe",align=2,sort=1)
|
||||||
public String getCfgDesc() {
|
/*public String getCfgDesc() {
|
||||||
return cfgDesc;
|
return cfgDesc;
|
||||||
}
|
}
|
||||||
public void setCfgDesc(String cfgDesc) {
|
public void setCfgDesc(String cfgDesc) {
|
||||||
this.cfgDesc = cfgDesc;
|
this.cfgDesc = cfgDesc;
|
||||||
}
|
}*/
|
||||||
@ExcelField(title="asn_no",align=2,sort=11)
|
@ExcelField(title="asn_no",align=2,sort=11)
|
||||||
public String getUserRegion1() {
|
public String getUserRegion1() {
|
||||||
return userRegion1;
|
return userRegion1;
|
||||||
@@ -42,7 +42,7 @@ public class AsnIpTemplate extends BasicTemplate{
|
|||||||
public void setDestIpAddress(String destIpAddress) {
|
public void setDestIpAddress(String destIpAddress) {
|
||||||
this.destIpAddress = destIpAddress;
|
this.destIpAddress = destIpAddress;
|
||||||
}
|
}
|
||||||
@ExcelField(title="asn_name",align=2,sort=1)
|
@ExcelField(title="organization",align=2,sort=1)
|
||||||
public String getOrganization() {
|
public String getOrganization() {
|
||||||
return organization;
|
return organization;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2982,7 +2982,7 @@ public abstract class BaseService {
|
|||||||
if(!StringUtil.isEmpty(commonGroupIds)){
|
if(!StringUtil.isEmpty(commonGroupIds)){
|
||||||
commonGroupIds=commonGroupIds.substring(0, commonGroupIds.length()-1);
|
commonGroupIds=commonGroupIds.substring(0, commonGroupIds.length()-1);
|
||||||
}
|
}
|
||||||
entity.setCommonGroupIds(commonGroupIds);
|
/*entity.setCommonGroupIds(commonGroupIds);*/
|
||||||
//return entity;
|
//return entity;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -3031,6 +3031,12 @@ public abstract class BaseService {
|
|||||||
AsnKeywordCfg asnCfg=new AsnKeywordCfg();
|
AsnKeywordCfg asnCfg=new AsnKeywordCfg();
|
||||||
BeanUtils.copyProperties(entity, asnCfg,new String[]{"cfgId","userReigon1","userReigon2","userReigon3","userReigon4","userReigon5"});
|
BeanUtils.copyProperties(entity, asnCfg,new String[]{"cfgId","userReigon1","userReigon2","userReigon3","userReigon4","userReigon5"});
|
||||||
asnCfg.setTableName(AsnKeywordCfg.getTablename());
|
asnCfg.setTableName(AsnKeywordCfg.getTablename());
|
||||||
|
asnCfg.setCfgId(asnKeywordCfg.getCfgId());
|
||||||
|
asnCfg.setUserRegion1(asnKeywordCfg.getUserRegion1());
|
||||||
|
asnCfg.setUserRegion2(asnKeywordCfg.getUserRegion2());
|
||||||
|
asnCfg.setUserRegion3(asnKeywordCfg.getUserRegion3());
|
||||||
|
asnCfg.setUserRegion4(asnKeywordCfg.getUserRegion4());
|
||||||
|
asnCfg.setUserRegion5(asnKeywordCfg.getUserRegion5());
|
||||||
stringCfgDao.updateAsnKeyword(asnCfg);
|
stringCfgDao.updateAsnKeyword(asnCfg);
|
||||||
}
|
}
|
||||||
//3、//根据asnGroupIdList查询所有下发过的ASN NO
|
//3、//根据asnGroupIdList查询所有下发过的ASN NO
|
||||||
@@ -3083,9 +3089,13 @@ public abstract class BaseService {
|
|||||||
asnGroupInfoDao.updateIsUsedAndIsValid(notAuditGroupIdList,1,null);
|
asnGroupInfoDao.updateIsUsedAndIsValid(notAuditGroupIdList,1,null);
|
||||||
}
|
}
|
||||||
//6、标记组已被策略标记为全部下发
|
//6、标记组已被策略标记为全部下发
|
||||||
configGroupInfoDao.updateIsAuditAll(4, 1,signAuditAllGroupList );
|
if(!StringUtil.isEmpty(signAuditAllGroupList)){
|
||||||
|
configGroupInfoDao.updateIsAuditAll(4, 1,signAuditAllGroupList );
|
||||||
|
}
|
||||||
//7、标记组已被策略引用
|
//7、标记组已被策略引用
|
||||||
configGroupInfoDao.updateIsUsed(4, 1, isUsedGroupIdList);
|
if(!StringUtil.isEmpty(isUsedGroupIdList)){
|
||||||
|
configGroupInfoDao.updateIsUsed(4, 1, isUsedGroupIdList);
|
||||||
|
}
|
||||||
//8、maat配置转换
|
//8、maat配置转换
|
||||||
if(!StringUtil.isEmpty(newAsnList)){
|
if(!StringUtil.isEmpty(newAsnList)){
|
||||||
Map<String,List> map = cfgConvert(strRegionList,newAsnList,7,entity,groupRelationList);
|
Map<String,List> map = cfgConvert(strRegionList,newAsnList,7,entity,groupRelationList);
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
if(!asnNoMap.isEmpty()) {
|
if(!asnNoMap.isEmpty()) {
|
||||||
List<Integer> compileIds=ConfigServiceUtil.getId(1, asnNoMap.size());
|
List<Integer> compileIds=ConfigServiceUtil.getId(1, asnNoMap.size());
|
||||||
List<Integer> groupIds=ConfigServiceUtil.getId(2, asnNoMap.size());
|
List<Integer> groupIds=ConfigServiceUtil.getId(2, asnNoMap.size());
|
||||||
|
List<Integer> regionIds=ConfigServiceUtil.getId(3, asnNoMap.size());
|
||||||
for(Entry<Long, AsnGroupInfo> e:asnNoMap.entrySet()) {
|
for(Entry<Long, AsnGroupInfo> e:asnNoMap.entrySet()) {
|
||||||
AsnGroupInfo info=e.getValue();
|
AsnGroupInfo info=e.getValue();
|
||||||
info.setAsnId(e.getKey());
|
info.setAsnId(e.getKey());
|
||||||
@@ -189,6 +190,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
info.setCreateTime(createTime);
|
info.setCreateTime(createTime);
|
||||||
info.setGroupId(groupIds.get(index));
|
info.setGroupId(groupIds.get(index));
|
||||||
info.setCompileId(compileIds.get(index));
|
info.setCompileId(compileIds.get(index));
|
||||||
|
info.setRegionId(regionIds.get(index));
|
||||||
if(!groupSet.contains(info.getOrganization())) {
|
if(!groupSet.contains(info.getOrganization())) {
|
||||||
groupSet.add(info.getOrganization());
|
groupSet.add(info.getOrganization());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user