|
@@ -27,13 +27,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectShareholderInfoList" parameterType="ShareholderInfoVO" resultType="com.ruoyi.equity.domain.vo.ShareholderInfoVO">
|
|
|
- select shareholder_id, parent_id, ancestors, shareholder_name, shareholder_type, shareholding_ratio, controlled_company as thecompany, company_valuation, is_subject, node_type, create_by, create_time, update_by, update_time, remark ,
|
|
|
- (select shareholder_name from e_shareholder_info where thecompany = shareholder_id) as companyName
|
|
|
- from e_shareholder_info
|
|
|
- where (is_subject = 1 or node_type in (1, 0))
|
|
|
- <if test="shareholderName != null and shareholderName != ''"> and shareholder_name like concat('%', #{shareholderName}, '%')</if>
|
|
|
- <if test="shareholderType != null and shareholderType != ''"> and shareholder_type = #{shareholderType}</if>
|
|
|
- <if test="controlledCompany != null "> and controlled_company = #{controlledCompany}</if>
|
|
|
+ select esi.*,
|
|
|
+ esi2.shareholder_name as companyName
|
|
|
+ from e_shareholder_info esi left join e_shareholder_info esi2 on esi.controlled_company = esi2.shareholder_id
|
|
|
+ where (esi.is_subject = 1 or esi.node_type in (1, 0))
|
|
|
+ <if test="shareholderName != null and shareholderName != ''"> and esi.shareholder_name like concat('%', #{shareholderName}, '%')</if>
|
|
|
+ <if test="shareholderType != null and shareholderType != ''"> and esi.shareholder_type = #{shareholderType}</if>
|
|
|
+ <if test="controlledCompany != null "> and esi.controlled_company = #{controlledCompany}</if>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectShareholderInfoByShareholderId" parameterType="Long" resultMap="ShareholderInfoResult">
|