1月16号之前的asn版本修改组织输入为asn 号输入
This commit is contained in:
@@ -155,14 +155,11 @@ public class AsnGroupController extends BaseController {
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = {"/checkAsnNo"})
|
||||
public boolean checkIp(AsnGroupInfo cfg, HttpServletRequest request, HttpServletResponse response){
|
||||
public AsnGroupInfo checkIp(AsnGroupInfo cfg, HttpServletRequest request, HttpServletResponse response){
|
||||
|
||||
AsnGroupInfo policyGroup = asnGroupInfoService.getInfoByAsnNo(cfg);
|
||||
if(policyGroup == null){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return policyGroup;
|
||||
}
|
||||
/**
|
||||
* 校验asn号是否已存在
|
||||
|
||||
@@ -165,9 +165,11 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
}
|
||||
}
|
||||
if(regionDict!=null) {
|
||||
String org=entity.getUserRegion4();
|
||||
List<AsnGroupInfo> asnGroupInfos=asnGroupInfoDao.getValidConfigGroupInfoByName(org);
|
||||
for(AsnGroupInfo info:asnGroupInfos) {
|
||||
AsnGroupInfo asnSearch=new AsnGroupInfo();
|
||||
asnSearch.setOrganization(entity.getUserRegion4());
|
||||
asnSearch.setAsnId(Long.valueOf(entity.getUserRegion5()));
|
||||
AsnGroupInfo info=asnGroupInfoDao.getGroupInfo(asnSearch);
|
||||
if(info != null){
|
||||
BaseStringCfg<AsnKeywordCfg> asnKeywordCfg=new AsnKeywordCfg();
|
||||
BeanUtils.copyProperties(entity, asnKeywordCfg,new String[]{"cfgId","cfgDesc","cfgRegionCode","cfgType","userRegion1","userRegion2","userRegion3"});
|
||||
asnKeywordCfg.setTableName(AsnKeywordCfg.getTablename());
|
||||
@@ -233,10 +235,12 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
}
|
||||
if(regionDict!=null) {
|
||||
//先删除asn keyword
|
||||
String org=entity.getUserRegion4();
|
||||
stringCfgDao.deleteAsnKeyword(entity);
|
||||
List<AsnGroupInfo> asnGroupInfos=asnGroupInfoDao.getValidConfigGroupInfoByName(org);
|
||||
for(AsnGroupInfo info:asnGroupInfos) {
|
||||
AsnGroupInfo asnSearch=new AsnGroupInfo();
|
||||
asnSearch.setOrganization(entity.getUserRegion4());
|
||||
asnSearch.setAsnId(Long.valueOf(entity.getUserRegion5()));
|
||||
AsnGroupInfo info=asnGroupInfoDao.getGroupInfo(asnSearch);
|
||||
if(info != null){
|
||||
BaseStringCfg<AsnKeywordCfg> asnKeywordCfg=new AsnKeywordCfg();
|
||||
BeanUtils.copyProperties(entity, asnKeywordCfg,new String[]{"cfgId","cfgDesc","cfgRegionCode","cfgType","userRegion1","userRegion2","userRegion3"});
|
||||
asnKeywordCfg.setTableName(AsnKeywordCfg.getTablename());
|
||||
|
||||
Reference in New Issue
Block a user