@@ -22,6 +22,6 @@ public interface DmDataMapper extends BaseMapper<DmData> {
@Select("select a.* from tb_dm_data a join (select max(time) as time ,sensorid from tb_dm_data GROUP BY sensorid,DATE_FORMAT( time, '%y-%m-%d' ))b on a.time =b.time and a.sensorid=b.sensorid where a.sensorid=#{sensorid} and a.time>=#{start} and a.time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
@Select(value="select b.eqdanwei as eqdanwei,b.equipname as sensorname,b.equipno equipno,a.dispA as dispA,a.dispB as dispB , DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time from tb_dm_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_dm_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC ")
@Select(value="select b.eqdanwei as eqdanwei,b.sensortype,b.equipname as sensorname,b.equipno equipno,a.dispA as dispA,a.dispB as dispB , DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time from tb_dm_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_dm_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC ")
@Select("select a.* from tb_sl_data a join (select max(time) as time ,sensorid from tb_sl_data GROUP BY sensorid,DATE_FORMAT( time, '%y-%m-%d' ))b on a.time =b.time and a.sensorid=b.sensorid where a.sensorid=#{deviceid} and a.time>=#{start} and a.time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
@Select(value="SELECT a.*,b.jrx_trepanning as jrxTrepanning ,b.hole_base_elevation as jrxHoleTopElevation,b.hole_bottom_elevation as jrxHoleBottomElevation, b.jrx_burial as jrxBurial from `tb_st_data` a left join tb_drybeachequipinfor b on a.sensorid =b.equipno ${ew.customSqlSegment} ")
@Select("select a.* from tb_st_data a join (select max(time) as time ,sensorid from tb_st_data GROUP BY sensorid,DATE_FORMAT( time, '%y-%m-%d' ))b on a.time =b.time and a.sensorid=b.sensorid where a.sensorid=#{deviceid} and a.time>=#{start} and a.time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
@Select(value="select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.stage as stage,a.depth as depth ,DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time from tb_st_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_sl_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC")
@Select(value="select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.stage as stage,a.depth as depth ,DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time from tb_st_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_st_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC")