Browse Source

设备导入增加分组

master
review512jwy@163.com 2 days ago
parent
commit
f2215458f4
  1. 5
      data-center-business-common/src/main/resources/config/language/msg/msg_cn.yml
  2. 7
      data-center-business-common/src/main/resources/config/language/msg/msg_en.yml
  3. 7
      data-center-business-common/src/main/resources/config/language/msg/msg_jp.yml
  4. BIN
      data-center-business-controller/src/main/resources/template/deviceInfo_zh.xlsx
  5. BIN
      data-center-business-controller/src/main/resources/template/en/deviceInfo_en.xlsx
  6. BIN
      data-center-business-controller/src/main/resources/template/jp/deviceInfo_jp.xlsx
  7. 96
      data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/auto/DeviceGroupMapper.java
  8. 64
      data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/auto/DeviceGroupRelationMapper.java
  9. 11
      data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/DeviceGroupMapperExt.java
  10. 10
      data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/DeviceGroupRelationMapperExt.java
  11. 29
      data-center-business-dao/src/main/resources/mappers/auto/BasicAssetClassBigMapper.xml
  12. 27
      data-center-business-dao/src/main/resources/mappers/auto/BasicBuildingMapper.xml
  13. 319
      data-center-business-dao/src/main/resources/mappers/auto/DeviceGroupMapper.xml
  14. 185
      data-center-business-dao/src/main/resources/mappers/auto/DeviceGroupRelationMapper.xml
  15. 12
      data-center-business-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml
  16. 9
      data-center-business-dao/src/main/resources/mybatis-generator/generatorConfig.xml
  17. 40
      data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/AlarmLevelMapping.java
  18. 14
      data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceGroupRelationExcel.java
  19. 18
      data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcel.java
  20. 19
      data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelCn.java
  21. 18
      data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelEn.java
  22. 18
      data-center-business-model/src/main/java/com/techsor/datacenter/business/importexcel/deviceinfo/DeviceInfoExcelJp.java
  23. 34
      data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicAssetClassBig.java
  24. 34
      data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicBuilding.java
  25. 60
      data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicBuildingExample.java
  26. 302
      data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroup.java
  27. 802
      data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupExample.java
  28. 98
      data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupRelation.java
  29. 422
      data-center-business-model/src/main/java/com/techsor/datacenter/business/model/DeviceGroupRelationExample.java
  30. 243
      data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/DeviceServiceImpl.java

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

@ -186,3 +186,8 @@ msgcn:
spaceIdDumplicated: 空间Id已存在 spaceIdDumplicated: 空间Id已存在
spaceIdNotExist: 空间Id不存在 spaceIdNotExist: 空间Id不存在
personnasSpaceIdCannotBeNull: 人员空间Id不能为空 personnasSpaceIdCannotBeNull: 人员空间Id不能为空
dataProviderGatewayInfoNotExist: 网关情报不存在
alarmLevelNotExist: 告警级别错误
dataProviderNotExist: 数据提供方不存在
monitoringPointCategoryNotExist: 监控点分类不存在
deviceGroupNotExist: 设备组不存在

7
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. spaceIdOrSpaceNameIsNull: Space ID or space name is required.
spaceIdDumplicated: The space ID is duplicated spaceIdDumplicated: The space ID is duplicated
spaceIdNotExist: Space ID does not exist spaceIdNotExist: Space ID does not exist
personnasSpaceIdCannotBeNull: Personas space ID cannot be null 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

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

@ -185,4 +185,9 @@ msgjp:
spaceIdOrSpaceNameIsNull: 空間IDまたは空間名が空です spaceIdOrSpaceNameIsNull: 空間IDまたは空間名が空です
spaceIdDumplicated: 空間IDが重複しています spaceIdDumplicated: 空間IDが重複しています
spaceIdNotExist: 空間IDは存在しません spaceIdNotExist: 空間IDは存在しません
personnasSpaceIdCannotBeNull: 個人空間IDは空です personnasSpaceIdCannotBeNull: 個人空間IDは空です
dataProviderGatewayInfoNotExist: ゲートウェイ情報が存在しません
alarmLevelNotExist: アラームレベルが正しくありません
dataProviderNotExist: データ提供者が存在しません
monitoringPointCategoryNotExist: 監視ポイント分類が存在しません
deviceGroupNotExist: デバイスグループが存在しません

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

96
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<DeviceGroup> 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);
}

64
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<DeviceGroupRelation> 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);
}

11
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 {
}

10
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 {
}

29
data-center-business-dao/src/main/resources/mappers/auto/BasicAssetClassBigMapper.xml

