fix: 调整oid参数

dev
huangfeng 1 year ago
parent e38015e53a
commit 8385372492

@ -361,9 +361,8 @@ public class MntnStatus {
public HashMap<String, Object> match(TerminalSelectVo vo) { public HashMap<String, Object> match(TerminalSelectVo vo) {
HashMap<String, Object> map = this.makeRawReport(); HashMap<String, Object> map = this.makeRawReport();
if (map != null) { if (map != null) {
if (StringUtils.isNotBlank(vo.getVersion()) && StringUtils.isNotBlank(vo.getCma())) { if (StringUtils.isNotBlank(vo.getVersion())) {
int v = 0; int v = 0;
int c = 0;
Iterator<String> it = map.keySet().iterator(); Iterator<String> it = map.keySet().iterator();
while (it.hasNext()) { while (it.hasNext()) {
String key = it.next(); String key = it.next();
@ -371,76 +370,62 @@ public class MntnStatus {
if (key.toLowerCase().contains("version")) { if (key.toLowerCase().contains("version")) {
if (value.toString().contains(vo.getVersion())) { if (value.toString().contains(vo.getVersion())) {
v = 1; v = 1;
} break;
}
if (key.toLowerCase().contains("cma")) {
if (value.toString().contains(vo.getVersion())) {
c = 1;
} }
} }
} }
if (vo.getVersionExclude()) { if (vo.getVersionExclude()) {
if (vo.getCmaExclude()) { if (v == 0) {
if (v == 0 && c == 0) { return map;
return map;
}
} else {
if (v == 0 && c == 1) {
return map;
}
} }
} else { } else {
if (vo.getCmaExclude()) { if (v == 1) {
if (v == 1 && c == 0) { return map;
return map;
}
} else {
if (v == 1 && c == 1) {
return map;
}
} }
} }
} else if (StringUtils.isNotBlank(vo.getVersion())) { }
int v = 0; if (StringUtils.isNotBlank(vo.getCma())) {
int c = 0;
Iterator<String> it = map.keySet().iterator(); Iterator<String> it = map.keySet().iterator();
while (it.hasNext()) { while (it.hasNext()) {
String key = it.next(); String key = it.next();
Object value = map.get(key); Object value = map.get(key);
if (key.toLowerCase().contains("version")) { if (key.toLowerCase().contains("cma")) {
if (value.toString().contains(vo.getVersion())) { if (value.toString().contains(vo.getCma())) {
v = 1; c = 1;
break; break;
} }
} }
} }
if (vo.getVersionExclude()) { if (vo.getCmaExclude()) {
if (v == 0) { if (c == 0) {
return map; return map;
} }
} else { } else {
if (v == 1) { if (c == 1) {
return map; return map;
} }
} }
} else if (StringUtils.isNotBlank(vo.getCma())) { }
int c = 0; if (StringUtils.isNotBlank(vo.getOid())) {
int d = 0;
Iterator<String> it = map.keySet().iterator(); Iterator<String> it = map.keySet().iterator();
while (it.hasNext()) { while (it.hasNext()) {
String key = it.next(); String key = it.next();
Object value = map.get(key); Object value = map.get(key);
if (key.toLowerCase().contains("cma")) { if (key.toLowerCase().contains("oid")) {
if (value.toString().contains(vo.getCma())) { if (value.toString().contains(vo.getCma())) {
c = 1; d = 1;
break; break;
} }
} }
} }
if (vo.getCmaExclude()) { if (vo.getOidExclude()) {
if (c == 0) { if (d == 0) {
return map; return map;
} }
} else { } else {
if (c == 1) { if (d == 1) {
return map; return map;
} }
} }

@ -48,8 +48,8 @@ public class TerminalSelectVo {
private Boolean cmdidExclude; private Boolean cmdidExclude;
private String version; private String version;
private Boolean versionExclude; private Boolean versionExclude;
private String bsIdentifier; private String oid;
private Boolean bsIdentifierExclude; private Boolean oidExclude;
private Integer activityId; private Integer activityId;
private Integer mntn; private Integer mntn;
@ -60,6 +60,9 @@ public class TerminalSelectVo {
if (StringUtils.isNotBlank(cma)) { if (StringUtils.isNotBlank(cma)) {
return true; return true;
} }
if (StringUtils.isNotBlank(oid)) {
return true;
}
return false; return false;
} }
} }

@ -33,8 +33,6 @@ public class TerminalExtServiceImpl implements TerminalExtService {
@Resource @Resource
ActivitiesService activitiesService; ActivitiesService activitiesService;
@Resource @Resource
NewCacheService cacheService;
@Resource
UserService userService; UserService userService;
@Resource @Resource
View_Dy_Line_Tower_TerminalsDao viewDyLineTowerTerminalsDao; View_Dy_Line_Tower_TerminalsDao viewDyLineTowerTerminalsDao;
@ -53,8 +51,8 @@ public class TerminalExtServiceImpl implements TerminalExtService {
if (vo.getCmdidExclude() == null) { if (vo.getCmdidExclude() == null) {
vo.setCmdidExclude(false); vo.setCmdidExclude(false);
} }
if (vo.getBsIdentifierExclude() == null) { if (vo.getOidExclude() == null) {
vo.setBsIdentifierExclude(false); vo.setOidExclude(false);
} }
PermissionDetail permit = userService.getPermissionListFull(); PermissionDetail permit = userService.getPermissionListFull();
@ -83,13 +81,6 @@ public class TerminalExtServiceImpl implements TerminalExtService {
criteria.andCmdidLike("%" + vo.getCmdid() + "%"); criteria.andCmdidLike("%" + vo.getCmdid() + "%");
} }
} }
if (StringUtils.isNotBlank(vo.getBsIdentifier())) {
if (vo.getBsIdentifierExclude()) {
criteria.andBsIdentifierNotLike("%" + vo.getBsIdentifier() + "%");
} else {
criteria.andBsIdentifierLike("%" + vo.getBsIdentifier() + "%");
}
}
if (vo.getDevType() != null && vo.getDevType() > 0) { if (vo.getDevType() != null && vo.getDevType() > 0) {
criteria.andDevTypeLike("%" + vo.getDevType() + "%"); criteria.andDevTypeLike("%" + vo.getDevType() + "%");
} }
@ -170,9 +161,4 @@ public class TerminalExtServiceImpl implements TerminalExtService {
} }
return null; return null;
} }
@Override
public Terminals getById(Integer id) {
return terminalsDao.selectByPrimaryKey(id);
}
} }

@ -11,6 +11,4 @@ public interface TerminalExtService {
List<View_Dy_Line_Tower_Terminals> getExtTerminalList(TerminalSelectVo vo); List<View_Dy_Line_Tower_Terminals> getExtTerminalList(TerminalSelectVo vo);
Terminals getByCmdid(String cmdid); Terminals getByCmdid(String cmdid);
Terminals getById(Integer id);
} }

Loading…
Cancel
Save