<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.yuanchu.limslaboratory.mapper.MeteringPlanMapper">
|
|
<select id="pagingQueryOfMeasurementLedger" resultType="map">
|
SELECT
|
i.`equipment_code` equipmentCode,
|
i.`equipment_name` equipmentName,
|
m.measurement_unit measurementUnit,
|
i.measuring_range measuringRange,
|
i.term_validity termValidity,
|
m.result result,
|
m.end_date endDate,
|
u.NAME name ,
|
m.`create_time` createTime,
|
m.code code
|
FROM
|
metrical_information m
|
LEFT JOIN `user` u ON u.id = m.user_id
|
LEFT JOIN instrument i ON i.`id` = m.`instrument_id`
|
WHERE 1=1
|
and (m.state=1 and i.state=1)
|
<if test="dto.code!=null and dto.code!=''">
|
and i.`equipment_code` like concat('%',#{dto.code},'%')
|
</if>
|
<if test="dto.name!=null and dto.name!=''">
|
and i.`equipment_name` like concat('%',#{dto.name},'%')
|
</if>
|
<if test="dto.name!=null and dto.name!=''">
|
and i.measurement_unit like concat('%',#{dto.unit},'%')
|
</if>
|
</select>
|
</mapper>
|