@ -395,20 +395,26 @@ public interface NowDataMapper {
//按高低区更新water_Level
//按高低区更新water_Level
@Update("update now_data SET now_data.water_Level=#{waterLevel} FROM device_install where now_data.pump_id =device_install.device_addr AND device_install.seat=#{seat} and now_data.building_id=#{buildingId} ")
@Update("update now_data SET now_data.water_Level=#{waterLevel} FROM device_install "+
" where now_data.pump_id =device_install.device_addr AND device_install.seat=#{seat} and now_data.building_id=#{buildingId} "+
" and now_data.building_id = device_install.building_id ")
@Update("update now_data SET now_data.level_set=#{levelSet} FROM device_install where now_data.pump_id =device_install.device_addr AND device_install.seat=#{seat} and now_data.building_id=#{buildingId} ")
@Update("update now_data SET now_data.level_set=#{levelSet} FROM device_install "+
" where now_data.pump_id =device_install.device_addr AND device_install.seat=#{seat} and now_data.building_id=#{buildingId} "+
" and now_data.building_id = device_install.building_id ")
@Update("update history_Data SET history_Data.water_Level=#{waterLevel} FROM device_install where history_Data.pump_id =device_install.device_addr AND device_install.seat=#{seat} "+
@Update("update history_Data SET history_Data.water_Level=#{waterLevel} FROM device_install where history_Data.pump_id =device_install.device_addr AND device_install.seat=#{seat} "+
" and history_Data.building_id=#{buildingId} and convert(varchar(13),cur_date,121)=left(#{curDate},13) ")
" and history_Data.building_id=#{buildingId} "+
" and convert(varchar(13),cur_date,121)=left(#{curDate},13)"+
" and history_Data.building_id = device_install.building_id ")
@ -416,7 +422,9 @@ public interface NowDataMapper {
//按高低区更新levelSet
//按高低区更新levelSet
@Update("update history_Data SET history_Data.level_set=#{levelSet} FROM device_install where history_Data.pump_id =device_install.device_addr AND device_install.seat=#{seat} "+
@Update("update history_Data SET history_Data.level_set=#{levelSet} FROM device_install where history_Data.pump_id =device_install.device_addr AND device_install.seat=#{seat} "+
" and history_Data.building_id=#{buildingId} and convert(varchar(13),cur_date,121)=left(#{curDate},13) ")
" and history_Data.building_id=#{buildingId} "+
" and convert(varchar(13),cur_date,121)=left(#{curDate},13) "+
" and history_Data.building_id = device_install.building_id ")