27 lines
968 B
Java
27 lines
968 B
Java
|
|
package com.gunshi.project.hsz.mapper;
|
||
|
|
|
||
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||
|
|
import com.gunshi.project.hsz.entity.vo.HomeOsmoticShiftDeviceVo;
|
||
|
|
import com.gunshi.project.hsz.model.OsmoticShiftDevice;
|
||
|
|
import org.apache.ibatis.annotations.Mapper;
|
||
|
|
import org.apache.ibatis.annotations.Select;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 描述: 位移监测记录表
|
||
|
|
* author: xusan
|
||
|
|
* date: 2024-07-08 15:44:07
|
||
|
|
*/
|
||
|
|
@Mapper
|
||
|
|
public interface OsmoticShiftDeviceMapper extends BaseMapper<OsmoticShiftDevice> {
|
||
|
|
|
||
|
|
@Select("""
|
||
|
|
<script>
|
||
|
|
SELECT st.*,r.x,r.y,r.h,r.tm FROM osmotic_shift_device st
|
||
|
|
LEFT JOIN (SELECT station_code,MAX(tm) tm FROM osmotic_shift_r GROUP BY station_code) maxr ON st.station_code = maxr.station_code
|
||
|
|
LEFT JOIN osmotic_shift_r r ON maxr.station_code = r.station_code AND maxr.tm = r.tm
|
||
|
|
</script>
|
||
|
|
""")
|
||
|
|
List<HomeOsmoticShiftDeviceVo> getDetailsAndMonitoringDataList();
|
||
|
|
}
|