zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
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
71
72
73
74
75
76
77
78
79
80
81
82
83
<?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.changhong.epc.admin.mapper.centen.corres.CorresElFieldMapper">
    <resultMap type="com.changhong.epc.bean.admin.CorresElField" id="findCorresMap">
        <id property="id" column="id"/>
        <result property="elIden" column="el_iden"/>
        <result property="elIdenName" column="el_iden_name"/>
        <result property="businessMeaningCode" column="business_meaning_code"/>
        <result property="mdCode" column="md_code"/>
        <result property="mappingIden" column="mapping_iden"/>
    </resultMap>
        
    <update id="deleteCorres" parameterType="com.changhong.epc.bean.admin.CorresElField">
        update 
            epc_corres_el_field
        set 
            data_start = 99 
        where id = #{corr.id}
    </update>
    
    <!-- <select id="getMdCode" resultType="java.lang.String">
        SELECT
            md_code
        FROM
            epc_corres_el_field
        WHERE
            business_meaning_code = #{bmcode}
        AND
            data_start ='0'
    </select> -->
    
    <select id="getCorresElField" resultType="com.changhong.epc.bean.admin.CorresElField">
        SELECT
            id,
            el_iden elIden,
            el_iden_name elIdenName,
            business_meaning_code businessMeaningCode,
            md_code mdCode,
            mapping_iden mappingIden,
            ins_p insP,
            ins_t insT,
            upd_p updP,
            upd_t updT,
            data_start dataStart
        FROM
            epc_corres_el_field
        WHERE
            data_start ='0'
            <if test="corr.id != null and corr.id !=''">
        AND
            id = #{corr.id}
            </if>
            <if test="corr.elIden != null and corr.elIden !=''">
        AND
            el_iden = #{corr.elIden}
            </if>
            <if test="corr.elIdenName != null and corr.elIdenName !=''">
        AND
            el_iden_name = #{corr.elIdenName}
            </if>
            <if test="corr.businessMeaningCode != null and corr.businessMeaningCode !=''">
        AND
            business_meaning_code = #{corr.businessMeaningCode}
            </if>
            <if test="corr.mdCode != null and corr.mdCode !=''">
        AND
            md_code = #{corr.mdCode}
            </if>
            <if test="corr.mappingIden != null and corr.mappingIden !=''">
        AND
            mapping_iden = #{corr.mappingIden}
            </if>
    </select>
 
    <select id="getCodeByMeaning" resultType="java.lang.String">
        select
          md_code
        from
          epc_corres_el_field
        where
          business_meaning_code=#{flag}
    </select>
</mapper>