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 | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/laboratory-server/src/main/resources/mapper/MeteringPlanMapper.xml b/laboratory-server/src/main/resources/mapper/MeteringPlanMapper.xml index 8011603..efa48a6 100644 --- a/laboratory-server/src/main/resources/mapper/MeteringPlanMapper.xml +++ b/laboratory-server/src/main/resources/mapper/MeteringPlanMapper.xml @@ -2,4 +2,32 @@ <!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> -- Gitblit v1.9.3