commit | author | age
|
a18bfa
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
Z |
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
|
3 |
|
|
4 |
<mapper namespace="com.changhong.epc.parsing.mapper.centen.CostTypeTemplateMapper"> |
|
5 |
|
|
6 |
<resultMap id="getCostTypeTemplateMap" type="com.changhong.epc.bean.admin.extend.CostTypeTemplateExtend"> |
|
7 |
<id column="tId" property="id"/> |
|
8 |
<result column="node_name" property="name"/> |
|
9 |
<collection property="costFromTemplates" ofType="com.changhong.epc.bean.admin.CostFromTemplate"> |
|
10 |
<id column="fId" property="id"/> |
|
11 |
<result column="ct_id" property="ctId"/> |
|
12 |
<result column="f_id" property="fId"/> |
|
13 |
<result column="f_name" property="fName"/> |
|
14 |
<result column="type" property="type"/> |
|
15 |
</collection> |
|
16 |
</resultMap> |
|
17 |
|
|
18 |
<select id="getCostTypeTemplate" resultMap="getCostTypeTemplateMap"> |
|
19 |
select |
|
20 |
tt.id tId |
|
21 |
, tt.node_name |
|
22 |
, ft.id fId |
|
23 |
, ft.ct_id |
|
24 |
, ft.f_id |
|
25 |
, ft.f_name |
|
26 |
, ft.type |
|
27 |
from EPC_COST_TYPE_TEMPLATE_GROUP g |
|
28 |
left join epc_cost_type_template tt on g.id = tt.g_id and tt.data_start = 0 |
|
29 |
left join epc_cost_from_template ft on tt.id = ft.ct_id and ft.data_start = 0 |
|
30 |
where g.id = #{ctId} |
|
31 |
and ft.id is not null |
|
32 |
</select> |
|
33 |
|
|
34 |
</mapper> |