IP配置导出提交
This commit is contained in:
@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.callback.InlineIp;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
@@ -161,8 +162,18 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(cfg, maatCfg);
|
||||
String json="";
|
||||
if(cfg.getIsAudit()==1){
|
||||
if(Constants.SERVICE_IP_MULITIPLEX!=cfg.getServiceId().intValue() &&(Constants.DROP_ACTION==cfg.getAction()||Constants.LOOP_ACTION==cfg.getAction())){
|
||||
//获取region
|
||||
List<FunctionRegionDict> dictList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId());
|
||||
int maatType=0;
|
||||
//判断下发类型是走maat还是callback
|
||||
for(FunctionRegionDict f:dictList){
|
||||
if(f.getCfgRegionCode().intValue()==cfg.getCfgRegionCode()){
|
||||
maatType=f.getIsMaat();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(cfg.getIsAudit()==Constants.AUDIT_YES){
|
||||
if(maatType==Constants.CALLBACK_TYPE){
|
||||
List<InlineIp> ipList=new ArrayList<>();
|
||||
InlineIp ip=convertCallBackIp(cfg,null);
|
||||
ipList.add(ip);
|
||||
@@ -179,7 +190,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
logger.error("IP配置配置下发失败",e);
|
||||
throw e;
|
||||
}
|
||||
}else{
|
||||
}else if(maatType==Constants.MAAT_TYPE){
|
||||
Map<String,List> map = cfgConvert(ipRegionList,beans,1,cfg,groupRelationList);
|
||||
ipRegionList=map.get("dstList");
|
||||
groupRelationList=map.get("groupList");
|
||||
@@ -225,7 +236,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}else if(cfg.getIsAudit()==3){
|
||||
}else if(cfg.getIsAudit()==Constants.AUDIT_NOT_YET){
|
||||
if(Constants.DROP_ACTION==cfg.getAction()||Constants.LOOP_ACTION==cfg.getAction()){
|
||||
List<InlineIp> ipList=new ArrayList<>();
|
||||
InlineIp ip=convertCallBackIp(cfg,null);
|
||||
@@ -441,4 +452,19 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
}
|
||||
return compileId;
|
||||
}
|
||||
/**
|
||||
* getListByCfgIdWithName(这里用一句话描述这个方法的作用)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param tablename
|
||||
* @param functionId
|
||||
* @param ids
|
||||
* @return
|
||||
*List<BaseIpCfg>
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public List<BaseIpCfg> getListByCfgIdWithName(String tablename, Integer functionId, String ids) {
|
||||
// TODO Auto-generated method stub
|
||||
return ipCfgDao.getListByCfgIdWithName(tablename,functionId,ids);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user