|
@@ -131,10 +131,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
|
|
|
- <select id="selectShareholderInfoexport" resultType="com.ruoyi.equity.domain.vo.ShareholderInfoVO">
|
|
|
- select shareholder_name, shareholder_type, shareholding_ratio, company_valuation, is_subject, remark ,
|
|
|
- (select shareholder_name from e_shareholder_info where info.controlled_company = shareholder_id) as companyName
|
|
|
- from e_shareholder_info info where shareholder_type != 3 order by shareholding_ratio desc;
|
|
|
+ <select id="selectShareholderInfoexport" parameterType="ShareholderInfoDTO" resultType="com.ruoyi.equity.domain.vo.ShareholderInfoVO">
|
|
|
+ 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="companyName != null and companyName !=''"> and (select shareholder_name from e_shareholder_info e where e.shareholder_id = esi.controlled_company ) like concat('%', #{companyName}, '%')</if>
|
|
|
+ order by shareholding_ratio desc
|
|
|
</select>
|
|
|
|
|
|
|
|
@@ -182,7 +187,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<update id="updateShareholderInfo" parameterType="ShareholderInfo">
|
|
|
update e_shareholder_info
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="shareholderName != null">shareholder_name = #{shareholderName},</if>
|
|
|
+ <if test="shareholderName != null">shareholder_name = #{share
|
|
|
+ holderName},</if>
|
|
|
<if test="shareholderType != null">shareholder_type = #{shareholderType},</if>
|
|
|
</trim>
|
|
|
where
|