默认2个终端

This commit is contained in:
ZZ 2021-12-21 15:15:09 +08:00
parent 69a0671e8e
commit 8926510f78

View File

@ -287,14 +287,14 @@ public class QueryStationsInfoController {
List<ConnectorInfo> connectorInfoList = new ArrayList<>();
Integer gunNumCache = (Integer) cachePile.get("gunNum");
gunNumCache = gunNumCache == null ? 1 : gunNumCache;
gunNumCache = gunNumCache == null ? 2 : gunNumCache;
for (int i = 1; i <= gunNumCache; i++) {
String gunId = pileNo.concat(String.format("%02d", i));
ConnectorInfo connectorInfo = new ConnectorInfo();
connectorInfo.setConnectorID(gunId);
String connectorName = REDIS.getCacheMapValue("gun:".concat(gunId), "terminalName"); //todo set them in redis!
connectorInfo.setConnectorName(connectorName == null ?
Integer.parseInt(pileNo.substring(10, 14)) + "号桩 " + GUNNAMES[i] +
Integer.parseInt(pileNo.substring(10, 14)) + "号桩-" + GUNNAMES[i] +
"" : connectorName);
Integer connectorType = (Integer) cachePile.get("connectorType");
connectorInfo.setConnectorType(connectorType == null ? 4 : connectorType);