From df500bf6ee29b3fead5b920ed366230b62a4c7ee Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期三, 22 十一月 2023 09:57:42 +0800 Subject: [PATCH] 1.新增了站点信息查询的接口 2.修改了扬尘已有接口的参数以及sql语句 3.修改了用户登陆接口 --- src/main/resources/mapper/FugitiveDustMapper.xml | 91 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 89 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/FugitiveDustMapper.xml b/src/main/resources/mapper/FugitiveDustMapper.xml index c7ca729..ddbd502 100644 --- a/src/main/resources/mapper/FugitiveDustMapper.xml +++ b/src/main/resources/mapper/FugitiveDustMapper.xml @@ -145,12 +145,27 @@ from dust_exception_data as a join ja_t_dust_site_info as b on a.mn_code = b.mn_code <where> + <if test="siteName !=null and siteName != ''"> + b.name = #{siteName} + </if> <if test="exceptionType !=null and exceptionType != ''"> - a.exception_type = #{exceptionType} + and a.exception_type = #{exceptionType} </if> <if test="beginTime != null and endTime != null"> and (a.begin_time between #{beginTime} and #{endTime} or a.end_time between #{beginTime} and #{endTime}) + </if> + <if test="street != null and street != '' "> + and b.address in + <foreach item="item" collection="street" separator="," open="(" close=")"> + #{item} + </foreach> + </if> + <if test="dutyCompany != null and dutyCompany != '' "> + and b.duty_company in + <foreach item="item" collection="dutyCompany" separator="," open="(" close=")"> + #{item} + </foreach> </if> </where> </select> @@ -210,8 +225,9 @@ and a.type = #{type} </if> </where> - </select> + + <select id="analysisdataByTimeAndType" resultType="com.flightfeather.monitor.pojo.AnalysisDustData"> select a.*,b.name,b.duty_company from dust_statistics_value as a join ja_t_dust_site_info as b on a.mn_code = b. mn_code <where> @@ -223,7 +239,78 @@ and a.type = #{type} </if> </where> + </select> + <select id="getExceptionData2" resultType="com.flightfeather.monitor.pojo.DustExceptionData"> + + select a.* ,b.* + from dust_exception_data as a join ja_t_dust_site_info as b on a.mn_code = b.mn_code + <where> + <if test="street != null and street != '' "> + b.address in + <foreach item="item" collection="street" separator="," open="(" close=")"> + #{item} + </foreach> + </if> + + <if test="dutyCompany != null and dutyCompany != '' "> + and b.duty_company in + <foreach item="item" collection="dutyCompany" separator="," open="(" close=")"> + #{item} + </foreach> + </if> + <if test="siteName !=null and siteName != ''"> + and b.name like concat('%',#{siteName},'%') + </if> + + <if test="exceptionType != null and exceptionType != '' "> + and a.exception_type in + <foreach item="item" collection="exceptionType" separator="," open="(" close=")"> + #{item} + </foreach> + </if> + + + <if test="beginTime != null and endTime != null"> + and (a.begin_time between #{beginTime} and #{endTime} or a.end_time between #{beginTime} and #{endTime}) + </if> + + + + </where> </select> + <select id="exceptionNum" resultType="java.lang.Integer"> + select count(*) + from dust_exception_data as a join ja_t_dust_site_info as b on a.mn_code = b.mn_code + <where> + <if test="siteName !=null and siteName != ''"> + b.name = #{siteName} + </if> + <if test="exceptionType != null and exceptionType != '' "> + and a.exception_type = #{exceptionType} + </if> + + <if test="street != null and street != '' "> + and b.address in + <foreach item="item" collection="street" separator="," open="(" close=")"> + #{item} + </foreach> + </if> + + <if test="dutyCompany != null and dutyCompany != '' "> + and b.duty_company in + <foreach item="item" collection="dutyCompany" separator="," open="(" close=")"> + #{item} + </foreach> + </if> + + <if test="beginTime != null and endTime != null"> + and (a.begin_time between #{beginTime} and #{endTime} or a.end_time between #{beginTime} and #{endTime}) + </if> + + </where> + + </select> + </mapper> \ No newline at end of file -- Gitblit v1.9.3