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
<?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.form.mapper.tenant.apply.ApplyMergeDetailMapper">
 
    <select id="selectSuppStander" parameterType="java.lang.String" resultType="com.changhong.epc.bean.tenant.norm.extend.ApplyMergeSuppStander">
        SELECT
            DISTINCT
            name
            , type
            , type_name typeName
        FROM
            epc_supp_stander_{rule}
        WHERE
            data_start = 0
            and ct_id = (
                SELECT
                    ct_id
                FROM
                    epc_cost_from_mapping_{rule}
                WHERE
                    type = 'SQ'
                    AND f_id = #{formId}
                    LIMIT 1
            )
    </select>
 
    <delete id="deleteByDataRowNum" parameterType="int" >
        update apply_merge_detail_{rule}
        set data_start = 99
        where group_id in (
          select c.group_id from (
            select group_id from apply_merge_{rule} where apply_id = #{dataRowNum} and data_start = 0
          ) c
        )
    </delete>
</mapper>