| | |
| | | limit 1 |
| | | </select> |
| | | |
| | | <!-- 一个来源库(厂商侧一次测试)在该通道上的全部采样行,供分段推导工步与循环(ADR-0067)。 --> |
| | | <select id="selectSamplesOfSource" resultMap="TDeviceIngestRecordResultMap"> |
| | | select <include refid="ingestColumns"/> from t_device_ingest_record |
| | | where adapter_code = #{adapterCode} and payload_kind = 'SAMPLE' |
| | | and devtype = #{devtype} and devid = #{devid} and subdevid = #{subdevid} and chlid = #{chlid} |
| | | and source_ref = #{sourceRef} |
| | | order by device_time_utc, record_sequence |
| | | </select> |
| | | |
| | | <!-- 只取严格晚于水位的行;同秒多行按协议序号各自成立,不按秒合并。 --> |
| | | <select id="selectSamplesSince" resultMap="TDeviceIngestRecordResultMap"> |
| | | select <include refid="ingestColumns"/> from t_device_ingest_record |