From 58f820f804046e7fe82bef5a7b428b442a728e8a Mon Sep 17 00:00:00 2001 From: Fixiaobai <fixiaobai@163.com> Date: 星期四, 17 八月 2023 08:54:13 +0800 Subject: [PATCH] 计量管理-》计量台账 --- laboratory-server/src/main/resources/mapper/MeteringPlanMapper.xml | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-) diff --git a/laboratory-server/src/main/resources/mapper/MeteringPlanMapper.xml b/laboratory-server/src/main/resources/mapper/MeteringPlanMapper.xml index ca6ab6b..efa48a6 100644 --- a/laboratory-server/src/main/resources/mapper/MeteringPlanMapper.xml +++ b/laboratory-server/src/main/resources/mapper/MeteringPlanMapper.xml @@ -3,9 +3,31 @@ <mapper namespace="com.yuanchu.limslaboratory.mapper.MeteringPlanMapper"> <select id="pagingQueryOfMeasurementLedger" resultType="map"> - SELECT i.`equipment_code`, i.`equipment_name`, i.`specifications_models`, m.`create_time`, m.`uncertainty`, - m.`end_date`, i.`term_validity`, i.`storage_place`, i.`conditions` - FROM instrument i, metrical_information m - WHERE i.`id` = m.`instrument_id` + 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> -- Gitblit v1.9.3