From d1d6771a32edca40f88a800459442279c00f6867 Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期一, 07 八月 2023 17:52:48 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
inspection-server/src/main/resources/mapper/LinkBasicInformationMapper.xml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/inspection-server/src/main/resources/mapper/LinkBasicInformationMapper.xml b/inspection-server/src/main/resources/mapper/LinkBasicInformationMapper.xml
index b82d831..d659b1d 100644
--- a/inspection-server/src/main/resources/mapper/LinkBasicInformationMapper.xml
+++ b/inspection-server/src/main/resources/mapper/LinkBasicInformationMapper.xml
@@ -2,4 +2,52 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.limslaboratory.mapper.LinkBasicInformationMapper">
+ <select id="getLinkBasicPage" resultType="map">
+ SELECT l.`id`, l.`entrust_coding`, l.`entrusted`, d.`samples_number`, d.`sample_name`, d.`specifications_models`,
+ DATE_FORMAT(l.`inspection_time`,'%Y-%m-%d') inspectionTime, DATE_FORMAT(l.`completion_deadline`,'%Y-%m-%d') inspectionTime, l.`contacts`, d.`date_survey`, d.`inspection_status`
+ FROM link_basic_information l, link_detection d
+ WHERE l.`id` = d.`link_basic_id`
+ AND l.`state` = 1
+ <if test="entrustCoding != null and entrustCoding != null">
+ AND l.`entrust_coding` like concat('%', #{entrustCoding}, '%')
+ </if>
+ <if test="sampleName != null and sampleName != null">
+ AND d.`sample_name` like concat('%', #{sampleName}, '%')
+ </if>
+ <if test="entrusted != null and entrusted != null">
+ AND l.`contacts` like concat('%', #{entrusted}, '%')
+ </if>
+ <if test="inspectionStatus != null and inspectionStatus != null">
+ AND d.`inspection_status` = #{inspectionStatus}
+ </if>
+ </select>
+
+ <select id="selectLinkAll" resultType="java.util.Map">
+ SELECT l.`id`, l.`entrust_coding`, l.`entrusted`, d.`samples_number`, d.`sample_name`, d.`specifications_models`,
+ DATE_FORMAT(l.`inspection_time`,'%Y-%m-%d') inspectionTime, l.`completion_deadline`, l.`contacts`, d.`date_survey`, d.`inspection_status`
+ FROM lims_laboratory.link_basic_information l, lims_laboratory.link_detection d
+ WHERE l.`id` = d.`link_basic_id`
+ AND l.`state` = 1
+ </select>
+
+ <select id="selectLinkByid" resultType="com.yuanchu.limslaboratory.pojo.vo.InspectionVo">
+ SELECT l.`inspection_time` formTime,
+ l.`entrusted` supplier,
+ d.`sample_number` mcode,
+ d.`sample_name` name,
+ d.`specifications_models` specifications,
+ d.`unit`,
+ d.`samples_number` num,
+ d.date_survey startTime,
+ l.completion_deadline endTime
+ FROM lims_laboratory.link_basic_information l, lims_laboratory.link_detection d
+ WHERE l.`id` = d.`link_basic_id`
+ AND l.`state` = 1
+ <if test="bid!=null">
+ and l.id=#{bid}
+ </if>
+ <if test="did!=null">
+ and d.id=#{did}
+ </if>
+ </select>
</mapper>
--
Gitblit v1.9.3