WFinanceDetailMapper.xml
2.54 KB
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
<?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.hotent.chkpower.dao.WFinanceDetailDao">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.hotent.chkpower.model.WFinanceDetail">
<id column="ID_" property="id" />
<result column="REF_ID_" property="refId" />
<result column="F_org_name" property="fOrgName" />
<result column="F_org_id" property="fOrgId" />
<result column="F_date" property="fDate" />
<result column="F_form_data_rev_" property="fFormDataRev" />
<result column="F_matter" property="fMatter" />
<result column="F_income" property="fIncome" />
<result column="F_disbursement" property="fDisbursement" />
<result column="F_net_cash_flow" property="fNetCashFlow" />
<result column="F_org_type" property="fOrgType" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
ID_, REF_ID_, F_org_name, F_org_id, F_date, F_form_data_rev_, F_matter, F_income, F_disbursement, F_net_cash_flow, F_org_type
</sql>
<select id="selectPage" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from
w_finance_detail
${ew.customSqlSegment}
</select>
<select id="selectList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from
w_finance_detail
${ew.customSqlSegment}
</select>
<select id="selectById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from
w_finance_detail
where
ID_ = #{id}
</select>
<select id="mattersIncomerByOrgIdAndDate" resultType="java.lang.String">
SELECT
GROUP_CONCAT( F_matter, F_income,"万" )
FROM
w_finance_detail w_finance_detail
WHERE
F_income != 0 and F_income is not null and F_income != ''
<if test="orgId != null and orgId != ''">
and w_finance_detail.F_org_id = #{orgId}
</if>
<if test="date != null and date != ''">
and date(w_finance_detail.F_date) = date(#{date})
</if>
</select>
<select id="matterDisbursementByOrgIdAndDate" resultType="java.lang.String">
SELECT
GROUP_CONCAT( F_matter, F_disbursement,"万" )
FROM
w_finance_detail w_finance_detail
WHERE
F_disbursement != 0 and F_disbursement is not null and F_disbursement != ''
<if test="orgId != null and orgId != ''">
and w_finance_detail.F_org_id = #{orgId}
</if>
<if test="date != null and date != ''">
and date(w_finance_detail.F_date) = date(#{date})
</if>
</select>
</mapper>