| | |
| | | , #{createTime}) |
| | | </select> |
| | | |
| | | <select id="selectDeviceParameterPage" resultType="com.ruoyi.device.pojo.Device"> |
| | | <select id="selectDeviceParameterPage" resultType="com.ruoyi.device.dto.DeviceDto"> |
| | | select * from( |
| | | SELECT |
| | | d.*, |
| | |
| | | <resultMap id="deviceNameMap" type="map"> |
| | | <result property="value" column="id"/> |
| | | <result property="label" column="device_name"/> |
| | | <result property="activationDate" column="activation_date"/> |
| | | <result property="managementNumber" column="management_number"/> |
| | | </resultMap> |
| | | |
| | |
| | | case when d.storage_point is null || d.storage_point ='' then '其他' else d.storage_point end as storage_point, |
| | | d.device_name, |
| | | d.management_number, |
| | | null as value |
| | | null as value, |
| | | d.activation_date |
| | | from device d |
| | | LEFT JOIN laboratory l ON l.id = d.subordinate_departments_id |
| | | <where> |
| | |
| | | and device_name like concat('%',#{deviceName},'%') |
| | | </if> |
| | | </where> |
| | | order by l.laboratory_name desc, d.storage_point desc |
| | | </select> |
| | | |
| | | <select id="selectDeviceByCode" resultType="com.ruoyi.device.dto.DeviceDto"> |
| | |
| | | u1.name, |
| | | u2.name |
| | | </select> |
| | | |
| | | <!-- 查询到达校准有效期的设备-提前5天 --> |
| | | <select id="selectOverdueDevice" resultType="com.ruoyi.device.pojo.Device"> |
| | | SELECT * |
| | | FROM device |
| | | WHERE |
| | | -- 筛选出 activation_date 在当前日期前五天内的数据 |
| | | activation_date BETWEEN now() AND now() + INTERVAL 5 DAY |
| | | -- 筛选出 activation_date 已经超过当前日期的数据 |
| | | OR activation_date < now() |
| | | </select> |
| | | </mapper> |