Browse Source

fix:数据详情优化查询

chenjianhua 1 month ago
parent
commit
283deb1885

+ 2 - 2
service-base/src/main/resources/mapper/EmailFundAssetMapper.xml

@@ -66,7 +66,7 @@
         on file.email_id = parse.id
         where asset.isvalid=1 and file.isvalid=1 and parse.isvalid=1
         <if test="fundName != null and fundName !=''">
-            and (asset.fund_name like concat('%',#{fundName},'%') or asset.register_number like concat('%',#{fundName},'%') )
+            and (asset.fund_name like concat(#{fundName},'%') or asset.register_number like concat(#{fundName},'%') )
         </if>
         <if test="priceStartDate != null and priceStartDate !=''">
             and asset.price_date >= #{priceStartDate}
@@ -112,7 +112,7 @@
         on file.email_id = parse.id
         where asset.isvalid=1 and file.isvalid=1 and parse.isvalid=1
         <if test="fundName != null and fundName !=''">
-            and (asset.fund_name like concat('%',#{fundName},'%') or asset.register_number like concat('%',#{fundName},'%') )
+            and (asset.fund_name like concat(#{fundName},'%') or asset.register_number like concat(#{fundName},'%') )
         </if>
         <if test="priceStartDate != null and priceStartDate !=''">
             and asset.price_date >= #{priceStartDate}

+ 2 - 2
service-base/src/main/resources/mapper/EmailFundNavMapper.xml

@@ -71,7 +71,7 @@
                 on file.email_id = parse.id
         WHERE nav.isvalid = 1  and file.isvalid=1 and parse.isvalid=1
         <if test="fundName != null and fundName !=''">
-            and (nav.fund_name like concat('%',#{fundName},'%') or nav.register_number like concat('%',#{fundName},'%'))
+            and (nav.fund_name like concat(#{fundName},'%') or nav.register_number like concat(#{fundName},'%'))
         </if>
         <if test="priceStartDate != null and priceStartDate !=''">
             and nav.price_date >= #{priceStartDate}
@@ -117,7 +117,7 @@
         on file.email_id = parse.id
         WHERE nav.isvalid = 1  and file.isvalid=1 and parse.isvalid=1
         <if test="fundName != null and fundName !=''">
-            and (nav.fund_name like concat('%',#{fundName},'%') or nav.register_number like concat('%',#{fundName},'%'))
+            and (nav.fund_name like concat(#{fundName},'%') or nav.register_number like concat(#{fundName},'%'))
         </if>
         <if test="priceStartDate != null and priceStartDate !=''">
             and nav.price_date >= #{priceStartDate}

+ 7 - 7
service-daq/src/main/java/com/simuwang/daq/service/EmailParseService.java

@@ -744,13 +744,13 @@ public class EmailParseService {
         }
         // 考虑单独规模文件时 -> 无单位净值和累计净值
         // 2.单位净值或累计净值不大于0
-        if (!emailTitle.contains("规模")) {
-            if (StrUtil.isBlank(fundNavDTO.getNav()) || StrUtil.isBlank(fundNavDTO.getCumulativeNavWithdrawal())
-                    || (fundNavDTO.getNav().compareTo("0") <= 0 || fundNavDTO.getCumulativeNavWithdrawal().compareTo("0") <= 0)) {
-                fundNavDTO.setParseStatus(NavParseStatusConst.NAV_NEGATIVE);
-                return;
-            }
-        }
+//        if (!emailTitle.contains("规模")) {
+//            if (StrUtil.isBlank(fundNavDTO.getNav()) || StrUtil.isBlank(fundNavDTO.getCumulativeNavWithdrawal())
+//                    || (fundNavDTO.getNav().compareTo("0") <= 0 || fundNavDTO.getCumulativeNavWithdrawal().compareTo("0") <= 0)) {
+//                fundNavDTO.setParseStatus(NavParseStatusConst.NAV_NEGATIVE);
+//                return;
+//            }
+//        }
         // 3.资产净值不大于0
         if (StrUtil.isNotBlank(fundNavDTO.getAssetNet()) && fundNavDTO.getAssetNet().compareTo("0") <= 0) {
             fundNavDTO.setParseStatus(NavParseStatusConst.ASSET_NET_NEGATIVE);