李林
2023-08-22 d88d0c64c357eb2a5f0438c0eb6b5a294ab8a0e5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?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.InspectionProductMapper">
    <update id="upda">
        update lims_laboratory.inspection_product
        set test_state=null
        where id = #{id}
          and state = 1
    </update>
 
    <!--根据检验单id查询检验项目的检验结果-->
    <select id="getresult" resultType="java.lang.Integer">
        select test_state
        from lims_laboratory.inspection_product
        where state = 1
          and inspection_material_id = (select id from lims_laboratory.inspection_material where inspection_id = #{id})
    </select>
    <!--根据检验样品id作废检验项目-->
    <update id="updat">
        update lims_laboratory.inspection_product
            set state=0
        where inspection_material_id=#{id}
    </update>
</mapper>