@ -19,6 +19,7 @@
--> -->
<result column="thumbnail_normal_base64" jdbcType="LONGVARCHAR" property="thumbnailNormalBase64" /> <result column="thumbnail_normal_base64" jdbcType="LONGVARCHAR" property="thumbnailNormalBase64" />
<result column="thumbnail_alarm_base64" jdbcType="LONGVARCHAR" property="thumbnailAlarmBase64" /> <result column="thumbnail_alarm_base64" jdbcType="LONGVARCHAR" property="thumbnailAlarmBase64" />
<result column="thumbnail_dis_base64" jdbcType="LONGVARCHAR" property="thumbnailDisBase64" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
@ -98,7 +99,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
thumbnail_normal_base64, thumbnail_alarm_base64 thumbnail_normal_base64, thumbnail_alarm_base64, thumbnail_dis_base64
</sql> </sql>
<select id="selectByExampleWithBLOBs" parameterType="com.techsor.datacenter.business.model.BasicAssetClassBigExample" resultMap="ResultMapWithBLOBs"> <select id="selectByExampleWithBLOBs" parameterType="com.techsor.datacenter.business.model.BasicAssetClassBigExample" resultMap="ResultMapWithBLOBs">
<!-- <!--
@ -179,11 +180,11 @@
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into basic_asset_class_big (company_id, class_name, create_time, insert into basic_asset_class_big (company_id, class_name, create_time,
flag, thumbnail_normal_base64, thumbnail_alarm_base64 flag, thumbnail_normal_base64, thumbnail_alarm_base64,
) thumbnail_dis_base64)
values (#{companyId,jdbcType=BIGINT}, #{className,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, values (#{companyId,jdbcType=BIGINT}, #{className,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
#{flag,jdbcType=INTEGER}, #{thumbnailNormalBase64,jdbcType=LONGVARCHAR}, #{thumbnailAlarmBase64,jdbcType=LONGVARCHAR} #{flag,jdbcType=INTEGER}, #{thumbnailNormalBase64,jdbcType=LONGVARCHAR}, #{thumbnailAlarmBase64,jdbcType=LONGVARCHAR},
) #{thumbnailDisBase64,jdbcType=LONGVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.techsor.datacenter.business.model.BasicAssetClassBig"> <insert id="insertSelective" parameterType="com.techsor.datacenter.business.model.BasicAssetClassBig">
<!-- <!--
@ -213,6 +214,9 @@
<if test="thumbnailAlarmBase64 != null"> <if test="thumbnailAlarmBase64 != null">
thumbnail_alarm_base64, thumbnail_alarm_base64,
</if> </if>
<if test="thumbnailDisBase64 != null">
thumbnail_dis_base64,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="companyId != null"> <if test="companyId != null">
@ -233,6 +237,9 @@
<if test="thumbnailAlarmBase64 != null"> <if test="thumbnailAlarmBase64 != null">
#{thumbnailAlarmBase64,jdbcType=LONGVARCHAR}, #{thumbnailAlarmBase64,jdbcType=LONGVARCHAR},
</if> </if>
<if test="thumbnailDisBase64 != null">
#{thumbnailDisBase64,jdbcType=LONGVARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.techsor.datacenter.business.model.BasicAssetClassBigExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.techsor.datacenter.business.model.BasicAssetClassBigExample" resultType="java.lang.Long">
@ -273,6 +280,9 @@
<if test="record.thumbnailAlarmBase64 != null"> <if test="record.thumbnailAlarmBase64 != null">
thumbnail_alarm_base64 = #{record.thumbnailAlarmBase64,jdbcType=LONGVARCHAR}, thumbnail_alarm_base64 = #{record.thumbnailAlarmBase64,jdbcType=LONGVARCHAR},
</if> </if>
<if test="record.thumbnailDisBase64 != null">
thumbnail_dis_base64 = #{record.thumbnailDisBase64,jdbcType=LONGVARCHAR},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -290,7 +300,8 @@
create_time = #{record.createTime,jdbcType=BIGINT}, create_time = #{record.createTime,jdbcType=BIGINT},
flag = #{record.flag,jdbcType=INTEGER}, flag = #{record.flag,jdbcType=INTEGER},
thumbnail_normal_base64 = #{record.thumbnailNormalBase64,jdbcType=LONGVARCHAR}, thumbnail_normal_base64 = #{record.thumbnailNormalBase64,jdbcType=LONGVARCHAR},
thumbnail_alarm_base64 = #{record.thumbnailAlarmBase64,jdbcType=LONGVARCHAR} thumbnail_alarm_base64 = #{record.thumbnailAlarmBase64,jdbcType=LONGVARCHAR},
thumbnail_dis_base64 = #{record.thumbnailDisBase64,jdbcType=LONGVARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -335,6 +346,9 @@
<if test="thumbnailAlarmBase64 != null"> <if test="thumbnailAlarmBase64 != null">
thumbnail_alarm_base64 = #{thumbnailAlarmBase64,jdbcType=LONGVARCHAR}, thumbnail_alarm_base64 = #{thumbnailAlarmBase64,jdbcType=LONGVARCHAR},
</if> </if>
<if test="thumbnailDisBase64 != null">
thumbnail_dis_base64 = #{thumbnailDisBase64,jdbcType=LONGVARCHAR},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
@ -349,7 +363,8 @@
create_time = #{createTime,jdbcType=BIGINT}, create_time = #{createTime,jdbcType=BIGINT},
flag = #{flag,jdbcType=INTEGER}, flag = #{flag,jdbcType=INTEGER},
thumbnail_normal_base64 = #{thumbnailNormalBase64,jdbcType=LONGVARCHAR}, thumbnail_normal_base64 = #{thumbnailNormalBase64,jdbcType=LONGVARCHAR},
thumbnail_alarm_base64 = #{thumbnailAlarmBase64,jdbcType=LONGVARCHAR} thumbnail_alarm_base64 = #{thumbnailAlarmBase64,jdbcType=LONGVARCHAR},
thumbnail_dis_base64 = #{thumbnailDisBase64,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.techsor.datacenter.business.model.BasicAssetClassBig"> <update id="updateByPrimaryKey" parameterType="com.techsor.datacenter.business.model.BasicAssetClassBig">

27
data-center-business-dao/src/main/resources/mappers/auto/BasicBuildingMapper.xml

