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

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

@ -33,8 +33,6 @@ public class TerminalExtServiceImpl implements TerminalExtService {
@Resource
ActivitiesService activitiesService;
@Resource
NewCacheService cacheService;
@Resource
UserService userService;
@Resource
View_Dy_Line_Tower_TerminalsDao viewDyLineTowerTerminalsDao;
@ -53,8 +51,8 @@ public class TerminalExtServiceImpl implements TerminalExtService {
if (vo.getCmdidExclude() == null) {
vo.setCmdidExclude(false);
}
if (vo.getBsIdentifierExclude() == null) {
vo.setBsIdentifierExclude(false);
if (vo.getOidExclude() == null) {
vo.setOidExclude(false);
}
PermissionDetail permit = userService.getPermissionListFull();
@ -83,13 +81,6 @@ public class TerminalExtServiceImpl implements TerminalExtService {
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) {
criteria.andDevTypeLike("%" + vo.getDevType() + "%");
}
@ -170,9 +161,4 @@ public class TerminalExtServiceImpl implements TerminalExtService {
}
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);
Terminals getByCmdid(String cmdid);
Terminals getById(Integer id);
}

Loading…
Cancel
Save