Browse Source

通知接口、同步东建一些功能

master
review512jwy@163.com 3 days ago
parent
commit
84fa41c192
  1. 3
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceDataMeasureController.java
  2. 3
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceGroupController.java
  3. 13
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/OverviewController.java
  4. 120
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardNotificationMapper.java
  5. 17
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/DashboardNotificationMapperExt.java
  6. 423
      dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardNotificationMapper.xml
  7. 29
      dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DeviceGroupMapper.xml
  8. 70
      dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DeviceInfoMapper.xml
  9. 27
      dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DeviceRawdataRealtimeMapper.xml
  10. 17
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DashboardNotificationMapperExt.xml
  11. 33
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceGroupMapperExt.xml
  12. 5
      dongjian-dashboard-back-dao/src/main/resources/mybatis-generator/generatorConfig.xml
  13. 3
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/device/DeviceSearchParams.java
  14. 9
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/devicegroup/DeviceGroupSearchParams.java
  15. 9
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/devicegroup/OptDeviceGroupParams.java
  16. 370
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardNotification.java
  17. 862
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardNotificationExample.java
  18. 34
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DeviceGroup.java
  19. 60
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DeviceGroupExample.java
  20. 68
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DeviceInfo.java
  21. 120
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DeviceInfoExample.java
  22. 34
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DeviceRawdataRealtime.java
  23. 70
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DeviceRawdataRealtimeExample.java
  24. 28
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/dashboardnotification/DashboardNotificationPageVO.java
  25. 11
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/devicegroup/DeviceGroupPageVO.java
  26. 2
      dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/DeviceDataMeasureService.java
  27. 3
      dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/OverviewService.java
  28. 69
      dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/common/LineDataHourAggregator.java
  29. 12
      dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/DeviceDataMeasureServiceImpl.java
  30. 5
      dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/DeviceGroupServiceImpl.java
  31. 6
      dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/DeviceServiceImpl.java
  32. 11
      dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/OverviewServiceImpl.java

3
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceDataMeasureController.java

