Browse Source

合并冲突

jwy
review512jwy@163.com 3 days ago
parent
commit
0e125915b6
  1. 1
      data-center-business-common/src/main/resources/config/language/msg/msg_cn.yml
  2. 3
      data-center-business-common/src/main/resources/config/language/msg/msg_en.yml
  3. 3
      data-center-business-common/src/main/resources/config/language/msg/msg_jp.yml
  4. 7
      data-center-business-controller/buildPush-prod.sh
  5. 5
      data-center-business-controller/dockerfile
  6. 3
      data-center-business-controller/src/main/java/com/techsor/datacenter/business/configurator/CrosXssFilter.java
  7. 1
      data-center-business-controller/src/main/java/com/techsor/datacenter/business/controller/DeviceController.java
  8. 19
      data-center-business-controller/src/main/java/com/techsor/datacenter/business/controller/GatewayClientsController.java
  9. 12
      data-center-business-controller/src/main/resources/config/application.properties
  10. BIN
      data-center-business-controller/src/main/resources/template/deviceInfo_zh.xlsx
  11. BIN
      data-center-business-controller/src/main/resources/template/en/deviceInfo_en.xlsx
  12. BIN
      data-center-business-controller/src/main/resources/template/jp/deviceInfo_jp.xlsx
  13. 2
      data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/DeviceConfigInfoExtMapper.java
  14. 4
      data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/GatewayClientsMapperExt.java
  15. 6
      data-center-business-dao/src/main/resources/mappers/auto/DeviceInfoMapper.xml
  16. 11
      data-center-business-dao/src/main/resources/mappers/ex/DeviceConfigInfoExtMapper.xml
  17. 9
      data-center-business-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml
  18. 45
      data-center-business-dao/src/main/resources/mappers/ex/GatewayClientsMapperExt.xml
  19. 3
      data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/device/DeviceAddParams.java
  20. 3
      data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/device/DeviceSearchParams.java
  21. 3
      data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/device/DeviceUpdateParams.java
  22. 6
      data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/gateway/GatewayClientsAddParam.java
  23. 6
      data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/gateway/GatewayClientsEditParam.java
  24. 37
      data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/gateway/GatewayClientsQueryResponse.java
  25. 110
      data-center-business-model/src/main/java/com/techsor/datacenter/business/entity/ioserver/IoserverDeviceIdEntity.java
  26. 3
      data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcel.java
  27. 3
      data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelCn.java
  28. 3
      data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelEn.java
  29. 5
      data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelJp.java
  30. 5
      data-center-business-model/src/main/java/com/techsor/datacenter/business/vo/device/DeviceVO.java
  31. 3
      data-center-business-service/src/main/java/com/techsor/datacenter/business/service/GatewayClientsService.java
  32. 30
      data-center-business-service/src/main/java/com/techsor/datacenter/business/service/SyncTrendsStatsService.java
  33. 64
      data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/DeviceConfigInfoImpl.java
  34. 68
      data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/DeviceServiceImpl.java
  35. 14
      data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/GatewayClientsServiceImpl.java

1
data-center-business-common/src/main/resources/config/language/msg/msg_cn.yml

@ -18,6 +18,7 @@ msgcn:
buildingNameDoesNotExist: 楼宇名称不存在
floorNameHasExisted: 楼层名称已存在
floorNameDoesNotExist: 楼层名称不存在
gatewayClientDoesNotExist: 网关不存在
buildingNotFound: 不存在该楼宇
fbNotSameCompany: 需与楼宇归属于同一企业
spaceNameHasExisted: 房间名称已存在

3
data-center-business-common/src/main/resources/config/language/msg/msg_en.yml

@ -26,7 +26,8 @@ msgen:
assetNameHasExisted: Asset name already exists.
assetSymbolHasExisted: Asset symbol already exists.
assetNameDoesNotExist: Asset name does not exist.
assetSymbolDoesNotExist: 资产记号不存在
gatewayClientDoesNotExist: Gateway client does not exist.
assetSymbolDoesNotExist: Asset symbol does not exist.
spaceNotFound: Room not found.
faNotSameCompany: Must belong to the same company as the room.
bindedDevice: Device is bound.

3
data-center-business-common/src/main/resources/config/language/msg/msg_jp.yml

@ -27,10 +27,11 @@ msgjp:
assetSymbolHasExisted: 記号はすでに存在します
assetNameDoesNotExist: 該当資産名がない
assetSymbolDoesNotExist: 資産記号が存在しません
gatewayClientDoesNotExist: 該当ゲートウェイが存在しません
spaceNotFound: 該当空間がない
faNotSameCompany: 空間と同じ会社に所属してください
bindedDevice: 登録されたデバイスは存在しています
deviceTypeNotExist: デバイスタイプがない
deviceTypeNotExist: ロパティがない
excelBuildingLineDuplicate: テーブルに同じデータがある
dbBuildingDuplicate: プラットフォームにすでに該当ビルがない
dbFloorDuplicate: プラットフォームには既にこのフロアが存在しています。

7
data-center-business-controller/buildPush-prod.sh

