双重预防项目-国泰新华二开定制版
heheng
2025-06-25 f8606e6c37bbc815b59d0452fd7c3ecb0dcb6cef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?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.ruoyi.project.tr.rsStandard.mapper.RsStandardMapper">
    
    <resultMap type="com.ruoyi.project.tr.rsStandard.domain.RsStandard" id="RsStandardResult">
        <result property="rKenengxing"    column="r_kenengxing"    />
        <result property="sDengji"    column="s_dengji"    />
        <result property="result"    column="result"    />
    </resultMap>
 
    <sql id="selectRsStandardVo">
        select r_kenengxing, s_dengji, result from tr_rs_standard
    </sql>
 
    <select id="selectRsStandardList" parameterType="RsStandard" resultMap="RsStandardResult">
        <include refid="selectRsStandardVo"/>
        <where>  
            <if test="rKenengxing != null  and rKenengxing != ''"> and r_kenengxing = #{rKenengxing}</if>
            <if test="sDengji != null  and sDengji != ''"> and s_dengji = #{sDengji}</if>
            <if test="result != null "> and result = #{result}</if>
        </where>
    </select>
    
    <select id="selectRsStandardById" parameterType="String" resultMap="RsStandardResult">
        <include refid="selectRsStandardVo"/>
        where r_kenengxing = #{rKenengxing}
    </select>
 
    <select id="selectRsStandardByKenengxingAndDengji" parameterType="String" resultMap="RsStandardResult">
        <include refid="selectRsStandardVo"/>
        where r_kenengxing = #{kenengxing} and s_dengji = #{dengji}
    </select>
        
    <insert id="insertRsStandard" parameterType="RsStandard">
        insert into tr_rs_standard
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="rKenengxing != null  and rKenengxing != ''">r_kenengxing,</if>
            <if test="sDengji != null  and sDengji != ''">s_dengji,</if>
            <if test="result != null ">result,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="rKenengxing != null  and rKenengxing != ''">#{rKenengxing},</if>
            <if test="sDengji != null  and sDengji != ''">#{sDengji},</if>
            <if test="result != null ">#{result},</if>
         </trim>
    </insert>
 
    <update id="updateRsStandard" parameterType="RsStandard">
        update tr_rs_standard
        <trim prefix="SET" suffixOverrides=",">
            <if test="sDengji != null  and sDengji != ''">s_dengji = #{sDengji},</if>
            <if test="result != null ">result = #{result},</if>
        </trim>
        where r_kenengxing = #{rKenengxing}
    </update>
 
    <delete id="deleteRsStandardById" parameterType="String">
        delete from tr_rs_standard where r_kenengxing = #{rKenengxing}
    </delete>
 
    <delete id="deleteRsStandardByIds" parameterType="String">
        delete from tr_rs_standard where r_kenengxing in 
        <foreach item="rKenengxing" collection="array" open="(" separator="," close=")">
            #{rKenengxing}
        </foreach>
    </delete>
    
</mapper>