wangzaijun 6 ماه پیش
والد
کامیت
995ec91b8f
24فایلهای تغییر یافته به همراه202 افزوده شده و 57 حذف شده
  1. 28 0
      service-base/src/main/java/com/simuwang/base/common/support/query/PageQuery.java
  2. 6 5
      service-base/src/main/java/com/simuwang/base/common/util/EmailUtil.java
  3. 1 1
      service-base/src/main/java/com/simuwang/base/common/util/ExcelUtil.java
  4. 5 1
      service-base/src/main/java/com/simuwang/base/common/util/StringUtil.java
  5. 5 0
      service-base/src/main/java/com/simuwang/base/pojo/dos/DeletionInfoDO.java
  6. 3 0
      service-base/src/main/java/com/simuwang/base/pojo/dos/FundAliasDO.java
  7. 12 6
      service-base/src/main/resources/mapper/CompanyEmailHistoryMapper.xml
  8. 0 0
      service-base/src/main/resources/mapper/CompanyInformationMapper.xml
  9. 17 8
      service-base/src/main/resources/mapper/DeletionInfoMapper.xml
  10. 8 1
      service-base/src/main/resources/mapper/DistributionMapper.xml
  11. 2 2
      service-base/src/main/resources/mapper/EmailFileInfoMapper.xml
  12. 8 1
      service-base/src/main/resources/mapper/EmailFundAssetMapper.xml
  13. 9 2
      service-base/src/main/resources/mapper/EmailFundNavMapper.xml
  14. 11 1
      service-base/src/main/resources/mapper/EmailParseInfoMapper.xml
  15. 18 1
      service-base/src/main/resources/mapper/FundAliasMapper.xml
  16. 14 2
      service-base/src/main/resources/mapper/FundInfoMapper.xml
  17. 8 1
      service-base/src/main/resources/mapper/FundNavAssetMapper.xml
  18. 0 0
      service-base/src/main/resources/mapper/ValuationMarketCodeMapper.xml
  19. 37 14
      service-daq/src/main/java/com/simuwang/daq/service/EmailParseService.java
  20. 4 1
      service-daq/src/main/java/com/simuwang/daq/service/NavEmailParser.java
  21. 2 2
      service-manage/src/main/java/com/simuwang/manage/api/email/ParseEmailController.java
  22. 2 1
      service-manage/src/main/java/com/simuwang/manage/service/impl/CompanyEmailConfigServiceImpl.java
  23. 0 5
      service-manage/src/main/java/com/simuwang/manage/service/impl/DeletionServiceImpl.java
  24. 2 2
      service-manage/src/main/java/com/simuwang/manage/service/impl/FundAliasServiceImpl.java

+ 28 - 0
service-base/src/main/java/com/simuwang/base/common/support/query/PageQuery.java