@ -0,0 +1,7 @@
aws configure set aws_access_key_id AKIAR26KHSVRUEAKRBPZ
aws configure set aws_secret_access_key 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
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

5
data-center-business-controller/dockerfile

@ -1,4 +1,7 @@
FROM registry.ap-northeast-1.aliyuncs.com/southwave/jdk17-template:latest
# FROM registry.ap-northeast-1.aliyuncs.com/southwave/jdk17-template:latest
FROM amazoncorretto:17-alpine
# 安装 fontconfig 和 DejaVu 字体 (这是一个通用且免费的字体包)
RUN apk --no-cache add fontconfig ttf-dejavu
# FROM openjdk:17-jdk
ENV TZ=Asia/Tokyo
WORKDIR /home/data-center-business

3
data-center-business-controller/src/main/java/com/techsor/datacenter/business/configurator/CrosXssFilter.java

@ -53,7 +53,8 @@ public class CrosXssFilter implements Filter {
String requestUri = httpRequest.getRequestURI();
// 当 URL 不包含 /common/ 时,校验 Referer
// if (!requestUri.contains("/common/") && !requestUri.contains("swagger")) {
if (!requestUri.contains("/swagger") && !requestUri.contains("/api-docs")) {
if (!requestUri.contains("/swagger") && !requestUri.contains("/api-docs")
&& !requestUri.contains("websocket")) {
String referer = httpRequest.getHeader("Referer");
if (StringUtils.isNotBlank(referer)){
if(!"*".equals(accessControlAllowOrigin)){

1
data-center-business-controller/src/main/java/com/techsor/datacenter/business/controller/DeviceController.java

@ -366,7 +366,6 @@ public class DeviceController {
@Parameter(name = "UTCOffset", description = "Offset between GMT and local time in minutes, e.g., -480 for GMT+8") @RequestHeader(required = true) Integer UTCOffset,
@RequestBody MultipartFile files,
HttpServletResponse response) {
return this.deviceExcelService.importDeviceInfosExcelFiles(wsClientId, files, UserId, CompanyId, LanguageType);
}

19
data-center-business-controller/src/main/java/com/techsor/datacenter/business/controller/GatewayClientsController.java

@ -11,6 +11,7 @@ import com.techsor.datacenter.business.model.GatewayClients;
import com.techsor.datacenter.business.service.GatewayClientsService;
import com.techsor.datacenter.business.vo.device.BuildInFunctionVO;
import com.techsor.datacenter.business.vo.device.DeviceVO;
import com.techsor.datacenter.business.vo.floor.FloorPageVO;
import com.techsor.datacenter.business.vo.gateway.GatewayClientsStatisticsCount;
import com.techsor.datacenter.business.vo.gateway.GatewayClientsStatisticsVO;
@ -38,7 +39,7 @@ public class GatewayClientsController {
@Operation(summary = "Get Gateway clients list by param", description = "")
@PostMapping(path = "/getListPage")
public PageResponse<PageInfo<GatewayClients>> getBuildInFunctionList(
public PageResponse<PageInfo<GatewayClientsQueryResponse>> getBuildInFunctionList(
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@ -46,7 +47,7 @@ public class GatewayClientsController {
@Parameter(name = "LanguageType", description = "Language type 0: Chinese 1: English 2: Japanese", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType,
@Parameter(name = "UTCOffset", description = "Offset between GMT and local time in minutes, e.g., -480 for GMT+8") @RequestHeader(required = true) Integer UTCOffset,
@RequestBody GatewayClientsQueryParam param){
PageResponse<PageInfo<GatewayClients>> pageResponse = new PageResponse<>();
PageResponse<PageInfo<GatewayClientsQueryResponse>> pageResponse = new PageResponse<>();
try {
pageResponse.setData(gatewayClientsService.query(param, UserId, CompanyId, LanguageType));
pageResponse.setCode(ResponseCode.SUCCESS);
@ -59,6 +60,20 @@ public class GatewayClientsController {
return pageResponse;
}
@Operation(summary = "Get Gateway clients ", description = "")
@PostMapping(path = "/getAll")
public SimpleDataResponse<List<GatewayClientsQueryResponse>> getBuildInFunctionList(
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@Parameter(name = "CompanyId", description = "User's company ID", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type 0: Chinese 1: English 2: Japanese", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType,
@Parameter(name = "UTCOffset", description = "Offset between GMT and local time in minutes, e.g., -480 for GMT+8") @RequestHeader(required = true) Integer UTCOffset
){
SimpleDataResponse dataResponse =SimpleDataResponse.success(gatewayClientsService.getAll(UserId, CompanyId, LanguageType));
return dataResponse;
}
@Operation(summary = "add", description = "")
@PostMapping(path = "/add")
public SimpleDataResponse add(

12
data-center-business-controller/src/main/resources/config/application.properties

@ -71,12 +71,12 @@ mail.smtp.host=email-smtp.ap-northeast-1.amazonaws.com
mail.smtp.port=465
mail.smtp.auth=true
mail.smtp.ssl=true
mail.sender.username=AKIAVRXFMB43Z4Q6WGZN
mail.sender.password_encrypted=true
mail.sender.password=a/52R0rao7ksRMvl1j17fVEmPCw7gC9OreHDqWOE+S7sgmoQT0YgoLRJqOlJqX7e
mail.sender.sendername=datacenter-info
mail.sender.from=alert@ttkdatatechbuild.com
#邮件通知服务开关
mail.sender.username=AKIAR26KHSVR3E7N7V3X
mail.sender.password_encrypted=false
mail.sender.password=BFe3PePmvmKJKF/cwVxKq2C3EG10IcYQ+fNq0Eccl0PU
mail.sender.sendername=smbil-support@ifmservice.jp
mail.sender.from=smbil-support@ifmservice.jp
#\u90AE\u4EF6\u901A\u77E5\u670D\u52A1\u5F00\u5173
mail.send.switch=true
Spring.mvc.hiddenmethod.filter.enabled=true

BIN
data-center-business-controller/src/main/resources/template/deviceInfo_zh.xlsx

Binary file not shown.

BIN
data-center-business-controller/src/main/resources/template/en/deviceInfo_en.xlsx

Binary file not shown.

BIN
data-center-business-controller/src/main/resources/template/jp/deviceInfo_jp.xlsx

Binary file not shown.

2
data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/DeviceConfigInfoExtMapper.java

@ -14,6 +14,8 @@ public interface DeviceConfigInfoExtMapper extends DeviceConfigInfoMapper {
List<DeviceConfigVO> getListPage(DeviceConfigSearchParams pageSearchParam);
List<DeviceConfigVO> getAll();
List<DeviceTypeVO> getDeviceCategoryListByTypeName(String deviceTypeName, Long companyId);
DeviceConfigVO selectByDeviceId(String deviceId);

4
data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/GatewayClientsMapperExt.java

@ -4,6 +4,7 @@ import com.techsor.datacenter.business.dao.auto.DeviceInfoMapper;
import com.techsor.datacenter.business.dao.auto.GatewayClientsMapper;
import com.techsor.datacenter.business.dto.device.DeviceSearchParams;
import com.techsor.datacenter.business.dto.gateway.GatewayClientsQueryParam;
import com.techsor.datacenter.business.dto.gateway.GatewayClientsQueryResponse;
import com.techsor.datacenter.business.model.DeviceInfo;
import com.techsor.datacenter.business.model.GatewayClients;
import com.techsor.datacenter.business.vo.asset.ApiDeviceInfoVO;
@ -21,6 +22,7 @@ import java.util.Map;
@Mapper
public interface GatewayClientsMapperExt extends GatewayClientsMapper {
List<GatewayClients> getListPage(@Param("param") GatewayClientsQueryParam param,@Param("companyId") Long companyId);
List<GatewayClientsQueryResponse> getAll(@Param("companyId") Long companyId);
List<GatewayClientsQueryResponse> getListPage(@Param("param") GatewayClientsQueryParam param, @Param("companyId") Long companyId);
}

6
data-center-business-dao/src/main/resources/mappers/auto/DeviceInfoMapper.xml

@ -114,7 +114,7 @@
-->
id, device_id, device_sn, type_id, wsclient_id, space_id, device_name, remark, building_id,
asset_id, gateway_client_id, flag, company_id, created_by, created_timestamp, updated_by,
updated_timestamp, project_id, floor_id, monitoring_point_name, monitoring_point_category_id,
updated_timestamp, project_id, floor_id, monitoring_point_name, monitoring_point_category_id,
data_provider_id, gateway_info_id, alarm_level, retain_alert, unit, dashboard_decimal_places
</sql>
<sql id="Blob_Column_List">
@ -209,7 +209,7 @@
created_by, created_timestamp, updated_by,
updated_timestamp, project_id, floor_id,
monitoring_point_name, monitoring_point_category_id,
data_provider_id, gateway_info_id, alarm_level,
data_provider_id, gateway_info_id, alarm_level,
retain_alert, unit, dashboard_decimal_places,
data_mapping)
values (#{deviceId,jdbcType=VARCHAR}, #{deviceSn,jdbcType=VARCHAR}, #{typeId,jdbcType=INTEGER},
@ -219,7 +219,7 @@
#{createdBy,jdbcType=BIGINT}, #{createdTimestamp,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT},
#{updatedTimestamp,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{floorId,jdbcType=BIGINT},
#{monitoringPointName,jdbcType=VARCHAR}, #{monitoringPointCategoryId,jdbcType=BIGINT},
#{dataProviderId,jdbcType=BIGINT}, #{gatewayInfoId,jdbcType=BIGINT}, #{alarmLevel,jdbcType=INTEGER},
#{dataProviderId,jdbcType=BIGINT}, #{gatewayInfoId,jdbcType=BIGINT}, #{alarmLevel,jdbcType=INTEGER},
#{retainAlert,jdbcType=INTEGER}, #{unit,jdbcType=VARCHAR}, #{dashboardDecimalPlaces,jdbcType=INTEGER},
#{dataMapping,jdbcType=LONGVARCHAR})
</insert>

11
data-center-business-dao/src/main/resources/mappers/ex/DeviceConfigInfoExtMapper.xml

@ -48,4 +48,15 @@
<select id="selectByDeviceId" resultType="com.techsor.datacenter.business.vo.device.DeviceConfigVO">
select * from type,device_info where type.id=device_info.type_id and device_info.device_id=#{deviceId} and device_info.flag!=1
</select>
<select id="getAll" resultType="com.techsor.datacenter.business.vo.device.DeviceConfigVO" >
select
id, `name`, description, device_type, device_data_src, origin_json_format, expression_map,
expression_variable_map, target_json_format, target_forward_id, target_foward_code, company_id,dbm_id,name_zh,name_en,
device_category_id,`unit`
from `type`
<where>
and flag = 0
</where>
</select>
</mapper>

9
data-center-business-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml

@ -53,7 +53,10 @@
device_info.data_provider_id, data_provider.name dataProviderName, device_info.retain_alert,
device_info.gateway_info_id, data_provider_gateway_info.name gatewayInfoName, device_info.alarm_level,
device_info.unit,device_info.data_mapping,device_info.dashboard_decimal_places,
dashboard_device_group.id deviceGroupId, dashboard_device_group.name deviceGroupName
dashboard_device_group.id deviceGroupId, dashboard_device_group.name deviceGroupName,
gateway_clients.client_name gatewayClientName,
gateway_clients.id gatewayId,
device_category.category_name_jp categoryName
from
device_info
left join basic_project on device_info.project_id = basic_project.id
@ -69,6 +72,7 @@
left join device_alert_config dac on device_info.id=dac.device_config_id and dac.flag = 0
left join dashboard_device_group_relation on dashboard_device_group_relation.device_info_id = device_info.id
left join dashboard_device_group on dashboard_device_group_relation.device_group_id = dashboard_device_group.id
left join gateway_clients on gateway_clients.id = device_info.gateway_client_id
<if test="deviceVO.targetIdValue != null ">
left join target_id_check tic on dac.id = tic.alert_config_id
</if>
@ -103,6 +107,9 @@
<if test="deviceVO.floorId != null ">
and basic_floor.floor_id = #{deviceVO.floorId}
</if>
<if test="deviceVO.gatewayClientName != null ">
and gateway_clients.client_name like concat('%', #{deviceVO.gatewayClientName}, '%')
</if>
<if test="deviceVO.targetIdValue != null ">
and tic.target_id_value = #{deviceVO.targetIdValue}
</if>

45
data-center-business-dao/src/main/resources/mappers/ex/GatewayClientsMapperExt.xml

@ -1,12 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.techsor.datacenter.business.dao.ex.GatewayClientsMapperExt">
<select id="getListPage" resultType="com.techsor.datacenter.business.model.GatewayClients">
<select id="getListPage" resultType="com.techsor.datacenter.business.dto.gateway.GatewayClientsQueryResponse">
select
id as id,client_id as clientId,client_name as clientName,online_status as onlineStatus,last_updata_ts as lastUpdataTs,create_ts as createTs,address as address,
data_amount_threshold, data_amount_threshold_alarm,company_id as companyId,alert_switch as alertSwitch
gateway_clients.id as id,
gateway_clients.client_id as clientId,
gateway_clients.client_name as clientName,
gateway_clients.online_status as onlineStatus,
gateway_clients.last_updata_ts as lastUpdataTs,
gateway_clients.create_ts as createTs,
gateway_clients.address as address,
gateway_clients.data_amount_threshold,
gateway_clients.data_amount_threshold_alarm,
gateway_clients.company_id as companyId,
gateway_clients.alert_switch as alertSwitch,
gateway_clients.project_id as projectId,
gateway_clients.building_id as buildingId,
basic_project.project_name as projectName,
basic_building.name as buildingName
from
gateway_clients
left join basic_project on gateway_clients.project_id = basic_project.id
left join basic_building on gateway_clients.building_id = basic_building.building_id
<where>
<if test="param.clientId != null and param.clientId != ''">
and gateway_clients.client_id = #{param.clientId}
@ -25,4 +40,28 @@
</select>
<select id="getAll" resultType="com.techsor.datacenter.business.dto.gateway.GatewayClientsQueryResponse">
select
gateway_clients.id as id,
gateway_clients.client_id as clientId,
gateway_clients.client_name as clientName,
gateway_clients.online_status as onlineStatus,
gateway_clients.last_updata_ts as lastUpdataTs,
gateway_clients.create_ts as createTs,
gateway_clients.address as address,
gateway_clients.data_amount_threshold,
gateway_clients.data_amount_threshold_alarm,
gateway_clients.company_id as companyId,
gateway_clients.alert_switch as alertSwitch,
gateway_clients.project_id as projectId,
gateway_clients.building_id as buildingId,
basic_project.project_name as projectName,
basic_building.name as buildingName
from
gateway_clients
left join basic_project on gateway_clients.project_id = basic_project.id
left join basic_building on gateway_clients.building_id = basic_building.building_id
where gateway_clients.flag = 0 and gateway_clients.company_id = #{companyId}
</select>
</mapper>

3
data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/device/DeviceAddParams.java

@ -37,6 +37,9 @@ public class DeviceAddParams {
@Schema(description = "Asset ID", example = "Asset-ID")
private Long assetId;
@Schema(description = "gatewayClientId", example = "1")
private Integer gatewayClientId;
@Schema(description = "Floor ID", example = "Floor-ID")
private Long floorId;

3
data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/device/DeviceSearchParams.java

@ -45,6 +45,9 @@ public class DeviceSearchParams extends BaseSearchParams {
@Schema(description = "Asset symbol", example = "asset-01")
private String assetSymbol;
@Schema(description = "gatewayClientName", example = "asset-01")
private String gatewayClientName;
@Schema(description = "Target ID value", example = "33")
private Integer targetIdValue;

3
data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/device/DeviceUpdateParams.java

@ -38,6 +38,9 @@ public class DeviceUpdateParams {
@Schema(description = "Asset ID", example = "Asset ID")
private Long assetId;
@Schema(description = "gatewayClientId", example = "gatewayClientId")
private Integer gatewayClientId;
@Schema(description = "Floor ID", example = "Floor ID")
private Long floorId;

6
data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/gateway/GatewayClientsAddParam.java

@ -24,4 +24,10 @@ public class GatewayClientsAddParam {
@Schema(description ="alert switch", example = "1")
private Integer alertSwitch;
@Schema(description ="project id", example = "1")
private Long projectId;
@Schema(description ="building id", example = "1")
private Long buildingId;
}

6
data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/gateway/GatewayClientsEditParam.java

@ -23,4 +23,10 @@ public class GatewayClientsEditParam {
@Schema(description ="alert switch", example = "1")
private Integer alertSwitch;
@Schema(description ="project id", example = "1")
private Long projectId;
@Schema(description ="building id", example = "1")
private Long buildingId;
}

37
data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/gateway/GatewayClientsQueryResponse.java

@ -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;
}

110
data-center-business-model/src/main/java/com/techsor/datacenter/business/entity/ioserver/IoserverDeviceIdEntity.java

@ -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);
}
}
}

3
data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcel.java

@ -27,6 +27,9 @@ public class DeviceInfoExcel {
@ExcelProperty(value ="资产记号")
private String assetSymbol;
@ExcelProperty(value ="网关ID")
private String gatewayClientId;
@ExcelProperty(value ="设备ID")
private String deviceId;

3
data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelCn.java

@ -65,6 +65,9 @@ public class DeviceInfoExcelCn {
@ExcelProperty(value ="资产符号")
private String assetSymbol;
@ExcelProperty(value ="网关ClientID")
private String gatewayClientId;
@ExcelProperty(value ="项目名称")
private String projectName;

3
data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelEn.java

@ -35,6 +35,9 @@ public class DeviceInfoExcelEn {
@ExcelProperty(value ="asset symbol")
private String assetSymbol;
@ExcelProperty(value ="gateway client id")
private String gatewayClientId;
@ExcelProperty(value ="project name")
private String projectName;

5
data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelJp.java

@ -13,7 +13,7 @@ public class DeviceInfoExcelJp {
@ExcelProperty(value ="デバイスSN")
private String deviceSn;
@ExcelProperty(value ="デバイスのタイプ")
@ExcelProperty(value ="プロパティ")
private String deviceType;
@ExcelProperty(value ="デバイス名")
@ -37,6 +37,9 @@ public class DeviceInfoExcelJp {
@ExcelProperty(value ="資産記号")
private String assetSymbol;
@ExcelProperty(value ="クライアントID")
private String gatewayClientId;
// @ExcelProperty(value ="DBM ClientID")
// private String clientId;

5
data-center-business-model/src/main/java/com/techsor/datacenter/business/vo/device/DeviceVO.java

@ -45,6 +45,8 @@ public class DeviceVO {
private Long categoryId;
private String categoryName;
private String typeName;
private Long wsclientId;
@ -65,6 +67,9 @@ public class DeviceVO {
private String assetSymbol;
private Integer gatewayId;
private String gatewayClientName;
private Integer flag;
private Long companyId;

3
data-center-business-service/src/main/java/com/techsor/datacenter/business/service/GatewayClientsService.java

@ -18,7 +18,8 @@ import java.util.List;
*/
public interface GatewayClientsService {
PageInfo<GatewayClients> query(GatewayClientsQueryParam param, Long userId, Long companyId, Integer languageType);
List<GatewayClientsQueryResponse> getAll(Long userId, Long companyId, Integer languageType);
PageInfo<GatewayClientsQueryResponse> query(GatewayClientsQueryParam param, Long userId, Long companyId, Integer languageType);
SimpleDataResponse add(GatewayClientsAddParam param, Long userId, Long companyId, Integer languageType);

30
data-center-business-service/src/main/java/com/techsor/datacenter/business/service/SyncTrendsStatsService.java

@ -291,11 +291,31 @@ public class SyncTrendsStatsService {
if (resultDTO != null) {
AuroraTrendsStatsTotal auroraTrendsStatsTotal = new AuroraTrendsStatsTotal();
auroraTrendsStatsTotal.setReceiverDeviceId(0L);
auroraTrendsStatsTotal.setSenderDeviceId(resultDTO.getSenderDeviceIdDelta());
auroraTrendsStatsTotal.setDispatch(resultDTO.getSenderDispatchDelta());
auroraTrendsStatsTotal.setAlert(Long.valueOf(resultDTO.getSenderAlertDelta()));
auroraTrendsStatsTotal.setAlertCancel(Long.valueOf(resultDTO.getSenderAlertCancelDelta()));
auroraTrendsStatsTotal.setSenderBuilding(Long.valueOf(resultDTO.getBuildingIdCount()));
if (resultDTO.getRecieverDeviceIdDelta() != null){
auroraTrendsStatsTotal.setSenderDeviceId(resultDTO.getSenderDeviceIdDelta());
}else {
auroraTrendsStatsTotal.setSenderDeviceId(0L);
}
if (resultDTO.getSenderDispatchDelta() != null){
auroraTrendsStatsTotal.setDispatch(resultDTO.getSenderDispatchDelta());
}else {
auroraTrendsStatsTotal.setDispatch(0L);
}
if (resultDTO.getSenderAlertDelta() != null){
auroraTrendsStatsTotal.setAlert(Long.valueOf(resultDTO.getSenderAlertDelta()));
}else {
auroraTrendsStatsTotal.setAlert(0L);
}
if (resultDTO.getSenderAlertCancelDelta() != null){
auroraTrendsStatsTotal.setAlertCancel(Long.valueOf(resultDTO.getSenderAlertCancelDelta()));
}else{
auroraTrendsStatsTotal.setAlertCancel(0L);
}
if (resultDTO.getBuildingIdCount() != null){
auroraTrendsStatsTotal.setSenderBuilding(Long.valueOf(resultDTO.getBuildingIdCount()));
}else{
auroraTrendsStatsTotal.setSenderBuilding(0L);
}
auroraTrendsStatsTotal.setCreatedDate(Date.from(yesterdayMidnight.toInstant()));
this.auroraTrendsStatsTotalMapper.insert(auroraTrendsStatsTotal);
}

64
data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/DeviceConfigInfoImpl.java

@ -166,37 +166,36 @@ public class DeviceConfigInfoImpl implements IDeviceTypeService {
public SimpleDataResponse addDeviceInfos(DeviceConfigParams deviceAddParams, Long userId, Long companyId, Integer languageType) {
String deviceDataSrc=deviceAddParams.getDeviceDataSrc();
if (StringUtils.isBlank(deviceDataSrc)) {
return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "dataSrcNotExist"));
}
if (StringUtils.isBlank(deviceAddParams.getDeviceType())) {
return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "deviceTypeNotExist"));
}
if(MapUtils.isEmpty(deviceAddParams.getExpressionMap())){
return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "expressionMapNotExist"));
}
if(MapUtils.isEmpty(deviceAddParams.getExpressionMap())){
return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "expressionVariableMapNotExist"));
}
// if (StringUtils.isBlank(deviceDataSrc)) {
// return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "dataSrcNotExist"));
// }
// if (StringUtils.isBlank(deviceAddParams.getDeviceType())) {
// return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "deviceTypeNotExist"));
// }
//
// if(MapUtils.isEmpty(deviceAddParams.getExpressionMap())){
// return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "expressionMapNotExist"));
// }
//
// if(MapUtils.isEmpty(deviceAddParams.getExpressionMap())){
// return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "expressionVariableMapNotExist"));
// }
if (MapUtils.isEmpty(deviceAddParams.getExpressionVariableMap())) {
return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "deviceNameNotExist"));
}
// if (!deviceAddParams.getExpressionMap().containsKey("$.deviceId")) {
// return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "deviceIdNotExist"));
// }
DataSourceConfigExample dataSourceConfigExample=new DataSourceConfigExample();
dataSourceConfigExample.createCriteria().andCompanyIdEqualTo(companyId).andCodeEqualTo(deviceDataSrc).andFlagEqualTo(0);
long cnt = this.dataSourceConfigMapperExt.countByExample(dataSourceConfigExample);
if (cnt==0){
return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "dataSrcNotExist"));
}
// DataSourceConfigExample dataSourceConfigExample=new DataSourceConfigExample();
// dataSourceConfigExample.createCriteria().andCompanyIdEqualTo(companyId).andNameEqualTo(deviceAddParams.getName()).andFlagEqualTo(0);
// long cnt = this.dataSourceConfigMapperExt.countByExample(dataSourceConfigExample);
// if (cnt==0){
// return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "dataSrcNotExist"));
// }
DeviceConfigInfoExample deviceConfigInfoExample=new DeviceConfigInfoExample();
deviceConfigInfoExample.createCriteria().andCompanyIdEqualTo(companyId).andFlagEqualTo(0).andDeviceDataSrcEqualTo(deviceDataSrc).andDeviceTypeEqualTo(deviceAddParams.getDeviceType());
deviceConfigInfoExample.createCriteria().andCompanyIdEqualTo(companyId).andFlagEqualTo(0).andNameEqualTo(deviceAddParams.getName());
long result=this.deviceConfigInfoExtMapper.countByExample(deviceConfigInfoExample);
if (result>0){
return new SimpleDataResponse(SERVER_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "deviceConfigInfoExist"));
}
@ -207,15 +206,18 @@ public class DeviceConfigInfoImpl implements IDeviceTypeService {
deviceConfigInfo.setCreatedTimestamp(new Date());
deviceConfigInfo.setUpdatedTimestamp(new Date());
deviceConfigInfo.setCreatedBy(userId);
if (languageType==0){
deviceConfigInfo.setNameZh(deviceAddParams.getName());
}
if (languageType==1){
deviceConfigInfo.setNameEn(deviceAddParams.getName());
}
if (languageType==2){
deviceConfigInfo.setName(deviceAddParams.getName());
}
deviceConfigInfo.setNameZh(deviceAddParams.getName());
deviceConfigInfo.setNameEn(deviceAddParams.getName());
deviceConfigInfo.setName(deviceAddParams.getName());
// if (languageType==0){
// deviceConfigInfo.setNameZh(deviceAddParams.getName());
// }
// if (languageType==1){
// deviceConfigInfo.setNameEn(deviceAddParams.getName());
// }
// if (languageType==2){
// deviceConfigInfo.setName(deviceAddParams.getName());
// }
deviceConfigInfo.setUpdatedBy(userId);
deviceConfigInfo.setExpressionMap(JSON.toJSONString(deviceAddParams.getExpressionMap()));
deviceConfigInfo.setExpressionVariableMap(JSON.toJSONString(deviceAddParams.getExpressionVariableMap()));

68
data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/DeviceServiceImpl.java

@ -37,6 +37,7 @@ import com.techsor.datacenter.business.dto.device.forward.DeviceForwardBatchPara
import com.techsor.datacenter.business.dto.device.forward.DeviceForwardQueryParams;
import com.techsor.datacenter.business.dto.device.forward.DeviceForwardRemoveParmas;
import com.techsor.datacenter.business.dto.devicegroup.DeviceGroupSearchParams;
import com.techsor.datacenter.business.entity.ioserver.IoserverDeviceIdEntity;
import com.techsor.datacenter.business.importexcel.deviceAlertInfo.DeviceAlertInfoExcel;
import com.techsor.datacenter.business.importexcel.deviceinfo.AlarmLevelMapping;
import com.techsor.datacenter.business.importexcel.deviceinfo.DeviceGroupRelationExcel;
@ -57,11 +58,7 @@ import com.techsor.datacenter.business.util.entity.AlertContentExtractParams;
import com.techsor.datacenter.business.util.redis.RedisUtil;
import com.techsor.datacenter.business.vo.company.ApikeyInfo2;
import com.techsor.datacenter.business.vo.data.AuroraDataVO;
import com.techsor.datacenter.business.vo.device.DeviceAlertCsvVO;
import com.techsor.datacenter.business.vo.device.DeviceInfoCsvVO;
import com.techsor.datacenter.business.vo.device.DeviceVO;
import com.techsor.datacenter.business.vo.device.LambdaEmailResult;
import com.techsor.datacenter.business.vo.device.MonitoringPointCategoryVO;
import com.techsor.datacenter.business.vo.device.*;
import com.techsor.datacenter.business.vo.device.alert.DeviceAlertConfigVO;
import com.techsor.datacenter.business.vo.device.forward.DeviceForwardConfigVO;
import com.techsor.datacenter.business.vo.devicegroup.DeviceGroupPageVO;
@ -141,12 +138,18 @@ public class DeviceServiceImpl implements IDeviceService {
@Resource
private BasicFloorMapperExt basicFloorMapperExt;
@Resource
private DeviceConfigInfoExtMapper deviceTypeExtMapper;
@Resource
private BasicSpaceMapperExt basicSpaceMapperExt;
@Resource
private NotificationService notificationService;
@Resource
private GatewayClientsMapperExt gatewayClientsMapperExt;
@Resource
private DeviceAlertTemplateMapperExt deviceAlertTemplateMapperExt;
@ -801,6 +804,8 @@ public class DeviceServiceImpl implements IDeviceService {
Map<String, DeviceGroup> deviceGroupMapping = deviceGroupList.stream()
.collect(Collectors.toMap(DeviceGroup::getName, item -> item));
//Prepare all device type list for futher checks
List<DeviceConfigVO> allDeviceTypeList = deviceTypeExtMapper.getAll();
List<Long> targetFowardCodeIdListCache = new ArrayList<>();
for (int dataIndex=0; dataIndex<dataSize; dataIndex++) {
@ -844,8 +849,14 @@ public class DeviceServiceImpl implements IDeviceService {
errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "assetSymbolDoesNotExist"));
}
// gatewayClient Check
boolean gatewayClientExist = checkGatewayClient(deviceInfoExcel.getGatewayClientId(), companyId, deviceInfo);
if (!gatewayClientExist) {
errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "floorNameDoesNotExist"));
}
// Device Type Check
boolean deviceExists = checkDeviceType(deviceInfoExcel.getDeviceType(), companyId);
boolean deviceExists = checkDeviceType(allDeviceTypeList,deviceInfoExcel,deviceInfoExcel.getDeviceType(), companyId);
if (!deviceExists) {
errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "deviceTypeNotExist"));
}
@ -2087,21 +2098,52 @@ public class DeviceServiceImpl implements IDeviceService {
}
}
private boolean checkDeviceType(String deviceType, long companyId) {
if (StringUtils.isBlank(deviceType)) {
return false;
private boolean checkGatewayClient(String gatewayClientId, long companyId, DeviceInfo deviceInfo) {
if (StringUtils.isBlank(gatewayClientId)) {
return true;
} else {
DeviceConfigInfoExample deviceConfigInfoExample = new DeviceConfigInfoExample();
deviceConfigInfoExample.createCriteria().andNameEqualTo(deviceType);
List deviceConfigInfoList = this.deviceConfigInfoExtMapper.selectByExample(deviceConfigInfoExample);
if (CollectionUtils.isEmpty(deviceConfigInfoList)) {
GatewayClientsExample gatewayClientsExample = new GatewayClientsExample();
gatewayClientsExample.createCriteria().andClientIdEqualTo(gatewayClientId).andCompanyIdEqualTo(companyId).andFlagEqualTo(0);
List<GatewayClients> assetList = this.gatewayClientsMapperExt.selectByExample(gatewayClientsExample);
if (CollectionUtils.isEmpty(assetList)) {
return false;
} else {
deviceInfo.setGatewayClientId(assetList.get(assetList.size()-1).getId());
return true;
}
}
}
private boolean checkDeviceType(List<DeviceConfigVO> allDeviceTypeList, DeviceInfoExcel deviceInfoExcel,String deviceType, long companyId) {
IoserverDeviceIdEntity.DeviceInfo baseDeviceInfo = IoserverDeviceIdEntity.parseDeviceId(deviceInfoExcel.getDeviceId());
// Return false if not enter type and deviceInfo is null(Means it's not valid eaon's ioserver device, so we cannot auto fill the type)
if (StringUtils.isBlank(deviceType) && baseDeviceInfo == null) {
return false;
}else if (StringUtils.isBlank(deviceType)){
// If DeviceType is blank but device is eaon's ioserver device,auto fill the type
for (DeviceConfigVO deviceConfigInfo : allDeviceTypeList) {
if (deviceConfigInfo.getName().contains(baseDeviceInfo.getProperty()) && deviceConfigInfo.getName().contains(baseDeviceInfo.getDeviceCategory())) {
deviceInfoExcel.setDeviceType(deviceConfigInfo.getName());
return true;
}
}
}
//If deviceType not blank, check if it exists in the database
DeviceConfigInfoExample deviceConfigInfoExample = new DeviceConfigInfoExample();
deviceConfigInfoExample.createCriteria().andNameEqualTo(deviceType);
List deviceConfigInfoList = this.deviceConfigInfoExtMapper.selectByExample(deviceConfigInfoExample);
if (CollectionUtils.isEmpty(deviceConfigInfoList)) {
return false;
} else {
return true;
}
}
private Integer checkWsClientId(String wsClientId, long companyId) {
if (StringUtils.isBlank(wsClientId)) {
return 0;

14
data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/GatewayClientsServiceImpl.java

@ -82,13 +82,19 @@ public class GatewayClientsServiceImpl implements GatewayClientsService {
@Override
public PageInfo<GatewayClients> query(GatewayClientsQueryParam param, Long userId, Long companyId, Integer languageType) {
public PageInfo<GatewayClientsQueryResponse> query(GatewayClientsQueryParam param, Long userId, Long companyId, Integer languageType) {
PageHelper.startPage(param.getPageNum() == null ? 1 : param.getPageNum(), param.getPageSize() == null ? 20 : param.getPageSize());
List<GatewayClients> resultList = gatewayClientsMapperExt.getListPage(param,companyId);
List<GatewayClientsQueryResponse> resultList = gatewayClientsMapperExt.getListPage(param,companyId);
return new PageInfo<>(resultList);
}
@Override
public List<GatewayClientsQueryResponse> getAll(Long userId, Long companyId, Integer languageType) {
List<GatewayClientsQueryResponse> resultList = gatewayClientsMapperExt.getAll(companyId);
return resultList;
}
@Override
public SimpleDataResponse count(Long userId, Long companyId, Integer languageType) {
@ -138,6 +144,8 @@ public class GatewayClientsServiceImpl implements GatewayClientsService {
insertObj.setCompanyId(companyId);
insertObj.setAlertSwitch(param.getAlertSwitch());
insertObj.setDataAmountThreshold(param.getDataAmountThreshold());
insertObj.setBuildingId(param.getBuildingId());
insertObj.setProjectId(param.getProjectId());
this.gatewayClientsMapperExt.insert(insertObj);
//Record log
@ -178,6 +186,8 @@ public class GatewayClientsServiceImpl implements GatewayClientsService {
insertObj.setAddress(param.getAddress());
insertObj.setDataAmountThreshold(param.getDataAmountThreshold());
insertObj.setAlertSwitch(param.getAlertSwitch());
insertObj.setBuildingId(param.getBuildingId());
insertObj.setProjectId(param.getProjectId());
this.gatewayClientsMapperExt.updateByPrimaryKeySelective(insertObj);
//Record log

Loading…
Cancel
Save