|
@@ -41,9 +41,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where shareholder_id = #{shareholderId}
|
|
|
</select>
|
|
|
<select id="getAllUpNode" resultType="com.ruoyi.equity.domain.vo.ShareholderUpPicVO">
|
|
|
- select shareholder_id as id,parent_id as parentId,shareholder_name as name,shareholding_ratio as shareholdingRatio
|
|
|
- from e_shareholder_info
|
|
|
- where node_type = 1 or is_subject = 1
|
|
|
+ select
|
|
|
+ shareholder_id as id,
|
|
|
+ parent_id as parentId,
|
|
|
+ shareholder_name as name,
|
|
|
+ shareholding_ratio as shareholdingRatio,
|
|
|
+ 100 - COALESCE((select sum(shareholding_ratio) from e_shareholder_info e where e.parent_id = esi.shareholder_id), 0) as notAssigned
|
|
|
+ from
|
|
|
+ e_shareholder_info esi
|
|
|
+ where
|
|
|
+ node_type = 1 or is_subject = 1
|
|
|
</select>
|
|
|
<select id="getSubjectCompany" resultType="com.ruoyi.equity.domain.ShareholderInfo">
|
|
|
select shareholder_id, parent_id, ancestors, shareholder_name, shareholder_type, shareholding_ratio,
|