@ -22,6 +22,7 @@
<result column="brief_introduction" jdbcType="VARCHAR" property="briefIntroduction" /> <result column="brief_introduction" jdbcType="VARCHAR" property="briefIntroduction" />
<result column="latitude" jdbcType="VARCHAR" property="latitude" /> <result column="latitude" jdbcType="VARCHAR" property="latitude" />
<result column="longitude" jdbcType="VARCHAR" property="longitude" /> <result column="longitude" jdbcType="VARCHAR" property="longitude" />
<result column="retain_alert" jdbcType="INTEGER" property="retainAlert" />
</resultMap> </resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.techsor.datacenter.business.model.BasicBuilding"> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.techsor.datacenter.business.model.BasicBuilding">
<!-- <!--
@ -104,7 +105,7 @@
--> -->
building_id, company_id, `name`, address, flag, create_time, creator_id, modify_time, building_id, company_id, `name`, address, flag, create_time, creator_id, modify_time,
modifier_id, udf_building_id, building_bucket, thumbnail_num, show_switch_2d3d, brief_introduction, modifier_id, udf_building_id, building_bucket, thumbnail_num, show_switch_2d3d, brief_introduction,
latitude, longitude latitude, longitude, retain_alert
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
<!-- <!--
@ -196,14 +197,14 @@
modify_time, modifier_id, udf_building_id, modify_time, modifier_id, udf_building_id,
building_bucket, thumbnail_num, show_switch_2d3d, building_bucket, thumbnail_num, show_switch_2d3d,
brief_introduction, latitude, longitude, brief_introduction, latitude, longitude,
floor_info_list, picture_introduction retain_alert, floor_info_list, picture_introduction
) )
values (#{companyId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, values (#{companyId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{flag,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT}, #{flag,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT},
#{modifyTime,jdbcType=BIGINT}, #{modifierId,jdbcType=BIGINT}, #{udfBuildingId,jdbcType=VARCHAR}, #{modifyTime,jdbcType=BIGINT}, #{modifierId,jdbcType=BIGINT}, #{udfBuildingId,jdbcType=VARCHAR},
#{buildingBucket,jdbcType=VARCHAR}, #{thumbnailNum,jdbcType=INTEGER}, #{showSwitch2d3d,jdbcType=INTEGER}, #{buildingBucket,jdbcType=VARCHAR}, #{thumbnailNum,jdbcType=INTEGER}, #{showSwitch2d3d,jdbcType=INTEGER},
#{briefIntroduction,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, #{briefIntroduction,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR},
#{floorInfoList,jdbcType=LONGVARCHAR}, #{pictureIntroduction,jdbcType=LONGVARCHAR} #{retainAlert,jdbcType=INTEGER}, #{floorInfoList,jdbcType=LONGVARCHAR}, #{pictureIntroduction,jdbcType=LONGVARCHAR}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.techsor.datacenter.business.model.BasicBuilding"> <insert id="insertSelective" parameterType="com.techsor.datacenter.business.model.BasicBuilding">
@ -261,6 +262,9 @@
<if test="longitude != null"> <if test="longitude != null">
longitude, longitude,
</if> </if>
<if test="retainAlert != null">
retain_alert,
</if>
<if test="floorInfoList != null"> <if test="floorInfoList != null">
floor_info_list, floor_info_list,
</if> </if>
@ -314,6 +318,9 @@
<if test="longitude != null"> <if test="longitude != null">
#{longitude,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR},
</if> </if>
<if test="retainAlert != null">
#{retainAlert,jdbcType=INTEGER},
</if>
<if test="floorInfoList != null"> <if test="floorInfoList != null">
#{floorInfoList,jdbcType=LONGVARCHAR}, #{floorInfoList,jdbcType=LONGVARCHAR},
</if> </if>
@ -387,6 +394,9 @@
<if test="record.longitude != null"> <if test="record.longitude != null">
longitude = #{record.longitude,jdbcType=VARCHAR}, longitude = #{record.longitude,jdbcType=VARCHAR},
</if> </if>
<if test="record.retainAlert != null">
retain_alert = #{record.retainAlert,jdbcType=INTEGER},
</if>
<if test="record.floorInfoList != null"> <if test="record.floorInfoList != null">
floor_info_list = #{record.floorInfoList,jdbcType=LONGVARCHAR}, floor_info_list = #{record.floorInfoList,jdbcType=LONGVARCHAR},
</if> </if>
@ -420,6 +430,7 @@
brief_introduction = #{record.briefIntroduction,jdbcType=VARCHAR}, brief_introduction = #{record.briefIntroduction,jdbcType=VARCHAR},
latitude = #{record.latitude,jdbcType=VARCHAR}, latitude = #{record.latitude,jdbcType=VARCHAR},
longitude = #{record.longitude,jdbcType=VARCHAR}, longitude = #{record.longitude,jdbcType=VARCHAR},
retain_alert = #{record.retainAlert,jdbcType=INTEGER},
floor_info_list = #{record.floorInfoList,jdbcType=LONGVARCHAR}, floor_info_list = #{record.floorInfoList,jdbcType=LONGVARCHAR},
picture_introduction = #{record.pictureIntroduction,jdbcType=LONGVARCHAR} picture_introduction = #{record.pictureIntroduction,jdbcType=LONGVARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
@ -447,7 +458,8 @@
show_switch_2d3d = #{record.showSwitch2d3d,jdbcType=INTEGER}, show_switch_2d3d = #{record.showSwitch2d3d,jdbcType=INTEGER},
brief_introduction = #{record.briefIntroduction,jdbcType=VARCHAR}, brief_introduction = #{record.briefIntroduction,jdbcType=VARCHAR},
latitude = #{record.latitude,jdbcType=VARCHAR}, latitude = #{record.latitude,jdbcType=VARCHAR},
longitude = #{record.longitude,jdbcType=VARCHAR} longitude = #{record.longitude,jdbcType=VARCHAR},
retain_alert = #{record.retainAlert,jdbcType=INTEGER}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -504,6 +516,9 @@
<if test="longitude != null"> <if test="longitude != null">
longitude = #{longitude,jdbcType=VARCHAR}, longitude = #{longitude,jdbcType=VARCHAR},
</if> </if>
<if test="retainAlert != null">
retain_alert = #{retainAlert,jdbcType=INTEGER},
</if>
<if test="floorInfoList != null"> <if test="floorInfoList != null">
floor_info_list = #{floorInfoList,jdbcType=LONGVARCHAR}, floor_info_list = #{floorInfoList,jdbcType=LONGVARCHAR},
</if> </if>
@ -534,6 +549,7 @@
brief_introduction = #{briefIntroduction,jdbcType=VARCHAR}, brief_introduction = #{briefIntroduction,jdbcType=VARCHAR},
latitude = #{latitude,jdbcType=VARCHAR}, latitude = #{latitude,jdbcType=VARCHAR},
longitude = #{longitude,jdbcType=VARCHAR}, longitude = #{longitude,jdbcType=VARCHAR},
retain_alert = #{retainAlert,jdbcType=INTEGER},
floor_info_list = #{floorInfoList,jdbcType=LONGVARCHAR}, floor_info_list = #{floorInfoList,jdbcType=LONGVARCHAR},
picture_introduction = #{pictureIntroduction,jdbcType=LONGVARCHAR} picture_introduction = #{pictureIntroduction,jdbcType=LONGVARCHAR}
where building_id = #{buildingId,jdbcType=BIGINT} where building_id = #{buildingId,jdbcType=BIGINT}
@ -558,7 +574,8 @@
show_switch_2d3d = #{showSwitch2d3d,jdbcType=INTEGER}, show_switch_2d3d = #{showSwitch2d3d,jdbcType=INTEGER},
brief_introduction = #{briefIntroduction,jdbcType=VARCHAR}, brief_introduction = #{briefIntroduction,jdbcType=VARCHAR},
latitude = #{latitude,jdbcType=VARCHAR}, latitude = #{latitude,jdbcType=VARCHAR},
longitude = #{longitude,jdbcType=VARCHAR} longitude = #{longitude,jdbcType=VARCHAR},
retain_alert = #{retainAlert,jdbcType=INTEGER}
where building_id = #{buildingId,jdbcType=BIGINT} where building_id = #{buildingId,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

319
data-center-business-dao/src/main/resources/mappers/auto/DeviceGroupMapper.xml

@ -0,0 +1,319 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.techsor.datacenter.business.dao.auto.DeviceGroupMapper">
<resultMap id="BaseResultMap" type="com.techsor.datacenter.business.model.DeviceGroup">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="company_id" jdbcType="BIGINT" property="companyId" />
<result column="building_id" jdbcType="BIGINT" property="buildingId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="flag" jdbcType="INTEGER" property="flag" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, company_id, building_id, `name`, remark, flag, created_by, created_at
</sql>
<select id="selectByExample" parameterType="com.techsor.datacenter.business.model.DeviceGroupExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from dashboard_device_group
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from dashboard_device_group
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dashboard_device_group
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.techsor.datacenter.business.model.DeviceGroupExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dashboard_device_group
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.techsor.datacenter.business.model.DeviceGroup">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
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})
</insert>
<insert id="insertSelective" parameterType="com.techsor.datacenter.business.model.DeviceGroup">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into dashboard_device_group
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="companyId != null">
company_id,
</if>
<if test="buildingId != null">
building_id,
</if>
<if test="name != null">
`name`,
</if>
<if test="remark != null">
remark,
</if>
<if test="flag != null">
flag,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="createdAt != null">
created_at,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="companyId != null">
#{companyId,jdbcType=BIGINT},
</if>
<if test="buildingId != null">
#{buildingId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="flag != null">
#{flag,jdbcType=INTEGER},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.techsor.datacenter.business.model.DeviceGroupExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from dashboard_device_group
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_device_group
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=BIGINT},
</if>
<if test="record.buildingId != null">
building_id = #{record.buildingId,jdbcType=BIGINT},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.flag != null">
flag = #{record.flag,jdbcType=INTEGER},
</if>
<if test="record.createdBy != null">
created_by = #{record.createdBy,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.techsor.datacenter.business.model.DeviceGroup">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_device_group
<set>
<if test="companyId != null">
company_id = #{companyId,jdbcType=BIGINT},
</if>
<if test="buildingId != null">
building_id = #{buildingId,jdbcType=BIGINT},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="flag != null">
flag = #{flag,jdbcType=INTEGER},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.techsor.datacenter.business.model.DeviceGroup">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
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}
</update>
</mapper>

185
data-center-business-dao/src/main/resources/mappers/auto/DeviceGroupRelationMapper.xml

@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.techsor.datacenter.business.dao.auto.DeviceGroupRelationMapper">
<resultMap id="BaseResultMap" type="com.techsor.datacenter.business.model.DeviceGroupRelation">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="device_info_id" jdbcType="INTEGER" property="deviceInfoId" />
<result column="device_group_id" jdbcType="BIGINT" property="deviceGroupId" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
device_info_id, device_group_id
</sql>
<select id="selectByExample" parameterType="com.techsor.datacenter.business.model.DeviceGroupRelationExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from dashboard_device_group_relation
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.techsor.datacenter.business.model.DeviceGroupRelationExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dashboard_device_group_relation
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.techsor.datacenter.business.model.DeviceGroupRelation">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dashboard_device_group_relation (device_info_id, device_group_id)
values (#{deviceInfoId,jdbcType=INTEGER}, #{deviceGroupId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.techsor.datacenter.business.model.DeviceGroupRelation">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dashboard_device_group_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceInfoId != null">
device_info_id,
</if>
<if test="deviceGroupId != null">
device_group_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceInfoId != null">
#{deviceInfoId,jdbcType=INTEGER},
</if>
<if test="deviceGroupId != null">
#{deviceGroupId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.techsor.datacenter.business.model.DeviceGroupRelationExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from dashboard_device_group_relation
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_device_group_relation
<set>
<if test="record.deviceInfoId != null">
device_info_id = #{record.deviceInfoId,jdbcType=INTEGER},
</if>
<if test="record.deviceGroupId != null">
device_group_id = #{record.deviceGroupId,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_device_group_relation
set device_info_id = #{record.deviceInfoId,jdbcType=INTEGER},
device_group_id = #{record.deviceGroupId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
</mapper>

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

@ -3,7 +3,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.techsor.datacenter.business.dao.ex.DeviceInfoMapperExt"> <mapper namespace="com.techsor.datacenter.business.dao.ex.DeviceInfoMapperExt">
<insert id="batchInsert" parameterType="java.util.List"> <insert id="batchInsert" parameterType="java.util.List">
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 VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
( (
@ -23,7 +27,11 @@
#{item.updatedBy,jdbcType=BIGINT}, #{item.updatedBy,jdbcType=BIGINT},
#{item.updatedTimestamp,jdbcType=BIGINT}, #{item.updatedTimestamp,jdbcType=BIGINT},
#{item.projectId,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}
) )
</foreach> </foreach>
</insert> </insert>

9
data-center-business-dao/src/main/resources/mybatis-generator/generatorConfig.xml

@ -261,5 +261,14 @@
<property name="useActualColumnNames" value="false" /> <property name="useActualColumnNames" value="false" />
<generatedKey column="id" sqlStatement="Mysql" identity="true" /> <generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table> </table>
<table tableName="dashboard_device_group" domainObjectName="DeviceGroup" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<property name="useActualColumnNames" value="false" />
<generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table>
<table tableName="dashboard_device_group_relation" domainObjectName="DeviceGroupRelation" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<property name="useActualColumnNames" value="false" />
</table>
</context> </context>
</generatorConfiguration> </generatorConfiguration>

40
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<Integer, Map<String, Integer>> statusMap = new HashMap<>();
// 中文映射
public static final Map<String, Integer> zhMap = new HashMap<>();
// 英文映射
public static final Map<String, Integer> enMap = new HashMap<>();
// 日文映射
public static final Map<String, Integer> 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);
}
}

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