@ -115,6 +115,7 @@ public class DeviceDataMeasureController {
@Operation(summary = "获取7日趋势数据")
@RequestMapping(value = "/getLineData",method = RequestMethod.POST)
public SimpleDataResponse<List<LineData>> getLineData(
@Parameter(name = "searchType", description = "1-按小时,2-全部数据", required = true) Integer searchType,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@ -122,7 +123,7 @@ public class DeviceDataMeasureController {
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
@RequestBody LineDataSearchParams lineDataSearchParams
) throws BusinessException {
return deviceDataMeasureService.getLineData(lineDataSearchParams, CompanyId, UserId, LanguageType);
return deviceDataMeasureService.getLineData(searchType, lineDataSearchParams, CompanyId, UserId, LanguageType);
}
}

3
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceGroupController.java

@ -40,7 +40,6 @@ public class DeviceGroupController {
@Autowired
private DeviceGroupService deviceGroupService;
@Hidden
@OperationLog(operation = "addDeviceGroup", remark = "")
@Operation(summary = "Add deviceGroup")
@RequestMapping(value = "/add", method = RequestMethod.POST)
@ -54,7 +53,6 @@ public class DeviceGroupController {
return deviceGroupService.add(optDeviceGroupParams, UserId, CompanyId, LanguageType);
}
@Hidden
@OperationLog(operation = "editDeviceGroup", remark = "")
@Operation(summary = "Edit deviceGroup")
@RequestMapping(value = "/edit", method = RequestMethod.POST)
@ -68,7 +66,6 @@ public class DeviceGroupController {
return deviceGroupService.edit(optDeviceGroupParams, UserId, CompanyId, LanguageType);
}
@Hidden
@OperationLog(operation = "deleteDeviceGroup", remark = "")
@Operation(summary = "Delete deviceGroup")
@RequestMapping(value = "/batchDelete", method = RequestMethod.POST)

13
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/OverviewController.java

@ -3,6 +3,7 @@ package com.dongjian.dashboard.back.controller;
import com.dongjian.dashboard.back.common.response.SimpleDataResponse;
import com.dongjian.dashboard.back.configurator.interceptor.AccessRequired;
import com.dongjian.dashboard.back.service.OverviewService;
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO;
import com.dongjian.dashboard.back.vo.data.OverviewVO;
import com.dongjian.dashboard.back.weather.JpMeshHourlyForecasts;
import com.dongjian.dashboard.back.weather.QueryWeather;
@ -53,4 +54,16 @@ public class OverviewController {
@Parameter(name = "UTCOffset", description = "Time zone offset in minutes from GMT, e.g., +480 for UTC+8", required = true, schema = @Schema(defaultValue = "-480")) @RequestHeader(required = true) Integer UTCOffset) {
return overviewService.getWeatherInfo(queryWeather, UserId, CompanyId, LanguageType, UTCOffset);
}
@Operation(summary = "Get notification")
@RequestMapping(value = "/getNotification", method = RequestMethod.GET)
public SimpleDataResponse<DashboardNotificationPageVO> getNotification(
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@Parameter(name = "CompanyId", description = "User's company ID", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type: 0 - Chinese, 1 - English, 2 - Japanese", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType,
@Parameter(name = "UTCOffset", description = "Time zone offset in minutes from GMT, e.g., +480 for UTC+8", required = true, schema = @Schema(defaultValue = "-480")) @RequestHeader(required = true) Integer UTCOffset) {
return overviewService.getNotification(UserId, CompanyId, LanguageType, UTCOffset);
}
}

120
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardNotificationMapper.java

@ -0,0 +1,120 @@
package com.dongjian.dashboard.back.dao.auto;
import com.dongjian.dashboard.back.model.DashboardNotification;
import com.dongjian.dashboard.back.model.DashboardNotificationExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DashboardNotificationMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
long countByExample(DashboardNotificationExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
int deleteByExample(DashboardNotificationExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
int insert(DashboardNotification record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
int insertSelective(DashboardNotification record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
List<DashboardNotification> selectByExampleWithBLOBs(DashboardNotificationExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
List<DashboardNotification> selectByExample(DashboardNotificationExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
DashboardNotification selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") DashboardNotification record, @Param("example") DashboardNotificationExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
int updateByExampleWithBLOBs(@Param("record") DashboardNotification record, @Param("example") DashboardNotificationExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
int updateByExample(@Param("record") DashboardNotification record, @Param("example") DashboardNotificationExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(DashboardNotification record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
int updateByPrimaryKeyWithBLOBs(DashboardNotification record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
int updateByPrimaryKey(DashboardNotification record);
}

17
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/DashboardNotificationMapperExt.java

@ -0,0 +1,17 @@
package com.dongjian.dashboard.back.dao.ex;
import java.util.List;
import com.dongjian.dashboard.back.dao.auto.DashboardNotificationMapper;
import com.dongjian.dashboard.back.dao.auto.UserBuildingRelationMapper;
import com.dongjian.dashboard.back.model.UserBuildingRelation;
import com.dongjian.dashboard.back.vo.building.BindedBuildingVO;
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DashboardNotificationMapperExt extends DashboardNotificationMapper {
DashboardNotificationPageVO getNotification(Long companyId);
}

423
dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardNotificationMapper.xml

@ -0,0 +1,423 @@
<?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.dongjian.dashboard.back.dao.auto.DashboardNotificationMapper">
<resultMap id="BaseResultMap" type="com.dongjian.dashboard.back.model.DashboardNotification">
<!--
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="demand_time" jdbcType="VARCHAR" property="demandTime" />
<result column="category" jdbcType="VARCHAR" property="category" />
<result column="flag" jdbcType="INTEGER" property="flag" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.dongjian.dashboard.back.model.DashboardNotification">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="content" jdbcType="LONGVARCHAR" property="content" />
</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, demand_time, category, flag, created_at, created_by, updated_at,
updated_by
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationExample" resultMap="ResultMapWithBLOBs">
<!--
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" />
,
<include refid="Blob_Column_List" />
from dashboard_notification
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationExample" 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_notification
<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="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from dashboard_notification
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_notification
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dashboard_notification
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.dongjian.dashboard.back.model.DashboardNotification">
<!--
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_notification (company_id, demand_time, category,
flag, created_at, created_by,
updated_at, updated_by, content
)
values (#{companyId,jdbcType=BIGINT}, #{demandTime,jdbcType=VARCHAR}, #{category,jdbcType=VARCHAR},
#{flag,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, #{createdBy,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.DashboardNotification">
<!--
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_notification
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="companyId != null">
company_id,
</if>
<if test="demandTime != null">
demand_time,
</if>
<if test="category != null">
category,
</if>
<if test="flag != null">
flag,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="companyId != null">
#{companyId,jdbcType=BIGINT},
</if>
<if test="demandTime != null">
#{demandTime,jdbcType=VARCHAR},
</if>
<if test="category != null">
#{category,jdbcType=VARCHAR},
</if>
<if test="flag != null">
#{flag,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from dashboard_notification
<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_notification
<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.demandTime != null">
demand_time = #{record.demandTime,jdbcType=VARCHAR},
</if>
<if test="record.category != null">
category = #{record.category,jdbcType=VARCHAR},
</if>
<if test="record.flag != null">
flag = #{record.flag,jdbcType=INTEGER},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=BIGINT},
</if>
<if test="record.createdBy != null">
created_by = #{record.createdBy,jdbcType=BIGINT},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=BIGINT},
</if>
<if test="record.updatedBy != null">
updated_by = #{record.updatedBy,jdbcType=BIGINT},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_notification
set id = #{record.id,jdbcType=BIGINT},
company_id = #{record.companyId,jdbcType=BIGINT},
demand_time = #{record.demandTime,jdbcType=VARCHAR},
category = #{record.category,jdbcType=VARCHAR},
flag = #{record.flag,jdbcType=INTEGER},
created_at = #{record.createdAt,jdbcType=BIGINT},
created_by = #{record.createdBy,jdbcType=BIGINT},
updated_at = #{record.updatedAt,jdbcType=BIGINT},
updated_by = #{record.updatedBy,jdbcType=BIGINT},
content = #{record.content,jdbcType=LONGVARCHAR}
<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_notification
set id = #{record.id,jdbcType=BIGINT},
company_id = #{record.companyId,jdbcType=BIGINT},
demand_time = #{record.demandTime,jdbcType=VARCHAR},
category = #{record.category,jdbcType=VARCHAR},
flag = #{record.flag,jdbcType=INTEGER},
created_at = #{record.createdAt,jdbcType=BIGINT},
created_by = #{record.createdBy,jdbcType=BIGINT},
updated_at = #{record.updatedAt,jdbcType=BIGINT},
updated_by = #{record.updatedBy,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.dongjian.dashboard.back.model.DashboardNotification">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_notification
<set>
<if test="companyId != null">
company_id = #{companyId,jdbcType=BIGINT},
</if>
<if test="demandTime != null">
demand_time = #{demandTime,jdbcType=VARCHAR},
</if>
<if test="category != null">
category = #{category,jdbcType=VARCHAR},
</if>
<if test="flag != null">
flag = #{flag,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.dongjian.dashboard.back.model.DashboardNotification">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_notification
set company_id = #{companyId,jdbcType=BIGINT},
demand_time = #{demandTime,jdbcType=VARCHAR},
category = #{category,jdbcType=VARCHAR},
flag = #{flag,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=BIGINT},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
updated_by = #{updatedBy,jdbcType=BIGINT},
content = #{content,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.dongjian.dashboard.back.model.DashboardNotification">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_notification
set company_id = #{companyId,jdbcType=BIGINT},
demand_time = #{demandTime,jdbcType=VARCHAR},
category = #{category,jdbcType=VARCHAR},
flag = #{flag,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=BIGINT},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

29
dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DeviceGroupMapper.xml

@ -9,6 +9,7 @@
<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="class_id" jdbcType="INTEGER" property="classId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="flag" jdbcType="INTEGER" property="flag" />
@ -86,7 +87,7 @@
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
id, company_id, building_id, class_id, `name`, remark, flag, created_by, created_at
</sql>
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.DeviceGroupExample" resultMap="BaseResultMap">
<!--
@ -143,12 +144,12 @@
<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 into dashboard_device_group (company_id, building_id, class_id,
`name`, remark, flag,
created_by, created_at)
values (#{companyId,jdbcType=BIGINT}, #{buildingId,jdbcType=BIGINT}, #{classId,jdbcType=INTEGER},
#{name,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{flag,jdbcType=INTEGER},
#{createdBy,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.DeviceGroup">
<!--
@ -166,6 +167,9 @@
<if test="buildingId != null">
building_id,
</if>
<if test="classId != null">
class_id,
</if>
<if test="name != null">
`name`,
</if>
@ -189,6 +193,9 @@
<if test="buildingId != null">
#{buildingId,jdbcType=BIGINT},
</if>
<if test="classId != null">
#{classId,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
@ -232,6 +239,9 @@
<if test="record.buildingId != null">
building_id = #{record.buildingId,jdbcType=BIGINT},
</if>
<if test="record.classId != null">
class_id = #{record.classId,jdbcType=INTEGER},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
@ -261,6 +271,7 @@
set id = #{record.id,jdbcType=BIGINT},
company_id = #{record.companyId,jdbcType=BIGINT},
building_id = #{record.buildingId,jdbcType=BIGINT},
class_id = #{record.classId,jdbcType=INTEGER},
`name` = #{record.name,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
flag = #{record.flag,jdbcType=INTEGER},
@ -283,6 +294,9 @@
<if test="buildingId != null">
building_id = #{buildingId,jdbcType=BIGINT},
</if>
<if test="classId != null">
class_id = #{classId,jdbcType=INTEGER},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
@ -309,6 +323,7 @@
update dashboard_device_group
set company_id = #{companyId,jdbcType=BIGINT},
building_id = #{buildingId,jdbcType=BIGINT},
class_id = #{classId,jdbcType=INTEGER},
`name` = #{name,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
flag = #{flag,jdbcType=INTEGER},

70
dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DeviceInfoMapper.xml

@ -16,6 +16,7 @@
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="building_id" jdbcType="BIGINT" property="buildingId" />
<result column="asset_id" jdbcType="BIGINT" property="assetId" />
<result column="gateway_client_id" jdbcType="INTEGER" property="gatewayClientId" />
<result column="flag" jdbcType="INTEGER" property="flag" />
<result column="company_id" jdbcType="BIGINT" property="companyId" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
@ -31,6 +32,7 @@
<result column="alarm_level" jdbcType="INTEGER" property="alarmLevel" />
<result column="retain_alert" jdbcType="INTEGER" property="retainAlert" />
<result column="unit" jdbcType="VARCHAR" property="unit" />
<result column="dashboard_decimal_places" jdbcType="INTEGER" property="dashboardDecimalPlaces" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.dongjian.dashboard.back.model.DeviceInfo">
<!--
@ -111,9 +113,9 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, 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, monitoring_point_category_id, data_provider_id,
gateway_info_id, alarm_level, retain_alert, unit
asset_id, gateway_client_id, flag, company_id, created_by, created_timestamp, updated_by,
updated_timestamp, project_id, floor_id, monitoring_point_name, monitoring_point_category_id,
data_provider_id, gateway_info_id, alarm_level, retain_alert, unit, dashboard_decimal_places
</sql>
<sql id="Blob_Column_List">
<!--
@ -203,21 +205,23 @@
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,
monitoring_point_category_id, data_provider_id,
gateway_info_id, alarm_level, retain_alert,
unit, data_mapping)
gateway_client_id, flag, company_id,
created_by, created_timestamp, updated_by,
updated_timestamp, project_id, floor_id,
monitoring_point_name, monitoring_point_category_id,
data_provider_id, gateway_info_id, alarm_level,
retain_alert, unit, dashboard_decimal_places,
data_mapping)
values (#{deviceId,jdbcType=VARCHAR}, #{deviceSn,jdbcType=VARCHAR}, #{typeId,jdbcType=INTEGER},
#{wsclientId,jdbcType=INTEGER}, #{spaceId,jdbcType=BIGINT}, #{deviceName,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{buildingId,jdbcType=BIGINT}, #{assetId,jdbcType=BIGINT},
#{flag,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT}, #{createdBy,jdbcType=BIGINT},
#{createdTimestamp,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}, #{updatedTimestamp,jdbcType=BIGINT},
#{projectId,jdbcType=BIGINT}, #{floorId,jdbcType=BIGINT}, #{monitoringPointName,jdbcType=VARCHAR},
#{monitoringPointCategoryId,jdbcType=BIGINT}, #{dataProviderId,jdbcType=BIGINT},
#{gatewayInfoId,jdbcType=BIGINT}, #{alarmLevel,jdbcType=INTEGER}, #{retainAlert,jdbcType=INTEGER},
#{unit,jdbcType=VARCHAR}, #{dataMapping,jdbcType=LONGVARCHAR})
#{gatewayClientId,jdbcType=INTEGER}, #{flag,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT},
#{createdBy,jdbcType=BIGINT}, #{createdTimestamp,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT},
#{updatedTimestamp,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{floorId,jdbcType=BIGINT},
#{monitoringPointName,jdbcType=VARCHAR}, #{monitoringPointCategoryId,jdbcType=BIGINT},
#{dataProviderId,jdbcType=BIGINT}, #{gatewayInfoId,jdbcType=BIGINT}, #{alarmLevel,jdbcType=INTEGER},
#{retainAlert,jdbcType=INTEGER}, #{unit,jdbcType=VARCHAR}, #{dashboardDecimalPlaces,jdbcType=INTEGER},
#{dataMapping,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.DeviceInfo">
<!--
@ -256,6 +260,9 @@
<if test="assetId != null">
asset_id,
</if>
<if test="gatewayClientId != null">
gateway_client_id,
</if>
<if test="flag != null">
flag,
</if>
@ -301,6 +308,9 @@
<if test="unit != null">
unit,
</if>
<if test="dashboardDecimalPlaces != null">
dashboard_decimal_places,
</if>
<if test="dataMapping != null">
data_mapping,
</if>
@ -333,6 +343,9 @@
<if test="assetId != null">
#{assetId,jdbcType=BIGINT},
</if>
<if test="gatewayClientId != null">
#{gatewayClientId,jdbcType=INTEGER},
</if>
<if test="flag != null">
#{flag,jdbcType=INTEGER},
</if>
@ -378,6 +391,9 @@
<if test="unit != null">
#{unit,jdbcType=VARCHAR},
</if>
<if test="dashboardDecimalPlaces != null">
#{dashboardDecimalPlaces,jdbcType=INTEGER},
</if>
<if test="dataMapping != null">
#{dataMapping,jdbcType=LONGVARCHAR},
</if>
@ -430,6 +446,9 @@
<if test="record.assetId != null">
asset_id = #{record.assetId,jdbcType=BIGINT},
</if>
<if test="record.gatewayClientId != null">
gateway_client_id = #{record.gatewayClientId,jdbcType=INTEGER},
</if>
<if test="record.flag != null">
flag = #{record.flag,jdbcType=INTEGER},
</if>
@ -475,6 +494,9 @@
<if test="record.unit != null">
unit = #{record.unit,jdbcType=VARCHAR},
</if>
<if test="record.dashboardDecimalPlaces != null">
dashboard_decimal_places = #{record.dashboardDecimalPlaces,jdbcType=INTEGER},
</if>
<if test="record.dataMapping != null">
data_mapping = #{record.dataMapping,jdbcType=LONGVARCHAR},
</if>
@ -499,6 +521,7 @@
remark = #{record.remark,jdbcType=VARCHAR},
building_id = #{record.buildingId,jdbcType=BIGINT},
asset_id = #{record.assetId,jdbcType=BIGINT},
gateway_client_id = #{record.gatewayClientId,jdbcType=INTEGER},
flag = #{record.flag,jdbcType=INTEGER},
company_id = #{record.companyId,jdbcType=BIGINT},
created_by = #{record.createdBy,jdbcType=BIGINT},
@ -514,6 +537,7 @@
alarm_level = #{record.alarmLevel,jdbcType=INTEGER},
retain_alert = #{record.retainAlert,jdbcType=INTEGER},
unit = #{record.unit,jdbcType=VARCHAR},
dashboard_decimal_places = #{record.dashboardDecimalPlaces,jdbcType=INTEGER},
data_mapping = #{record.dataMapping,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -535,6 +559,7 @@
remark = #{record.remark,jdbcType=VARCHAR},
building_id = #{record.buildingId,jdbcType=BIGINT},
asset_id = #{record.assetId,jdbcType=BIGINT},
gateway_client_id = #{record.gatewayClientId,jdbcType=INTEGER},
flag = #{record.flag,jdbcType=INTEGER},
company_id = #{record.companyId,jdbcType=BIGINT},
created_by = #{record.createdBy,jdbcType=BIGINT},
@ -549,7 +574,8 @@
gateway_info_id = #{record.gatewayInfoId,jdbcType=BIGINT},
alarm_level = #{record.alarmLevel,jdbcType=INTEGER},
retain_alert = #{record.retainAlert,jdbcType=INTEGER},
unit = #{record.unit,jdbcType=VARCHAR}
unit = #{record.unit,jdbcType=VARCHAR},
dashboard_decimal_places = #{record.dashboardDecimalPlaces,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -588,6 +614,9 @@
<if test="assetId != null">
asset_id = #{assetId,jdbcType=BIGINT},
</if>
<if test="gatewayClientId != null">
gateway_client_id = #{gatewayClientId,jdbcType=INTEGER},
</if>
<if test="flag != null">
flag = #{flag,jdbcType=INTEGER},
</if>
@ -633,6 +662,9 @@
<if test="unit != null">
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="dashboardDecimalPlaces != null">
dashboard_decimal_places = #{dashboardDecimalPlaces,jdbcType=INTEGER},
</if>
<if test="dataMapping != null">
data_mapping = #{dataMapping,jdbcType=LONGVARCHAR},
</if>
@ -654,6 +686,7 @@
remark = #{remark,jdbcType=VARCHAR},
building_id = #{buildingId,jdbcType=BIGINT},
asset_id = #{assetId,jdbcType=BIGINT},
gateway_client_id = #{gatewayClientId,jdbcType=INTEGER},
flag = #{flag,jdbcType=INTEGER},
company_id = #{companyId,jdbcType=BIGINT},
created_by = #{createdBy,jdbcType=BIGINT},
@ -669,6 +702,7 @@
alarm_level = #{alarmLevel,jdbcType=INTEGER},
retain_alert = #{retainAlert,jdbcType=INTEGER},
unit = #{unit,jdbcType=VARCHAR},
dashboard_decimal_places = #{dashboardDecimalPlaces,jdbcType=INTEGER},
data_mapping = #{dataMapping,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
@ -687,6 +721,7 @@
remark = #{remark,jdbcType=VARCHAR},
building_id = #{buildingId,jdbcType=BIGINT},
asset_id = #{assetId,jdbcType=BIGINT},
gateway_client_id = #{gatewayClientId,jdbcType=INTEGER},
flag = #{flag,jdbcType=INTEGER},
company_id = #{companyId,jdbcType=BIGINT},
created_by = #{createdBy,jdbcType=BIGINT},
@ -701,7 +736,8 @@
gateway_info_id = #{gatewayInfoId,jdbcType=BIGINT},
alarm_level = #{alarmLevel,jdbcType=INTEGER},
retain_alert = #{retainAlert,jdbcType=INTEGER},
unit = #{unit,jdbcType=VARCHAR}
unit = #{unit,jdbcType=VARCHAR},
dashboard_decimal_places = #{dashboardDecimalPlaces,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

27
dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DeviceRawdataRealtimeMapper.xml

@ -15,6 +15,7 @@
<result column="upload_year" jdbcType="INTEGER" property="uploadYear" />
<result column="upload_month" jdbcType="INTEGER" property="uploadMonth" />
<result column="upload_day" jdbcType="INTEGER" property="uploadDay" />
<result column="dashboard_status" jdbcType="VARCHAR" property="dashboardStatus" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.dongjian.dashboard.back.model.DeviceRawdataRealtime">
<!--
@ -97,7 +98,7 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
device_id, building_id, `status`, receive_ts, alert_title, alert_cancel_title, upload_year,
upload_month, upload_day
upload_month, upload_day, dashboard_status
</sql>
<sql id="Blob_Column_List">
<!--
@ -184,12 +185,12 @@
insert into device_rawdata_realtime (device_id, building_id, `status`,
receive_ts, alert_title, alert_cancel_title,
upload_year, upload_month, upload_day,
alert_content, alert_cancel_content,
dashboard_status, alert_content, alert_cancel_content,
raw_data)
values (#{deviceId,jdbcType=VARCHAR}, #{buildingId,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR},
#{receiveTs,jdbcType=BIGINT}, #{alertTitle,jdbcType=VARCHAR}, #{alertCancelTitle,jdbcType=VARCHAR},
#{uploadYear,jdbcType=INTEGER}, #{uploadMonth,jdbcType=INTEGER}, #{uploadDay,jdbcType=INTEGER},
#{alertContent,jdbcType=LONGVARCHAR}, #{alertCancelContent,jdbcType=LONGVARCHAR},
#{dashboardStatus,jdbcType=VARCHAR}, #{alertContent,jdbcType=LONGVARCHAR}, #{alertCancelContent,jdbcType=LONGVARCHAR},
#{rawData,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.DeviceRawdataRealtime">
@ -226,6 +227,9 @@
<if test="uploadDay != null">
upload_day,
</if>
<if test="dashboardStatus != null">
dashboard_status,
</if>
<if test="alertContent != null">
alert_content,
</if>
@ -264,6 +268,9 @@
<if test="uploadDay != null">
#{uploadDay,jdbcType=INTEGER},
</if>
<if test="dashboardStatus != null">
#{dashboardStatus,jdbcType=VARCHAR},
</if>
<if test="alertContent != null">
#{alertContent,jdbcType=LONGVARCHAR},
</if>
@ -319,6 +326,9 @@
<if test="record.uploadDay != null">
upload_day = #{record.uploadDay,jdbcType=INTEGER},
</if>
<if test="record.dashboardStatus != null">
dashboard_status = #{record.dashboardStatus,jdbcType=VARCHAR},
</if>
<if test="record.alertContent != null">
alert_content = #{record.alertContent,jdbcType=LONGVARCHAR},
</if>
@ -348,6 +358,7 @@
upload_year = #{record.uploadYear,jdbcType=INTEGER},
upload_month = #{record.uploadMonth,jdbcType=INTEGER},
upload_day = #{record.uploadDay,jdbcType=INTEGER},
dashboard_status = #{record.dashboardStatus,jdbcType=VARCHAR},
alert_content = #{record.alertContent,jdbcType=LONGVARCHAR},
alert_cancel_content = #{record.alertCancelContent,jdbcType=LONGVARCHAR},
raw_data = #{record.rawData,jdbcType=LONGVARCHAR}
@ -369,7 +380,8 @@
alert_cancel_title = #{record.alertCancelTitle,jdbcType=VARCHAR},
upload_year = #{record.uploadYear,jdbcType=INTEGER},
upload_month = #{record.uploadMonth,jdbcType=INTEGER},
upload_day = #{record.uploadDay,jdbcType=INTEGER}
upload_day = #{record.uploadDay,jdbcType=INTEGER},
dashboard_status = #{record.dashboardStatus,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -405,6 +417,9 @@
<if test="uploadDay != null">
upload_day = #{uploadDay,jdbcType=INTEGER},
</if>
<if test="dashboardStatus != null">
dashboard_status = #{dashboardStatus,jdbcType=VARCHAR},
</if>
<if test="alertContent != null">
alert_content = #{alertContent,jdbcType=LONGVARCHAR},
</if>
@ -431,6 +446,7 @@
upload_year = #{uploadYear,jdbcType=INTEGER},
upload_month = #{uploadMonth,jdbcType=INTEGER},
upload_day = #{uploadDay,jdbcType=INTEGER},
dashboard_status = #{dashboardStatus,jdbcType=VARCHAR},
alert_content = #{alertContent,jdbcType=LONGVARCHAR},
alert_cancel_content = #{alertCancelContent,jdbcType=LONGVARCHAR},
raw_data = #{rawData,jdbcType=LONGVARCHAR}
@ -449,7 +465,8 @@
alert_cancel_title = #{alertCancelTitle,jdbcType=VARCHAR},
upload_year = #{uploadYear,jdbcType=INTEGER},
upload_month = #{uploadMonth,jdbcType=INTEGER},
upload_day = #{uploadDay,jdbcType=INTEGER}
upload_day = #{uploadDay,jdbcType=INTEGER},
dashboard_status = #{dashboardStatus,jdbcType=VARCHAR}
where device_id = #{deviceId,jdbcType=VARCHAR}
</update>
</mapper>

17
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DashboardNotificationMapperExt.xml

@ -0,0 +1,17 @@
<?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.dongjian.dashboard.back.dao.ex.DashboardNotificationMapperExt">
<select id="getNotification" resultType="com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO">
SELECT
id dashboardNotificationId,
demand_time,
category,
content,
created_at
FROM dashboard_notification
WHERE flag = 0 AND company_id = #{companyId}
ORDER BY id DESC limit 1
</select>
</mapper>

33
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceGroupMapperExt.xml

@ -6,30 +6,37 @@
SELECT
COUNT(1)
FROM
device_group
dashboard_device_group
WHERE
flag != 1 AND `name` = #{name} AND building_id = #{buildingId}
<if test="deviceGroupId != null">
AND id != #{deviceGroupId}
</if>
</select>
<select id="getListPage" resultType="com.dongjian.dashboard.back.vo.devicegroup.DeviceGroupPageVO">
SELECT
dg.id deviceGroupId,
dg.company_id,
dg.`name`,
dg.remark
dg.id deviceGroupId,
dg.company_id,
dg.`name`,
dg.remark,
dg.building_id,
dg.class_id,
basic_building.name AS buildingName
FROM
dashboard_device_group dg
WHERE
dg.flag != 1
inner join basic_building on dg.building_id = basic_building.building_id
WHERE
dg.flag != 1
<if test="deviceGroupIdList != null">
AND dg.id IN <foreach collection="deviceGroupIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
AND dg.id IN <foreach collection="deviceGroupIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
</if>
<if test="name != null">
AND dg.`name` LIKE CONCAT('%',#{name},'%')
AND dg.`name` LIKE CONCAT('%',#{name},'%')
</if>
<if test="classId != null">
AND dg.class_id = #{classId}
</if>
<if test="buildingId != null">
AND dg.`building_id` = #{buildingId}
@ -46,9 +53,9 @@
dg.name,
dg.remark
FROM
device_group_relation dgr
dashboard_device_group_relation dgr
LEFT JOIN
device_group dg ON dgr.device_group_id = dg.id
dashboard_device_group dg ON dgr.device_group_id = dg.id
WHERE
dgr.device_info_id = #{deviceInfoId}
AND dg.flag = 0

5
dongjian-dashboard-back-dao/src/main/resources/mybatis-generator/generatorConfig.xml

@ -149,5 +149,10 @@
<generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table>
<table tableName="dashboard_notification" domainObjectName="DashboardNotification" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<property name="useActualColumnNames" value="false" />
<generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table>
</context>
</generatorConfiguration>

3
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/device/DeviceSearchParams.java

@ -19,6 +19,9 @@ public class DeviceSearchParams extends BaseSearchParams {
@Schema(description = "设备类别类型",example = "[]", hidden = true)
private List<Long> categoryIdList;
@Schema(description = "设备分类ID,1-警报设备、2-积算、3-计测、4-状态",example = "1")
private Integer classId;
@Schema(description = "Monitoring point name", example = "Device-Monitoring")
private String monitoringPointName;

9
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/devicegroup/DeviceGroupSearchParams.java

@ -14,13 +14,16 @@ public class DeviceGroupSearchParams extends BaseSearchParams {
@Schema(description = "楼宇ID",example = "222", hidden = true)
private Long buildingId;
@Schema(description = "设备组名",example = "张三李四")
private String name;
@Schema(description = "设备分类ID,2-积算、3-计测、4-状态",example = "2")
private Integer classId;
@Schema(description = "设备组id,多个逗号连接",example = "1,47")
private String deviceGroupIds;
@Schema(description = "设备组id", hidden = true)
private List<Long> deviceGroupIdList;

9
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/devicegroup/OptDeviceGroupParams.java

@ -6,16 +6,19 @@ import lombok.Data;
@Data
public class OptDeviceGroupParams{
@Schema(description = "唯一标识ID,新增时无此参数",example = "2738967")
private Long deviceGroupId;
@Schema(description = "楼宇ID",example = "222")
private Long buildingId;
@Schema(description = "设备分类ID,2-积算、3-计测、4-状态",example = "2")
private Integer classId;
@Schema(description = "所属企业ID",example = "2738967", hidden = true)
private Long companyId;
@Schema(description = "设备组名",example = "testDeviceGroup1", required = true)
private String name;

370
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardNotification.java

@ -0,0 +1,370 @@
package com.dongjian.dashboard.back.model;
import java.io.Serializable;
public class DashboardNotification implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_notification.id
*
* @mbg.generated
*/
private Long id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_notification.company_id
*
* @mbg.generated
*/
private Long companyId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_notification.demand_time
*
* @mbg.generated
*/
private String demandTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_notification.category
*
* @mbg.generated
*/
private String category;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_notification.flag
*
* @mbg.generated
*/
private Integer flag;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_notification.created_at
*
* @mbg.generated
*/
private Long createdAt;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_notification.created_by
*
* @mbg.generated
*/
private Long createdBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_notification.updated_at
*
* @mbg.generated
*/
private Long updatedAt;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_notification.updated_by
*
* @mbg.generated
*/
private Long updatedBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_notification.content
*
* @mbg.generated
*/
private String content;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table dashboard_notification
*
* @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_notification.id
*
* @return the value of dashboard_notification.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_notification.id
*
* @param id the value for dashboard_notification.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_notification.company_id
*
* @return the value of dashboard_notification.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_notification.company_id
*
* @param companyId the value for dashboard_notification.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_notification.demand_time
*
* @return the value of dashboard_notification.demand_time
*
* @mbg.generated
*/
public String getDemandTime() {
return demandTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_notification.demand_time
*
* @param demandTime the value for dashboard_notification.demand_time
*
* @mbg.generated
*/
public void setDemandTime(String demandTime) {
this.demandTime = demandTime == null ? null : demandTime.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_notification.category
*
* @return the value of dashboard_notification.category
*
* @mbg.generated
*/
public String getCategory() {
return category;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_notification.category
*
* @param category the value for dashboard_notification.category
*
* @mbg.generated
*/
public void setCategory(String category) {
this.category = category == null ? null : category.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_notification.flag
*
* @return the value of dashboard_notification.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_notification.flag
*
* @param flag the value for dashboard_notification.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_notification.created_at
*
* @return the value of dashboard_notification.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_notification.created_at
*
* @param createdAt the value for dashboard_notification.created_at
*
* @mbg.generated
*/
public void setCreatedAt(Long createdAt) {
this.createdAt = createdAt;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_notification.created_by
*
* @return the value of dashboard_notification.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_notification.created_by
*
* @param createdBy the value for dashboard_notification.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_notification.updated_at
*
* @return the value of dashboard_notification.updated_at
*
* @mbg.generated
*/
public Long getUpdatedAt() {
return updatedAt;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_notification.updated_at
*
* @param updatedAt the value for dashboard_notification.updated_at
*
* @mbg.generated
*/
public void setUpdatedAt(Long updatedAt) {
this.updatedAt = updatedAt;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_notification.updated_by
*
* @return the value of dashboard_notification.updated_by
*
* @mbg.generated
*/
public Long getUpdatedBy() {
return updatedBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_notification.updated_by
*
* @param updatedBy the value for dashboard_notification.updated_by
*
* @mbg.generated
*/
public void setUpdatedBy(Long updatedBy) {
this.updatedBy = updatedBy;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_notification.content
*
* @return the value of dashboard_notification.content
*
* @mbg.generated
*/
public String getContent() {
return content;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_notification.content
*
* @param content the value for dashboard_notification.content
*
* @mbg.generated
*/
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @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(", demandTime=").append(demandTime);
sb.append(", category=").append(category);
sb.append(", flag=").append(flag);
sb.append(", createdAt=").append(createdAt);
sb.append(", createdBy=").append(createdBy);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", updatedBy=").append(updatedBy);
sb.append(", content=").append(content);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

862
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardNotificationExample.java

@ -0,0 +1,862 @@
package com.dongjian.dashboard.back.model;
import java.util.ArrayList;
import java.util.List;
public class DashboardNotificationExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
public DashboardNotificationExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @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_notification
*
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @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_notification
*
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @mbg.generated
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification
*
* @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_notification
*
* @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_notification
*
* @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_notification
*
* @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_notification
*
* @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_notification
*
* @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 andDemandTimeIsNull() {
addCriterion("demand_time is null");
return (Criteria) this;
}
public Criteria andDemandTimeIsNotNull() {
addCriterion("demand_time is not null");
return (Criteria) this;
}
public Criteria andDemandTimeEqualTo(String value) {
addCriterion("demand_time =", value, "demandTime");
return (Criteria) this;
}
public Criteria andDemandTimeNotEqualTo(String value) {
addCriterion("demand_time <>", value, "demandTime");
return (Criteria) this;
}
public Criteria andDemandTimeGreaterThan(String value) {
addCriterion("demand_time >", value, "demandTime");
return (Criteria) this;
}
public Criteria andDemandTimeGreaterThanOrEqualTo(String value) {
addCriterion("demand_time >=", value, "demandTime");
return (Criteria) this;
}
public Criteria andDemandTimeLessThan(String value) {
addCriterion("demand_time <", value, "demandTime");
return (Criteria) this;
}
public Criteria andDemandTimeLessThanOrEqualTo(String value) {
addCriterion("demand_time <=", value, "demandTime");
return (Criteria) this;
}
public Criteria andDemandTimeLike(String value) {
addCriterion("demand_time like", value, "demandTime");
return (Criteria) this;
}
public Criteria andDemandTimeNotLike(String value) {
addCriterion("demand_time not like", value, "demandTime");
return (Criteria) this;
}
public Criteria andDemandTimeIn(List<String> values) {
addCriterion("demand_time in", values, "demandTime");
return (Criteria) this;
}
public Criteria andDemandTimeNotIn(List<String> values) {
addCriterion("demand_time not in", values, "demandTime");
return (Criteria) this;
}
public Criteria andDemandTimeBetween(String value1, String value2) {
addCriterion("demand_time between", value1, value2, "demandTime");
return (Criteria) this;
}
public Criteria andDemandTimeNotBetween(String value1, String value2) {
addCriterion("demand_time not between", value1, value2, "demandTime");
return (Criteria) this;
}
public Criteria andCategoryIsNull() {
addCriterion("category is null");
return (Criteria) this;
}
public Criteria andCategoryIsNotNull() {
addCriterion("category is not null");
return (Criteria) this;
}
public Criteria andCategoryEqualTo(String value) {
addCriterion("category =", value, "category");
return (Criteria) this;
}
public Criteria andCategoryNotEqualTo(String value) {
addCriterion("category <>", value, "category");
return (Criteria) this;
}
public Criteria andCategoryGreaterThan(String value) {
addCriterion("category >", value, "category");
return (Criteria) this;
}
public Criteria andCategoryGreaterThanOrEqualTo(String value) {
addCriterion("category >=", value, "category");
return (Criteria) this;
}
public Criteria andCategoryLessThan(String value) {
addCriterion("category <", value, "category");
return (Criteria) this;
}
public Criteria andCategoryLessThanOrEqualTo(String value) {
addCriterion("category <=", value, "category");
return (Criteria) this;
}
public Criteria andCategoryLike(String value) {
addCriterion("category like", value, "category");
return (Criteria) this;
}
public Criteria andCategoryNotLike(String value) {
addCriterion("category not like", value, "category");
return (Criteria) this;
}
public Criteria andCategoryIn(List<String> values) {
addCriterion("category in", values, "category");
return (Criteria) this;
}
public Criteria andCategoryNotIn(List<String> values) {
addCriterion("category not in", values, "category");
return (Criteria) this;
}
public Criteria andCategoryBetween(String value1, String value2) {
addCriterion("category between", value1, value2, "category");
return (Criteria) this;
}
public Criteria andCategoryNotBetween(String value1, String value2) {
addCriterion("category not between", value1, value2, "category");
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 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;
}
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 andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Long value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Long value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Long value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Long value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Long value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Long value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Long> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Long> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Long value1, Long value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Long value1, Long value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedByIsNull() {
addCriterion("updated_by is null");
return (Criteria) this;
}
public Criteria andUpdatedByIsNotNull() {
addCriterion("updated_by is not null");
return (Criteria) this;
}
public Criteria andUpdatedByEqualTo(Long value) {
addCriterion("updated_by =", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotEqualTo(Long value) {
addCriterion("updated_by <>", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByGreaterThan(Long value) {
addCriterion("updated_by >", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) {
addCriterion("updated_by >=", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByLessThan(Long value) {
addCriterion("updated_by <", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByLessThanOrEqualTo(Long value) {
addCriterion("updated_by <=", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByIn(List<Long> values) {
addCriterion("updated_by in", values, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotIn(List<Long> values) {
addCriterion("updated_by not in", values, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByBetween(Long value1, Long value2) {
addCriterion("updated_by between", value1, value2, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotBetween(Long value1, Long value2) {
addCriterion("updated_by not between", value1, value2, "updatedBy");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table dashboard_notification
*
* @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_notification
*
* @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);
}
}
}

34
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DeviceGroup.java

@ -30,6 +30,15 @@ public class DeviceGroup implements Serializable {
*/
private Long buildingId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_device_group.class_id
*
* @mbg.generated
*/
private Integer classId;
/**
*
* This field was generated by MyBatis Generator.
@ -155,6 +164,30 @@ public class DeviceGroup implements Serializable {
this.buildingId = buildingId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_device_group.class_id
*
* @return the value of dashboard_device_group.class_id
*
* @mbg.generated
*/
public Integer getClassId() {
return classId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_device_group.class_id
*
* @param classId the value for dashboard_device_group.class_id
*
* @mbg.generated
*/
public void setClassId(Integer classId) {
this.classId = classId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_device_group.name
@ -290,6 +323,7 @@ public class DeviceGroup implements Serializable {
sb.append(", id=").append(id);
sb.append(", companyId=").append(companyId);
sb.append(", buildingId=").append(buildingId);
sb.append(", classId=").append(classId);
sb.append(", name=").append(name);
sb.append(", remark=").append(remark);
sb.append(", flag=").append(flag);

60
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DeviceGroupExample.java

@ -374,6 +374,66 @@ public class DeviceGroupExample {
return (Criteria) this;
}
public Criteria andClassIdIsNull() {
addCriterion("class_id is null");
return (Criteria) this;
}
public Criteria andClassIdIsNotNull() {
addCriterion("class_id is not null");
return (Criteria) this;
}
public Criteria andClassIdEqualTo(Integer value) {
addCriterion("class_id =", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdNotEqualTo(Integer value) {
addCriterion("class_id <>", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdGreaterThan(Integer value) {
addCriterion("class_id >", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdGreaterThanOrEqualTo(Integer value) {
addCriterion("class_id >=", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdLessThan(Integer value) {
addCriterion("class_id <", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdLessThanOrEqualTo(Integer value) {
addCriterion("class_id <=", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdIn(List<Integer> values) {
addCriterion("class_id in", values, "classId");
return (Criteria) this;
}
public Criteria andClassIdNotIn(List<Integer> values) {
addCriterion("class_id not in", values, "classId");
return (Criteria) this;
}
public Criteria andClassIdBetween(Integer value1, Integer value2) {
addCriterion("class_id between", value1, value2, "classId");
return (Criteria) this;
}
public Criteria andClassIdNotBetween(Integer value1, Integer value2) {
addCriterion("class_id not between", value1, value2, "classId");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;

68
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DeviceInfo.java

@ -94,6 +94,15 @@ public class DeviceInfo implements Serializable {
*/
private Long assetId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column device_info.gateway_client_id
*
* @mbg.generated
*/
private Integer gatewayClientId;
/**
*
* This field was generated by MyBatis Generator.
@ -229,6 +238,15 @@ public class DeviceInfo implements Serializable {
*/
private String unit;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column device_info.dashboard_decimal_places
*
* @mbg.generated
*/
private Integer dashboardDecimalPlaces;
/**
*
* This field was generated by MyBatis Generator.
@ -486,6 +504,30 @@ public class DeviceInfo implements Serializable {
this.assetId = assetId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column device_info.gateway_client_id
*
* @return the value of device_info.gateway_client_id
*
* @mbg.generated
*/
public Integer getGatewayClientId() {
return gatewayClientId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column device_info.gateway_client_id
*
* @param gatewayClientId the value for device_info.gateway_client_id
*
* @mbg.generated
*/
public void setGatewayClientId(Integer gatewayClientId) {
this.gatewayClientId = gatewayClientId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column device_info.flag
@ -846,6 +888,30 @@ public class DeviceInfo implements Serializable {
this.unit = unit == null ? null : unit.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column device_info.dashboard_decimal_places
*
* @return the value of device_info.dashboard_decimal_places
*
* @mbg.generated
*/
public Integer getDashboardDecimalPlaces() {
return dashboardDecimalPlaces;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column device_info.dashboard_decimal_places
*
* @param dashboardDecimalPlaces the value for device_info.dashboard_decimal_places
*
* @mbg.generated
*/
public void setDashboardDecimalPlaces(Integer dashboardDecimalPlaces) {
this.dashboardDecimalPlaces = dashboardDecimalPlaces;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column device_info.data_mapping
@ -892,6 +958,7 @@ public class DeviceInfo implements Serializable {
sb.append(", remark=").append(remark);
sb.append(", buildingId=").append(buildingId);
sb.append(", assetId=").append(assetId);
sb.append(", gatewayClientId=").append(gatewayClientId);
sb.append(", flag=").append(flag);
sb.append(", companyId=").append(companyId);
sb.append(", createdBy=").append(createdBy);
@ -907,6 +974,7 @@ public class DeviceInfo implements Serializable {
sb.append(", alarmLevel=").append(alarmLevel);
sb.append(", retainAlert=").append(retainAlert);
sb.append(", unit=").append(unit);
sb.append(", dashboardDecimalPlaces=").append(dashboardDecimalPlaces);
sb.append(", dataMapping=").append(dataMapping);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");

120
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DeviceInfoExample.java

@ -835,6 +835,66 @@ public class DeviceInfoExample {
return (Criteria) this;
}
public Criteria andGatewayClientIdIsNull() {
addCriterion("gateway_client_id is null");
return (Criteria) this;
}
public Criteria andGatewayClientIdIsNotNull() {
addCriterion("gateway_client_id is not null");
return (Criteria) this;
}
public Criteria andGatewayClientIdEqualTo(Integer value) {
addCriterion("gateway_client_id =", value, "gatewayClientId");
return (Criteria) this;
}
public Criteria andGatewayClientIdNotEqualTo(Integer value) {
addCriterion("gateway_client_id <>", value, "gatewayClientId");
return (Criteria) this;
}
public Criteria andGatewayClientIdGreaterThan(Integer value) {
addCriterion("gateway_client_id >", value, "gatewayClientId");
return (Criteria) this;
}
public Criteria andGatewayClientIdGreaterThanOrEqualTo(Integer value) {
addCriterion("gateway_client_id >=", value, "gatewayClientId");
return (Criteria) this;
}
public Criteria andGatewayClientIdLessThan(Integer value) {
addCriterion("gateway_client_id <", value, "gatewayClientId");
return (Criteria) this;
}
public Criteria andGatewayClientIdLessThanOrEqualTo(Integer value) {
addCriterion("gateway_client_id <=", value, "gatewayClientId");
return (Criteria) this;
}
public Criteria andGatewayClientIdIn(List<Integer> values) {
addCriterion("gateway_client_id in", values, "gatewayClientId");
return (Criteria) this;
}
public Criteria andGatewayClientIdNotIn(List<Integer> values) {
addCriterion("gateway_client_id not in", values, "gatewayClientId");
return (Criteria) this;
}
public Criteria andGatewayClientIdBetween(Integer value1, Integer value2) {
addCriterion("gateway_client_id between", value1, value2, "gatewayClientId");
return (Criteria) this;
}
public Criteria andGatewayClientIdNotBetween(Integer value1, Integer value2) {
addCriterion("gateway_client_id not between", value1, value2, "gatewayClientId");
return (Criteria) this;
}
public Criteria andFlagIsNull() {
addCriterion("flag is null");
return (Criteria) this;
@ -1754,6 +1814,66 @@ public class DeviceInfoExample {
addCriterion("unit not between", value1, value2, "unit");
return (Criteria) this;
}
public Criteria andDashboardDecimalPlacesIsNull() {
addCriterion("dashboard_decimal_places is null");
return (Criteria) this;
}
public Criteria andDashboardDecimalPlacesIsNotNull() {
addCriterion("dashboard_decimal_places is not null");
return (Criteria) this;
}
public Criteria andDashboardDecimalPlacesEqualTo(Integer value) {
addCriterion("dashboard_decimal_places =", value, "dashboardDecimalPlaces");
return (Criteria) this;
}
public Criteria andDashboardDecimalPlacesNotEqualTo(Integer value) {
addCriterion("dashboard_decimal_places <>", value, "dashboardDecimalPlaces");
return (Criteria) this;
}
public Criteria andDashboardDecimalPlacesGreaterThan(Integer value) {
addCriterion("dashboard_decimal_places >", value, "dashboardDecimalPlaces");
return (Criteria) this;
}
public Criteria andDashboardDecimalPlacesGreaterThanOrEqualTo(Integer value) {
addCriterion("dashboard_decimal_places >=", value, "dashboardDecimalPlaces");
return (Criteria) this;
}
public Criteria andDashboardDecimalPlacesLessThan(Integer value) {
addCriterion("dashboard_decimal_places <", value, "dashboardDecimalPlaces");
return (Criteria) this;
}
public Criteria andDashboardDecimalPlacesLessThanOrEqualTo(Integer value) {
addCriterion("dashboard_decimal_places <=", value, "dashboardDecimalPlaces");
return (Criteria) this;
}
public Criteria andDashboardDecimalPlacesIn(List<Integer> values) {
addCriterion("dashboard_decimal_places in", values, "dashboardDecimalPlaces");
return (Criteria) this;
}
public Criteria andDashboardDecimalPlacesNotIn(List<Integer> values) {
addCriterion("dashboard_decimal_places not in", values, "dashboardDecimalPlaces");
return (Criteria) this;
}
public Criteria andDashboardDecimalPlacesBetween(Integer value1, Integer value2) {
addCriterion("dashboard_decimal_places between", value1, value2, "dashboardDecimalPlaces");
return (Criteria) this;
}
public Criteria andDashboardDecimalPlacesNotBetween(Integer value1, Integer value2) {
addCriterion("dashboard_decimal_places not between", value1, value2, "dashboardDecimalPlaces");
return (Criteria) this;
}
}
/**

34
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DeviceRawdataRealtime.java

@ -84,6 +84,15 @@ public class DeviceRawdataRealtime implements Serializable {
*/
private Integer uploadDay;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column device_rawdata_realtime.dashboard_status
*
* @mbg.generated
*/
private String dashboardStatus;
/**
*
* This field was generated by MyBatis Generator.
@ -335,6 +344,30 @@ public class DeviceRawdataRealtime implements Serializable {
this.uploadDay = uploadDay;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column device_rawdata_realtime.dashboard_status
*
* @return the value of device_rawdata_realtime.dashboard_status
*
* @mbg.generated
*/
public String getDashboardStatus() {
return dashboardStatus;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column device_rawdata_realtime.dashboard_status
*
* @param dashboardStatus the value for device_rawdata_realtime.dashboard_status
*
* @mbg.generated
*/
public void setDashboardStatus(String dashboardStatus) {
this.dashboardStatus = dashboardStatus == null ? null : dashboardStatus.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column device_rawdata_realtime.alert_content
@ -428,6 +461,7 @@ public class DeviceRawdataRealtime implements Serializable {
sb.append(", uploadYear=").append(uploadYear);
sb.append(", uploadMonth=").append(uploadMonth);
sb.append(", uploadDay=").append(uploadDay);
sb.append(", dashboardStatus=").append(dashboardStatus);
sb.append(", alertContent=").append(alertContent);
sb.append(", alertCancelContent=").append(alertCancelContent);
sb.append(", rawData=").append(rawData);

70
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DeviceRawdataRealtimeExample.java

@ -773,6 +773,76 @@ public class DeviceRawdataRealtimeExample {
addCriterion("upload_day not between", value1, value2, "uploadDay");
return (Criteria) this;
}
public Criteria andDashboardStatusIsNull() {
addCriterion("dashboard_status is null");
return (Criteria) this;
}
public Criteria andDashboardStatusIsNotNull() {
addCriterion("dashboard_status is not null");
return (Criteria) this;
}
public Criteria andDashboardStatusEqualTo(String value) {
addCriterion("dashboard_status =", value, "dashboardStatus");
return (Criteria) this;
}
public Criteria andDashboardStatusNotEqualTo(String value) {
addCriterion("dashboard_status <>", value, "dashboardStatus");
return (Criteria) this;
}
public Criteria andDashboardStatusGreaterThan(String value) {
addCriterion("dashboard_status >", value, "dashboardStatus");
return (Criteria) this;
}
public Criteria andDashboardStatusGreaterThanOrEqualTo(String value) {
addCriterion("dashboard_status >=", value, "dashboardStatus");
return (Criteria) this;
}
public Criteria andDashboardStatusLessThan(String value) {
addCriterion("dashboard_status <", value, "dashboardStatus");
return (Criteria) this;
}
public Criteria andDashboardStatusLessThanOrEqualTo(String value) {
addCriterion("dashboard_status <=", value, "dashboardStatus");
return (Criteria) this;
}
public Criteria andDashboardStatusLike(String value) {
addCriterion("dashboard_status like", value, "dashboardStatus");
return (Criteria) this;
}
public Criteria andDashboardStatusNotLike(String value) {
addCriterion("dashboard_status not like", value, "dashboardStatus");
return (Criteria) this;
}
public Criteria andDashboardStatusIn(List<String> values) {
addCriterion("dashboard_status in", values, "dashboardStatus");
return (Criteria) this;
}
public Criteria andDashboardStatusNotIn(List<String> values) {
addCriterion("dashboard_status not in", values, "dashboardStatus");
return (Criteria) this;
}
public Criteria andDashboardStatusBetween(String value1, String value2) {
addCriterion("dashboard_status between", value1, value2, "dashboardStatus");
return (Criteria) this;
}
public Criteria andDashboardStatusNotBetween(String value1, String value2) {
addCriterion("dashboard_status not between", value1, value2, "dashboardStatus");
return (Criteria) this;
}
}
/**

28
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/dashboardnotification/DashboardNotificationPageVO.java

@ -0,0 +1,28 @@
package com.dongjian.dashboard.back.vo.dashboardnotification;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @author Mr.Jiang
* @time 2022年7月21日 下午8:50:31
*/
@Data
public class DashboardNotificationPageVO {
@Schema(description = "Provider unique identifier ID, not required for new entries", example = "2738967")
private Long dashboardNotificationId;
@Schema(description = "demand time", example = "testProvider1")
private String demandTime;
@Schema(description = "category", example = "remark")
private String category;
@Schema(description ="content", example = "2")
private String content;
@Schema(description = "created time", example = "2738967")
private Long createdAt;
}

11
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/devicegroup/DeviceGroupPageVO.java

@ -5,20 +5,23 @@ import lombok.Data;
@Data
public class DeviceGroupPageVO {
@Schema(description = "项目唯一标识ID,新增时无此参数",example = "2738967")
private Long deviceGroupId;
@Schema(description = "楼宇ID",example = "222", hidden = true)
private Long buildingId;
@Schema(description = "设备分类ID,2-积算、3-计测、4-状态",example = "2")
private Integer classId;
@Schema(description = "楼宇名称",example = "楼宇222", hidden = true)
private String buildingName;
@Schema(description = "所属企业ID",example = "2738967", hidden = true)
private Long companyId;
@Schema(description = "项目名称",example = "testDeviceGroup1", required = true)
@Schema(description = "名称",example = "testDeviceGroup1", required = true)
private String name;
@Schema(description = "remark", example = "remark")

2
dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/DeviceDataMeasureService.java

@ -18,5 +18,5 @@ public interface DeviceDataMeasureService {
List<DeviceMeasureData> handleDeviceMeasureData(MeasureDataSearchParam pageSearchParam);
SimpleDataResponse<List<LineData>> getLineData(LineDataSearchParams lineDataSearchParams, Long companyId, Long userId, Integer languageType);
SimpleDataResponse<List<LineData>> getLineData(Integer searchType, LineDataSearchParams lineDataSearchParams, Long companyId, Long userId, Integer languageType);
}

3
dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/OverviewService.java

@ -1,6 +1,7 @@
package com.dongjian.dashboard.back.service;
import com.dongjian.dashboard.back.common.response.SimpleDataResponse;
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO;
import com.dongjian.dashboard.back.vo.data.OverviewVO;
import com.dongjian.dashboard.back.weather.JpMeshHourlyForecasts;
import com.dongjian.dashboard.back.weather.QueryWeather;
@ -15,4 +16,6 @@ public interface OverviewService {
SimpleDataResponse<List<OverviewVO>> getOverviewInfo(Long userId, Long companyId, Integer languageType, Integer UTCOffset);
SimpleDataResponse<JpMeshHourlyForecasts> getWeatherInfo(QueryWeather queryWeather, Long userId, Long companyId, Integer languageType, Integer utcOffset);
SimpleDataResponse<DashboardNotificationPageVO> getNotification(Long userId, Long companyId, Integer languageType, Integer utcOffset);
}

69
dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/common/LineDataHourAggregator.java

@ -0,0 +1,69 @@
package com.dongjian.dashboard.back.service.common;
import com.dongjian.dashboard.back.vo.device.LineData;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
/**
* 给计测设备按小时聚合数据求平均值
*/
public class LineDataHourAggregator {
private static final DateTimeFormatter INPUT_FMT =
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
private static final DateTimeFormatter HOUR_FMT =
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:00:00");
public static void aggregateByHour(LineData lineData) {
List<Object> xData = lineData.getXData();
List<Object> yData = lineData.getYData();
if (xData == null || yData == null || xData.size() != yData.size()) {
return;
}
// hour -> List<Double>
Map<String, List<Double>> hourMap = new TreeMap<>();
for (int i = 0; i < xData.size(); i++) {
String timeStr = String.valueOf(xData.get(i));
Object yVal = yData.get(i);
if (yVal == null) {
continue;
}
LocalDateTime time = LocalDateTime.parse(timeStr, INPUT_FMT);
String hourKey = time.format(HOUR_FMT);
hourMap.computeIfAbsent(hourKey, k -> new ArrayList<>()).add(Double.parseDouble(String.valueOf(yVal)));
}
// 重新构建 xData / yData
List<Object> newX = new ArrayList<>();
List<Object> newY = new ArrayList<>();
for (Map.Entry<String, List<Double>> entry : hourMap.entrySet()) {
newX.add(entry.getKey());
double avg = entry.getValue()
.stream()
.mapToDouble(Double::doubleValue)
.average()
.orElse(0);
newY.add(avg);
}
lineData.setXData(newX);
lineData.setYData(newY);
}
}

12
dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/DeviceDataMeasureServiceImpl.java

@ -17,6 +17,7 @@ import com.dongjian.dashboard.back.model.DeviceRawdataRealtime;
import com.dongjian.dashboard.back.model.DeviceRawdataRealtimeExample;
import com.dongjian.dashboard.back.service.DeviceDataMeasureService;
import com.dongjian.dashboard.back.service.common.CommonOpt;
import com.dongjian.dashboard.back.service.common.LineDataHourAggregator;
import com.dongjian.dashboard.back.vo.data.DeviceMeasureData;
import com.dongjian.dashboard.back.vo.device.LineData;
import com.fasterxml.jackson.databind.JsonNode;
@ -190,8 +191,15 @@ public class DeviceDataMeasureServiceImpl implements DeviceDataMeasureService {
}
@Override
public SimpleDataResponse<List<LineData>> getLineData(LineDataSearchParams lineDataSearchParams, Long companyId, Long userId, Integer languageType) {
return SimpleDataResponse.success(commonOpt.getLineData(companyId, lineDataSearchParams, 3));
public SimpleDataResponse<List<LineData>> getLineData(Integer searchType, LineDataSearchParams lineDataSearchParams, Long companyId, Long userId, Integer languageType) {
if (null == searchType) {
searchType = 2;//默认全部数据
}
List<LineData> lineDataList = commonOpt.getLineData(companyId, lineDataSearchParams, 3);
if (1 == searchType && CollectionUtils.isNotEmpty(lineDataList)) {
lineDataList.forEach(LineDataHourAggregator::aggregateByHour);
}
return SimpleDataResponse.success(lineDataList);
}
}

5
dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/DeviceGroupServiceImpl.java

@ -110,6 +110,11 @@ public class DeviceGroupServiceImpl implements DeviceGroupService {
throw new MsgCodeException(msgLanguageChange.getParameterMapByCode(languageType, "noOperationAuth"));
}
}
if (null == param.getClassId()){
throw new MsgCodeException("Parameter error [classId]");
} else if (2 != param.getClassId() && 3 != param.getClassId() && 4 != param.getClassId() ){
throw new MsgCodeException("Parameter error [classId]");
}
}
private void commonVerifyOpt(OptDeviceGroupParams param, Long companyId, Integer languageType) {

6
dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/DeviceServiceImpl.java

@ -46,7 +46,11 @@ public class DeviceServiceImpl implements DeviceService {
} else {
pageSearchParam.setCompanyIdList(commonOpt.filterCompanyIds(companyId, pageSearchParam.getCompanyIds()));
}
pageSearchParam.setCategoryIdList(Constants.ALL_CATEGORY_IDS);
if (null == pageSearchParam.getClassId()) {
pageSearchParam.setCategoryIdList(Constants.ALL_CATEGORY_IDS);
} else {
pageSearchParam.setCategoryIdList(Constants.CATEGORY_MAP.get(pageSearchParam.getClassId()));
}
PageHelper.startPage(pageSearchParam.getPageNum() == null ? 1 : pageSearchParam.getPageNum(), pageSearchParam.getPageSize() == null ? 20 : pageSearchParam.getPageSize());

11
dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/OverviewServiceImpl.java

@ -4,9 +4,13 @@ import com.dongjian.dashboard.back.common.Constants;
import com.dongjian.dashboard.back.common.language.msg.MsgLanguageChange;
import com.dongjian.dashboard.back.common.response.ResponseCode;
import com.dongjian.dashboard.back.common.response.SimpleDataResponse;
import com.dongjian.dashboard.back.dao.ex.DashboardNotificationMapperExt;
import com.dongjian.dashboard.back.dao.ex.DeviceRawdataRealtimeMapperExt;
import com.dongjian.dashboard.back.model.DashboardNotification;
import com.dongjian.dashboard.back.model.DashboardNotificationExample;
import com.dongjian.dashboard.back.service.OverviewService;
import com.dongjian.dashboard.back.service.common.CommonOpt;
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO;
import com.dongjian.dashboard.back.vo.data.OverviewInfo;
import com.dongjian.dashboard.back.vo.data.OverviewVO;
import com.dongjian.dashboard.back.weather.JpMeshHourlyForecasts;
@ -44,6 +48,8 @@ public class OverviewServiceImpl implements OverviewService {
@Autowired
private DeviceRawdataRealtimeMapperExt deviceRawdataRealtimeMapperExt;
@Autowired
private DashboardNotificationMapperExt dashboardNotificationMapperExt;
@Autowired
private MsgLanguageChange msgLanguageChange;
@Autowired
@ -194,4 +200,9 @@ public class OverviewServiceImpl implements OverviewService {
return SimpleDataResponse.fail(ResponseCode.SERVER_ERROR, ResponseCode.SERVER_ERROR_MSG);
}
@Override
public SimpleDataResponse<DashboardNotificationPageVO> getNotification(Long userId, Long companyId, Integer languageType, Integer utcOffset) {
return SimpleDataResponse.success(dashboardNotificationMapperExt.getNotification(companyId));
}
}

Loading…
Cancel
Save