| | |
| | | <?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.LinkBasicInformationMapper"> |
| | | <delete id="deleteByID"> |
| | | delete from link_basic_information where id=#{id} |
| | | </delete> |
| | | <select id="getLinkBasicPage" resultType="map"> |
| | | SELECT l.`id`, l.`entrust_coding`, l.`entrusted`, d.`samples_number`, d.`sample_name`, |
| | | SELECT d.`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') |
| | | completionDeadline, l.`contacts`, |
| | | DATE_FORMAT(d.`date_survey`,'%Y-%m-%d') dateSurvey, d.`inspection_status` |
| | | FROM link_basic_information l, link_detection d |
| | | WHERE l.`id` = d.`link_basic_id` |
| | | AND l.`state` = 1 |
| | | AND d.`state` = 1 |
| | | and l.`state` = 1 |
| | | <if test="entrustCoding != null and entrustCoding != null"> |
| | | AND l.`entrust_coding` like concat('%', #{entrustCoding}, '%') |
| | | </if> |
| | |
| | | ld.unit unit, |
| | | ld.samples_number samplesNumber, |
| | | ld.remarks remarks |
| | | FROM link_basic_information lb, |
| | | FROM link_basic_information lb left join |
| | | link_detection ld |
| | | WHERE lb.id = ld.link_basic_id |
| | | AND lb.uid = #{uid} |
| | | on lb.id = ld.link_basic_id |
| | | where lb.uid = #{uid} |
| | | and lb.state = 1 |
| | | AND ld.state = 1 |
| | | </select> |
| | | |
| | | <resultMap id="getLinkBasicInformationMap" type="com.yuanchu.limslaboratory.pojo.LinkBasicInformation"> |
| | | <result property="entrustCoding" column="entrustCoding"/> |
| | | <result property="contacts" column="contacts"/> |
| | | <result property="contactNumber" column="contactNumber"/> |
| | | <result property="entrusted" column="entrusted"/> |
| | | <result property="contactAddress" column="contactAddress"/> |
| | | <result property="uid" column="uid"/> |
| | | <result property="completionDeadline" column="completionDeadline"/> |