18
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") @ExcelProperty(value ="IoT Core")
private String iotCoreName; 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;
} }

19
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项目名") @ExcelProperty(value ="MQTT项目名")
private String iotCoreName; 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;
} }

18
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") @ExcelProperty(value ="MQTT Name")
private String iotCoreName; 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;
} }

18
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項目名") @ExcelProperty(value ="MQTT項目名")
private String iotCoreName; 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;
} }

34
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; 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 was generated by MyBatis Generator.
* This field corresponds to the database table basic_asset_class_big * 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.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 was generated by MyBatis Generator.
* This method corresponds to the database table basic_asset_class_big * 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(", flag=").append(flag);
sb.append(", thumbnailNormalBase64=").append(thumbnailNormalBase64); sb.append(", thumbnailNormalBase64=").append(thumbnailNormalBase64);
sb.append(", thumbnailAlarmBase64=").append(thumbnailAlarmBase64); sb.append(", thumbnailAlarmBase64=").append(thumbnailAlarmBase64);
sb.append(", thumbnailDisBase64=").append(thumbnailDisBase64);
sb.append(", serialVersionUID=").append(serialVersionUID); sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();

34
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; 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. * This field was generated by MyBatis Generator.
@ -557,6 +566,30 @@ public class BasicBuilding implements Serializable {
this.longitude = longitude == null ? null : longitude.trim(); 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 was generated by MyBatis Generator.
* This method returns the value of the database column basic_building.floor_info_list * 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(", briefIntroduction=").append(briefIntroduction);
sb.append(", latitude=").append(latitude); sb.append(", latitude=").append(latitude);
sb.append(", longitude=").append(longitude); sb.append(", longitude=").append(longitude);
sb.append(", retainAlert=").append(retainAlert);
sb.append(", floorInfoList=").append(floorInfoList); sb.append(", floorInfoList=").append(floorInfoList);
sb.append(", pictureIntroduction=").append(pictureIntroduction); sb.append(", pictureIntroduction=").append(pictureIntroduction);
sb.append(", serialVersionUID=").append(serialVersionUID); sb.append(", serialVersionUID=").append(serialVersionUID);

60
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"); addCriterion("longitude not between", value1, value2, "longitude");
return (Criteria) this; 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<Integer> values) {
addCriterion("retain_alert in", values, "retainAlert");
return (Criteria) this;
}
public Criteria andRetainAlertNotIn(List<Integer> 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;
}
} }
/** /**

302
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();
}
}

802
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<Criteria> 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<Criteria>();
}
/**
* 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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> 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<Long> values) {
addCriterion("company_id in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotIn(List<Long> 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<Long> values) {
addCriterion("building_id in", values, "buildingId");
return (Criteria) this;
}
public Criteria andBuildingIdNotIn(List<Long> 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<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> 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<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> 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<Integer> values) {
addCriterion("flag in", values, "flag");
return (Criteria) this;
}
public Criteria andFlagNotIn(List<Integer> 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<Long> values) {
addCriterion("created_by in", values, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotIn(List<Long> 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<Long> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Long> 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);
}
}
}

98
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();
}
}

422
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<Criteria> 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<Criteria>();
}
/**
* 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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Integer> values) {
addCriterion("device_info_id in", values, "deviceInfoId");
return (Criteria) this;
}
public Criteria andDeviceInfoIdNotIn(List<Integer> 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<Long> values) {
addCriterion("device_group_id in", values, "deviceGroupId");
return (Criteria) this;
}
public Criteria andDeviceGroupIdNotIn(List<Long> 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);
}
}
}

243
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.DeviceForwardQueryParams;
import com.techsor.datacenter.business.dto.device.forward.DeviceForwardRemoveParmas; import com.techsor.datacenter.business.dto.device.forward.DeviceForwardRemoveParmas;
import com.techsor.datacenter.business.importexcel.deviceAlertInfo.DeviceAlertInfoExcel; 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.importexcel.deviceinfo.DeviceInfoExcel;
import com.techsor.datacenter.business.model.*; import com.techsor.datacenter.business.model.*;
import com.techsor.datacenter.business.service.IDeviceService; import com.techsor.datacenter.business.service.IDeviceService;
@ -175,6 +177,18 @@ public class DeviceServiceImpl implements IDeviceService {
@Resource @Resource
private MqttConfigMapperExt mqttConfigMapperExt; private MqttConfigMapperExt mqttConfigMapperExt;
@Resource
private DataProviderGatewayInfoMapperExt gatewayInfoMapperExt;
@Resource
private DataProviderMapperExt dataProviderMapperExt;
@Resource
private DeviceGroupMapperExt deviceGroupMapperExt;
@Resource
private DeviceGroupRelationMapperExt deviceGroupRelationMapperExt;
@Resource @Resource
private DeviceForwardConfigMapperExt deviceForwardConfigMapperExt; 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. * @return A list of error messages detailing issues encountered during batch device addition.
*/ */
@Override @Override
public List<String> batchAddDeviceInfos(String wsClientId, List<DeviceInfoExcel> dataList, Map<String, Object> s3InfoMap, public List<String> batchAddDeviceInfos(String wsClientId, List<DeviceInfoExcel> dataList, Map<String, Object> s3InfoMap,
Long userId, Long companyId, Integer languageType) { Long userId, Long companyId, Integer languageType) {
List<String> redisList = new ArrayList<>(); List<String> redisList = new ArrayList<>();
try { try {
List<String> errorMsgList=new ArrayList<>(); List<String> errorMsgList=new ArrayList<>();
int dataSize = dataList.size(); int dataSize = dataList.size();
//First, check if it is being imported //First, check if it is being imported
boolean absent = true; boolean absent = true;
for (DeviceInfoExcel deviceInfoExcel : dataList) { for (DeviceInfoExcel deviceInfoExcel : dataList) {
absent = redisUtil.setIfAbsent(deviceInfoExcel.getDeviceId(), userId, 120, TimeUnit.SECONDS); String importKey = "importing-" + deviceInfoExcel.getDeviceId();
if (!absent) { absent = redisUtil.setIfAbsent(importKey, userId, 120, TimeUnit.SECONDS);
break; if (!absent) {
} else { break;
redisList.add(deviceInfoExcel.getDeviceId()); } else {
} redisList.add(importKey);
} }
}
if (!absent) {
if (CollectionUtils.isNotEmpty(redisList)) { if (!absent) {
redisUtil.delKeys(redisList); if (CollectionUtils.isNotEmpty(redisList)) {
} redisUtil.delKeys(redisList);
}
errorMsgList.add(msgLanguageChange.getParameterMapByCode(languageType, "deviceIsImporting"));
return errorMsgList; errorMsgList.add(msgLanguageChange.getParameterMapByCode(languageType, "deviceIsImporting"));
} return errorMsgList;
}
DataSourceContextHolder.clearCurrentDataSourceKey(); DataSourceContextHolder.clearCurrentDataSourceKey();
List<DeviceInfo> batchInfoList=new ArrayList<>(); List<DeviceInfo> batchInfoList=new ArrayList<>();
List<DeviceGroupRelationExcel> deviceGroupRelationExcelList = new ArrayList<>();
// BasicCompanyExample basicCompanyExample=new BasicCompanyExample(); // BasicCompanyExample basicCompanyExample=new BasicCompanyExample();
// basicCompanyExample.createCriteria().andIdEqualTo(companyId); // basicCompanyExample.createCriteria().andIdEqualTo(companyId);
@ -726,7 +742,7 @@ public class DeviceServiceImpl implements IDeviceService {
int i=1; int i=1;
Long topCompanyId = dataSourceInterceptor.getTopCompanyId(companyId+""); Long topCompanyId = dataSourceInterceptor.getTopCompanyId(companyId+"");
DataSourceContextHolder.setCurrentDataSourceKey("dataSourceForCompany_" + topCompanyId); DataSourceContextHolder.setCurrentDataSourceKey("dataSourceForCompany_" + topCompanyId);
//get iotcore //get iotcore
MqttConfigExample mqttConfigExample = new MqttConfigExample(); MqttConfigExample mqttConfigExample = new MqttConfigExample();
MqttConfigExample.Criteria mqttCriteria = mqttConfigExample.createCriteria(); MqttConfigExample.Criteria mqttCriteria = mqttConfigExample.createCriteria();
@ -734,12 +750,31 @@ public class DeviceServiceImpl implements IDeviceService {
List<MqttConfig> iotcoreConfigs = mqttConfigMapperExt.selectByExample(mqttConfigExample); List<MqttConfig> iotcoreConfigs = mqttConfigMapperExt.selectByExample(mqttConfigExample);
Map<String, MqttConfig> iotcoreMapping = iotcoreConfigs.stream() Map<String, MqttConfig> iotcoreMapping = iotcoreConfigs.stream()
.collect(Collectors.toMap(MqttConfig::getMqttName, item -> item)); .collect(Collectors.toMap(MqttConfig::getMqttName, item -> item));
DataProviderGatewayInfoExample dataProviderGatewayInfoExample = new DataProviderGatewayInfoExample();
DataProviderGatewayInfoExample.Criteria dataProviderGatewayInfoCriteria = dataProviderGatewayInfoExample.createCriteria();
dataProviderGatewayInfoCriteria.andCompanyIdEqualTo(companyId).andFlagNotEqualTo(1);
List<DataProviderGatewayInfo> dataProviderGatewayInfoList = gatewayInfoMapperExt.selectByExample(dataProviderGatewayInfoExample);
Map<String, DataProviderGatewayInfo> 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<DataProvider> dataProviderList = dataProviderMapperExt.selectByExample(dataProviderExample);
Map<String, DataProvider> dataProviderMapping = dataProviderList.stream()
.collect(Collectors.toMap(DataProvider::getName, item -> item));
DeviceGroupExample deviceGroupExample = new DeviceGroupExample();
List<DeviceGroup> deviceGroupList = deviceGroupMapperExt.selectByExample(deviceGroupExample);
Map<String, DeviceGroup> deviceGroupMapping = deviceGroupList.stream()
.collect(Collectors.toMap(DeviceGroup::getName, item -> item));
List<Long> targetFowardCodeIdListCache = new ArrayList<>(); List<Long> targetFowardCodeIdListCache = new ArrayList<>();
for (int dataIndex=0; dataIndex<dataSize; dataIndex++) { for (int dataIndex=0; dataIndex<dataSize; dataIndex++) {
DeviceInfoExcel deviceInfoExcel = dataList.get(dataIndex); DeviceInfoExcel deviceInfoExcel = dataList.get(dataIndex);
DeviceInfo deviceInfo = new DeviceInfo(); DeviceInfo deviceInfo = new DeviceInfo();
List<String> errorList = new ArrayList<>(); List<String> errorList = new ArrayList<>();
@ -783,12 +818,39 @@ public class DeviceServiceImpl implements IDeviceService {
if (!deviceExists) { if (!deviceExists) {
errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "deviceTypeNotExist")); errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "deviceTypeNotExist"));
} }
// iotcore Check // iotcore Check
if (StringUtils.isNotBlank(deviceInfoExcel.getIotCoreName()) && !iotcoreMapping.containsKey(deviceInfoExcel.getIotCoreName())) { if (StringUtils.isNotBlank(deviceInfoExcel.getIotCoreName()) && !iotcoreMapping.containsKey(deviceInfoExcel.getIotCoreName())) {
errorList.add(msgLanguageChange.getParameterMapByCode(languageType, "IoTCoreNotExist")); 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 //TargetForward Code Check
Integer wsClientIdId = checkWsClientId(deviceInfoExcel.getWsClientId(),companyId); Integer wsClientIdId = checkWsClientId(deviceInfoExcel.getWsClientId(),companyId);
if (wsClientIdId==-1){ if (wsClientIdId==-1){
@ -820,7 +882,7 @@ public class DeviceServiceImpl implements IDeviceService {
String deviceId=deviceInfoExcel.getDeviceId(); String deviceId=deviceInfoExcel.getDeviceId();
DeviceInfoExample deviceInfoExample=new DeviceInfoExample(); DeviceInfoExample deviceInfoExample=new DeviceInfoExample();
deviceInfoExample.createCriteria().andCompanyIdEqualTo(companyId).andDeviceIdEqualTo(deviceId); deviceInfoExample.createCriteria().andCompanyIdEqualTo(companyId).andDeviceIdEqualTo(deviceId).andFlagNotEqualTo(1);
long cntNum=this.deviceInfoMapperExt.countByExample(deviceInfoExample); long cntNum=this.deviceInfoMapperExt.countByExample(deviceInfoExample);
DeviceConfigInfoExample deviceConfigInfoExample = new DeviceConfigInfoExample(); DeviceConfigInfoExample deviceConfigInfoExample = new DeviceConfigInfoExample();
deviceConfigInfoExample.createCriteria().andNameEqualTo(deviceInfoExcel.getDeviceType()); deviceConfigInfoExample.createCriteria().andNameEqualTo(deviceInfoExcel.getDeviceType());
@ -838,9 +900,24 @@ public class DeviceServiceImpl implements IDeviceService {
deviceInfo.setUpdatedTimestamp(System.currentTimeMillis()); deviceInfo.setUpdatedTimestamp(System.currentTimeMillis());
deviceInfo.setWsclientId(wsClientIdId); deviceInfo.setWsclientId(wsClientIdId);
deviceInfo.setFlag(0); 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.notificationService.saveDeviceCompanyMapping(deviceInfo.getDeviceId(), String.valueOf(companyId));
this.deviceInfoMapperExt.updateByExampleSelective(deviceInfo,deviceInfoExample); this.deviceInfoMapperExt.updateByExampleSelective(deviceInfo,deviceInfoExample);
batchDeviceFowardConfig(deviceInfo,userId,targetForwardCodeId); batchDeviceFowardConfig(deviceInfo,userId,targetForwardCodeId, deviceGroupRelationExcelList);
}else{ }else{
// Set values and add to the batch list // Set values and add to the batch list
deviceInfo.setTypeId(deviceConfigInfoList.get(0).getId().intValue()); deviceInfo.setTypeId(deviceConfigInfoList.get(0).getId().intValue());
@ -855,47 +932,82 @@ public class DeviceServiceImpl implements IDeviceService {
deviceInfo.setFlag(0); deviceInfo.setFlag(0);
deviceInfo.setUpdatedTimestamp(System.currentTimeMillis()); deviceInfo.setUpdatedTimestamp(System.currentTimeMillis());
deviceInfo.setWsclientId(wsClientIdId); 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); batchInfoList.add(deviceInfo);
targetFowardCodeIdListCache.add(targetForwardCodeId); // Note: if targetForwardCodeId=0, don't process targetFowardCodeIdListCache.add(targetForwardCodeId); // Note: if targetForwardCodeId=0, don't process
this.notificationService.saveDeviceCompanyMapping(deviceInfo.getDeviceId(), String.valueOf(companyId)); this.notificationService.saveDeviceCompanyMapping(deviceInfo.getDeviceId(), String.valueOf(companyId));
} }
webSocketServer.sendToOne(wsClientId, Arith.mul(Arith.div(dataIndex, dataSize, 2), 30)+""); webSocketServer.sendToOne(wsClientId, Arith.mul(Arith.div(dataIndex, dataSize, 2), 30)+"");
} }
if (errorMsgList.size()>0){ if (errorMsgList.size()>0){
return errorMsgList; return errorMsgList;
}else{ }else{
//Old data saved to s3 //Old data saved to s3
if (CollectionUtils.isNotEmpty(dataList)) { if (CollectionUtils.isNotEmpty(dataList)) {
oldDeviceInfoDataSaveToS3(companyId,dataList, languageType, s3InfoMap); oldDeviceInfoDataSaveToS3(companyId,dataList, languageType, s3InfoMap);
webSocketServer.sendToOne(wsClientId, "40"); webSocketServer.sendToOne(wsClientId, "40");
} }
if (!batchInfoList.isEmpty()) { if (!batchInfoList.isEmpty()) {
this.deviceInfoMapperExt.batchInsert(batchInfoList); this.deviceInfoMapperExt.batchInsert(batchInfoList);
webSocketServer.sendToOne(wsClientId, "60"); webSocketServer.sendToOne(wsClientId, "50");
int batchInfoSize = batchInfoList.size(); int batchInfoSize = batchInfoList.size();
for (int j=0;j<batchInfoSize;j++){ for (int j=0;j<batchInfoSize;j++){
batchDeviceFowardConfig(batchInfoList.get(j),userId,targetFowardCodeIdListCache.get(j)); batchDeviceFowardConfig(batchInfoList.get(j),userId,targetFowardCodeIdListCache.get(j), deviceGroupRelationExcelList);
webSocketServer.sendToOne(wsClientId, 60+Arith.mul(Arith.div(j, batchInfoSize, 2), 20)+""); webSocketServer.sendToOne(wsClientId, 50+Arith.mul(Arith.div(j, batchInfoSize, 2), 20)+"");
}
}
if (!deviceGroupRelationExcelList.isEmpty()) {
List<Integer> 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<deviceGroupRelationSize;j++){
DeviceGroupRelationExcel deviceGroupRelationExcel = deviceGroupRelationExcelList.get(j);
DeviceGroupRelation deviceGroupRelation = new DeviceGroupRelation();
deviceGroupRelation.setDeviceGroupId(deviceGroupRelationExcel.getDeviceGroupId());
deviceGroupRelation.setDeviceInfoId(deviceGroupRelationExcel.getDeviceInfoId());
deviceGroupRelationMapperExt.insertSelective(deviceGroupRelation);
webSocketServer.sendToOne(wsClientId, 70+Arith.mul(Arith.div(j, deviceGroupRelationSize, 2), 10)+"");
} }
} }
bindIotcore(wsClientId, dataList, iotcoreMapping, userId, companyId); bindIotcore(wsClientId, dataList, iotcoreMapping, userId, companyId);
webSocketServer.sendToOne(wsClientId, "95"); webSocketServer.sendToOne(wsClientId, "95");
} }
return errorMsgList; return errorMsgList;
} finally { } finally {
if (CollectionUtils.isNotEmpty(redisList)) { if (CollectionUtils.isNotEmpty(redisList)) {
redisUtil.delKeys(redisList); redisUtil.delKeys(redisList);
} }
} }
} }
@ -934,8 +1046,8 @@ public class DeviceServiceImpl implements IDeviceService {
DeviceSearchParams deviceSearchParams = new DeviceSearchParams(); DeviceSearchParams deviceSearchParams = new DeviceSearchParams();
deviceSearchParams.setDeviceIdList(deviceIdList); deviceSearchParams.setDeviceIdList(deviceIdList);
Long topCompanyId = dataSourceInterceptor.getTopCompanyId(companyId+""); // Long topCompanyId = dataSourceInterceptor.getTopCompanyId(companyId+"");
DataSourceContextHolder.setCurrentDataSourceKey("dataSourceForCompany_" + topCompanyId); // DataSourceContextHolder.setCurrentDataSourceKey("dataSourceForCompany_" + topCompanyId);
List<DeviceInfoCsvVO> resultList = deviceInfoMapperExt.downloadAllDevicesInfo(companyId,deviceSearchParams); List<DeviceInfoCsvVO> resultList = deviceInfoMapperExt.downloadAllDevicesInfo(companyId,deviceSearchParams);
if (CollectionUtils.isNotEmpty(resultList)) { if (CollectionUtils.isNotEmpty(resultList)) {
@ -995,7 +1107,7 @@ public class DeviceServiceImpl implements IDeviceService {
String s3FileName = timeStr + "_old_" + RandomNumberUtil.createRandomLowerLetterAndNumber(5) + ".xlsx"; String s3FileName = timeStr + "_old_" + RandomNumberUtil.createRandomLowerLetterAndNumber(5) + ".xlsx";
dataFileSaveToS3(fileStream, oldFileBucket, s3FileName); dataFileSaveToS3(fileStream, oldFileBucket, s3FileName);
DataSourceContextHolder.clearCurrentDataSourceKey(); // DataSourceContextHolder.clearCurrentDataSourceKey();
s3InfoMap.put("s3OldFileName", s3FileName); s3InfoMap.put("s3OldFileName", s3FileName);
} }
} }
@ -2353,11 +2465,18 @@ public class DeviceServiceImpl implements IDeviceService {
} }
//process insert targetForwardConfig table //process insert targetForwardConfig table
private void batchDeviceFowardConfig(DeviceInfo deviceInfo, Long userId, Long targetForwardCodeId){ private void batchDeviceFowardConfig(DeviceInfo deviceInfo, Long userId, Long targetForwardCodeId, List<DeviceGroupRelationExcel> deviceGroupRelationExcelList){
DeviceForwardConfig deviceForwardConfigItem = new DeviceForwardConfig();//Used to create device forward config. DeviceForwardConfig deviceForwardConfigItem = new DeviceForwardConfig();//Used to create device forward config.
DeviceInfoExample deviceInfoExample2 = new DeviceInfoExample(); DeviceInfoExample deviceInfoExample2 = new DeviceInfoExample();
deviceInfoExample2.createCriteria().andDeviceIdEqualTo(deviceInfo.getDeviceId()).andCompanyIdEqualTo(deviceInfo.getCompanyId()).andFlagNotEqualTo(1); deviceInfoExample2.createCriteria().andDeviceIdEqualTo(deviceInfo.getDeviceId()).andCompanyIdEqualTo(deviceInfo.getCompanyId()).andFlagNotEqualTo(1);
Integer deviceTableId = deviceInfoMapperExt.selectByExample(deviceInfoExample2).get(0).getId(); Integer deviceTableId = deviceInfoMapperExt.selectByExample(deviceInfoExample2).get(0).getId();
deviceGroupRelationExcelList.forEach(item -> {
if (deviceTableId != null) {
item.setDeviceInfoId(deviceTableId);
}
});
//Remove if this device forward config exists. //Remove if this device forward config exists.
if (targetForwardCodeId>-1){ if (targetForwardCodeId>-1){
DeviceForwardConfigExample deviceForwardConfigExample = new DeviceForwardConfigExample(); DeviceForwardConfigExample deviceForwardConfigExample = new DeviceForwardConfigExample();

Loading…
Cancel
Save