Compare commits
22 Commits
68ed33df5f
...
0e125915b6
| Author | SHA1 | Date |
|---|---|---|
|
|
0e125915b6 | 3 days ago |
|
|
3a553d9c80 | 6 days ago |
|
|
ad8d33ecf6 | 2 weeks ago |
|
|
dd492aab71 | 2 weeks ago |
|
|
11fe9b9a29 | 2 weeks ago |
|
|
2d255c4b64 | 2 weeks ago |
|
|
e5960d9c56 | 2 weeks ago |
|
|
5b26606574 | 2 weeks ago |
|
|
14f8dcb5dd | 2 weeks ago |
|
|
d63db1cdff | 2 weeks ago |
|
|
e0805c3d00 | 2 weeks ago |
|
|
89ed2b5c31 | 2 weeks ago |
|
|
139e804ecc | 2 weeks ago |
|
|
936a5ff887 | 3 weeks ago |
|
|
505d3f4343 | 3 weeks ago |
|
|
444c9768b7 | 3 weeks ago |
|
|
46706a66b9 | 3 weeks ago |
|
|
8456e026dc | 3 weeks ago |
|
|
b36b66c374 | 3 weeks ago |
|
|
83cee29c0e | 3 weeks ago |
|
|
1564dba1cb | 3 weeks ago |
|
|
2e643b3ff4 | 4 weeks ago |
35 changed files with 423 additions and 74 deletions
@ -0,0 +1,7 @@ |
|||||
|
aws configure set aws_access_key_id AKIAR26KHSVRUEAKRBPZ |
||||
|
aws configure set aws_secret_access_key wmMPx9vypaNi5ZIlyz4c018hKCb2M1dnGBdA+oh2 |
||||
|
aws configure set default.region ap-northeast-1 |
||||
|
aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com |
||||
|
docker build -t 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com/aeon-prod/spf-business:latest --build-arg JAR_FILE=target/data-center-business-controller-0.0.1-SNAPSHOT.jar --build-arg LIB_DIR=target/lib --build-arg CONFIG_DIR=target/config . |
||||
|
docker push 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com/aeon-prod/spf-business:latest |
||||
|
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,37 @@ |
|||||
|
package com.techsor.datacenter.business.dto.gateway; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class GatewayClientsQueryResponse { |
||||
|
|
||||
|
private Long id; |
||||
|
|
||||
|
private String clientId; |
||||
|
|
||||
|
private String clientName; |
||||
|
|
||||
|
private Integer onlineStatus; |
||||
|
|
||||
|
private Long lastUpdataTs; |
||||
|
|
||||
|
private Long createTs; |
||||
|
|
||||
|
private String address; |
||||
|
|
||||
|
private Integer dataAmountThreshold; |
||||
|
|
||||
|
private Boolean dataAmountThresholdAlarm; |
||||
|
|
||||
|
private String companyId; |
||||
|
|
||||
|
private Boolean alertSwitch; |
||||
|
|
||||
|
private String projectId; |
||||
|
|
||||
|
private String buildingId; |
||||
|
|
||||
|
private String projectName; |
||||
|
|
||||
|
private String buildingName; |
||||
|
} |
||||
@ -0,0 +1,110 @@ |
|||||
|
package com.techsor.datacenter.business.entity.ioserver; |
||||
|
|
||||
|
import java.util.regex.Matcher; |
||||
|
import java.util.regex.Pattern; |
||||
|
|
||||
|
public class IoserverDeviceIdEntity { |
||||
|
// 定义正则表达式模式
|
||||
|
private static final String DEVICE_ID_PATTERN = "^([A-Z]+)_([A-Z]+)_(\\d{4})_(\\w+)_(\\d+)(?:_S)?$"; |
||||
|
private static final Pattern PATTERN = Pattern.compile(DEVICE_ID_PATTERN); |
||||
|
|
||||
|
/** |
||||
|
* 解析设备ID格式 |
||||
|
* 格式: [物件Initial]_[设备分类]_[BA Device Instance]_[ObjectType, Instance]_[Property][_S(sub, 备份用)] |
||||
|
*/ |
||||
|
public static DeviceInfo parseDeviceId(String deviceId) { |
||||
|
if (deviceId == null) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
Matcher matcher = PATTERN.matcher(deviceId); |
||||
|
if (!matcher.matches()) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
String[] groups = new String[matcher.groupCount()]; |
||||
|
for (int i = 0; i < groups.length; i++) { |
||||
|
groups[i] = matcher.group(i + 1); |
||||
|
} |
||||
|
|
||||
|
DeviceInfo info = new DeviceInfo(); |
||||
|
info.setObjectInitial(groups[0]); |
||||
|
info.setDeviceCategory(groups[1]); |
||||
|
info.setBaDeviceInstance(groups[2]); |
||||
|
info.setObjectTypeInstance(groups[3]); |
||||
|
info.setProperty(groups[4]); |
||||
|
info.setHasBackup(deviceId.endsWith("_S")); |
||||
|
|
||||
|
return info; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 验证设备ID格式是否正确 |
||||
|
*/ |
||||
|
public static boolean isValidFormat(String deviceId) { |
||||
|
if (deviceId == null) { |
||||
|
return false; |
||||
|
} |
||||
|
return PATTERN.matcher(deviceId).matches(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量验证和解析设备ID |
||||
|
*/ |
||||
|
public static void validateAndParse(String[] deviceIds) { |
||||
|
System.out.println("设备ID格式验证结果:"); |
||||
|
System.out.println("=" + "=".repeat(80)); |
||||
|
|
||||
|
for (String deviceId : deviceIds) { |
||||
|
DeviceInfo info = parseDeviceId(deviceId); |
||||
|
if (info != null) { |
||||
|
System.out.printf("✓ %-30s - 格式正确\n", deviceId); |
||||
|
System.out.println(" - 物件Initial: " + info.getObjectInitial()); |
||||
|
System.out.println(" - 设备分类: " + info.getDeviceCategory()); |
||||
|
System.out.println(" - BA Device Instance: " + info.getBaDeviceInstance()); |
||||
|
System.out.println(" - ObjectType, Instance: " + info.getObjectTypeInstance()); |
||||
|
System.out.println(" - Property: " + info.getProperty()); |
||||
|
System.out.println(" - 是否备份: " + (info.isHasBackup() ? "是" : "否")); |
||||
|
System.out.println(); |
||||
|
} else { |
||||
|
System.out.printf("✗ %-30s - 格式错误\n", deviceId); |
||||
|
System.out.println(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 设备信息类
|
||||
|
public static class DeviceInfo { |
||||
|
private String objectInitial; |
||||
|
private String deviceCategory; |
||||
|
private String baDeviceInstance; |
||||
|
private String objectTypeInstance; |
||||
|
private String property; |
||||
|
private boolean hasBackup; |
||||
|
|
||||
|
// Getters and Setters
|
||||
|
public String getObjectInitial() { return objectInitial; } |
||||
|
public void setObjectInitial(String objectInitial) { this.objectInitial = objectInitial; } |
||||
|
|
||||
|
public String getDeviceCategory() { return deviceCategory; } |
||||
|
public void setDeviceCategory(String deviceCategory) { this.deviceCategory = deviceCategory; } |
||||
|
|
||||
|
public String getBaDeviceInstance() { return baDeviceInstance; } |
||||
|
public void setBaDeviceInstance(String baDeviceInstance) { this.baDeviceInstance = baDeviceInstance; } |
||||
|
|
||||
|
public String getObjectTypeInstance() { return objectTypeInstance; } |
||||
|
public void setObjectTypeInstance(String objectTypeInstance) { this.objectTypeInstance = objectTypeInstance; } |
||||
|
|
||||
|
public String getProperty() { return property; } |
||||
|
public void setProperty(String property) { this.property = property; } |
||||
|
|
||||
|
public boolean isHasBackup() { return hasBackup; } |
||||
|
public void setHasBackup(boolean hasBackup) { this.hasBackup = hasBackup; } |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return String.format("DeviceInfo{物件Initial='%s', 设备分类='%s', BA Device Instance='%s', ObjectType_Instance='%s', Property='%s', 备份=%s}", |
||||
|
objectInitial, deviceCategory, baDeviceInstance, objectTypeInstance, property, hasBackup); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue