From f2215458f485aefad65923d386be74a15a6f6b16 Mon Sep 17 00:00:00 2001 From: "review512jwy@163.com" <“review512jwy@163.com”> Date: Tue, 25 Nov 2025 09:23:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=AF=BC=E5=85=A5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=86=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/config/language/msg/msg_cn.yml | 5 + .../resources/config/language/msg/msg_en.yml | 7 +- .../resources/config/language/msg/msg_jp.yml | 7 +- .../resources/template/deviceInfo_zh.xlsx | Bin 10708 -> 11015 bytes .../resources/template/en/deviceInfo_en.xlsx | Bin 10571 -> 10873 bytes .../resources/template/jp/deviceInfo_jp.xlsx | Bin 10854 -> 11192 bytes .../business/dao/auto/DeviceGroupMapper.java | 96 +++ .../dao/auto/DeviceGroupRelationMapper.java | 64 ++ .../business/dao/ex/DeviceGroupMapperExt.java | 11 + .../dao/ex/DeviceGroupRelationMapperExt.java | 10 + .../mappers/auto/BasicAssetClassBigMapper.xml | 29 +- .../mappers/auto/BasicBuildingMapper.xml | 27 +- .../mappers/auto/DeviceGroupMapper.xml | 319 +++++++ .../auto/DeviceGroupRelationMapper.xml | 185 ++++ .../mappers/ex/DeviceInfoMapperExt.xml | 12 +- .../mybatis-generator/generatorConfig.xml | 9 + .../deviceinfo/AlarmLevelMapping.java | 40 + .../deviceinfo/DeviceGroupRelationExcel.java | 14 + .../deviceinfo/DeviceInfoExcel.java | 18 + .../deviceinfo/DeviceInfoExcelCn.java | 19 +- .../deviceinfo/DeviceInfoExcelEn.java | 18 + .../deviceinfo/DeviceInfoExcelJp.java | 18 + .../business/model/BasicAssetClassBig.java | 34 + .../business/model/BasicBuilding.java | 34 + .../business/model/BasicBuildingExample.java | 60 ++ .../business/model/DeviceGroup.java | 302 +++++++ .../business/model/DeviceGroupExample.java | 802 ++++++++++++++++++ .../business/model/DeviceGroupRelation.java | 98 +++ .../model/DeviceGroupRelationExample.java | 422 +++++++++ .../service/impl/DeviceServiceImpl.java | 243 ++++-- 30 files changed, 2824 insertions(+), 79 deletions(-) create mode 100644 data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/auto/DeviceGroupMapper.java create mode 100644 data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/auto/DeviceGroupRelationMapper.java create mode 100644 data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/DeviceGroupMapperExt.java create mode 100644 data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/DeviceGroupRelationMapperExt.java create mode 100644 data-center-business-dao/src/main/resources/mappers/auto/DeviceGroupMapper.xml create mode 100644 data-center-business-dao/src/main/resources/mappers/auto/DeviceGroupRelationMapper.xml create mode 100644 data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/AlarmLevelMapping.java create mode 100644 data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceGroupRelationExcel.java create mode 100644 data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroup.java create mode 100644 data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupExample.java create mode 100644 data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupRelation.java create mode 100644 data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupRelationExample.java diff --git a/data-center-business-common/src/main/resources/config/language/msg/msg_cn.yml b/data-center-business-common/src/main/resources/config/language/msg/msg_cn.yml index 46d2b7a..55bee5a 100644 --- a/data-center-business-common/src/main/resources/config/language/msg/msg_cn.yml +++ b/data-center-business-common/src/main/resources/config/language/msg/msg_cn.yml @@ -186,3 +186,8 @@ msgcn: spaceIdDumplicated: 空间Id已存在 spaceIdNotExist: 空间Id不存在 personnasSpaceIdCannotBeNull: 人员空间Id不能为空 + dataProviderGatewayInfoNotExist: 网关情报不存在 + alarmLevelNotExist: 告警级别错误 + dataProviderNotExist: 数据提供方不存在 + monitoringPointCategoryNotExist: 监控点分类不存在 + deviceGroupNotExist: 设备组不存在 diff --git a/data-center-business-common/src/main/resources/config/language/msg/msg_en.yml b/data-center-business-common/src/main/resources/config/language/msg/msg_en.yml index 8fe6d26..8dbabc5 100644 --- a/data-center-business-common/src/main/resources/config/language/msg/msg_en.yml +++ b/data-center-business-common/src/main/resources/config/language/msg/msg_en.yml @@ -185,4 +185,9 @@ msgen: spaceIdOrSpaceNameIsNull: Space ID or space name is required. spaceIdDumplicated: The space ID is duplicated spaceIdNotExist: Space ID does not exist - personnasSpaceIdCannotBeNull: Personas space ID cannot be null \ No newline at end of file + personnasSpaceIdCannotBeNull: Personas space ID cannot be null + dataProviderGatewayInfoNotExist: Gateway information does not exist + alarmLevelNotExist: Alarm level error + dataProviderNotExist: Data provider does not exist + monitoringPointCategoryNotExist: Monitoring point category does not exist + deviceGroupNotExist: Device group does not exist \ No newline at end of file diff --git a/data-center-business-common/src/main/resources/config/language/msg/msg_jp.yml b/data-center-business-common/src/main/resources/config/language/msg/msg_jp.yml index 02d183f..df2ada9 100644 --- a/data-center-business-common/src/main/resources/config/language/msg/msg_jp.yml +++ b/data-center-business-common/src/main/resources/config/language/msg/msg_jp.yml @@ -185,4 +185,9 @@ msgjp: spaceIdOrSpaceNameIsNull: 空間IDまたは空間名が空です spaceIdDumplicated: 空間IDが重複しています spaceIdNotExist: 空間IDは存在しません - personnasSpaceIdCannotBeNull: 個人空間IDは空です \ No newline at end of file + personnasSpaceIdCannotBeNull: 個人空間IDは空です + dataProviderGatewayInfoNotExist: ゲートウェイ情報が存在しません + alarmLevelNotExist: アラームレベルが正しくありません + dataProviderNotExist: データ提供者が存在しません + monitoringPointCategoryNotExist: 監視ポイント分類が存在しません + deviceGroupNotExist: デバイスグループが存在しません \ No newline at end of file diff --git a/data-center-business-controller/src/main/resources/template/deviceInfo_zh.xlsx b/data-center-business-controller/src/main/resources/template/deviceInfo_zh.xlsx index a5cf97be0c4d63a0fdd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?n26HKDq`X1*Z7@27^wD=pp}<|tl5cSn!C&o@_i7=RBnmr_%gEAv_wF&rp(L5v9U z88e5Vz-5y+hVmi1^BY?^4!1B=Du7ze*DqI8lG~V}A5}QHr2Xw2OK+nE`aT9h*bVNG9=Po*F@5nBe#o`1+9Um*k0OYVNM% z#y%+{7K?-+qttGy+{F)l4S7iKngvUjR&m2U^)C$R4+U-a zi;w6B-o0qW6XI-~XYQooUcQ?o+ZGo!TdZ;sU-Io?y;J>Jj@Coy0PWy`p>Wi`YTx@R~k;1;{ZB3MHBs#*T_ z-*LD|^M4Ni#~h0PHykGM*3Z*TQ82Jo5gsmI4*9Oj(GCLO^kD25&*W}xQYog`o#-7V z-{xOKnUXz1naCK~dk;z8|Iv_>t?S_2)PhE9tE>CvUO28^xM-j|9hih+E38Mp9UDae zf7C(n`j>CJ{(jfUYx^c+Vhd1D&0#(V02^38q?UdQ2oK-xI67N3V_z3G z%GP0a2wJ!6y#+OrWZ*xqdq!y#-|!Mz{1_zOTcf+2(>K7luTh@CXV?jWFkuvX-$8IE5USv$2J^HDXMtOBXHiv%RNy3vM z!uyrN=&r!FwaQ6!2)H2j8O9j#PFXet+mW@|Mc4MprJwOlRPE_`Z*BMr&mASIMK=kS zs$pRzZVn-@EgmWoTXJshfQ;7kC7P{{n~yN+&8IaJ6GxB1XS8$ZsYb!1)Cp*a@nE(o z*}=+~cr?#g2cqhBBZ2>%?RjbP^1JqKSm1K^V4lJwSav+cvdJHbs+czw^M~^15jMn0 zY3KW4mjTC!DI3m2gd3MA%s_&|;f1dQi}-O9!m_{-ejFuCocrhA`%(J$;vSaE zPE-S~v*D6q3c%lJaicIib^0&IR7Z~y=R diff --git a/data-center-business-controller/src/main/resources/template/jp/deviceInfo_jp.xlsx b/data-center-business-controller/src/main/resources/template/jp/deviceInfo_jp.xlsx index 8261f6c31ce39b25f3594ceb7e4b3951a01523c2..146f8080e12abbd347ddf8b113b9a9b0635beec3 100644 GIT binary patch delta 4105 zcmeH~Rag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enter/business/dao/auto/DeviceGroupMapper.java b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/auto/DeviceGroupMapper.java new file mode 100644 index 0000000..39f2d1b --- /dev/null +++ b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/auto/DeviceGroupMapper.java @@ -0,0 +1,96 @@ +package com.techsor.datacenter.business.dao.auto; + +import com.techsor.datacenter.business.model.DeviceGroup; +import com.techsor.datacenter.business.model.DeviceGroupExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface DeviceGroupMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + long countByExample(DeviceGroupExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + int deleteByExample(DeviceGroupExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + int insert(DeviceGroup record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + int insertSelective(DeviceGroup record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + List selectByExample(DeviceGroupExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + DeviceGroup selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") DeviceGroup record, @Param("example") DeviceGroupExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + int updateByExample(@Param("record") DeviceGroup record, @Param("example") DeviceGroupExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(DeviceGroup record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + int updateByPrimaryKey(DeviceGroup record); +} \ No newline at end of file diff --git a/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/auto/DeviceGroupRelationMapper.java b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/auto/DeviceGroupRelationMapper.java new file mode 100644 index 0000000..1746e0b --- /dev/null +++ b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/auto/DeviceGroupRelationMapper.java @@ -0,0 +1,64 @@ +package com.techsor.datacenter.business.dao.auto; + +import com.techsor.datacenter.business.model.DeviceGroupRelation; +import com.techsor.datacenter.business.model.DeviceGroupRelationExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface DeviceGroupRelationMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + long countByExample(DeviceGroupRelationExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + int deleteByExample(DeviceGroupRelationExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + int insert(DeviceGroupRelation record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + int insertSelective(DeviceGroupRelation record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + List selectByExample(DeviceGroupRelationExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") DeviceGroupRelation record, @Param("example") DeviceGroupRelationExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + int updateByExample(@Param("record") DeviceGroupRelation record, @Param("example") DeviceGroupRelationExample example); +} \ No newline at end of file diff --git a/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/DeviceGroupMapperExt.java b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/DeviceGroupMapperExt.java new file mode 100644 index 0000000..0a680ee --- /dev/null +++ b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/DeviceGroupMapperExt.java @@ -0,0 +1,11 @@ +package com.techsor.datacenter.business.dao.ex; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; + +import com.techsor.datacenter.business.dao.auto.DeviceGroupMapper; + +@Mapper +public interface DeviceGroupMapperExt extends DeviceGroupMapper { +} diff --git a/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/DeviceGroupRelationMapperExt.java b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/DeviceGroupRelationMapperExt.java new file mode 100644 index 0000000..01aa699 --- /dev/null +++ b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/DeviceGroupRelationMapperExt.java @@ -0,0 +1,10 @@ +package com.techsor.datacenter.business.dao.ex; + +import org.apache.ibatis.annotations.Mapper; + +import com.techsor.datacenter.business.dao.auto.DeviceGroupRelationMapper; + +@Mapper +public interface DeviceGroupRelationMapperExt extends DeviceGroupRelationMapper { + +} diff --git a/data-center-business-dao/src/main/resources/mappers/auto/BasicAssetClassBigMapper.xml b/data-center-business-dao/src/main/resources/mappers/auto/BasicAssetClassBigMapper.xml index 272974a..21f3c74 100644 --- a/data-center-business-dao/src/main/resources/mappers/auto/BasicAssetClassBigMapper.xml +++ b/data-center-business-dao/src/main/resources/mappers/auto/BasicAssetClassBigMapper.xml @@ -19,6 +19,7 @@ --> + - thumbnail_normal_base64, thumbnail_alarm_base64 + thumbnail_normal_base64, thumbnail_alarm_base64, thumbnail_dis_base64 + + select + + distinct + + 'true' as QUERYID, + + from dashboard_device_group + + + + + order by ${orderByClause} + + + + + + delete from dashboard_device_group + where id = #{id,jdbcType=BIGINT} + + + + delete from dashboard_device_group + + + + + + + + SELECT LAST_INSERT_ID() + + insert into dashboard_device_group (company_id, building_id, `name`, + remark, flag, created_by, + created_at) + values (#{companyId,jdbcType=BIGINT}, #{buildingId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, + #{remark,jdbcType=VARCHAR}, #{flag,jdbcType=INTEGER}, #{createdBy,jdbcType=BIGINT}, + #{createdAt,jdbcType=BIGINT}) + + + + + SELECT LAST_INSERT_ID() + + insert into dashboard_device_group + + + company_id, + + + building_id, + + + `name`, + + + remark, + + + flag, + + + created_by, + + + created_at, + + + + + #{companyId,jdbcType=BIGINT}, + + + #{buildingId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, + + + #{flag,jdbcType=INTEGER}, + + + #{createdBy,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=BIGINT}, + + + + + + + update dashboard_device_group + + + id = #{record.id,jdbcType=BIGINT}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + building_id = #{record.buildingId,jdbcType=BIGINT}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + flag = #{record.flag,jdbcType=INTEGER}, + + + created_by = #{record.createdBy,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=BIGINT}, + + + + + + + + + update dashboard_device_group + set id = #{record.id,jdbcType=BIGINT}, + company_id = #{record.companyId,jdbcType=BIGINT}, + building_id = #{record.buildingId,jdbcType=BIGINT}, + `name` = #{record.name,jdbcType=VARCHAR}, + remark = #{record.remark,jdbcType=VARCHAR}, + flag = #{record.flag,jdbcType=INTEGER}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=BIGINT} + + + + + + + update dashboard_device_group + + + company_id = #{companyId,jdbcType=BIGINT}, + + + building_id = #{buildingId,jdbcType=BIGINT}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + flag = #{flag,jdbcType=INTEGER}, + + + created_by = #{createdBy,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + + update dashboard_device_group + set company_id = #{companyId,jdbcType=BIGINT}, + building_id = #{buildingId,jdbcType=BIGINT}, + `name` = #{name,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + flag = #{flag,jdbcType=INTEGER}, + created_by = #{createdBy,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/data-center-business-dao/src/main/resources/mappers/auto/DeviceGroupRelationMapper.xml b/data-center-business-dao/src/main/resources/mappers/auto/DeviceGroupRelationMapper.xml new file mode 100644 index 0000000..27e62e6 --- /dev/null +++ b/data-center-business-dao/src/main/resources/mappers/auto/DeviceGroupRelationMapper.xml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + device_info_id, device_group_id + + + + + delete from dashboard_device_group_relation + + + + + + + insert into dashboard_device_group_relation (device_info_id, device_group_id) + values (#{deviceInfoId,jdbcType=INTEGER}, #{deviceGroupId,jdbcType=BIGINT}) + + + + insert into dashboard_device_group_relation + + + device_info_id, + + + device_group_id, + + + + + #{deviceInfoId,jdbcType=INTEGER}, + + + #{deviceGroupId,jdbcType=BIGINT}, + + + + + + + update dashboard_device_group_relation + + + device_info_id = #{record.deviceInfoId,jdbcType=INTEGER}, + + + device_group_id = #{record.deviceGroupId,jdbcType=BIGINT}, + + + + + + + + + update dashboard_device_group_relation + set device_info_id = #{record.deviceInfoId,jdbcType=INTEGER}, + device_group_id = #{record.deviceGroupId,jdbcType=BIGINT} + + + + + \ No newline at end of file diff --git a/data-center-business-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml b/data-center-business-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml index c3d9a1b..3afe20e 100644 --- a/data-center-business-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml +++ b/data-center-business-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml @@ -3,7 +3,11 @@ - INSERT INTO device_info (device_id, device_sn, type_id, wsclient_id, space_id, device_name, remark, building_id, asset_id, flag, company_id, created_by, created_timestamp, updated_by, updated_timestamp, project_id, floor_id) + INSERT INTO device_info (device_id, device_sn, type_id, wsclient_id, space_id, + device_name, remark, building_id, asset_id, flag, company_id, + created_by, created_timestamp, updated_by, updated_timestamp, + project_id, floor_id, monitoring_point_name, data_provider_id, + gateway_info_id, alarm_level) VALUES ( @@ -23,7 +27,11 @@ #{item.updatedBy,jdbcType=BIGINT}, #{item.updatedTimestamp,jdbcType=BIGINT}, #{item.projectId,jdbcType=BIGINT}, - #{item.floorId,jdbcType=BIGINT} + #{item.floorId,jdbcType=BIGINT}, + #{item.monitoringPointName,jdbcType=VARCHAR}, + #{item.dataProviderId,jdbcType=BIGINT}, + #{item.gatewayInfoId,jdbcType=BIGINT}, + #{item.alarmLevel,jdbcType=INTEGER} ) diff --git a/data-center-business-dao/src/main/resources/mybatis-generator/generatorConfig.xml b/data-center-business-dao/src/main/resources/mybatis-generator/generatorConfig.xml index edaa7bc..00970e0 100644 --- a/data-center-business-dao/src/main/resources/mybatis-generator/generatorConfig.xml +++ b/data-center-business-dao/src/main/resources/mybatis-generator/generatorConfig.xml @@ -261,5 +261,14 @@ + + + + +
+ + + +
\ No newline at end of file diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/AlarmLevelMapping.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/AlarmLevelMapping.java new file mode 100644 index 0000000..07058ec --- /dev/null +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/AlarmLevelMapping.java @@ -0,0 +1,40 @@ +package com.techsor.datacenter.business.importexcel.deviceinfo; + +import java.util.HashMap; +import java.util.Map; + +public class AlarmLevelMapping { + + // 初始化映射关系 + public static final Map> statusMap = new HashMap<>(); + // 中文映射 + public static final Map zhMap = new HashMap<>(); + // 英文映射 + public static final Map enMap = new HashMap<>(); + // 日文映射 + public static final Map jaMap = new HashMap<>(); + + static { + zhMap.put("正常", 1); + zhMap.put("紧急", 2); + zhMap.put("严重故障", 3); + zhMap.put("中等故障", 4); + zhMap.put("轻微故障", 5); + + enMap.put("Normal", 1); + enMap.put("Emergency", 2); + enMap.put("Critical Failure", 3); + enMap.put("Medium Failure", 4); + enMap.put("Minor Failure", 5); + + jaMap.put("正常", 1); + jaMap.put("緊急", 2); + jaMap.put("重大故障", 3); + jaMap.put("中程度の故障", 4); + jaMap.put("軽微な故障", 5); + + statusMap.put(0, zhMap); + statusMap.put(1, enMap); + statusMap.put(2, jaMap); + } +} diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceGroupRelationExcel.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceGroupRelationExcel.java new file mode 100644 index 0000000..5d42d99 --- /dev/null +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceGroupRelationExcel.java @@ -0,0 +1,14 @@ +package com.techsor.datacenter.business.importexcel.deviceinfo; + +import lombok.Data; + +@Data +public class DeviceGroupRelationExcel { + + private Integer deviceInfoId; + + private Long deviceGroupId; + + private String deviceId; + +} diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcel.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcel.java index 8ad74e5..cea60b7 100644 --- a/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcel.java +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcel.java @@ -55,4 +55,22 @@ public class DeviceInfoExcel { @ExcelProperty(value ="IoT Core") private String iotCoreName; + @ExcelProperty(value ="监控点名称") + private String monitoringPointName; + + @ExcelProperty(value ="网关情报名称") + private String gatewayInfo; + + @ExcelProperty(value ="告警级别") + private String alarmLevel; + + @ExcelProperty(value ="数据提供方") + private String dataProvider; + + @ExcelProperty(value ="监控点分类") + private String monitoringPointCategory; + + @ExcelProperty(value ="设备组") + private String deviceGroup; + } diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelCn.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelCn.java index 068ec43..e2e3061 100644 --- a/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelCn.java +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelCn.java @@ -79,6 +79,23 @@ public class DeviceInfoExcelCn { @ExcelProperty(value ="MQTT项目名") private String iotCoreName; - + + @ExcelProperty(value ="监控点名称") + private String monitoringPointName; + + @ExcelProperty(value ="网关情报名称") + private String gatewayInfo; + + @ExcelProperty(value ="告警级别") + private String alarmLevel; + + @ExcelProperty(value ="数据提供方") + private String dataProvider; + + @ExcelProperty(value ="监控点分类") + private String monitoringPointCategory; + + @ExcelProperty(value ="设备组") + private String deviceGroup; } diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelEn.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelEn.java index 8cb95ce..8f4a9a4 100644 --- a/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelEn.java +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelEn.java @@ -49,5 +49,23 @@ public class DeviceInfoExcelEn { @ExcelProperty(value ="MQTT Name") private String iotCoreName; + + @ExcelProperty(value ="Monitoring Point Name") + private String monitoringPointName; + + @ExcelProperty(value ="Gateway Data Provider Name") + private String gatewayInfo; + + @ExcelProperty(value ="Alarm Level") + private String alarmLevel; + + @ExcelProperty(value ="Data Provider") + private String dataProvider; + + @ExcelProperty(value ="Monitoring Point Category") + private String monitoringPointCategory; + + @ExcelProperty(value ="Device Group") + private String deviceGroup; } diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelJp.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelJp.java index 9087642..f45b437 100644 --- a/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelJp.java +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelJp.java @@ -51,5 +51,23 @@ public class DeviceInfoExcelJp { @ExcelProperty(value ="MQTT項目名") private String iotCoreName; + + @ExcelProperty(value ="監視ポイント名") + private String monitoringPointName; + + @ExcelProperty(value ="ゲートウェイ情報名") + private String gatewayInfo; + + @ExcelProperty(value ="アラームレベル") + private String alarmLevel; + + @ExcelProperty(value ="データ提供元") + private String dataProvider; + + @ExcelProperty(value ="監視ポイント分類") + private String monitoringPointCategory; + + @ExcelProperty(value ="デバイスグループ") + private String deviceGroup; } diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicAssetClassBig.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicAssetClassBig.java index 924885d..a6ce697 100644 --- a/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicAssetClassBig.java +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicAssetClassBig.java @@ -66,6 +66,15 @@ public class BasicAssetClassBig implements Serializable { */ private String thumbnailAlarmBase64; + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column basic_asset_class_big.thumbnail_dis_base64 + * + * @mbg.generated + */ + private String thumbnailDisBase64; + /** * This field was generated by MyBatis Generator. * This field corresponds to the database table basic_asset_class_big @@ -242,6 +251,30 @@ public class BasicAssetClassBig implements Serializable { this.thumbnailAlarmBase64 = thumbnailAlarmBase64 == null ? null : thumbnailAlarmBase64.trim(); } + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column basic_asset_class_big.thumbnail_dis_base64 + * + * @return the value of basic_asset_class_big.thumbnail_dis_base64 + * + * @mbg.generated + */ + public String getThumbnailDisBase64() { + return thumbnailDisBase64; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column basic_asset_class_big.thumbnail_dis_base64 + * + * @param thumbnailDisBase64 the value for basic_asset_class_big.thumbnail_dis_base64 + * + * @mbg.generated + */ + public void setThumbnailDisBase64(String thumbnailDisBase64) { + this.thumbnailDisBase64 = thumbnailDisBase64 == null ? null : thumbnailDisBase64.trim(); + } + /** * This method was generated by MyBatis Generator. * This method corresponds to the database table basic_asset_class_big @@ -261,6 +294,7 @@ public class BasicAssetClassBig implements Serializable { sb.append(", flag=").append(flag); sb.append(", thumbnailNormalBase64=").append(thumbnailNormalBase64); sb.append(", thumbnailAlarmBase64=").append(thumbnailAlarmBase64); + sb.append(", thumbnailDisBase64=").append(thumbnailDisBase64); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicBuilding.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicBuilding.java index 13187e4..d5b6f21 100644 --- a/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicBuilding.java +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicBuilding.java @@ -147,6 +147,15 @@ public class BasicBuilding implements Serializable { */ private String longitude; + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column basic_building.retain_alert + * + * @mbg.generated + */ + private Integer retainAlert; + /** * * This field was generated by MyBatis Generator. @@ -557,6 +566,30 @@ public class BasicBuilding implements Serializable { this.longitude = longitude == null ? null : longitude.trim(); } + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column basic_building.retain_alert + * + * @return the value of basic_building.retain_alert + * + * @mbg.generated + */ + public Integer getRetainAlert() { + return retainAlert; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column basic_building.retain_alert + * + * @param retainAlert the value for basic_building.retain_alert + * + * @mbg.generated + */ + public void setRetainAlert(Integer retainAlert) { + this.retainAlert = retainAlert; + } + /** * This method was generated by MyBatis Generator. * This method returns the value of the database column basic_building.floor_info_list @@ -633,6 +666,7 @@ public class BasicBuilding implements Serializable { sb.append(", briefIntroduction=").append(briefIntroduction); sb.append(", latitude=").append(latitude); sb.append(", longitude=").append(longitude); + sb.append(", retainAlert=").append(retainAlert); sb.append(", floorInfoList=").append(floorInfoList); sb.append(", pictureIntroduction=").append(pictureIntroduction); sb.append(", serialVersionUID=").append(serialVersionUID); diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicBuildingExample.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicBuildingExample.java index 88af535..2a98ab5 100644 --- a/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicBuildingExample.java +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicBuildingExample.java @@ -1223,6 +1223,66 @@ public class BasicBuildingExample { addCriterion("longitude not between", value1, value2, "longitude"); return (Criteria) this; } + + public Criteria andRetainAlertIsNull() { + addCriterion("retain_alert is null"); + return (Criteria) this; + } + + public Criteria andRetainAlertIsNotNull() { + addCriterion("retain_alert is not null"); + return (Criteria) this; + } + + public Criteria andRetainAlertEqualTo(Integer value) { + addCriterion("retain_alert =", value, "retainAlert"); + return (Criteria) this; + } + + public Criteria andRetainAlertNotEqualTo(Integer value) { + addCriterion("retain_alert <>", value, "retainAlert"); + return (Criteria) this; + } + + public Criteria andRetainAlertGreaterThan(Integer value) { + addCriterion("retain_alert >", value, "retainAlert"); + return (Criteria) this; + } + + public Criteria andRetainAlertGreaterThanOrEqualTo(Integer value) { + addCriterion("retain_alert >=", value, "retainAlert"); + return (Criteria) this; + } + + public Criteria andRetainAlertLessThan(Integer value) { + addCriterion("retain_alert <", value, "retainAlert"); + return (Criteria) this; + } + + public Criteria andRetainAlertLessThanOrEqualTo(Integer value) { + addCriterion("retain_alert <=", value, "retainAlert"); + return (Criteria) this; + } + + public Criteria andRetainAlertIn(List values) { + addCriterion("retain_alert in", values, "retainAlert"); + return (Criteria) this; + } + + public Criteria andRetainAlertNotIn(List values) { + addCriterion("retain_alert not in", values, "retainAlert"); + return (Criteria) this; + } + + public Criteria andRetainAlertBetween(Integer value1, Integer value2) { + addCriterion("retain_alert between", value1, value2, "retainAlert"); + return (Criteria) this; + } + + public Criteria andRetainAlertNotBetween(Integer value1, Integer value2) { + addCriterion("retain_alert not between", value1, value2, "retainAlert"); + return (Criteria) this; + } } /** diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroup.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroup.java new file mode 100644 index 0000000..9664f94 --- /dev/null +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroup.java @@ -0,0 +1,302 @@ +package com.techsor.datacenter.business.model; + +import java.io.Serializable; + +public class DeviceGroup implements Serializable { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_device_group.id + * + * @mbg.generated + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_device_group.company_id + * + * @mbg.generated + */ + private Long companyId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_device_group.building_id + * + * @mbg.generated + */ + private Long buildingId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_device_group.name + * + * @mbg.generated + */ + private String name; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_device_group.remark + * + * @mbg.generated + */ + private String remark; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_device_group.flag + * + * @mbg.generated + */ + private Integer flag; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_device_group.created_by + * + * @mbg.generated + */ + private Long createdBy; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_device_group.created_at + * + * @mbg.generated + */ + private Long createdAt; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_device_group.id + * + * @return the value of dashboard_device_group.id + * + * @mbg.generated + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_device_group.id + * + * @param id the value for dashboard_device_group.id + * + * @mbg.generated + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_device_group.company_id + * + * @return the value of dashboard_device_group.company_id + * + * @mbg.generated + */ + public Long getCompanyId() { + return companyId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_device_group.company_id + * + * @param companyId the value for dashboard_device_group.company_id + * + * @mbg.generated + */ + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_device_group.building_id + * + * @return the value of dashboard_device_group.building_id + * + * @mbg.generated + */ + public Long getBuildingId() { + return buildingId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_device_group.building_id + * + * @param buildingId the value for dashboard_device_group.building_id + * + * @mbg.generated + */ + public void setBuildingId(Long buildingId) { + this.buildingId = buildingId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_device_group.name + * + * @return the value of dashboard_device_group.name + * + * @mbg.generated + */ + public String getName() { + return name; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_device_group.name + * + * @param name the value for dashboard_device_group.name + * + * @mbg.generated + */ + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_device_group.remark + * + * @return the value of dashboard_device_group.remark + * + * @mbg.generated + */ + public String getRemark() { + return remark; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_device_group.remark + * + * @param remark the value for dashboard_device_group.remark + * + * @mbg.generated + */ + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_device_group.flag + * + * @return the value of dashboard_device_group.flag + * + * @mbg.generated + */ + public Integer getFlag() { + return flag; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_device_group.flag + * + * @param flag the value for dashboard_device_group.flag + * + * @mbg.generated + */ + public void setFlag(Integer flag) { + this.flag = flag; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_device_group.created_by + * + * @return the value of dashboard_device_group.created_by + * + * @mbg.generated + */ + public Long getCreatedBy() { + return createdBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_device_group.created_by + * + * @param createdBy the value for dashboard_device_group.created_by + * + * @mbg.generated + */ + public void setCreatedBy(Long createdBy) { + this.createdBy = createdBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_device_group.created_at + * + * @return the value of dashboard_device_group.created_at + * + * @mbg.generated + */ + public Long getCreatedAt() { + return createdAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_device_group.created_at + * + * @param createdAt the value for dashboard_device_group.created_at + * + * @mbg.generated + */ + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", companyId=").append(companyId); + sb.append(", buildingId=").append(buildingId); + sb.append(", name=").append(name); + sb.append(", remark=").append(remark); + sb.append(", flag=").append(flag); + sb.append(", createdBy=").append(createdBy); + sb.append(", createdAt=").append(createdAt); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupExample.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupExample.java new file mode 100644 index 0000000..9b7b55d --- /dev/null +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupExample.java @@ -0,0 +1,802 @@ +package com.techsor.datacenter.business.model; + +import java.util.ArrayList; +import java.util.List; + +public class DeviceGroupExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + public DeviceGroupExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andBuildingIdIsNull() { + addCriterion("building_id is null"); + return (Criteria) this; + } + + public Criteria andBuildingIdIsNotNull() { + addCriterion("building_id is not null"); + return (Criteria) this; + } + + public Criteria andBuildingIdEqualTo(Long value) { + addCriterion("building_id =", value, "buildingId"); + return (Criteria) this; + } + + public Criteria andBuildingIdNotEqualTo(Long value) { + addCriterion("building_id <>", value, "buildingId"); + return (Criteria) this; + } + + public Criteria andBuildingIdGreaterThan(Long value) { + addCriterion("building_id >", value, "buildingId"); + return (Criteria) this; + } + + public Criteria andBuildingIdGreaterThanOrEqualTo(Long value) { + addCriterion("building_id >=", value, "buildingId"); + return (Criteria) this; + } + + public Criteria andBuildingIdLessThan(Long value) { + addCriterion("building_id <", value, "buildingId"); + return (Criteria) this; + } + + public Criteria andBuildingIdLessThanOrEqualTo(Long value) { + addCriterion("building_id <=", value, "buildingId"); + return (Criteria) this; + } + + public Criteria andBuildingIdIn(List values) { + addCriterion("building_id in", values, "buildingId"); + return (Criteria) this; + } + + public Criteria andBuildingIdNotIn(List values) { + addCriterion("building_id not in", values, "buildingId"); + return (Criteria) this; + } + + public Criteria andBuildingIdBetween(Long value1, Long value2) { + addCriterion("building_id between", value1, value2, "buildingId"); + return (Criteria) this; + } + + public Criteria andBuildingIdNotBetween(Long value1, Long value2) { + addCriterion("building_id not between", value1, value2, "buildingId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andFlagIsNull() { + addCriterion("flag is null"); + return (Criteria) this; + } + + public Criteria andFlagIsNotNull() { + addCriterion("flag is not null"); + return (Criteria) this; + } + + public Criteria andFlagEqualTo(Integer value) { + addCriterion("flag =", value, "flag"); + return (Criteria) this; + } + + public Criteria andFlagNotEqualTo(Integer value) { + addCriterion("flag <>", value, "flag"); + return (Criteria) this; + } + + public Criteria andFlagGreaterThan(Integer value) { + addCriterion("flag >", value, "flag"); + return (Criteria) this; + } + + public Criteria andFlagGreaterThanOrEqualTo(Integer value) { + addCriterion("flag >=", value, "flag"); + return (Criteria) this; + } + + public Criteria andFlagLessThan(Integer value) { + addCriterion("flag <", value, "flag"); + return (Criteria) this; + } + + public Criteria andFlagLessThanOrEqualTo(Integer value) { + addCriterion("flag <=", value, "flag"); + return (Criteria) this; + } + + public Criteria andFlagIn(List values) { + addCriterion("flag in", values, "flag"); + return (Criteria) this; + } + + public Criteria andFlagNotIn(List values) { + addCriterion("flag not in", values, "flag"); + return (Criteria) this; + } + + public Criteria andFlagBetween(Integer value1, Integer value2) { + addCriterion("flag between", value1, value2, "flag"); + return (Criteria) this; + } + + public Criteria andFlagNotBetween(Integer value1, Integer value2) { + addCriterion("flag not between", value1, value2, "flag"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNull() { + addCriterion("created_by is null"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNotNull() { + addCriterion("created_by is not null"); + return (Criteria) this; + } + + public Criteria andCreatedByEqualTo(Long value) { + addCriterion("created_by =", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotEqualTo(Long value) { + addCriterion("created_by <>", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThan(Long value) { + addCriterion("created_by >", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThanOrEqualTo(Long value) { + addCriterion("created_by >=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThan(Long value) { + addCriterion("created_by <", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThanOrEqualTo(Long value) { + addCriterion("created_by <=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByIn(List values) { + addCriterion("created_by in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotIn(List values) { + addCriterion("created_by not in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByBetween(Long value1, Long value2) { + addCriterion("created_by between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotBetween(Long value1, Long value2) { + addCriterion("created_by not between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Long value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Long value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Long value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Long value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Long value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Long value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Long value1, Long value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Long value1, Long value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_device_group + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_device_group + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupRelation.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupRelation.java new file mode 100644 index 0000000..0dc75d2 --- /dev/null +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupRelation.java @@ -0,0 +1,98 @@ +package com.techsor.datacenter.business.model; + +import java.io.Serializable; + +public class DeviceGroupRelation implements Serializable { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_device_group_relation.device_info_id + * + * @mbg.generated + */ + private Integer deviceInfoId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_device_group_relation.device_group_id + * + * @mbg.generated + */ + private Long deviceGroupId; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_device_group_relation.device_info_id + * + * @return the value of dashboard_device_group_relation.device_info_id + * + * @mbg.generated + */ + public Integer getDeviceInfoId() { + return deviceInfoId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_device_group_relation.device_info_id + * + * @param deviceInfoId the value for dashboard_device_group_relation.device_info_id + * + * @mbg.generated + */ + public void setDeviceInfoId(Integer deviceInfoId) { + this.deviceInfoId = deviceInfoId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_device_group_relation.device_group_id + * + * @return the value of dashboard_device_group_relation.device_group_id + * + * @mbg.generated + */ + public Long getDeviceGroupId() { + return deviceGroupId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_device_group_relation.device_group_id + * + * @param deviceGroupId the value for dashboard_device_group_relation.device_group_id + * + * @mbg.generated + */ + public void setDeviceGroupId(Long deviceGroupId) { + this.deviceGroupId = deviceGroupId; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", deviceInfoId=").append(deviceInfoId); + sb.append(", deviceGroupId=").append(deviceGroupId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupRelationExample.java b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupRelationExample.java new file mode 100644 index 0000000..8baf1d6 --- /dev/null +++ b/data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupRelationExample.java @@ -0,0 +1,422 @@ +package com.techsor.datacenter.business.model; + +import java.util.ArrayList; +import java.util.List; + +public class DeviceGroupRelationExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + public DeviceGroupRelationExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andDeviceInfoIdIsNull() { + addCriterion("device_info_id is null"); + return (Criteria) this; + } + + public Criteria andDeviceInfoIdIsNotNull() { + addCriterion("device_info_id is not null"); + return (Criteria) this; + } + + public Criteria andDeviceInfoIdEqualTo(Integer value) { + addCriterion("device_info_id =", value, "deviceInfoId"); + return (Criteria) this; + } + + public Criteria andDeviceInfoIdNotEqualTo(Integer value) { + addCriterion("device_info_id <>", value, "deviceInfoId"); + return (Criteria) this; + } + + public Criteria andDeviceInfoIdGreaterThan(Integer value) { + addCriterion("device_info_id >", value, "deviceInfoId"); + return (Criteria) this; + } + + public Criteria andDeviceInfoIdGreaterThanOrEqualTo(Integer value) { + addCriterion("device_info_id >=", value, "deviceInfoId"); + return (Criteria) this; + } + + public Criteria andDeviceInfoIdLessThan(Integer value) { + addCriterion("device_info_id <", value, "deviceInfoId"); + return (Criteria) this; + } + + public Criteria andDeviceInfoIdLessThanOrEqualTo(Integer value) { + addCriterion("device_info_id <=", value, "deviceInfoId"); + return (Criteria) this; + } + + public Criteria andDeviceInfoIdIn(List values) { + addCriterion("device_info_id in", values, "deviceInfoId"); + return (Criteria) this; + } + + public Criteria andDeviceInfoIdNotIn(List values) { + addCriterion("device_info_id not in", values, "deviceInfoId"); + return (Criteria) this; + } + + public Criteria andDeviceInfoIdBetween(Integer value1, Integer value2) { + addCriterion("device_info_id between", value1, value2, "deviceInfoId"); + return (Criteria) this; + } + + public Criteria andDeviceInfoIdNotBetween(Integer value1, Integer value2) { + addCriterion("device_info_id not between", value1, value2, "deviceInfoId"); + return (Criteria) this; + } + + public Criteria andDeviceGroupIdIsNull() { + addCriterion("device_group_id is null"); + return (Criteria) this; + } + + public Criteria andDeviceGroupIdIsNotNull() { + addCriterion("device_group_id is not null"); + return (Criteria) this; + } + + public Criteria andDeviceGroupIdEqualTo(Long value) { + addCriterion("device_group_id =", value, "deviceGroupId"); + return (Criteria) this; + } + + public Criteria andDeviceGroupIdNotEqualTo(Long value) { + addCriterion("device_group_id <>", value, "deviceGroupId"); + return (Criteria) this; + } + + public Criteria andDeviceGroupIdGreaterThan(Long value) { + addCriterion("device_group_id >", value, "deviceGroupId"); + return (Criteria) this; + } + + public Criteria andDeviceGroupIdGreaterThanOrEqualTo(Long value) { + addCriterion("device_group_id >=", value, "deviceGroupId"); + return (Criteria) this; + } + + public Criteria andDeviceGroupIdLessThan(Long value) { + addCriterion("device_group_id <", value, "deviceGroupId"); + return (Criteria) this; + } + + public Criteria andDeviceGroupIdLessThanOrEqualTo(Long value) { + addCriterion("device_group_id <=", value, "deviceGroupId"); + return (Criteria) this; + } + + public Criteria andDeviceGroupIdIn(List values) { + addCriterion("device_group_id in", values, "deviceGroupId"); + return (Criteria) this; + } + + public Criteria andDeviceGroupIdNotIn(List values) { + addCriterion("device_group_id not in", values, "deviceGroupId"); + return (Criteria) this; + } + + public Criteria andDeviceGroupIdBetween(Long value1, Long value2) { + addCriterion("device_group_id between", value1, value2, "deviceGroupId"); + return (Criteria) this; + } + + public Criteria andDeviceGroupIdNotBetween(Long value1, Long value2) { + addCriterion("device_group_id not between", value1, value2, "deviceGroupId"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_device_group_relation + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/DeviceServiceImpl.java b/data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/DeviceServiceImpl.java index 75a4842..d60a823 100644 --- a/data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/DeviceServiceImpl.java +++ b/data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/DeviceServiceImpl.java @@ -37,6 +37,8 @@ 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.importexcel.deviceAlertInfo.DeviceAlertInfoExcel; +import com.techsor.datacenter.business.importexcel.deviceinfo.AlarmLevelMapping; +import com.techsor.datacenter.business.importexcel.deviceinfo.DeviceGroupRelationExcel; import com.techsor.datacenter.business.importexcel.deviceinfo.DeviceInfoExcel; import com.techsor.datacenter.business.model.*; import com.techsor.datacenter.business.service.IDeviceService; @@ -175,6 +177,18 @@ public class DeviceServiceImpl implements IDeviceService { @Resource private MqttConfigMapperExt mqttConfigMapperExt; + @Resource + private DataProviderGatewayInfoMapperExt gatewayInfoMapperExt; + + @Resource + private DataProviderMapperExt dataProviderMapperExt; + + @Resource + private DeviceGroupMapperExt deviceGroupMapperExt; + + @Resource + private DeviceGroupRelationMapperExt deviceGroupRelationMapperExt; + @Resource private DeviceForwardConfigMapperExt deviceForwardConfigMapperExt; @@ -684,37 +698,39 @@ public class DeviceServiceImpl implements IDeviceService { * @return A list of error messages detailing issues encountered during batch device addition. */ @Override - public List batchAddDeviceInfos(String wsClientId, List dataList, Map s3InfoMap, - Long userId, Long companyId, Integer languageType) { - - List redisList = new ArrayList<>(); - try { - List errorMsgList=new ArrayList<>(); - int dataSize = dataList.size(); - //First, check if it is being imported - boolean absent = true; - for (DeviceInfoExcel deviceInfoExcel : dataList) { - absent = redisUtil.setIfAbsent(deviceInfoExcel.getDeviceId(), userId, 120, TimeUnit.SECONDS); - if (!absent) { - break; - } else { - redisList.add(deviceInfoExcel.getDeviceId()); - } - } - - if (!absent) { - if (CollectionUtils.isNotEmpty(redisList)) { - redisUtil.delKeys(redisList); - } - - errorMsgList.add(msgLanguageChange.getParameterMapByCode(languageType, "deviceIsImporting")); - return errorMsgList; - } - - + public List batchAddDeviceInfos(String wsClientId, List dataList, Map s3InfoMap, + Long userId, Long companyId, Integer languageType) { + + List redisList = new ArrayList<>(); + try { + List errorMsgList=new ArrayList<>(); + int dataSize = dataList.size(); + //First, check if it is being imported + boolean absent = true; + for (DeviceInfoExcel deviceInfoExcel : dataList) { + String importKey = "importing-" + deviceInfoExcel.getDeviceId(); + absent = redisUtil.setIfAbsent(importKey, userId, 120, TimeUnit.SECONDS); + if (!absent) { + break; + } else { + redisList.add(importKey); + } + } + + if (!absent) { + if (CollectionUtils.isNotEmpty(redisList)) { + redisUtil.delKeys(redisList); + } + + errorMsgList.add(msgLanguageChange.getParameterMapByCode(languageType, "deviceIsImporting")); + return errorMsgList; + } + + DataSourceContextHolder.clearCurrentDataSourceKey(); - + List batchInfoList=new ArrayList<>(); + List deviceGroupRelationExcelList = new ArrayList<>(); // BasicCompanyExample basicCompanyExample=new BasicCompanyExample(); // basicCompanyExample.createCriteria().andIdEqualTo(companyId); @@ -726,7 +742,7 @@ public class DeviceServiceImpl implements IDeviceService { int i=1; Long topCompanyId = dataSourceInterceptor.getTopCompanyId(companyId+""); DataSourceContextHolder.setCurrentDataSourceKey("dataSourceForCompany_" + topCompanyId); - + //get iotcore MqttConfigExample mqttConfigExample = new MqttConfigExample(); MqttConfigExample.Criteria mqttCriteria = mqttConfigExample.createCriteria(); @@ -734,12 +750,31 @@ public class DeviceServiceImpl implements IDeviceService { List iotcoreConfigs = mqttConfigMapperExt.selectByExample(mqttConfigExample); Map iotcoreMapping = iotcoreConfigs.stream() .collect(Collectors.toMap(MqttConfig::getMqttName, item -> item)); - - + + DataProviderGatewayInfoExample dataProviderGatewayInfoExample = new DataProviderGatewayInfoExample(); + DataProviderGatewayInfoExample.Criteria dataProviderGatewayInfoCriteria = dataProviderGatewayInfoExample.createCriteria(); + dataProviderGatewayInfoCriteria.andCompanyIdEqualTo(companyId).andFlagNotEqualTo(1); + List dataProviderGatewayInfoList = gatewayInfoMapperExt.selectByExample(dataProviderGatewayInfoExample); + Map dataProviderGatewayInfoMapping = dataProviderGatewayInfoList.stream() + .collect(Collectors.toMap(DataProviderGatewayInfo::getName, item -> item)); + + DataProviderExample dataProviderExample = new DataProviderExample(); + DataProviderExample.Criteria dataProviderCriteria = dataProviderExample.createCriteria(); + dataProviderCriteria.andCompanyIdEqualTo(companyId).andFlagNotEqualTo(1); + List dataProviderList = dataProviderMapperExt.selectByExample(dataProviderExample); + Map dataProviderMapping = dataProviderList.stream() + .collect(Collectors.toMap(DataProvider::getName, item -> item)); + + DeviceGroupExample deviceGroupExample = new DeviceGroupExample(); + List deviceGroupList = deviceGroupMapperExt.selectByExample(deviceGroupExample); + Map deviceGroupMapping = deviceGroupList.stream() + .collect(Collectors.toMap(DeviceGroup::getName, item -> item)); + + List targetFowardCodeIdListCache = new ArrayList<>(); for (int dataIndex=0; dataIndex errorList = new ArrayList<>(); @@ -783,12 +818,39 @@ public class DeviceServiceImpl implements IDeviceService { if (!deviceExists) { errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "deviceTypeNotExist")); } - + // iotcore Check if (StringUtils.isNotBlank(deviceInfoExcel.getIotCoreName()) && !iotcoreMapping.containsKey(deviceInfoExcel.getIotCoreName())) { errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "IoTCoreNotExist")); } + if (StringUtils.isNotBlank(deviceInfoExcel.getGatewayInfo()) && !dataProviderGatewayInfoMapping.containsKey(deviceInfoExcel.getGatewayInfo())) { + errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "dataProviderGatewayInfoNotExist")); + } + + if (StringUtils.isNotBlank(deviceInfoExcel.getAlarmLevel()) && !AlarmLevelMapping.statusMap.get(languageType).containsKey(deviceInfoExcel.getAlarmLevel())) { + errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "alarmLevelNotExist")); + } + + if (StringUtils.isNotBlank(deviceInfoExcel.getDataProvider()) && !dataProviderMapping.containsKey(deviceInfoExcel.getDataProvider())) { + errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "dataProviderNotExist")); + } + + if (StringUtils.isNotBlank(deviceInfoExcel.getDeviceGroup())) { + if (!deviceGroupMapping.containsKey(deviceInfoExcel.getDeviceGroup())) { + errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "deviceGroupNotExist")); + } else { + DeviceGroupRelationExcel deviceGroupRelationExcel = new DeviceGroupRelationExcel(); + deviceGroupRelationExcel.setDeviceId(deviceInfoExcel.getDeviceId()); + deviceGroupRelationExcel.setDeviceGroupId(deviceGroupMapping.get(deviceInfoExcel.getDeviceGroup()).getId()); + deviceGroupRelationExcelList.add(deviceGroupRelationExcel); + } + } + +// if (StringUtils.isNotBlank(deviceInfoExcel.getMonitoringPointCategory()) && !monitoringPointCategoryMapping.containsKey(deviceInfoExcel.getMonitoringPointCategory())) { +// errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "monitoringPointCategoryNotExist")); +// } + //TargetForward Code Check Integer wsClientIdId = checkWsClientId(deviceInfoExcel.getWsClientId(),companyId); if (wsClientIdId==-1){ @@ -820,7 +882,7 @@ public class DeviceServiceImpl implements IDeviceService { String deviceId=deviceInfoExcel.getDeviceId(); DeviceInfoExample deviceInfoExample=new DeviceInfoExample(); - deviceInfoExample.createCriteria().andCompanyIdEqualTo(companyId).andDeviceIdEqualTo(deviceId); + deviceInfoExample.createCriteria().andCompanyIdEqualTo(companyId).andDeviceIdEqualTo(deviceId).andFlagNotEqualTo(1); long cntNum=this.deviceInfoMapperExt.countByExample(deviceInfoExample); DeviceConfigInfoExample deviceConfigInfoExample = new DeviceConfigInfoExample(); deviceConfigInfoExample.createCriteria().andNameEqualTo(deviceInfoExcel.getDeviceType()); @@ -838,9 +900,24 @@ public class DeviceServiceImpl implements IDeviceService { deviceInfo.setUpdatedTimestamp(System.currentTimeMillis()); deviceInfo.setWsclientId(wsClientIdId); deviceInfo.setFlag(0); + if (StringUtils.isNotBlank(deviceInfoExcel.getMonitoringPointName())) { + deviceInfo.setMonitoringPointName(deviceInfoExcel.getMonitoringPointName()); + } + if (StringUtils.isNotBlank(deviceInfoExcel.getGatewayInfo())) { + deviceInfo.setGatewayInfoId(dataProviderGatewayInfoMapping.get(deviceInfoExcel.getGatewayInfo()).getId()); + } + if (StringUtils.isNotBlank(deviceInfoExcel.getAlarmLevel())) { + deviceInfo.setAlarmLevel(AlarmLevelMapping.statusMap.get(languageType).get(deviceInfoExcel.getAlarmLevel())); + } + if (StringUtils.isNotBlank(deviceInfoExcel.getDataProvider())) { + deviceInfo.setDataProviderId(dataProviderMapping.get(deviceInfoExcel.getDataProvider()).getId()); + } +// if (StringUtils.isNotBlank(deviceInfoExcel.getMonitoringPointCategory())) { +// deviceInfo.setMonitoringPointCategoryId(monitoringPointCategoryMapping.get(deviceInfoExcel.getMonitoringPointCategory()).getId()); +// } this.notificationService.saveDeviceCompanyMapping(deviceInfo.getDeviceId(), String.valueOf(companyId)); this.deviceInfoMapperExt.updateByExampleSelective(deviceInfo,deviceInfoExample); - batchDeviceFowardConfig(deviceInfo,userId,targetForwardCodeId); + batchDeviceFowardConfig(deviceInfo,userId,targetForwardCodeId, deviceGroupRelationExcelList); }else{ // Set values and add to the batch list deviceInfo.setTypeId(deviceConfigInfoList.get(0).getId().intValue()); @@ -855,47 +932,82 @@ public class DeviceServiceImpl implements IDeviceService { deviceInfo.setFlag(0); deviceInfo.setUpdatedTimestamp(System.currentTimeMillis()); deviceInfo.setWsclientId(wsClientIdId); + if (StringUtils.isNotBlank(deviceInfoExcel.getMonitoringPointName())) { + deviceInfo.setMonitoringPointName(deviceInfoExcel.getMonitoringPointName()); + } + if (StringUtils.isNotBlank(deviceInfoExcel.getGatewayInfo())) { + deviceInfo.setGatewayInfoId(dataProviderGatewayInfoMapping.get(deviceInfoExcel.getGatewayInfo()).getId()); + } + if (StringUtils.isNotBlank(deviceInfoExcel.getAlarmLevel())) { + deviceInfo.setAlarmLevel(AlarmLevelMapping.statusMap.get(languageType).get(deviceInfoExcel.getAlarmLevel())); + } + if (StringUtils.isNotBlank(deviceInfoExcel.getDataProvider())) { + deviceInfo.setDataProviderId(dataProviderMapping.get(deviceInfoExcel.getDataProvider()).getId()); + } +// if (StringUtils.isNotBlank(deviceInfoExcel.getMonitoringPointCategory())) { +// deviceInfo.setMonitoringPointCategoryId(monitoringPointCategoryMapping.get(deviceInfoExcel.getMonitoringPointCategory()).getId()); +// } batchInfoList.add(deviceInfo); targetFowardCodeIdListCache.add(targetForwardCodeId); // Note: if targetForwardCodeId=0, don't process this.notificationService.saveDeviceCompanyMapping(deviceInfo.getDeviceId(), String.valueOf(companyId)); } - + webSocketServer.sendToOne(wsClientId, Arith.mul(Arith.div(dataIndex, dataSize, 2), 30)+""); } if (errorMsgList.size()>0){ return errorMsgList; }else{ - - //Old data saved to s3 - if (CollectionUtils.isNotEmpty(dataList)) { - oldDeviceInfoDataSaveToS3(companyId,dataList, languageType, s3InfoMap); - webSocketServer.sendToOne(wsClientId, "40"); - } - + + //Old data saved to s3 + if (CollectionUtils.isNotEmpty(dataList)) { + oldDeviceInfoDataSaveToS3(companyId,dataList, languageType, s3InfoMap); + webSocketServer.sendToOne(wsClientId, "40"); + } + if (!batchInfoList.isEmpty()) { this.deviceInfoMapperExt.batchInsert(batchInfoList); - - webSocketServer.sendToOne(wsClientId, "60"); - + + webSocketServer.sendToOne(wsClientId, "50"); + int batchInfoSize = batchInfoList.size(); for (int j=0;j deviceInfoIds = deviceGroupRelationExcelList.stream() + .map(DeviceGroupRelationExcel::getDeviceInfoId) + .collect(Collectors.toList()); + // 使用 Example 删除指定设备ID的所有绑定记录 + DeviceGroupRelationExample example = new DeviceGroupRelationExample(); + example.createCriteria().andDeviceInfoIdIn(deviceInfoIds); + deviceGroupRelationMapperExt.deleteByExample(example); + // 插入新绑定关系 + int deviceGroupRelationSize = deviceGroupRelationExcelList.size(); + for (int j=0;j resultList = deviceInfoMapperExt.downloadAllDevicesInfo(companyId,deviceSearchParams); if (CollectionUtils.isNotEmpty(resultList)) { @@ -995,7 +1107,7 @@ public class DeviceServiceImpl implements IDeviceService { String s3FileName = timeStr + "_old_" + RandomNumberUtil.createRandomLowerLetterAndNumber(5) + ".xlsx"; dataFileSaveToS3(fileStream, oldFileBucket, s3FileName); - DataSourceContextHolder.clearCurrentDataSourceKey(); +// DataSourceContextHolder.clearCurrentDataSourceKey(); s3InfoMap.put("s3OldFileName", s3FileName); } } @@ -2353,11 +2465,18 @@ public class DeviceServiceImpl implements IDeviceService { } //process insert targetForwardConfig table - private void batchDeviceFowardConfig(DeviceInfo deviceInfo, Long userId, Long targetForwardCodeId){ + private void batchDeviceFowardConfig(DeviceInfo deviceInfo, Long userId, Long targetForwardCodeId, List deviceGroupRelationExcelList){ DeviceForwardConfig deviceForwardConfigItem = new DeviceForwardConfig();//Used to create device forward config. DeviceInfoExample deviceInfoExample2 = new DeviceInfoExample(); deviceInfoExample2.createCriteria().andDeviceIdEqualTo(deviceInfo.getDeviceId()).andCompanyIdEqualTo(deviceInfo.getCompanyId()).andFlagNotEqualTo(1); Integer deviceTableId = deviceInfoMapperExt.selectByExample(deviceInfoExample2).get(0).getId(); + + deviceGroupRelationExcelList.forEach(item -> { + if (deviceTableId != null) { + item.setDeviceInfoId(deviceTableId); + } + }); + //Remove if this device forward config exists. if (targetForwardCodeId>-1){ DeviceForwardConfigExample deviceForwardConfigExample = new DeviceForwardConfigExample();