This commit is contained in:
wuweida 2022-07-19 17:50:49 +08:00
parent 03a02d4644
commit 068ab2d5ed
1 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@
LEFT JOIN ( LEFT JOIN (
select DATE_FORMAT(br.push_time,'%Y%-%m-%d') pushTime,ROUND(AVG(br.pm10)) pm10,ROUND(AVG(br.noice)) noice select DATE_FORMAT(br.push_time,'%Y%-%m-%d') pushTime,ROUND(AVG(br.pm10)) pm10,ROUND(AVG(br.noice)) noice
from t_building_records br JOIN t_building_new_site bns ON br.project_name = bns.gdmc from t_building_records br JOIN t_building_new_site bns ON br.project_name = bns.gdmc
WHERE br.build_license = 'JZ安许证字{2005}140001-12' WHERE br.build_license = #{buildLicense}
AND DATE_SUB(CURDATE(), INTERVAL 7 DAY) < date(br.push_time) group by pushTime) b AND DATE_SUB(CURDATE(), INTERVAL 7 DAY) < date(br.push_time) group by pushTime) b
ON a.pushTime = b.pushTime ORDER BY a.pushTime ON a.pushTime = b.pushTime ORDER BY a.pushTime
</select> </select>
@ -141,7 +141,7 @@
LEFT JOIN ( LEFT JOIN (
select DATE_FORMAT(br.push_time,'%Y%-%m-%d') pushTime,ROUND(AVG(br.pm10)) pm10,ROUND(AVG(br.noice)) noice select DATE_FORMAT(br.push_time,'%Y%-%m-%d') pushTime,ROUND(AVG(br.pm10)) pm10,ROUND(AVG(br.noice)) noice
from t_building_records br JOIN t_building_new_site bns ON br.project_name = bns.gdmc from t_building_records br JOIN t_building_new_site bns ON br.project_name = bns.gdmc
WHERE br.build_license = 'JZ安许证字{2005}140001-12' WHERE br.build_license = #{buildLicense}
AND DATE_SUB(CURDATE(), INTERVAL 30 DAY) &lt; date(br.push_time) group by pushTime) b AND DATE_SUB(CURDATE(), INTERVAL 30 DAY) &lt; date(br.push_time) group by pushTime) b
ON a.pushTime = b.pushTime ORDER BY a.pushTime ON a.pushTime = b.pushTime ORDER BY a.pushTime
</select> </select>