Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into develop

This commit is contained in:
DuanDongmei
2018-12-03 16:38:38 +08:00
20 changed files with 170 additions and 91 deletions

View File

@@ -176,9 +176,9 @@ public class IpAddrPoolCfgService extends BaseService{
}
IpCfg c = cfgs.get(0);
ip.setRegionId(ipcfg.getCompileId());
//ip.setGroupId(ipcfg.getCompileId());
ip.setGroupId(cfg.getCfgId());
ip.setAddrType(ipcfg.getIpType());
ip.setSrcIp(c.getSrcIp());
ip.setMaskSrcIp(c.getSrcIpMask());
ip.setSrcPort(c.getSrcPort());
@@ -190,13 +190,12 @@ public class IpAddrPoolCfgService extends BaseService{
ip.setProtocol(ipcfg.getProtocol());
ip.setDirection(ipcfg.getDirection());
ip.setAddrPoolId(cfg.getCfgId());
ip.setIsValid(cfg.getIsValid());
ip.setAction(ipcfg.getAction());
ip.setService(ipcfg.getServiceId());
ip.setAddrPoolId(cfg.getCfgId());
ip.setAreaEffectiveIds(cfg.getAreaEffectiveIds());//添加区域管控
ip.setOpTime(auditTime);
//ip.setAreaEffectiveIds(cfg.getAreaEffectiveIds());//添加区域管控
resStrategyList.add(ip);
}
//调用服务接口下发配置数据
@@ -224,7 +223,9 @@ public class IpAddrPoolCfgService extends BaseService{
}
IpCfg c = cfgs.get(0);
ip.setRegionId(ipcfg.getCompileId());
ip.setGroupId(cfg.getCfgId());
ip.setAddrType(ipcfg.getIpType());
ip.setSrcIp(c.getSrcIp());
ip.setMaskSrcIp(c.getSrcIpMask());
ip.setSrcPort(c.getSrcPort());
@@ -235,12 +236,13 @@ public class IpAddrPoolCfgService extends BaseService{
ip.setMaskDstPort(c.getDstPortMask());
ip.setProtocol(ipcfg.getProtocol());
ip.setDirection(ipcfg.getDirection());
ip.setAddrPoolId(cfg.getCfgId());
ip.setIsValid(cfg.getIsValid());
ip.setAction(ipcfg.getAction());
ip.setService(ipcfg.getServiceId());
ip.setAddrPoolId(cfg.getCfgId());
ip.setAreaEffectiveIds(cfg.getAreaEffectiveIds());
ip.setOpTime(auditTime);
//ip.setAreaEffectiveIds(cfg.getAreaEffectiveIds());
resStrategyList.add(ip);
}
//调用服务接口取消配置

View File

@@ -40,7 +40,7 @@ public class IpMultiplexService extends BaseService{
}
public IpReusePolicyCfg getPolicyCfg(Long cfgId, Integer isValid) {
List<IpReusePolicyCfg> list=ipMultiplexDao.findList(cfgId,isValid,null);
List<IpReusePolicyCfg> list=ipMultiplexDao.findList(cfgId,isValid);
IpReusePolicyCfg policyCfg=null;
if(list != null && list.size()>0){
policyCfg=list.get(0);
@@ -119,6 +119,7 @@ public class IpMultiplexService extends BaseService{
cfg.setIsAudit(isAudit);
cfg.setAuditorId(UserUtils.getUser().getId());
cfg.setAuditTime(auditTime);
cfg.setDoLog(null);;
ipMultiplexDao.updatePolicyCfg(cfg);
SysDictInfoService sysDictInfoService = SpringContextHolder.getBean(SysDictInfoService.class);
@@ -126,16 +127,20 @@ public class IpMultiplexService extends BaseService{
cfg = this.getPolicyCfg(cfg.getCfgId(), null);
String json="";
if(cfg.getIsAudit() == Constants.AUDIT_YES){
String areaEffectiveIds = cfg.getIsAreaEffective() == 1?sysDictInfoService.setEffectiveRange(cfg.getAreaEffectiveIds()):"0";
Map<String, Object> params = new HashMap<String,Object>();
params.put("configId", cfg.getCompileId());
params.put("addrPoolId", cfg.getAddrPoolId());
params.put("userType", cfg.getUserType());
params.put("userId", cfg.getUserId());
params.put("doLog", cfg.getDoLog());
params.put("action", cfg.getAction());
params.put("service", cfg.getServiceId());
params.put("isValid", 1);
params.put("opTime", auditTime);
if(cfg.getIsAreaEffective() == 1){
params.put("effectiveRange", sysDictInfoService.setEffectiveRange(cfg.getAreaEffectiveIds()));
}
params.put("translateParam", "byconn=10");
params.put("effectiveRange", areaEffectiveIds);
List list = Lists.newArrayList();
list.add(params);
//调用服务接口下发配置数据
@@ -153,16 +158,20 @@ public class IpMultiplexService extends BaseService{
}
}else if(cfg.getIsAudit() == Constants.AUDIT_NOT_YES){
String areaEffectiveIds = cfg.getIsAreaEffective() == 1?sysDictInfoService.setEffectiveRange(cfg.getAreaEffectiveIds()):"0";
Map<String, Object> params = new HashMap<String,Object>();
params.put("configId", cfg.getCompileId());
params.put("addrPoolId", cfg.getAddrPoolId());
params.put("userType", cfg.getUserType());
params.put("userId", cfg.getUserId());
params.put("doLog", cfg.getDoLog());
params.put("action", cfg.getAction());
params.put("service", cfg.getServiceId());
params.put("isValid", 0);
params.put("opTime", auditTime);
if(cfg.getIsAreaEffective() == 1){
params.put("effectiveRange", sysDictInfoService.setEffectiveRange(cfg.getAreaEffectiveIds()));
}
params.put("translateParam", "byconn=10");
params.put("effectiveRange", areaEffectiveIds);
List list = Lists.newArrayList();
list.add(params);
//调用服务接口取消配置