@@ -22,6 +22,18 @@ public class PageQuery extends BaseQuery {
      * 当前页记录开始
      */
     private Long offset;
+
+
+    /**
+     * 新排序字段
+     */
+    private String sort;
+
+    /**
+     * 新排序方式,DESC降序,ASC升序
+     */
+    private String order;
+
     /**
      * 排序字段
      */
@@ -56,6 +68,22 @@ public class PageQuery extends BaseQuery {
         this.orderItems = orderItems;
     }
 
+    public void setSort(String sort) {
+        this.sort = sort;
+    }
+
+    public void setOrder(String order) {
+        this.order = order;
+    }
+
+    public String getSort() {
+        return sort;
+    }
+
+    public String getOrder() {
+        return order;
+    }
+
     public Long getOffset() {
         return (current - 1) * pageSize;
     }

+ 6 - 5
service-base/src/main/java/com/simuwang/base/common/util/EmailUtil.java

@@ -178,7 +178,7 @@ public class EmailUtil {
                     String html = partContent.toString();
                     try{
                         if(contentType.indexOf("charset=") != -1){
-                            contentType = contentType.substring(contentType.indexOf("charset=")+8,contentType.length());
+                            contentType = contentType.substring(contentType.indexOf("charset=")+8,contentType.length()).replaceAll("\"","");
                             html = html.replace("charset="+contentType.toLowerCase(),"charset=UTF-8");
                             html = html.replace("charset="+contentType.toUpperCase(),"charset=UTF-8");
                         }
@@ -298,12 +298,12 @@ public class EmailUtil {
         return props;
     }
 
-    public static void senEmail(MailboxInfoDTO mailboxInfoDTO, String emails, File file,String htmlText) throws Exception {
+    public static void senEmail(MailboxInfoDTO mailboxInfoDTO, String emails, File file,String htmlText,String host,String emailTitle) throws Exception {
         logger.info("send email begin .........");
         // 根据Session 构建邮件信息
         MimeMessage message = new MimeMessage(getSession(mailboxInfoDTO));
         // 创建邮件发送者地址
-        Address from = new InternetAddress(mailboxInfoDTO.getAccount());
+        Address from = new InternetAddress(mailboxInfoDTO.getAccount()+host);
         String[] emailArr = emails.split(";");
         Address[] toArr = new Address[emailArr.length];
         for (int idx = 0; idx < emailArr.length; idx++) {
@@ -315,7 +315,7 @@ public class EmailUtil {
         message.setFrom(from);
         message.setRecipients(Message.RecipientType.TO, toArr);
         // 邮件主题
-        message.setSubject("产品净值补发");
+        message.setSubject(emailTitle);
         // 邮件容器
         MimeMultipart mimeMultiPart = new MimeMultipart();
         // 设置HTML
@@ -345,7 +345,8 @@ public class EmailUtil {
             properties.put("mail.smtp.host", mailboxInfoDTO.getHost());
             properties.put("mail.smtp.auth", true);
             properties.setProperty("mail.smtp.port", mailboxInfoDTO.getPort());
-            properties.put("mail.smtp.ssl.enable", true);
+            properties.put("mail.smtp.ssl.enable", false);
+            properties.put("mail.smtp.ssl.required", false);
             // 根据邮件的会话属性构造一个发送邮件的Session,
             JakartaUserPassAuthenticator authenticator = new JakartaUserPassAuthenticator(mailboxInfoDTO.getAccount(), mailboxInfoDTO.getPassword());
             Session session = Session.getInstance(properties, authenticator);

+ 1 - 1
service-base/src/main/java/com/simuwang/base/common/util/ExcelUtil.java

@@ -420,7 +420,7 @@ public class ExcelUtil {
                             }
                         }
                     }
-                    preEndRowIndex = preEndRowIndex + rowLength -1;
+                    preEndRowIndex = preEndRowIndex + rowLength - 1 < 0 ? 0 : preEndRowIndex + rowLength - 1;
                 }
             }
             // 将Excel工作簿写入输出流

+ 5 - 1
service-base/src/main/java/com/simuwang/base/common/util/StringUtil.java

@@ -1,5 +1,6 @@
 package com.simuwang.base.common.util;
 
+import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.StrUtil;
 
 import java.util.List;
@@ -23,10 +24,13 @@ public class StringUtil {
     /** 下划线 */
     private static final char SEPARATOR = '_';
 
-    public static String retainChineseCharacters(String value) {
+    public static String retainChineseCharacters(String value, List<String> notConvertFieldList) {
         if (StrUtil.isBlank(value)) {
             return null;
         }
+        if (CollUtil.isNotEmpty(notConvertFieldList) && notConvertFieldList.contains(value)) {
+            return value;
+        }
         // 正则表达式匹配中文字符
         String regex = "[^\\u4e00-\\u9fa5]";
         // 使用空字符串替换所有非中文字符

+ 5 - 0
service-base/src/main/java/com/simuwang/base/pojo/dos/DeletionInfoDO.java

@@ -77,6 +77,10 @@ public class DeletionInfoDO {
      * 是否发送过邮件
      */
     private Integer isSend;
+    /**
+     * 最新缺失日期
+     */
+    private String lastDeletionDate;
 
     public DeletionInfoVO toVO() {
         DeletionInfoVO deletionInfoVO = new DeletionInfoVO();
@@ -86,6 +90,7 @@ public class DeletionInfoDO {
         deletionInfoVO.setDeletionType(this.deletionType);
         deletionInfoVO.setDeletionNum(this.deletionNum);
         deletionInfoVO.setProcessedNum(this.processedNum);
+        deletionInfoVO.setLastDeletionDate(this.lastDeletionDate);
         return deletionInfoVO;
     }
 }

+ 3 - 0
service-base/src/main/java/com/simuwang/base/pojo/dos/FundAliasDO.java

@@ -3,6 +3,7 @@ package com.simuwang.base.pojo.dos;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.simuwang.base.common.util.DateUtils;
 import com.simuwang.base.pojo.vo.FundAliasVO;
 import lombok.Data;
 
@@ -59,6 +60,7 @@ public class FundAliasDO {
      */
     private Date updateTime;
 
+    private Date lastPriceDate;
     public FundAliasVO toVo() {
         FundAliasVO fundAliasVO = new FundAliasVO();
         fundAliasVO.setId(this.id);
@@ -67,6 +69,7 @@ public class FundAliasDO {
         fundAliasVO.setTargetFundId(this.targetFundId);
         fundAliasVO.setTargetFundName(this.targetFundName);
         fundAliasVO.setTargetRegisterNumber(this.targetRegisterNumber);
+        fundAliasVO.setPriceDate(this.lastPriceDate==null?null: DateUtils.format(this.lastPriceDate,DateUtils.YYYY_MM_DD));
         fundAliasVO.setCompanyName(this.companyName);
         return fundAliasVO;
     }

+ 12 - 6
service-base/src/main/resources/mapper/CompanyEmailHistoryMapper.xml

@@ -131,13 +131,16 @@
         FROM
             PPW_EMAIL.company_email_send_history cesh
             JOIN PPW_EMAIL.company_email_config cec
-            ON cec.email = cesh.email
+                ON cec.email = cesh.email and cesh.company_id=cec.company_id
             JOIN PPW_EMAIL.pvn_company_info c
-            ON cec.company_id = c.company_id
+            ON cesh.company_id = c.company_id
         WHERE cec.isvalid = 1
         AND cesh.isvalid = 1 and c.isvalid =1
         <if test="companyId != null and companyId !=''">
-            and c.company_id=#{companyId}
+            and cesh.company_id=#{companyId}
+        </if>
+        <if test="email != null and email !=''">
+            and cesh.email=#{email}
         </if>
         <if test="email != null and email !=''">
             and cesh.email=#{email}
@@ -152,13 +155,16 @@
         FROM
         PPW_EMAIL.company_email_send_history cesh
         JOIN PPW_EMAIL.company_email_config cec
-        ON cec.email = cesh.email
+        ON cec.email = cesh.email and cesh.company_id=cec.company_id
         JOIN PPW_EMAIL.pvn_company_info c
-        ON cec.company_id = c.company_id
+        ON cesh.company_id = c.company_id
         WHERE cec.isvalid = 1
         AND cesh.isvalid = 1 and c.isvalid =1
         <if test="companyId != null and companyId !=''">
-            and c.company_id=#{companyId}
+            and cesh.company_id=#{companyId}
+        </if>
+        <if test="email != null and email !=''">
+            and cesh.email=#{email}
         </if>
         <if test="email != null and email !=''">
             and cesh.email=#{email}

service-base/src/main/resources/mapper/EmailFundNavService.xml → service-base/src/main/resources/mapper/CompanyInformationMapper.xml


+ 17 - 8
service-base/src/main/resources/mapper/DeletionInfoMapper.xml

@@ -68,9 +68,11 @@
         c.company_name,
         d.deletion_type,
         ddn.deletion_num,
-        ddp.processed_num
+        ddp.processed_num,
+        d.last_deletion_date
         FROM
-        PPW_EMAIL.deletion_info d
+        (select de.fund_id,de.deletion_type,max(de.deletion_date) as last_deletion_date from PPW_EMAIL.deletion_info de where de.isvalid=1
+        group by de.fund_id,de.deletion_type) d
         LEFT JOIN PPW_EMAIL.pvn_fund_info info
         ON d.fund_id = info.fund_id and info.isvalid=1
         LEFT JOIN PPW_EMAIL.pvn_company_info c
@@ -101,7 +103,7 @@
         dip.deletion_type) ddp
         ON ddp.fund_id = d.fund_id
         AND d.deletion_type = ddp.deletion_type
-        WHERE d.isvalid = 1
+        WHERE 1=1
         <if test="companyName != null and companyName !=''">
             and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%'))
         </if>
@@ -117,7 +119,14 @@
         <if test="deletionEndNum != null and deletionEndNum != ''">
             and ddn.deletion_num <![CDATA[ <= ]]> #{deletionEndNum}
         </if>
-        group by d.fund_id,d.deletion_type
+        <choose>
+            <when test="sort != null and sort !='' and sort=='lastDeletionDate' and order != null and order !=''">
+                order by d.last_deletion_date ${order}
+            </when>
+            <otherwise>
+                order by d.last_deletion_date desc
+            </otherwise>
+        </choose>
         limit #{offset},#{pageSize}
     </select>
     <select id="countDeletion" resultType="java.lang.Long"
@@ -130,7 +139,8 @@
         ddn.deletion_num,
         ddp.processed_num
         FROM
-        PPW_EMAIL.deletion_info d
+        (select de.fund_id,de.deletion_type,max(de.deletion_date) as last_deletion_date from PPW_EMAIL.deletion_info de where de.isvalid=1
+        group by de.fund_id,de.deletion_type) d
         LEFT JOIN PPW_EMAIL.pvn_fund_info info
         ON d.fund_id = info.fund_id and info.isvalid=1
         LEFT JOIN PPW_EMAIL.pvn_company_info c
@@ -161,7 +171,7 @@
         dip.deletion_type) ddp
         ON ddp.fund_id = d.fund_id
         AND d.deletion_type = ddp.deletion_type
-        WHERE d.isvalid = 1
+        WHERE 1=1
         <if test="companyName != null and companyName !=''">
             and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%'))
         </if>
@@ -176,8 +186,7 @@
         </if>
         <if test="deletionEndNum != null and deletionEndNum != ''">
             and ddn.deletion_num <![CDATA[ <= ]]> #{deletionEndNum}
-        </if>
-        group by d.fund_id,d.deletion_type) a
+        </if>) a
     </select>
     <select id="getLastDeletionDateByFundId" resultType="java.lang.String">
         select max(deletion_date) from PPW_EMAIL.deletion_info where fund_id=#{fundId} and deletion_type=#{deletionType}

+ 8 - 1
service-base/src/main/resources/mapper/DistributionMapper.xml

@@ -89,7 +89,14 @@
         <if test="endDate != null and endDate !=''">
             and d.distribute_date <![CDATA[ <= ]]> #{endDate}
         </if>
-        order by d.updatetime desc
+        <choose>
+            <when test="sort != null and sort !='' and sort=='distributeDate' and order != null and order !=''">
+                order by d.distribute_date ${order}
+            </when>
+            <otherwise>
+                order by d.distribute_date desc
+            </otherwise>
+        </choose>
         limit #{offset},#{pageSize}
     </select>
     <select id="countDistributionList" resultType="java.lang.Long"

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

@@ -212,9 +212,9 @@
         </foreach>
     </select>
     <select id="getAllPriceDateByFileId" resultType="java.lang.String" parameterType="java.lang.Integer">
-        select * from (select distinct price_date from PPW_EMAIL.EMAIL_FUND_NAV WHERE file_id=#{fileId}and isvalid=1
+        select * from (select distinct price_date from PPW_EMAIL.EMAIL_FUND_NAV WHERE file_id=#{fileId} and isvalid=1
         union
-        select distinct price_date from PPW_EMAIL.EMAIL_FUND_ASSET WHERE file_id=#{fileId}and isvalid=1) a order by price_date desc
+        select distinct price_date from PPW_EMAIL.EMAIL_FUND_ASSET WHERE file_id=#{fileId} and isvalid=1) a order by price_date desc
     </select>
 
     <update id="updateTimeById">

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

@@ -100,7 +100,14 @@
                 #{exceptionStatus}
             </foreach>
         </if>
-        order by asset.updatetime desc
+        <choose>
+            <when test="sort != null and sort !='' and sort=='priceDate' and order != null and order !=''">
+                order by asset.price_date ${order}
+            </when>
+            <otherwise>
+                order by asset.price_date desc
+            </otherwise>
+        </choose>
         limit #{offset},#{pageSize}
     </select>
     <select id="countAssetDetail" resultType="java.lang.Long"

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

@@ -104,7 +104,14 @@
         <if test="emailId != null and emailId !=''">
             and parse.id =#{emailId}
         </if>
-        order by nav.updatetime desc
+        <choose>
+            <when test="sort != null and sort !='' and sort=='priceDate' and order != null and order !=''">
+                order by nav.price_date ${order}
+            </when>
+            <otherwise>
+                order by nav.price_date desc
+            </otherwise>
+        </choose>
         limit #{offset},#{pageSize}
     </select>
     <select id="countNavDetail" resultType="java.lang.Long"
@@ -211,7 +218,7 @@
         order by nav.updatetime desc
     </select>
     <select id="getMaxPriceDate" resultType="java.lang.String" parameterType="java.lang.String">
-        select max(nav.price_date) from PPW_EMAIL.email_fund_nav nav where nav.isvalid =1 and nav.exception_status=3
+        select max(nav.price_date) from PPW_EMAIL.email_fund_nav nav where nav.isvalid =1 and nav.exception_status in (1,3)
                                                                         and nav.fund_name=#{fundName}
     </select>
     <resultMap id="BaseDetailMap" type="com.simuwang.base.pojo.dos.EmailParseDetailDO">

+ 11 - 1
service-base/src/main/resources/mapper/EmailParseInfoMapper.xml

@@ -92,7 +92,17 @@
     <select id="searchEmailList" resultMap="BaseResultMap">
         <include refid="selectEmailParse"/>
         <include refid="sqlwhereSearch"/>
-        order by epi.parse_date desc
+        <choose>
+            <when test="sort != null and sort !='' and sort=='parseDate' and order != null and order !=''">
+                order by epi.parse_date ${order}
+            </when>
+            <when test="sort != null and sort !='' and sort=='emailDate'  and order != null and order !=''">
+                order by epi.email_date ${order}
+            </when>
+            <otherwise>
+                order by epi.parse_date desc
+            </otherwise>
+        </choose>
      limit #{offset},#{pageSize}
     </select>
     <select id="searchEmailById" resultMap="BaseResultMap">

+ 18 - 1
service-base/src/main/resources/mapper/FundAliasMapper.xml

@@ -8,6 +8,7 @@
         <result column="target_fund_id" property="targetFundId"/>
         <result column="target_fund_name" property="targetFundName"/>
         <result column="target_register_number" property="targetRegisterNumber"/>
+        <result column="last_price_date" property="lastPriceDate"/>
         <result column="company_name" property="companyName"/>
         <result column="isvalid" property="isvalid"/>
         <result column="creatorid" property="creatorId"/>
@@ -91,6 +92,7 @@
         info.fund_name as target_fund_name,
         info.register_number as target_register_number,
         c.company_name as company_name,
+        a.last_price_date as last_price_date,
         alias.isvalid,
         alias.creatorid,
         alias.createtime,
@@ -101,6 +103,9 @@
         on alias.target_fund_id = info.fund_id and info.isvalid=1
         left join PPW_EMAIL.pvn_company_info c
         on c.company_id = info.trust_id and c.isvalid=1
+        left join (select c.fund_name,c.register_number,max(c.price_date) as last_price_date from PPW_EMAIL.email_fund_nav c where c.isvalid=1
+                                                                                             group by c.fund_name,c.register_number) a
+        on a.fund_name = alias.source_fund_name and a.register_number=alias.source_register_number
         where alias.isvalid=1
         <if test="fundName != null and fundName !=''">
             and (alias.source_fund_name like concat('%',#{fundName},'%') or alias.source_register_number like concat('%',#{fundName},'%') )
@@ -114,7 +119,19 @@
         <if test="isMapping != null and isMapping == 1">
             and alias.target_fund_id is not null
         </if>
-        order by alias.updatetime desc
+        <choose>
+            <when test="sort != null and sort !='' and sort=='priceDate' and order != null and order !=''">
+                order by
+                CASE
+                    WHEN a.last_price_date IS NULL THEN 1
+                ELSE 0
+                END,
+                a.last_price_date ${order}
+            </when>
+            <otherwise>
+                order by a.last_price_date desc
+            </otherwise>
+        </choose>
         limit #{offset},#{pageSize}
     </select>
     <select id="countFundAlias" resultType="java.lang.Long"

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

@@ -51,7 +51,7 @@
                c.company_name as companyName,
                c.credit_code as creditCode,
                f.inception_date as inceptionDate,
-               ifnull(n.last_price_date,'') as lastPriceDate,
+               n.last_price_date as lastPriceDate,
                r.nav_frequency as navFrequency,
                r.asset_Frequency as assetFrequency,
                r.valuation_Frequency as valuationFrequency,
@@ -86,8 +86,20 @@
         <if test="endDate != null and endDate !=''">
             and f.inception_date <![CDATA[ <= ]]> #{endDate}
         </if>) a
+        <choose>
+            <when test="sort != null and sort !='' and sort=='lastPriceDate' and order != null and order !=''">
+                order by
+                CASE
+                    WHEN a.lastPriceDate IS NULL THEN 1
+                ELSE 0
+                END,
+                a.lastPriceDate ${order}
+            </when>
+            <otherwise>
+                order by a.lastPriceDate desc
+            </otherwise>
+        </choose>
         limit #{offset},#{pageSize}
-        order by a.lastPriceDate desc
     </select>
 
     <select id="queryFundByNameAndRegisterNumber" resultType="com.simuwang.base.pojo.dos.FundInfoDO">

+ 8 - 1
service-base/src/main/resources/mapper/FundNavAssetMapper.xml

@@ -59,7 +59,14 @@
         <if test="updateEndDate != null and updateEndDate !=''">
             and (nav.updatetime <![CDATA[ <= ]]> #{updateEndDate} or asset.updatetime <![CDATA[ <= ]]> #{updateEndDate})
         </if>
-        order by updatetime desc
+        <choose>
+            <when test="sort != null and sort !='' and sort=='priceDate' and order != null and order !=''">
+                order by price_date ${order}
+            </when>
+            <otherwise>
+                order by price_date desc
+            </otherwise>
+        </choose>
         limit #{offset},#{pageSize}
     </select>
     <select id="countNavAssetList" resultType="java.lang.Long"

service-base/src/main/resources/mapper/FundAliasService.xml → service-base/src/main/resources/mapper/ValuationMarketCodeMapper.xml


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

@@ -844,7 +844,7 @@ public class EmailParseService {
                 if (isNotParseConditionSatisfied) {
                     continue;
                 }
-                senderEmail = getSenderEmail(message.getFrom());
+                senderEmail = getSenderEmail(message);
                 emailType = EmailUtil.getEmailTypeBySubject(message.getSubject(), emailTypeMap);
                 String emailDateStr = DateUtil.format(emailDate, DateConst.YYYY_MM_DD_HH_MM_SS);
                 if (emailType == null) {
@@ -898,19 +898,42 @@ public class EmailParseService {
         return emailMessageMap;
     }
 
-    private String getSenderEmail(Address[] senderAddress) {
-        if (senderAddress == null || senderAddress.length == 0) {
-            return null;
-        }
-        // 此时的address是含有编码(MIME编码方式)后的文本和实际的邮件地址
-        String address = senderAddress[0].toString();
-
-        // 正则表达式匹配邮件地址
-        Pattern pattern = Pattern.compile("<(\\S+)>");
-
-        Matcher matcher = pattern.matcher(address);
-        if (matcher.find()) {
-            return matcher.group(1);
+    private String getSenderEmail(MimeMessage message) {
+        Address[] senderAddress = null;
+        try {
+            senderAddress = message.getFrom();
+            if (senderAddress == null || senderAddress.length == 0) {
+                log.info("发件人获取失败=============================");
+                return null;
+            }
+            // 此时的address是含有编码(MIME编码方式)后的文本和实际的邮件地址
+            String address = "";
+            for(Address from : senderAddress){
+                if(StringUtil.isNotEmpty(from.toString())){
+                    address = from.toString();
+                    break;
+                }
+            }
+            log.info("发件人地址:"+address+"========================senderAddress size:"+senderAddress.length);
+            // 正则表达式匹配邮件地址
+            Pattern pattern = Pattern.compile("<(\\S+)>");
+            Matcher matcher = pattern.matcher(address);
+            if (matcher.find()) {
+                return matcher.group(1);
+            }
+            //说明匹配不到,直接获取sender
+            Address sender = message.getSender();
+            if(sender == null){
+                return address;
+            }
+            String senderEmail = sender.toString();
+            log.info("senderEmail:"+senderEmail+"====================");
+            if(senderEmail.contains("<") && senderEmail.contains(">") && senderEmail.indexOf("<") < senderEmail.indexOf(">")){
+                senderEmail = senderEmail.substring(senderEmail.indexOf("<")+1,senderEmail.length()-1);
+            }
+            return senderEmail;
+        } catch (MessagingException e) {
+            log.error(e.getMessage(),e);
         }
         return null;
     }

+ 4 - 1
service-daq/src/main/java/com/simuwang/daq/service/NavEmailParser.java

@@ -1,6 +1,7 @@
 package com.simuwang.daq.service;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.collection.ListUtil;
 import cn.hutool.core.exceptions.ExceptionUtil;
 import cn.hutool.core.lang.Pair;
 import cn.hutool.core.map.MapUtil;
@@ -47,6 +48,8 @@ public class NavEmailParser extends AbstractEmailParser {
 
     private static final int MAX_COLUMN = 20;
 
+    private static final List<String> NOT_CONVERT_FIELD_LIST = ListUtil.toList("TA代码");
+
     public NavEmailParser(ValuationEmailParser valuationEmailParser, EmailTemplateService emailTemplateService) {
         this.valuationEmailParser = valuationEmailParser;
         this.emailTemplateService = emailTemplateService;
@@ -464,7 +467,7 @@ public class NavEmailParser extends AbstractEmailParser {
                 }
                 String cellValue = ExcelUtil.getCellValue(cell);
                 // 移除掉非中文字符
-                String newCellValue = StringUtil.retainChineseCharacters(cellValue);
+                String newCellValue = StringUtil.retainChineseCharacters(cellValue, NOT_CONVERT_FIELD_LIST);
                 String field = fieldMatch(newCellValue, emailFieldMap);
                 if (StrUtil.isNotBlank(field)) {
                     List<FieldPositionDTO> fieldPositionDTOList = tempFieldPositionMap.getOrDefault(field, new ArrayList<>());

+ 2 - 2
service-manage/src/main/java/com/simuwang/manage/api/email/ParseEmailController.java

@@ -70,11 +70,11 @@ public class ParseEmailController{
     }
 
     /**
-     * 邮箱配置页面展示查询
+     * 解析页面展示查询
      * @param emailParseQuery
      * @return
      */
-    @SystemLog(value = "邮箱配置页面展示查询")
+    @SystemLog(value = "解析页面展示查询")
     @GetMapping("/search-email-list")
     public MybatisPage<EmailParseInfoVO> searchEmailList(EmailParseQuery emailParseQuery){
         MybatisPage<EmailParseInfoVO> result = parseEmailService.searchEmailList(emailParseQuery);

+ 2 - 1
service-manage/src/main/java/com/simuwang/manage/service/impl/CompanyEmailConfigServiceImpl.java

@@ -166,7 +166,8 @@ public class CompanyEmailConfigServiceImpl implements CompanyEmailConfigService
                 MailboxInfoDTO dto = getFromEmailInfo();
                 // "<p>您好,附件为产品的数据未发送到最新,麻烦尽快发送缺失的数据。若是产品清算或者有其他原因不再发送数据,还请将产品的清算日期或者不再发送数据的原因发送给我们,非常感谢~\n</p>";
                 String htmlText = sysConfigMapper.selectConfigByKey("deletion_email_body");
-                EmailUtil.senEmail(dto,emails,file,htmlText);
+                String emailTitle = sysConfigMapper.selectConfigByKey("deletion_email_title");
+                EmailUtil.senEmail(dto,emails,file,htmlText,sysConfigMapper.selectConfigByKey("email.host")==null?"":sysConfigMapper.selectConfigByKey("email.host"),emailTitle);
                 //发送成功之后修改数据为已发送
                 deletionInfoMapper.updateSendStatusByFundId(fundIdList);
                 //写入发送历史

+ 0 - 5
service-manage/src/main/java/com/simuwang/manage/service/impl/DeletionServiceImpl.java

@@ -60,11 +60,6 @@ public class DeletionServiceImpl implements DeletionService {
         List<DeletionInfoDO> deletionInfoDOList = deletionInfoMapper.searchDeletionList(deletionPageQuery);
         long total = deletionInfoMapper.countDeletion(deletionPageQuery);
         List<DeletionInfoVO> dataList = deletionInfoDOList.stream().map(DeletionInfoDO::toVO).collect(Collectors.toList());
-        for(DeletionInfoVO vo : dataList){
-            String fundId = vo.getFundId();
-            String lastDeletionDate = deletionInfoMapper.getLastDeletionDateByFundId(fundId,vo.getDeletionType());
-            vo.setLastDeletionDate(lastDeletionDate);
-        }
         return MybatisPage.of(total,dataList);
     }
 

+ 2 - 2
service-manage/src/main/java/com/simuwang/manage/service/impl/FundAliasServiceImpl.java

@@ -63,8 +63,8 @@ public class FundAliasServiceImpl implements FundAliasService {
             //异常净值数量
             Integer assetTotal = emailFundAssetMapper.countNoStoreAsset(vo.getSourceFundName(),vo.getSourceRegisterNumber());
             vo.setAssetTotal(assetTotal);
-            //最新净值日期
-            vo.setPriceDate(emailFundNavMapper.getMaxPriceDate(vo.getSourceFundName()));
+//            //最新净值日期
+//            vo.setPriceDate(emailFundNavMapper.getMaxPriceDate(vo.getSourceFundName()));
         }
         long total = fundAliasMapper.countFundAlias(fundAliasPageQuery);
         return MybatisPage.of(total,fundAliasVOList);