From 7d74f3fd087d4a8192ed556a6c2e3a2ea3c81cff Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期五, 28 三月 2025 17:43:48 +0800 Subject: [PATCH] 1. 新增扬尘监测数据上传功能 --- src/main/resources/mapper/ds1/DustDataResultMapper.xml | 66 ++++++++++++++++++++++++--------- 1 files changed, 48 insertions(+), 18 deletions(-) diff --git a/src/main/resources/mapper/ds1/DustDataResultMapper.xml b/src/main/resources/mapper/ds1/DustDataResultMapper.xml index a48cfd7..2f6b333 100644 --- a/src/main/resources/mapper/ds1/DustDataResultMapper.xml +++ b/src/main/resources/mapper/ds1/DustDataResultMapper.xml @@ -1,27 +1,57 @@ -<?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="cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper"> - <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DustDataResult"> +<?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="cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper" > + <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DustDataResult" > <!-- WARNING - @mbg.generated --> - <id column="DR_Id" jdbcType="INTEGER" property="drId" /> - <result column="DR_Scene_Id" jdbcType="VARCHAR" property="drSceneId" /> - <result column="DR_Scene_Name" jdbcType="VARCHAR" property="drSceneName" /> - <result column="DR_Time" jdbcType="DATE" property="drTime" /> - <result column="DR_Exceed_Times" jdbcType="INTEGER" property="drExceedTimes" /> - <result column="DR_Avg" jdbcType="DOUBLE" property="drAvg" /> - <result column="DR_Max" jdbcType="DOUBLE" property="drMax" /> - <result column="DR_Min" jdbcType="DOUBLE" property="drMin" /> - <result column="DR_Over_Avg_Per" jdbcType="DOUBLE" property="drOverAvgPer" /> - <result column="DR_Data_Num" jdbcType="INTEGER" property="drDataNum" /> - <result column="DR_Effective_Rate" jdbcType="DOUBLE" property="drEffectiveRate" /> + <id column="DR_Id" property="drId" jdbcType="INTEGER" /> + <result column="DR_Scene_Id" property="drSceneId" jdbcType="VARCHAR" /> + <result column="DR_Scene_Name" property="drSceneName" jdbcType="VARCHAR" /> + <result column="DR_Device_Code" property="drDeviceCode" jdbcType="VARCHAR" /> + <result column="DR_Time" property="drTime" jdbcType="DATE" /> + <result column="DR_Exceed_Times" property="drExceedTimes" jdbcType="INTEGER" /> + <result column="DR_Avg" property="drAvg" jdbcType="DOUBLE" /> + <result column="DR_Max" property="drMax" jdbcType="DOUBLE" /> + <result column="DR_Min" property="drMin" jdbcType="DOUBLE" /> + <result column="DR_Over_Avg_Per" property="drOverAvgPer" jdbcType="DOUBLE" /> + <result column="DR_Data_Num" property="drDataNum" jdbcType="INTEGER" /> + <result column="DR_Effective_Rate" property="drEffectiveRate" jdbcType="DOUBLE" /> </resultMap> - <sql id="Base_Column_List"> + <sql id="Base_Column_List" > <!-- WARNING - @mbg.generated --> - DR_Id, DR_Scene_Id, DR_Scene_Name, DR_Time, DR_Exceed_Times, DR_Avg, DR_Max, DR_Min, - DR_Over_Avg_Per, DR_Data_Num, DR_Effective_Rate + DR_Id, DR_Scene_Id, DR_Scene_Name, DR_Device_Code, DR_Time, DR_Exceed_Times, DR_Avg, + DR_Max, DR_Min, DR_Over_Avg_Per, DR_Data_Num, DR_Effective_Rate </sql> + + <!-- 鏁版嵁缁熻缁撴灉鏃堕棿鏉′欢 --> + <sql id="Where_Plan_Time"> + <if test="starttime != null"> + AND ${tableAlias}.DR_Time >= #{starttime} + </if> + <if test="endtime != null"> + AND ${tableAlias}.DR_Time <= #{endtime} + </if> + </sql> + + <select id="selectByArea" resultMap="BaseResultMap"> + select + <include refid="Base_Column_List"/> + from ea_t_dust_data_result as a + left join sm_t_scense as b + on a.DR_Scene_Id = b.S_GUID + <where> + <include refid="cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper.Where_Area"> + <property name="tableAlias" value="b"/> + </include> + <include refid="cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper.Where_Type"> + <property name="tableAlias" value="b"/> + </include> + <include refid="Where_Plan_Time"> + <property name="tableAlias" value="a"/> + </include> + </where> + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3