소스 검색

feat:基金管理列表调整

chenjianhua 2 달 전
부모
커밋
43b4d537fe

+ 10 - 0
service-base/src/main/java/com/simuwang/base/pojo/dos/FundInformationDO.java

@@ -56,6 +56,14 @@ public class FundInformationDO {
      */
     private String firstPriceDate;
     /**
+     * 最新规模净值日期
+     */
+    private String lastAssetPriceDate;
+    /**
+     * 初始规模净值日期
+     */
+    private String firstAssetPriceDate;
+    /**
      * 净值报送频率,1-日频,2-周频,3-月频,4-季频,5-半年,6-年频
      */
     private Integer navFrequency;
@@ -89,6 +97,8 @@ public class FundInformationDO {
         vo.setInceptionDate(this.inceptionDate);
         vo.setLastPriceDate(this.lastPriceDate);
         vo.setFirstPriceDate(this.firstPriceDate);
+        vo.setLastAssetPriceDate(this.lastAssetPriceDate);
+        vo.setFirstAssetPriceDate(this.firstAssetPriceDate);
         return vo;
     }
 }

+ 8 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/FundInformationVO.java

@@ -56,6 +56,14 @@ public class FundInformationVO {
      */
     private String firstPriceDate;
     /**
+     * 最新规模净值日期
+     */
+    private String lastAssetPriceDate;
+    /**
+     * 初始规模净值日期
+     */
+    private String firstAssetPriceDate;
+    /**
      * 净值报送频率,1-日频,2-周频,3-月频,4-季频,5-半年,6-年频
      */
     private Integer navFrequency;

+ 35 - 15
service-base/src/main/resources/mapper/daq/FundInfoMapper.xml

@@ -52,17 +52,19 @@
                c.credit_code as creditCode,
                f.inception_date as inceptionDate,
                n.last_price_date as lastPriceDate,
-               fn.first_price_date as firstPriceDate,
+               n.first_price_date as firstPriceDate,
+               asset.last_asset_price_date as lastAssetPriceDate,
+               asset.first_asset_price_date as firstAssetPriceDate,
                r.nav_frequency as navFrequency,
                r.asset_Frequency as assetFrequency,
                r.valuation_Frequency as valuationFrequency,
                r.frequency_remark as frequencyRemark
         from pvn_fund_info f
         left join pvn_company_info c on f.trust_id = c.company_id and c.isvalid =1
-        left join (select nv.fund_id,max(nv.price_date) as last_price_date from nav nv where nv.isvalid =1 group by nv.fund_id) n
-        on f.fund_id = n .fund_id
-        left join (select fnv.fund_id,min(fnv.price_date) as first_price_date from nav fnv where fnv.isvalid =1 group by fnv.fund_id) fn
-        on f.fund_id = fn .fund_id
+        left join (select nv.fund_id,max(nv.price_date) as last_price_date,min(nv.price_date) as first_price_date from nav nv where nv.isvalid =1 group by nv.fund_id) n
+        on f.fund_id = n.fund_id
+        left join (select a.fund_id,max(a.price_date) as last_asset_price_date,min(a.price_date) as first_asset_price_date from asset a where a.isvalid =1 group by a.fund_id) asset
+        on f.fund_id = asset.fund_id
         left join fund_report_frequency r on r.fund_id = f.fund_id and r.isvalid =1
         where f.isvalid =1
         <if test="fundId != null and fundId !=''">
@@ -74,15 +76,24 @@
         <if test="companyShortName != null and companyShortName !=''">
             and (c.company_name like concat('%',#{companyShortName},'%') or c.company_short_name like concat('%',#{companyShortName},'%')  or c.register_number like concat('%',#{companyShortName},'%'))
         </if>
-        <if test="navFrequency != null and navFrequency !=''">
+        <if test="navFrequency != null and navFrequency !=''  and navFrequency != 0">
             and r.nav_frequency = #{navFrequency}
         </if>
-        <if test="assetFrequency != null and assetFrequency !=''">
+        <if test="navFrequency == 0">
+            and r.nav_frequency is null
+        </if>
+        <if test="assetFrequency != null and assetFrequency !='' and assetFrequency != 0">
             and r.asset_Frequency = #{assetFrequency}
         </if>
-        <if test="valuationFrequency != null and valuationFrequency !=''">
+        <if test="assetFrequency == 0">
+            and r.asset_Frequency is null
+        </if>
+        <if test="valuationFrequency != null and valuationFrequency !='' and valuationFrequency != 0">
             and r.valuation_Frequency = #{valuationFrequency}
         </if>
+        <if test="valuationFrequency == 0">
+            and r.valuation_Frequency is null
+        </if>
         <if test="startDate != null and startDate !=''">
             and f.inception_date <![CDATA[ >= ]]> #{startDate}
         </if>
@@ -153,10 +164,10 @@
         select count(f.fund_id)
         from pvn_fund_info f
         left join pvn_company_info c on f.trust_id = c.company_id and c.isvalid =1
-        left join (select nv.fund_id,max(nv.price_date) as last_price_date from nav nv where nv.isvalid =1 group by nv.fund_id) n
-        on f.fund_id = n .fund_id
-        left join (select fnv.fund_id,min(fnv.price_date) as first_price_date from nav fnv where fnv.isvalid =1 group by fnv.fund_id) fn
-        on f.fund_id = fn .fund_id
+        left join (select nv.fund_id,max(nv.price_date) as last_price_date,min(nv.price_date) as first_price_date from nav nv where nv.isvalid =1 group by nv.fund_id) n
+        on f.fund_id = n.fund_id
+        left join (select a.fund_id,max(a.price_date) as last_asset_price_date,min(a.price_date) as first_asset_price_date from asset a where a.isvalid =1 group by a.fund_id) asset
+        on f.fund_id = asset.fund_id
         left join fund_report_frequency r on r.fund_id = f.fund_id and r.isvalid =1
         where f.isvalid =1
         <if test="fundId != null and fundId !=''">
@@ -168,15 +179,24 @@
         <if test="companyShortName != null and companyShortName !=''">
             and (c.company_name like concat('%',#{companyShortName},'%') or c.company_short_name like concat('%',#{companyShortName},'%')  or c.register_number like concat('%',#{companyShortName},'%'))
         </if>
-        <if test="navFrequency != null and navFrequency !=''">
+        <if test="navFrequency != null and navFrequency !=''  and navFrequency != 0">
             and r.nav_frequency = #{navFrequency}
         </if>
-        <if test="assetFrequency != null and assetFrequency !=''">
+        <if test="navFrequency == 0">
+            and r.nav_frequency is null
+        </if>
+        <if test="assetFrequency != null and assetFrequency !='' and assetFrequency != 0">
             and r.asset_Frequency = #{assetFrequency}
         </if>
-        <if test="valuationFrequency != null and valuationFrequency !=''">
+        <if test="assetFrequency == 0">
+            and r.asset_Frequency is null
+        </if>
+        <if test="valuationFrequency != null and valuationFrequency !='' and valuationFrequency != 0">
             and r.valuation_Frequency = #{valuationFrequency}
         </if>
+        <if test="valuationFrequency == 0">
+            and r.valuation_Frequency is null
+        </if>
         <if test="startDate != null and startDate !=''">
             and f.inception_date <![CDATA[ >= ]]> #{startDate}
         </if>