<?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.tenant.mapper.tenant.system.budget.BudgetConfigMapper">
|
<resultMap type="com.changhong.epc.bean.tenant.system.budget.extend.BudgetOrgExtend" id="budgetOrgExtend">
|
<id property="id" column="t1"/>
|
<result property="cId" column="t2"/>
|
<result property="orgCode" column="t3"/>
|
<result property="parentOrgCode" column="t4"/>
|
<result property="groupId" column="t5"/>
|
<association property="costType" javaType="com.changhong.epc.bean.tenant.cost.CostType">
|
<result property="nodeName" column="t6"/>
|
</association>
|
</resultMap>
|
|
<select id="selectLinkPage" resultMap="budgetOrgExtend">
|
SELECT
|
e1.id t1,
|
e1.c_id t2,
|
GROUP_CONCAT(DISTINCT e1.org_code) t3,
|
GROUP_CONCAT(DISTINCT e1.parent_org_code) t4,
|
e1.group_id t5,
|
GROUP_CONCAT(DISTINCT e2.node_name) t6
|
FROM
|
epc_parent_budget_org_{rule} e1
|
LEFT JOIN epc_cost_type_{rule} e2 ON e1.c_id = e2.id
|
WHERE
|
e1.data_start = 0
|
GROUP BY
|
e1.group_id
|
ORDER BY
|
e1.id DESC
|
</select>
|
|
|
<select id="getCidList" resultType="java.lang.Integer">
|
SELECT
|
c_id
|
FROM
|
epc_parent_budget_org_{rule}
|
WHERE
|
data_start = 0
|
AND
|
group_id = #{bud.groupId}
|
GROUP BY
|
c_id
|
</select>
|
|
<select id="getOrgCodeList" resultType="java.lang.String">
|
SELECT
|
org_code
|
FROM
|
epc_parent_budget_org_{rule}
|
WHERE
|
data_start = 0
|
AND
|
group_id = #{bud.groupId}
|
GROUP BY
|
org_code
|
</select>
|
|
<select id="getParentOrgCodeList" resultType="java.lang.String">
|
SELECT
|
parent_org_code
|
FROM
|
epc_parent_budget_org_{rule}
|
WHERE
|
data_start = 0
|
AND
|
group_id = #{bud.groupId}
|
GROUP BY
|
parent_org_code
|
</select>
|
|
|
</mapper>
|