Browse Source

Merge branch 'test' of http://112.74.196.215:3000/Tech2/data-daq into test

wangzaijun 7 months ago
parent
commit
2c3e45ff25
100 changed files with 3167 additions and 677 deletions
  1. 16 0
      service-base/pom.xml
  2. 21 0
      service-base/src/main/java/com/simuwang/base/common/conts/ExcelConst.java
  3. 46 0
      service-base/src/main/java/com/simuwang/base/common/enums/DeletionType.java
  4. 46 0
      service-base/src/main/java/com/simuwang/base/common/enums/DistributeType.java
  5. 1 1
      service-base/src/main/java/com/simuwang/base/common/enums/EmailCron.java
  6. 0 102
      service-base/src/main/java/com/simuwang/base/common/page/PageDomain.java
  7. 0 85
      service-base/src/main/java/com/simuwang/base/common/page/TableDataInfo.java
  8. 0 56
      service-base/src/main/java/com/simuwang/base/common/page/TableSupport.java
  9. 49 5
      service-base/src/main/java/com/simuwang/base/common/util/ExcelUtil.java
  10. 0 35
      service-base/src/main/java/com/simuwang/base/common/util/PageUtils.java
  11. 188 0
      service-base/src/main/java/com/simuwang/base/common/util/QuartzUtils.java
  12. 1 1
      service-base/src/main/java/com/simuwang/base/config/ThreadPoolConfig.java
  13. 2 0
      service-base/src/main/java/com/simuwang/base/mapper/AssetMapper.java
  14. 2 0
      service-base/src/main/java/com/simuwang/base/mapper/CompanyEmailConfigMapper.java
  15. 2 0
      service-base/src/main/java/com/simuwang/base/mapper/CompanyInformationMapper.java
  16. 38 0
      service-base/src/main/java/com/simuwang/base/mapper/DeletionInfoMapper.java
  17. 34 0
      service-base/src/main/java/com/simuwang/base/mapper/DistributionMapper.java
  18. 2 0
      service-base/src/main/java/com/simuwang/base/mapper/EmailFileInfoMapper.java
  19. 6 0
      service-base/src/main/java/com/simuwang/base/mapper/EmailFundAssetMapper.java
  20. 9 0
      service-base/src/main/java/com/simuwang/base/mapper/EmailFundNavMapper.java
  21. 9 0
      service-base/src/main/java/com/simuwang/base/mapper/FundAliasMapper.java
  22. 4 0
      service-base/src/main/java/com/simuwang/base/mapper/FundInfoMapper.java
  23. 20 0
      service-base/src/main/java/com/simuwang/base/mapper/FundNavAssetMapper.java
  24. 3 1
      service-base/src/main/java/com/simuwang/base/mapper/MailboxInfoMapper.java
  25. 6 0
      service-base/src/main/java/com/simuwang/base/mapper/NavMapper.java
  26. 87 0
      service-base/src/main/java/com/simuwang/base/pojo/dos/DeletionInfoDO.java
  27. 70 0
      service-base/src/main/java/com/simuwang/base/pojo/dos/DistributionDO.java
  28. 98 0
      service-base/src/main/java/com/simuwang/base/pojo/dos/DistributionTablePageDO.java
  29. 1 1
      service-base/src/main/java/com/simuwang/base/pojo/dos/EmailFundAssetDO.java
  30. 12 0
      service-base/src/main/java/com/simuwang/base/pojo/dos/FundAliasDO.java
  31. 69 0
      service-base/src/main/java/com/simuwang/base/pojo/dos/FundDeletionInfoDO.java
  32. 63 0
      service-base/src/main/java/com/simuwang/base/pojo/dos/FundNavAssetDO.java
  33. 1 1
      service-base/src/main/java/com/simuwang/base/pojo/dos/FundReportFrequencyDO.java
  34. 43 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/DistributionExcelData.java
  35. 37 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/ExcelDeletionInfoDTO.java
  36. 41 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/NavAssetExcelData.java
  37. 49 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/QuartzBean.java
  38. 73 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/query/DeletionPageQuery.java
  39. 73 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/query/DistributionPageQuery.java
  40. 34 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/query/FundAliasPageQuery.java
  41. 25 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/query/FundDeletionPageQuery.java
  42. 35 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/query/FundNavAssetPageQuery.java
  43. 1 1
      service-base/src/main/java/com/simuwang/base/pojo/vo/CompanyEmailConfigVO.java
  44. 20 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/CompanyIdListVO.java
  45. 18 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/CompanyIdVO.java
  46. 47 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/DeletionInfoVO.java
  47. 67 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/DistributionTablePageVO.java
  48. 48 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/DistributionVO.java
  49. 38 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/ExcelFailDataVO.java
  50. 38 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/ExcelNavAssetFailDataVO.java
  51. 38 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/ExcelNavAssetSuccessDataVO.java
  52. 30 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/ExcelSuccessDataVO.java
  53. 50 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundAliasVO.java
  54. 38 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundDeletionInfoVO.java
  55. 25 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundDeletionRemarkVO.java
  56. 21 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundDeletionTypeVO.java
  57. 19 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundIdListVO.java
  58. 19 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundNavAssetDelListVO.java
  59. 21 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundNavAssetDelVO.java
  60. 47 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundNavAssetVO.java
  61. 1 1
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundReportFrequencyVO.java
  62. 20 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/IdListVO.java
  63. 0 12
      service-base/src/main/java/com/simuwang/base/pojo/vo/IdVO.java
  64. 6 2
      service-base/src/main/java/com/simuwang/base/pojo/vo/OpenStatusVO.java
  65. 28 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/ParseParamVO.java
  66. 3 0
      service-base/src/main/resources/mapper/AssetMapper.xml
  67. 6 2
      service-base/src/main/resources/mapper/CompanyEmailConfigMapper.xml
  68. 2 2
      service-base/src/main/resources/mapper/CompanyEmailHistoryMapper.xml
  69. 195 0
      service-base/src/main/resources/mapper/DeletionInfoMapper.xml
  70. 128 0
      service-base/src/main/resources/mapper/DistributionMapper.xml
  71. 14 0
      service-base/src/main/resources/mapper/EmailFileInfoMapper.xml
  72. 24 0
      service-base/src/main/resources/mapper/EmailFundAssetMapper.xml
  73. 46 0
      service-base/src/main/resources/mapper/EmailFundNavMapper.xml
  74. 6 0
      service-base/src/main/resources/mapper/CompanyInformationMapper.xml
  75. 35 0
      service-base/src/main/resources/mapper/FundAliasMapper.xml
  76. 0 0
      service-base/src/main/resources/mapper/FundAliasService.xml
  77. 21 10
      service-base/src/main/resources/mapper/FundInfoMapper.xml
  78. 95 0
      service-base/src/main/resources/mapper/FundNavAssetMapper.xml
  79. 6 2
      service-base/src/main/resources/mapper/MailBoxInfoMapper.xml
  80. 20 0
      service-base/src/main/resources/mapper/NavMapper.xml
  81. 1 1
      service-daq/src/main/java/com/simuwang/daq/service/EmailParseApiServiceImpl.java
  82. 2 2
      service-daq/src/main/java/com/simuwang/daq/service/EmailParseService.java
  83. 0 163
      service-manage/src/main/java/com/simuwang/manage/api/base/BaseController.java
  84. 5 9
      service-manage/src/main/java/com/simuwang/manage/api/company/CompanyEmailSendHistoryController.java
  85. 128 0
      service-manage/src/main/java/com/simuwang/manage/api/deletion/DeletionController.java
  86. 75 0
      service-manage/src/main/java/com/simuwang/manage/api/distribution/DistributionController.java
  87. 0 2
      service-manage/src/main/java/com/simuwang/manage/api/email/EmailAssetDetailController.java
  88. 27 11
      service-manage/src/main/java/com/simuwang/manage/api/email/EmailConfigController.java
  89. 0 2
      service-manage/src/main/java/com/simuwang/manage/api/email/EmailNavDetailController.java
  90. 0 42
      service-manage/src/main/java/com/simuwang/manage/api/email/NavController.java
  91. 5 8
      service-manage/src/main/java/com/simuwang/manage/api/email/ParseEmailController.java
  92. 42 2
      service-manage/src/main/java/com/simuwang/manage/api/fund/FunAliasController.java
  93. 79 0
      service-manage/src/main/java/com/simuwang/manage/api/navAsset/FundNavAssetController.java
  94. 103 114
      service-manage/src/main/java/com/simuwang/manage/api/system/SysConfigController.java
  95. 65 0
      service-manage/src/main/java/com/simuwang/manage/init/QuartzConfig.java
  96. 30 0
      service-manage/src/main/java/com/simuwang/manage/service/DeletionService.java
  97. 26 0
      service-manage/src/main/java/com/simuwang/manage/service/DistributionService.java
  98. 11 1
      service-manage/src/main/java/com/simuwang/manage/service/EmailConfigService.java
  99. 11 0
      service-manage/src/main/java/com/simuwang/manage/service/EmailFundAssetService.java
  100. 0 0
      service-manage/src/main/java/com/simuwang/manage/service/EmailFundInfoService.java

+ 16 - 0
service-base/pom.xml

@@ -212,6 +212,22 @@
             <artifactId>commons-compress</artifactId>
             <version>1.27.1</version>
         </dependency>
+        <!--阿里巴巴excel解析库 -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>3.1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-quartz</artifactId>
+        </dependency><!-- json 工具 -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>2.0.52</version>
+        </dependency>
+
     </dependencies>
 
 <!--    <build>-->

+ 21 - 0
service-base/src/main/java/com/simuwang/base/common/conts/ExcelConst.java

@@ -0,0 +1,21 @@
+package com.simuwang.base.common.conts;
+
+/**
+ * FileName: ExcelConst
+ * Author:   chenjianhua
+ * Date:     2024/9/16 12:56
+ * Description: ${DESCRIPTION}
+ */
+public class ExcelConst {
+    public final static String REQUIRE_FIELD = "必填字段不能为空";
+
+    public final static String CASH_DIVIDENDS= "分红";
+    public final static String DIVIDENDS_SPLIT= "拆分";
+
+    public final static String CASH_DIVIDENDS_FAIL= "现金分红需为正数";
+    public final static String DIVIDENDS_SPLIT_FAIL= "份额分红不能为0";
+    public final static String NOT_MAPPING_FUND= "未匹配基金";
+    public final static String SAVE_FAIL= "数据入库失败";
+    public static final String ERROR_NAV = "单位净值缺失或者有误";
+    public static final String ERROR_NAV_WITHDRAWAL = "累计净值缺失或者有误";
+}

+ 46 - 0
service-base/src/main/java/com/simuwang/base/common/enums/DeletionType.java

@@ -0,0 +1,46 @@
+package com.simuwang.base.common.enums;
+
+import java.util.stream.Stream;
+
+/**
+ * FileName: DeletionType
+ * Author:   chenjianhua
+ * Date:     2024/9/17 22:10
+ * Description: ${DESCRIPTION}
+ */
+public enum DeletionType {
+    //单位分红/拆分比例
+    NAV_DELETION(1, "净值缺失"), ASSET_DELETION(2, "规模缺失"), DISTRIBUTION_DELETION(3, "分红缺失");
+
+    private final Integer code;
+    private final String info;
+
+    DeletionType(Integer code, String info) {
+        this.code = code;
+        this.info = info;
+    }
+
+    public static DeletionType getDeletionTypeByCode(Integer code) {
+        if (null == code){
+            return null;
+        }
+        for(DeletionType s : DeletionType.values()){
+            if(code.equals(s.getCode())){
+                return s;
+            }
+        }
+        return null;
+    }
+
+    public static DeletionType getDeletionTypeByInfo(String info) {
+        return Stream.of(DeletionType.values()).filter(e -> e.info.equals(info)).findFirst().orElse(null);
+    }
+
+    public Integer getCode() {
+        return code;
+    }
+
+    public String getInfo() {
+        return info;
+    }
+}

+ 46 - 0
service-base/src/main/java/com/simuwang/base/common/enums/DistributeType.java

@@ -0,0 +1,46 @@
+package com.simuwang.base.common.enums;
+
+import java.util.stream.Stream;
+
+/**
+ * FileName: DistributeType
+ * Author:   chenjianhua
+ * Date:     2024/9/16 13:30
+ * Description: ${DESCRIPTION}
+ */
+public enum DistributeType {
+    //单位分红/拆分比例
+    CASH_DIVIDENDS(1, "分红"), DIVIDENDS_SPLIT(2, "拆分");
+
+    private final Integer code;
+    private final String info;
+
+    DistributeType(Integer code, String info) {
+        this.code = code;
+        this.info = info;
+    }
+
+    public static DistributeType getDistributeTypeByCode(Integer code) {
+        if (null == code){
+            return null;
+        }
+        for(DistributeType s : DistributeType.values()){
+            if(code.equals(s.getCode())){
+                return s;
+            }
+        }
+        return null;
+    }
+
+    public static DistributeType getDistributeTypeByInfo(String info) {
+        return Stream.of(DistributeType.values()).filter(e -> e.info.equals(info)).findFirst().orElse(null);
+    }
+
+    public Integer getCode() {
+        return code;
+    }
+
+    public String getInfo() {
+        return info;
+    }
+}

+ 1 - 1
service-base/src/main/java/com/simuwang/base/common/enums/EmailCron.java

@@ -9,7 +9,7 @@ import java.util.stream.Stream;
  * Description: ${DESCRIPTION}
  */
 public enum EmailCron {
-    EVERY_HOUR(1, "0 0 0/1 * * *"), ONE_AM(2, "0 0 1 * * *");
+    EVERY_HOUR(1, "0 0/1 * * * ?"), ONE_AM(2, "0 0 1 * * ?");
 
     private final Integer text;
     private final String cron;

+ 0 - 102
service-base/src/main/java/com/simuwang/base/common/page/PageDomain.java

@@ -1,102 +0,0 @@
-package com.simuwang.base.common.page;
-
-
-import com.simuwang.base.common.util.StringUtil;
-
-/**
- * 分页数据
- * 
- * @author ruoyi
- */
-public class PageDomain
-{
-    /** 当前记录起始索引 */
-    private Integer pageNum;
-
-    /** 每页显示记录数 */
-    private Integer pageSize;
-
-    /** 排序列 */
-    private String orderByColumn;
-
-    /** 排序的方向desc或者asc */
-    private String isAsc = "asc";
-
-    /** 分页参数合理化 */
-    private Boolean reasonable = true;
-
-    public String getOrderBy()
-    {
-        if (StringUtil.isEmpty(orderByColumn))
-        {
-            return "";
-        }
-        return StringUtil.toUnderScoreCase(orderByColumn) + " " + isAsc;
-    }
-
-    public Integer getPageNum()
-    {
-        return pageNum;
-    }
-
-    public void setPageNum(Integer pageNum)
-    {
-        this.pageNum = pageNum;
-    }
-
-    public Integer getPageSize()
-    {
-        return pageSize;
-    }
-
-    public void setPageSize(Integer pageSize)
-    {
-        this.pageSize = pageSize;
-    }
-
-    public String getOrderByColumn()
-    {
-        return orderByColumn;
-    }
-
-    public void setOrderByColumn(String orderByColumn)
-    {
-        this.orderByColumn = orderByColumn;
-    }
-
-    public String getIsAsc()
-    {
-        return isAsc;
-    }
-
-    public void setIsAsc(String isAsc)
-    {
-        if (StringUtil.isNotEmpty(isAsc))
-        {
-            // 兼容前端排序类型
-            if ("ascending".equals(isAsc))
-            {
-                isAsc = "asc";
-            }
-            else if ("descending".equals(isAsc))
-            {
-                isAsc = "desc";
-            }
-            this.isAsc = isAsc;
-        }
-    }
-
-    public Boolean getReasonable()
-    {
-        if (StringUtil.isNull(reasonable))
-        {
-            return Boolean.TRUE;
-        }
-        return reasonable;
-    }
-
-    public void setReasonable(Boolean reasonable)
-    {
-        this.reasonable = reasonable;
-    }
-}

+ 0 - 85
service-base/src/main/java/com/simuwang/base/common/page/TableDataInfo.java

@@ -1,85 +0,0 @@
-package com.simuwang.base.common.page;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * 表格分页数据对象
- * 
- * @author ruoyi
- */
-public class TableDataInfo implements Serializable
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 总记录数 */
-    private long total;
-
-    /** 列表数据 */
-    private List<?> rows;
-
-    /** 消息状态码 */
-    private int code;
-
-    /** 消息内容 */
-    private String msg;
-
-    /**
-     * 表格数据对象
-     */
-    public TableDataInfo()
-    {
-    }
-
-    /**
-     * 分页
-     * 
-     * @param list 列表数据
-     * @param total 总记录数
-     */
-    public TableDataInfo(List<?> list, int total)
-    {
-        this.rows = list;
-        this.total = total;
-    }
-
-    public long getTotal()
-    {
-        return total;
-    }
-
-    public void setTotal(long total)
-    {
-        this.total = total;
-    }
-
-    public List<?> getRows()
-    {
-        return rows;
-    }
-
-    public void setRows(List<?> rows)
-    {
-        this.rows = rows;
-    }
-
-    public int getCode()
-    {
-        return code;
-    }
-
-    public void setCode(int code)
-    {
-        this.code = code;
-    }
-
-    public String getMsg()
-    {
-        return msg;
-    }
-
-    public void setMsg(String msg)
-    {
-        this.msg = msg;
-    }
-}

+ 0 - 56
service-base/src/main/java/com/simuwang/base/common/page/TableSupport.java

@@ -1,56 +0,0 @@
-package com.simuwang.base.common.page;
-
-import com.simuwang.base.common.text.Convert;
-import com.simuwang.base.common.util.ServletUtils;
-
-/**
- * 表格数据处理
- * 
- * @author ruoyi
- */
-public class TableSupport
-{
-    /**
-     * 当前记录起始索引
-     */
-    public static final String PAGE_NUM = "pageNum";
-
-    /**
-     * 每页显示记录数
-     */
-    public static final String PAGE_SIZE = "pageSize";
-
-    /**
-     * 排序列
-     */
-    public static final String ORDER_BY_COLUMN = "orderByColumn";
-
-    /**
-     * 排序的方向 "desc" 或者 "asc".
-     */
-    public static final String IS_ASC = "isAsc";
-
-    /**
-     * 分页参数合理化
-     */
-    public static final String REASONABLE = "reasonable";
-
-    /**
-     * 封装分页对象
-     */
-    public static PageDomain getPageDomain()
-    {
-        PageDomain pageDomain = new PageDomain();
-        pageDomain.setPageNum(Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1));
-        pageDomain.setPageSize(Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10));
-        pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN));
-        pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC));
-        pageDomain.setReasonable(ServletUtils.getParameterToBool(REASONABLE));
-        return pageDomain;
-    }
-
-    public static PageDomain buildPageRequest()
-    {
-        return getPageDomain();
-    }
-}

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

@@ -4,11 +4,9 @@ import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.StrUtil;
 import com.simuwang.base.common.conts.DateConst;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.hssf.usermodel.*;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.jsoup.nodes.Element;
 import org.jsoup.select.Elements;
@@ -19,6 +17,8 @@ import java.io.*;
 import java.text.NumberFormat;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
+import java.util.UUID;
 
 import org.apache.commons.compress.archivers.ArchiveEntry;
 import org.apache.commons.compress.archivers.ArchiveInputStream;
@@ -275,5 +275,49 @@ public class ExcelUtil {
         }
         return data;
     }
+    public static HSSFWorkbook getHSSFWorkbook(String sheetName, List<String> title, Map<String,List<List<String>>> valueMap, HSSFWorkbook wb) {
+
+        // 第一步,创建一个HSSFWorkbook,对应一个Excel文件
+        if (wb == null) {
+            wb = new HSSFWorkbook();
+        }
+
+        try{
+            // 第二步,在workbook中添加一个sheet,对应Excel文件中的sheet
+            HSSFSheet sheet = wb.createSheet(sheetName);
+            // 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制
+            HSSFRow row = sheet.createRow(0);
+            // 第四步,创建单元格,并设置值表头 设置表头居中
+            HSSFCellStyle style = wb.createCellStyle();
+            style.setAlignment(HorizontalAlignment.RIGHT);
+            style.setWrapText(true);
+            sheet.setColumnWidth(0, 5000);
+            sheet.setColumnWidth(1, 5000);
+            sheet.setColumnWidth(2, 5000);
+            sheet.setColumnWidth(3, 8000);
+            sheet.setColumnWidth(4, 8000);
+            sheet.setColumnWidth(5, 5000);
+            //声明列对象
+            HSSFCell cell = null;
+            //创建标题
+            for (int i = 0; i < title.size(); i++) {
+                cell = row.createCell(i);
+                cell.setCellValue(title.get(i));
+                cell.setCellStyle(style);
+            }
+            List<List<String>> values = valueMap.get(sheetName);
+            //创建内容
+            for (int i = 0; i < values.size(); i++) {
+                row = sheet.createRow(i + 1);
+                for (int j = 0; j < values.get(i).size(); j++) {
+                    //将内容按顺序赋给对应的列对象
+                    row.createCell(j).setCellValue(values.get(i).get(j));
+                }
+            }
+        }catch (Exception e){
+            logger.error(e.getMessage(),e);
+        }
+        return wb;
+    }
 
 }

+ 0 - 35
service-base/src/main/java/com/simuwang/base/common/util/PageUtils.java

@@ -1,35 +0,0 @@
-package com.simuwang.base.common.util;
-
-import com.github.pagehelper
-        .PageHelper;
-import com.simuwang.base.common.page.PageDomain;
-import com.simuwang.base.common.page.TableSupport;
-
-/**
- * 分页工具类
- *
- * @author ruoyi
- */
-public class PageUtils extends PageHelper
-{
-    /**
-     * 设置请求分页数据
-     */
-    public static void startPage()
-    {
-        PageDomain pageDomain = TableSupport.buildPageRequest();
-        Integer pageNum = pageDomain.getPageNum();
-        Integer pageSize = pageDomain.getPageSize();
-        String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
-        Boolean reasonable = pageDomain.getReasonable();
-        PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
-    }
-
-    /**
-     * 清理分页的线程变量
-     */
-    public static void clearPage()
-    {
-        PageHelper.clearPage();
-    }
-}

+ 188 - 0
service-base/src/main/java/com/simuwang/base/common/util/QuartzUtils.java

@@ -0,0 +1,188 @@
+package com.simuwang.base.common.util;
+
+import com.alibaba.fastjson.JSON;
+import com.simuwang.base.pojo.dto.QuartzBean;
+import org.quartz.*;
+import org.quartz.impl.matchers.GroupMatcher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.ObjectUtils;
+import java.util.*;
+/**
+ * FileName: QuartzUtils
+ * Author:   chenjianhua
+ * Date:     2024/9/17 10:25
+ * Description: ${DESCRIPTION}
+ */
+public class QuartzUtils {
+
+    private static final Logger logger = LoggerFactory.getLogger(QuartzUtils.class);
+
+
+    /**
+     * 获取所有的定时任务
+     *
+     * @throws Exception
+     */
+    public static List<QuartzBean> getAllJob(Scheduler scheduler) {
+        GroupMatcher<JobKey> matcher = GroupMatcher.anyJobGroup();
+        List<QuartzBean> jobList = new ArrayList();
+        try {
+            Set<JobKey> jobKeys = scheduler.getJobKeys(matcher);
+            for (JobKey jobKey : jobKeys) {
+                List<? extends Trigger> triggers = scheduler.getTriggersOfJob(jobKey);
+                for (Trigger trigger : triggers) {
+                    QuartzBean job = new QuartzBean();
+                    job.setJobName(jobKey.getName());
+                    job.setGroupName(jobKey.getGroup());
+                    Trigger.TriggerState triggerState = scheduler.getTriggerState(trigger.getKey());
+                    job.setStatus(Trigger.TriggerState.NORMAL.equals(triggerState) ? 1 : 0);
+                    if (trigger instanceof CronTrigger) {
+                        CronTrigger cronTrigger = (CronTrigger) trigger;
+                        String cronExpression = cronTrigger.getCronExpression();
+                        job.setCronExpression(cronExpression);
+                    }
+                    JobDetail jobDetail = scheduler.getJobDetail(jobKey);
+                    JobDataMap jobDataMap = jobDetail.getJobDataMap();
+                    String[] keys = jobDataMap.getKeys();
+                    if (keys != null && keys.length > 0) {
+                        Map<String, String> paramMap = new HashMap<>(keys.length, 1.0f);
+                        for (String key : keys) {
+                            paramMap.put(key, jobDataMap.get(key).toString());
+                        }
+                        String paramStr = JSON.toJSONString(paramMap);
+                        job.setJobParam(paramStr);
+                    }
+                    Class<? extends Job> jobClass = jobDetail.getJobClass();
+                    job.setJobClass(jobClass.getName());
+                    jobList.add(job);
+                }
+            }
+
+        } catch (SchedulerException e) {
+            logger.error(e.getMessage(),e);
+        }
+        return jobList;
+    }
+
+    /**
+     * 创建定时任务 定时任务创建之后默认启动状态
+     *
+     * @param scheduler  调度器
+     * @param quartzBean 定时任务信息类
+     * @throws Exception
+     */
+    public static void createScheduleJob(Scheduler scheduler, QuartzBean quartzBean) {
+        try {
+            //获取到定时任务的执行类  必须是类的绝对路径名称
+            //定时任务类需要是job类的具体实现 QuartzJobBean是job的抽象类。
+            Class<? extends Job> jobClass = (Class<? extends Job>) Class.forName(quartzBean.getJobClass());
+            // 构建定时任务信息
+            JobBuilder jobBuilder = JobBuilder.newJob(jobClass).withIdentity(quartzBean.getJobName(), quartzBean.getGroupName());
+            // 设置参数
+            Map<String, String> paramHashMap = JSON.parseObject(quartzBean.getJobParam(), HashMap.class);
+            if (!ObjectUtils.isEmpty(paramHashMap)) {
+                paramHashMap.forEach(
+                        (param, paramValue) -> {
+                            jobBuilder.usingJobData(param, paramValue);
+                        }
+                );
+            }
+            JobDetail jobDetail = jobBuilder
+                    .storeDurably()
+                    .build();
+            // 设置定时任务执行方式
+            CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(quartzBean.getCronExpression());
+            // 构建触发器trigger
+            CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity(quartzBean.getJobName()).withSchedule(scheduleBuilder).build();
+            scheduler.scheduleJob(jobDetail, trigger);
+        } catch (ClassNotFoundException e) {
+            logger.error(e.getMessage(),e);
+        } catch (SchedulerException e) {
+            logger.error(e.getMessage(),e);
+        }
+    }
+
+    /**
+     * 根据任务名称暂停定时任务
+     *
+     * @param scheduler  调度器
+     * @param jobKeyName 定时任务名称
+     * @throws SchedulerException
+     */
+    public static void pauseScheduleJob(Scheduler scheduler, String jobKeyName) {
+        String[] jobNameGroupArr = jobKeyName.split("\\.");
+        JobKey jobKey = JobKey.jobKey(jobNameGroupArr[1], jobNameGroupArr[0]);
+        try {
+            scheduler.pauseJob(jobKey);
+        } catch (SchedulerException e) {
+            logger.error("暂停定时任务出错:" +e.getMessage(),e);
+        }
+    }
+
+    /**
+     * 根据任务名称恢复定时任务
+     *
+     * @param scheduler  调度器
+     * @param jobKeyName 定时任务名称
+     * @throws SchedulerException
+     */
+    public static void resumeScheduleJob(Scheduler scheduler, String jobKeyName) {
+        String[] jobNameGroupArr = jobKeyName.split("\\.");
+        JobKey jobKey = JobKey.jobKey(jobNameGroupArr[1], jobNameGroupArr[0]);
+        try {
+            scheduler.resumeJob(jobKey);
+        } catch (SchedulerException e) {
+            logger.error("启动定时任务出错:" +e.getMessage(),e);
+        }
+    }
+
+    /**
+     * 根据任务名称立即运行一次定时任务
+     *
+     * @param scheduler  调度器
+     * @param jobKeyName 定时任务名称
+     * @throws SchedulerException
+     */
+    public static void runOnce(Scheduler scheduler, String jobKeyName) {
+        String[] jobNameGroupArr = jobKeyName.split("\\.");
+        JobKey jobKey = JobKey.jobKey(jobNameGroupArr[1], jobNameGroupArr[0]);
+        try {
+            scheduler.triggerJob(jobKey);
+        } catch (SchedulerException e) {
+            logger.error("运行定时任务出错:" +e.getMessage(),e);
+        }
+    }
+
+    /**
+     * 更新定时任务
+     *
+     * @param scheduler  调度器
+     * @param quartzBean 定时任务信息类
+     * @throws SchedulerException
+     */
+    public static void updateScheduleJob(Scheduler scheduler, QuartzBean quartzBean) {
+        deleteScheduleJob(scheduler, quartzBean.getGroupName() + "." + quartzBean.getJobName());
+        createScheduleJob(scheduler, quartzBean);
+    }
+
+    /**
+     * 根据定时任务名称从调度器当中删除定时任务
+     *
+     * @param scheduler  调度器
+     * @param jobKeyName 定时任务名称
+     * @throws SchedulerException
+     */
+    public static void deleteScheduleJob(Scheduler scheduler, String jobKeyName) {
+        String[] jobNameGroupArr = jobKeyName.split("\\.");
+        JobKey jobKey = JobKey.jobKey(jobNameGroupArr[1], jobNameGroupArr[0]);
+        try {
+            if (ObjectUtils.isEmpty(jobKey)) {
+                return;
+            }
+            scheduler.deleteJob(jobKey);
+        } catch (SchedulerException e) {
+            logger.error("删除定时任务出错:" +e.getMessage(),e);
+        }
+    }
+}

+ 1 - 1
service-base/src/main/java/com/simuwang/base/config/ThreadPoolConfig.java

@@ -36,7 +36,7 @@ public class ThreadPoolConfig {
     public ThreadPoolTaskExecutor asyncExecutor() {
         ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
         taskExecutor.setCorePoolSize(2);
-        taskExecutor.setMaxPoolSize(50);
+        taskExecutor.setMaxPoolSize(5);
         taskExecutor.setQueueCapacity(50);
         taskExecutor.setKeepAliveSeconds(60);
         taskExecutor.setThreadNamePrefix("asyncExecutor--");

+ 2 - 0
service-base/src/main/java/com/simuwang/base/mapper/AssetMapper.java

@@ -17,4 +17,6 @@ public interface AssetMapper {
     List<String> queryFundNavByDate(@Param("fundId") String fundId, @Param("priceDateList") List<String> priceDateList);
 
     AssetDO queryFundAsset(AssetDO fundAssetVO);
+
+    void deleteAsset(@Param("fundId") String fundId, @Param("priceDate") String priceDate);
 }

+ 2 - 0
service-base/src/main/java/com/simuwang/base/mapper/CompanyEmailConfigMapper.java

@@ -33,4 +33,6 @@ public interface CompanyEmailConfigMapper extends BaseMapper<CompanyEmailConfigD
     long countEmailConfig(CompanyEmailHistoryPageQuery companyEmailHistoryPageQuery);
 
     List<CompanyEmailConfigVO> searchEmailConfigByCompanyId(@Param("companyId")String companyId);
+
+    CompanyEmailConfigDO selectEmailConfig(@Param("companyId")String companyId,@Param("email") String email);
 }

+ 2 - 0
service-base/src/main/java/com/simuwang/base/mapper/CompanyInformationMapper.java

@@ -15,4 +15,6 @@ import java.util.Map;
 @Mapper
 public interface CompanyInformationMapper {
     public List<Map<String, String>> searchCompanyInfoByKeyword(@Param("keyword") String keyword);
+
+    String getCompanyNameByFundId(@Param("fundId") String fundId);
 }

+ 38 - 0
service-base/src/main/java/com/simuwang/base/mapper/DeletionInfoMapper.java

@@ -0,0 +1,38 @@
+package com.simuwang.base.mapper;
+
+import com.simuwang.base.pojo.dos.DeletionInfoDO;
+import com.simuwang.base.pojo.dos.FundDeletionInfoDO;
+import com.simuwang.base.pojo.dto.query.DeletionPageQuery;
+import com.simuwang.base.pojo.dto.query.FundDeletionPageQuery;
+import com.simuwang.base.pojo.vo.FundDeletionInfoVO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * FileName: DeletionInfoMapper
+ * Author:   chenjianhua
+ * Date:     2024/9/17 18:59
+ * Description: ${DESCRIPTION}
+ */
+@Mapper
+public interface DeletionInfoMapper {
+    List<DeletionInfoDO> searchDeletionList(DeletionPageQuery deletionPageQuery);
+
+    long countDeletion(DeletionPageQuery deletionPageQuery);
+
+    String getLastDeletionDateByFundId(@Param("fundId") String fundId,@Param("deletionType") Integer deletionType);
+
+    List<FundDeletionInfoDO> searchFundDeletionList(FundDeletionPageQuery fundDeletionPageQuery);
+
+    long countFundDeletionList(FundDeletionPageQuery fundDeletionPageQuery);
+
+    void update(FundDeletionInfoDO infoDO);
+
+    void batchUpdate(@Param("itemDoList") List<FundDeletionInfoVO> fundDeletionInfoVOList);
+
+    void updateRemark(@Param("fundId") String fundId, @Param("deletionType") Integer deletionType, @Param("remark")String remark);
+
+    List<FundDeletionInfoDO> selectFundDeletionInfoVOList(@Param("fundIdList") List<String> fundIdList);
+}

+ 34 - 0
service-base/src/main/java/com/simuwang/base/mapper/DistributionMapper.java

@@ -0,0 +1,34 @@
+package com.simuwang.base.mapper;
+
+import com.simuwang.base.pojo.dos.DistributionDO;
+import com.simuwang.base.pojo.dos.DistributionTablePageDO;
+import com.simuwang.base.pojo.dto.query.DistributionPageQuery;
+import com.simuwang.base.pojo.vo.IdListVO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * FileName: DistributionMapper
+ * Author:   chenjianhua
+ * Date:     2024/9/15 14:09
+ * Description: ${DESCRIPTION}
+ */
+@Mapper
+public interface DistributionMapper {
+    List<DistributionTablePageDO> searchDistributionList(DistributionPageQuery distributionPageQuery);
+
+    long countDistributionList(DistributionPageQuery distributionPageQuery);
+
+    DistributionDO selectDistributionById(@Param("id") Integer id);
+
+    void updateDistributionById(DistributionDO distributionDO);
+
+    DistributionDO selectDistributionByDate(@Param("fundId") String fundId, @Param("distributeDate") Date distributeDate);
+
+    void saveDistribution(DistributionDO distributionDO);
+
+    void deleteDistribution(@Param("ids") List<Integer> idList);
+}

+ 2 - 0
service-base/src/main/java/com/simuwang/base/mapper/EmailFileInfoMapper.java

@@ -29,4 +29,6 @@ public interface EmailFileInfoMapper {
     long countEmailDetailById(EmailFileQuery emailFileQuery);
 
     void updateTimeById(@Param("id") Integer fileId, @Param("parseDate") Date parseDate);
+
+    List<Integer> selectValuationFileId(@Param("fileIdList") List<Integer> fileIdList);
 }

+ 6 - 0
service-base/src/main/java/com/simuwang/base/mapper/EmailFundAssetMapper.java

@@ -16,5 +16,11 @@ public interface EmailFundAssetMapper {
 
     long countAssetDetail(ParseDetailPageQuery parseDetailPageQuery);
 
+    Integer countNoStoreAsset(String sourceFundName);
+
     void deleteByFileId(@Param("fileId") Integer fileId);
+
+    List<EmailFundAssetDO> selectNotMappingAsset(@Param("fundName") String sourceFundName);
+
+    void batchUpdate(@Param("itemDoList")List<EmailFundAssetDO> fundAssetDOList);
 }

+ 9 - 0
service-base/src/main/java/com/simuwang/base/mapper/EmailFundNavMapper.java

@@ -2,6 +2,7 @@ package com.simuwang.base.mapper;
 
 import com.simuwang.base.pojo.dos.EmailFundNavDO;
 import com.simuwang.base.pojo.dto.query.ParseDetailPageQuery;
+import com.simuwang.base.pojo.vo.EmailFundNavVO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -16,5 +17,13 @@ public interface EmailFundNavMapper {
 
     long countNavDetail(ParseDetailPageQuery parseDetailPageQuery);
 
+    Integer countNoStoreNav(@Param("fundName") String sourceFundName);
+
+    List<Integer> selectFileIdByFundName(@Param("fundName") String sourceFundName);
+
     void deleteByFileId(@Param("fileId") Integer fileId);
+
+    List<EmailFundNavDO> selectNotMappingNav(@Param("fundName") String sourceFundName);
+
+    void batchUpdate(@Param("navList") List<EmailFundNavDO> fundNavDOList);
 }

+ 9 - 0
service-base/src/main/java/com/simuwang/base/mapper/FundAliasMapper.java

@@ -1,6 +1,7 @@
 package com.simuwang.base.mapper;
 
 import com.simuwang.base.pojo.dos.FundAliasDO;
+import com.simuwang.base.pojo.dto.query.FundAliasPageQuery;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -15,5 +16,13 @@ public interface FundAliasMapper {
 
     List<FundAliasDO> queryFundByRegisterNumber(@Param("registerNumber") String registerNumber);
 
+    List<FundAliasDO> searchFundAlias(FundAliasPageQuery fundAliasPageQuery);
+
+    long countFundAlias(FundAliasPageQuery fundAliasPageQuery);
+
+    FundAliasDO searchFundAliasById(@Param("id") Integer id);
+
+    void saveFundAlias(FundAliasDO fundAliasDO);
+
     void insert(@Param("fundName") String fundName, @Param("registerNumber") String registerNumber);
 }

+ 4 - 0
service-base/src/main/java/com/simuwang/base/mapper/FundInfoMapper.java

@@ -33,4 +33,8 @@ public interface FundInfoMapper {
     long countFundInfo(FundInfoPageQuery fundInfoPageQuery);
 
     String getFundNameByFundId(String fundId);
+
+    String queryFundIdByName(@Param("fundName") String fundName);
+
+    String getCompanyNameByFundId(@Param("fundId") String fundId);
 }

+ 20 - 0
service-base/src/main/java/com/simuwang/base/mapper/FundNavAssetMapper.java

@@ -0,0 +1,20 @@
+package com.simuwang.base.mapper;
+
+import com.simuwang.base.pojo.dos.FundNavAssetDO;
+import com.simuwang.base.pojo.dto.query.FundNavAssetPageQuery;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * FileName: FundNavAssetMapper
+ * Author:   chenjianhua
+ * Date:     2024/9/15 17:01
+ * Description: ${DESCRIPTION}
+ */
+@Mapper
+public interface FundNavAssetMapper {
+    List<FundNavAssetDO> searchNavAssetList(FundNavAssetPageQuery fundNavAssetPageQuery);
+
+    long countNavAssetList(FundNavAssetPageQuery fundNavAssetPageQuery);
+}

+ 3 - 1
service-base/src/main/java/com/simuwang/base/mapper/MailboxInfoMapper.java

@@ -23,9 +23,11 @@ public interface MailboxInfoMapper extends BaseMapper<MailboxInfoDO> {
 
     void deleteEmailConfigByIds(@Param("ids") List<Integer> split);
 
-    MailboxInfoDO checkEmailUnique(@Param("email") String email);
+    MailboxInfoDO selectEmailConfigByEmail(@Param("email") String email);
 
     long countEmailConfig(EmailPageQuery emailPageQuery);
 
     MailboxInfoDO searchEmailConfigById(@Param("id")Integer id);
+
+    List<MailboxInfoDO> getAll();
 }

+ 6 - 0
service-base/src/main/java/com/simuwang/base/mapper/NavMapper.java

@@ -16,4 +16,10 @@ public interface NavMapper {
     List<String> queryFundNavByDate(@Param("fundId") String fundId, @Param("priceDateList") List<String> priceDateList);
 
     NavDO queryFundNav(NavDO navDO);
+
+    void saveNav( NavDO navDO);
+
+    void updateNav(NavDO navDO);
+
+    void deleteNav(@Param("fundId")String fundId, @Param("priceDate")String priceDate);
 }

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

@@ -0,0 +1,87 @@
+package com.simuwang.base.pojo.dos;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.simuwang.base.pojo.vo.DeletionInfoVO;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * FileName: DeletionInfoDO
+ * Author:   chenjianhua
+ * Date:     2024/9/17 18:45
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class DeletionInfoDO {
+    /**
+     * 主键Id
+     */
+    private Integer id;
+    /**
+     * 基金ID
+     */
+    private String fundId;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 公司名称
+     */
+    private String companyName;
+    /**
+     * 缺失类型
+     */
+    private Integer deletionType;
+    /**
+     * 缺失日期
+     */
+    private String deletionDate;
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * 缺失数量
+     */
+    private Integer deletionNum;
+    /**
+     * 已处理数量
+     */
+    private Integer processedNum;
+
+    /**
+     * 是否有效:0-无效,1-有效
+     */
+    private Integer isvalid;
+    /**
+     * 创建者Id
+     */
+    private Integer creatorId;
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+    /**
+     * 修改者Id
+     */
+    private Integer updaterId;
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    public DeletionInfoVO toVO() {
+        DeletionInfoVO deletionInfoVO = new DeletionInfoVO();
+        deletionInfoVO.setFundId(this.fundId);
+        deletionInfoVO.setFundName(this.fundName);
+        deletionInfoVO.setCompanyName(this.companyName);
+        deletionInfoVO.setDeletionType(this.deletionType);
+        deletionInfoVO.setDeletionNum(this.deletionNum);
+        deletionInfoVO.setProcessedNum(this.processedNum);
+        return deletionInfoVO;
+    }
+}

+ 70 - 0
service-base/src/main/java/com/simuwang/base/pojo/dos/DistributionDO.java

@@ -0,0 +1,70 @@
+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 lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * FileName: DistributionDO
+ * Author:   chenjianhua
+ * Date:     2024/9/15 13:54
+ * Description: ${DESCRIPTION}
+ */
+@Data
+@TableName("distribution")
+public class DistributionDO {
+    /**
+     * 主键Id
+     */
+    @TableId(value = "id")
+    private Integer id;
+    /**
+     * 基金id
+     */
+    @TableField(value = "fund_id")
+    private String fundId;
+    /**
+     * 分红日期
+     */
+    @TableField(value = "distribute_date")
+    private Date distributeDate;
+    /**
+     * 基金分配类型标志:-1-其他,1-分红,2-拆分,3-业绩报酬,4-注资,5-撤资
+     */
+    @TableField(value = "distribute_type")
+    private Integer distributeType;
+    /**
+     * 分红/拆分比例
+     */
+    @TableField(value = "distribution")
+    private BigDecimal distribution;
+    /**
+     * 是否有效:0-无效,1-有效
+     */
+    @TableField(value = "isvalid")
+    private Integer isvalid;
+    /**
+     * 创建者Id
+     */
+    @TableField(value = "creatorid")
+    private Integer creatorId;
+    /**
+     * 创建时间
+     */
+    @TableField(value = "createtime")
+    private Date createTime;
+    /**
+     * 修改者Id
+     */
+    @TableField(value = "updaterid")
+    private Integer updaterId;
+    /**
+     * 更新时间
+     */
+    @TableField(value = "updatetime")
+    private Date updateTime;
+}

+ 98 - 0
service-base/src/main/java/com/simuwang/base/pojo/dos/DistributionTablePageDO.java

@@ -0,0 +1,98 @@
+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.DistributionTablePageVO;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * FileName: DistributionDO
+ * Author:   chenjianhua
+ * Date:     2024/9/15 13:54
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class DistributionTablePageDO{
+    /**
+     * 主键Id
+     */
+    private Integer id;
+    /**
+     * 基金id
+     */
+    private String fundId;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 备案编码
+     */
+    private String registerNumber;
+    /**
+     * 公司名称
+     */
+    private String companyName;
+    /**
+     * 分红日期
+     */
+    private Date distributeDate;
+    /**
+     * 基金分配类型标志:-1-其他,1-分红,2-拆分,3-业绩报酬,4-注资,5-撤资
+     */
+    private Integer distributeType;
+    /**
+     * 分红/拆分比例
+     */
+    private BigDecimal distribution;
+    /**
+     * 单位净值
+     */
+    private BigDecimal nav;
+    /**
+     * 累计单位净值
+     */
+    private BigDecimal cumulativeNavWithdrawal;
+    /**
+     * 是否有效:0-无效,1-有效
+     */
+    private Integer isvalid;
+    /**
+     * 创建者Id
+     */
+    private Integer creatorId;
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+    /**
+     * 修改者Id
+     */
+    private Integer updaterId;
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    public DistributionTablePageVO toVo() {
+        DistributionTablePageVO vo = new DistributionTablePageVO();
+        vo.setId(this.id);
+        vo.setFundId(this.fundId);
+        vo.setFundName(this.fundName);
+        vo.setCompanyName(this.companyName);
+        vo.setDistribution(this.distribution);
+        vo.setDistributeType(this.distributeType);
+        vo.setDistributeDate(DateUtils.format(this.distributeDate,DateUtils.YYYY_MM_DD));
+        vo.setNav(this.nav);
+        vo.setCumulativeNavWithdrawal(this.cumulativeNavWithdrawal);
+        vo.setRegisterNumber(this.registerNumber);
+        vo.setUpdateTime(DateUtils.format(this.updateTime,DateUtils.YYYY_MM_DD_HH_MM_SS));
+        vo.setIsvalid(this.isvalid);
+        return vo;
+    }
+}

+ 1 - 1
service-base/src/main/java/com/simuwang/base/pojo/dos/EmailFundAssetDO.java

@@ -64,7 +64,7 @@ public class EmailFundAssetDO {
     @TableField(value = "is_stored")
     private Integer isStored;
     /**
-     * 异常情况:1-无异常,2-资产净值<=0
+     * 异常情况:1-无异常,2-资产净值<=0,3-未匹配基金
      */
     @TableField(value = "exception_status")
     private Integer exceptionStatus;

+ 12 - 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.pojo.vo.FundAliasVO;
 import lombok.Data;
 
 import java.util.Date;
@@ -65,4 +66,15 @@ public class FundAliasDO {
      */
     @TableField(value = "updatetime")
     private Date updateTime;
+
+    public FundAliasVO toVo() {
+        FundAliasVO fundAliasVO = new FundAliasVO();
+        fundAliasVO.setId(this.id);
+        fundAliasVO.setSourceFundName(this.sourceFundName);
+        fundAliasVO.setSourceRegisterNumber(this.sourceRegisterNumber);
+        fundAliasVO.setTargetFundId(this.targetFundId);
+        fundAliasVO.setTargetFundName(this.targetFundName);
+        fundAliasVO.setTargetRegisterNumber(this.targetRegisterNumber);
+        return fundAliasVO;
+    }
 }

+ 69 - 0
service-base/src/main/java/com/simuwang/base/pojo/dos/FundDeletionInfoDO.java

@@ -0,0 +1,69 @@
+package com.simuwang.base.pojo.dos;
+
+import com.simuwang.base.pojo.dto.ExcelDeletionInfoDTO;
+import com.simuwang.base.pojo.vo.DeletionInfoVO;
+import com.simuwang.base.pojo.vo.FundDeletionInfoVO;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * FileName: DeletionInfoDO
+ * Author:   chenjianhua
+ * Date:     2024/9/17 18:45
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class FundDeletionInfoDO {
+    /**
+     * 主键Id
+     */
+    private Integer id;
+    /**
+     * 基金ID
+     */
+    private String fundId;
+    /**
+     * 缺失类型
+     */
+    private Integer deletionType;
+    /**
+     * 缺失日期
+     */
+    private String deletionDate;
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 是否有效:0-无效,1-有效
+     */
+    private Integer isvalid;
+    /**
+     * 创建者Id
+     */
+    private Integer creatorId;
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+    /**
+     * 修改者Id
+     */
+    private Integer updaterId;
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    public FundDeletionInfoVO toVO() {
+        FundDeletionInfoVO deletionInfoVO = new FundDeletionInfoVO();
+        deletionInfoVO.setId(this.id);
+        deletionInfoVO.setFundId(this.fundId);
+        deletionInfoVO.setDeletionType(this.deletionType);
+        deletionInfoVO.setDeletionDate(this.deletionDate);
+        deletionInfoVO.setRemark(this.remark);
+        return deletionInfoVO;
+    }
+}

+ 63 - 0
service-base/src/main/java/com/simuwang/base/pojo/dos/FundNavAssetDO.java

@@ -0,0 +1,63 @@
+package com.simuwang.base.pojo.dos;
+
+import com.simuwang.base.common.util.DateUtils;
+import com.simuwang.base.pojo.vo.FundNavAssetVO;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * FileName: FundNavAssetVO
+ * Author:   chenjianhua
+ * Date:     2024/9/15 16:49
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class FundNavAssetDO {
+    /**
+     * 基金ID
+     */
+    private String fundId;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 净值日期
+     */
+    private Date priceDate;
+    /**
+     * 单位净值
+     */
+    private BigDecimal nav;
+    /**
+     * 累计净值
+     */
+    private BigDecimal cumulativeNavWithdrawal;
+    /**
+     * 资产份额
+     */
+    private BigDecimal assetShare;
+    /**
+     * 资产净值
+     */
+    private BigDecimal assetNet;
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    public FundNavAssetVO toVo() {
+        FundNavAssetVO vo = new FundNavAssetVO();
+        vo.setFundId(this.fundId);
+        vo.setFundName(this.fundName);
+        vo.setPriceDate(DateUtils.format(this.priceDate,DateUtils.YYYY_MM_DD));
+        vo.setNav(this.nav);
+        vo.setCumulativeNavWithdrawal(this.cumulativeNavWithdrawal);
+        vo.setAssetNet(this.assetNet);
+        vo.setAssetShare(this.assetShare);
+        vo.setUpdateTime(DateUtils.format(this.updateTime,DateUtils.YYYY_MM_DD_HH_MM_SS));
+        return vo;
+    }
+}

+ 1 - 1
service-base/src/main/java/com/simuwang/base/pojo/dos/FundReportFrequencyDO.java

@@ -41,7 +41,7 @@ public class FundReportFrequencyDO {
      * 频率备注
      */
     @TableField(value = "frequency_remark")
-    private Integer frequencyRemark;
+    private String frequencyRemark;
     /**
      * 创建者Id
      */

+ 43 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/DistributionExcelData.java

@@ -0,0 +1,43 @@
+package com.simuwang.base.pojo.dto;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * FileName: DistributionExcelData
+ * Author:   chenjianhua
+ * Date:     2024/9/16 10:57
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class DistributionExcelData {
+    /**
+     * 基金ID
+     */
+    private String fundId;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 净值日期
+     */
+    private String priceDate;
+    /**
+     * 单位净值
+     */
+    private String nav;
+    /**
+     * 累计净值
+     */
+    private String cumulativeNavWithdrawal;
+    /**
+     * 分红方式
+     */
+    private String distributeType;
+    /**
+     * 分红/拆分比例
+     */
+    private String distribution;
+}

+ 37 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/ExcelDeletionInfoDTO.java

@@ -0,0 +1,37 @@
+package com.simuwang.base.pojo.dto;
+
+import lombok.Data;
+
+/**
+ * FileName: ExcelDeletionInfoDTO
+ * Author:   chenjianhua
+ * Date:     2024/9/17 22:13
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class ExcelDeletionInfoDTO {
+    /**
+     * 基金ID
+     */
+    private String fundId;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 公司名称
+     */
+    private String companyName;
+    /**
+     * 缺失类型
+     */
+    private String deletionType;
+    /**
+     * 缺失日期
+     */
+    private String deletionDate;
+    /**
+     * 备注
+     */
+    private String remark;
+}

+ 41 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/NavAssetExcelData.java

@@ -0,0 +1,41 @@
+package com.simuwang.base.pojo.dto;
+
+import lombok.Data;
+
+/**
+ * FileName: DistributionExcelData
+ * Author:   chenjianhua
+ * Date:     2024/9/16 10:57
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class NavAssetExcelData {
+    /**
+     * 基金ID
+     */
+    private String fundId;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 净值日期
+     */
+    private String priceDate;
+    /**
+     * 单位净值
+     */
+    private String nav;
+    /**
+     * 累计净值
+     */
+    private String cumulativeNavWithdrawal;
+    /**
+     * 资产规模
+     */
+    private String assetNet;
+    /**
+     * 资产净值
+     */
+    private String assetShare;
+}

+ 49 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/QuartzBean.java

@@ -0,0 +1,49 @@
+package com.simuwang.base.pojo.dto;
+
+/**
+ * FileName: QuartzBean
+ * Author:   chenjianhua
+ * Date:     2024/9/17 10:26
+ * Description: ${DESCRIPTION}
+ */
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class QuartzBean implements Serializable {
+    /**
+     * 任务id
+     */
+    private String id;
+
+    /**
+     * 任务名称
+     */
+    private String jobName;
+
+    /**
+     * 任务执行类
+     */
+    private String jobClass;
+
+    /**
+     * 组名
+     */
+    private String groupName;
+
+    /**
+     * 任务 参数信息
+     */
+    private String jobParam;
+
+    /**
+     * 任务状态 启动还是暂停
+     */
+    private Integer status;
+
+    /**
+     * 任务运行时间表达式
+     */
+    private String cronExpression;
+}

+ 73 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/query/DeletionPageQuery.java

@@ -0,0 +1,73 @@
+package com.simuwang.base.pojo.dto.query;
+
+import com.simuwang.base.common.support.query.PageQuery;
+import lombok.Data;
+
+/**
+ * FileName: DeletionPageQuery
+ * Author:   chenjianhua
+ * Date:     2024/9/17 18:19
+ * Description: ${DESCRIPTION}
+ */
+public class DeletionPageQuery extends PageQuery {
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 公司名称
+     */
+    private String companyName;
+    /**
+     * 缺失类型,-1对应全部,1-净值缺失,2-对应规模缺失,3-对应分红缺失
+     */
+    private Integer deletionType;
+    /**
+     * 未处理缺失数量开始区间
+     */
+    private Integer deletionStartNum;
+    /**
+     * 未处理缺失数量结束区间
+     */
+    private Integer deletionEndNum;
+
+    public String getFundName() {
+        return fundName;
+    }
+
+    public void setFundName(String fundName) {
+        this.fundName = fundName;
+    }
+
+    public String getCompanyName() {
+        return companyName;
+    }
+
+    public void setCompanyName(String companyName) {
+        this.companyName = companyName;
+    }
+
+    public Integer getDeletionType() {
+        return deletionType;
+    }
+
+    public void setDeletionType(Integer deletionType) {
+        this.deletionType = deletionType;
+    }
+
+    public Integer getDeletionStartNum() {
+        return deletionStartNum;
+    }
+
+    public void setDeletionStartNum(Integer deletionStartNum) {
+        this.deletionStartNum = deletionStartNum;
+    }
+
+    public Integer getDeletionEndNum() {
+        return deletionEndNum;
+    }
+
+    public void setDeletionEndNum(Integer deletionEndNum) {
+        this.deletionEndNum = deletionEndNum;
+    }
+}

+ 73 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/query/DistributionPageQuery.java

@@ -0,0 +1,73 @@
+package com.simuwang.base.pojo.dto.query;
+
+
+import com.simuwang.base.common.support.query.PageQuery;
+
+/**
+ * @author wangzaijun
+ * @date 2024/9/13 13:38
+ * @description 角色用户关联的分页接口请求参数
+ */
+public class DistributionPageQuery extends PageQuery {
+
+    /**
+     * 公司名称
+     */
+    private String fundName;
+    /**
+     * 公司名称
+     */
+    private String companyName;
+    /**
+     * 分红方式
+     */
+    private Integer distributeType;
+    /**
+     * 分红开始日期
+     */
+    private String startDate;
+    /**
+     * 分红结束日期
+     */
+    private String endDate;
+
+    public String getFundName() {
+        return fundName;
+    }
+
+    public void setFundName(String fundName) {
+        this.fundName = fundName;
+    }
+
+    public String getCompanyName() {
+        return companyName;
+    }
+
+    public void setCompanyName(String companyName) {
+        this.companyName = companyName;
+    }
+
+    public Integer getDistributeType() {
+        return distributeType;
+    }
+
+    public void setDistributeType(Integer distributeType) {
+        this.distributeType = distributeType;
+    }
+
+    public String getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public String getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+}

+ 34 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/query/FundAliasPageQuery.java

@@ -0,0 +1,34 @@
+package com.simuwang.base.pojo.dto.query;
+
+
+import com.simuwang.base.common.support.query.PageQuery;
+
+/**
+ * @author wangzaijun
+ * @date 2024/9/13 13:38
+ * @description 角色用户关联的分页接口请求参数
+ */
+public class FundAliasPageQuery extends PageQuery {
+    /**
+     * 基金名称
+     */
+    private String fundName;
+
+    private String fundAliasName;
+
+    public String getFundName() {
+        return fundName;
+    }
+
+    public void setFundName(String fundName) {
+        this.fundName = fundName;
+    }
+
+    public String getFundAliasName() {
+        return fundAliasName;
+    }
+
+    public void setFundAliasName(String fundAliasName) {
+        this.fundAliasName = fundAliasName;
+    }
+}

+ 25 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/query/FundDeletionPageQuery.java

@@ -0,0 +1,25 @@
+package com.simuwang.base.pojo.dto.query;
+
+import com.simuwang.base.common.support.query.PageQuery;
+
+/**
+ * FileName: FundDeletionPageQuery
+ * Author:   chenjianhua
+ * Date:     2024/9/17 21:00
+ * Description: ${DESCRIPTION}
+ */
+public class FundDeletionPageQuery extends PageQuery {
+
+    /**
+     * 基金ID
+     */
+    private String fundId;
+
+    public String getFundId() {
+        return fundId;
+    }
+
+    public void setFundId(String fundId) {
+        this.fundId = fundId;
+    }
+}

+ 35 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/query/FundNavAssetPageQuery.java

@@ -0,0 +1,35 @@
+package com.simuwang.base.pojo.dto.query;
+
+import com.simuwang.base.common.support.query.PageQuery;
+import lombok.Data;
+
+/**
+ * FileName: FundNavAssetPageQuery
+ * Author:   chenjianhua
+ * Date:     2024/9/15 16:55
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class FundNavAssetPageQuery extends PageQuery {
+
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 净值开始日期
+     */
+    private String priceStartDate;
+    /**
+     * 净值结束日期
+     */
+    private String priceEndDate;
+    /**
+     * 更新开始日期
+     */
+    private String updateStartDate;
+    /**
+     * 更新结束日期
+     */
+    private String updateEndDate;
+}

+ 1 - 1
service-base/src/main/java/com/simuwang/base/pojo/vo/CompanyEmailConfigVO.java

@@ -39,6 +39,6 @@ public class CompanyEmailConfigVO {
     /**
      * 备注信息
      */
-    private String remark;
+    private String sendRemark;
 
 }

+ 20 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/CompanyIdListVO.java

@@ -0,0 +1,20 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * FileName: CompanyIdVO
+ * Author:   chenjianhua
+ * Date:     2024/9/15 16:12
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class CompanyIdListVO {
+
+    /**
+     * 公司ID
+     */
+    private List<String> companyIdList;
+}

+ 18 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/CompanyIdVO.java

@@ -0,0 +1,18 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+/**
+ * FileName: CompanyIdVO
+ * Author:   chenjianhua
+ * Date:     2024/9/15 16:12
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class CompanyIdVO {
+
+    /**
+     * 公司ID
+     */
+    private String companyId;
+}

+ 47 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/DeletionInfoVO.java

@@ -0,0 +1,47 @@
+package com.simuwang.base.pojo.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * FileName: DeletionInfoDO
+ * Author:   chenjianhua
+ * Date:     2024/9/17 18:45
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class DeletionInfoVO {
+    /**
+     * 基金ID
+     */
+    private String fundId;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 公司名称
+     */
+    private String companyName;
+    /**
+     * 缺失类型
+     */
+    private Integer deletionType;
+    /**
+     * 缺失数量
+     */
+    private Integer deletionNum;
+    /**
+     * 已处理数量
+     */
+    private Integer processedNum;
+    /**
+     * 最新缺失日期
+     */
+    private String lastDeletionDate;
+
+}

+ 67 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/DistributionTablePageVO.java

@@ -0,0 +1,67 @@
+package com.simuwang.base.pojo.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * FileName: DistributionDO
+ * Author:   chenjianhua
+ * Date:     2024/9/15 13:54
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class DistributionTablePageVO {
+    /**
+     * 主键Id
+     */
+    private Integer id;
+    /**
+     * 基金id
+     */
+    private String fundId;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 备案编码
+     */
+    private String registerNumber;
+    /**
+     * 公司名称
+     */
+    private String companyName;
+    /**
+     * 分红日期
+     */
+    private String distributeDate;
+    /**
+     * 基金分配类型标志:-1-其他,1-分红,2-拆分,3-业绩报酬,4-注资,5-撤资
+     */
+    private Integer distributeType;
+    /**
+     * 分红/拆分比例
+     */
+    private BigDecimal distribution;
+    /**
+     * 单位净值
+     */
+    private BigDecimal nav;
+    /**
+     * 累计单位净值
+     */
+    private BigDecimal cumulativeNavWithdrawal;
+    /**
+     * 是否有效:0-无效,1-有效
+     */
+    private Integer isvalid;
+    /**
+     * 更新时间
+     */
+    private String updateTime;
+}

+ 48 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/DistributionVO.java

@@ -0,0 +1,48 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * FileName: DistributionDO
+ * Author:   chenjianhua
+ * Date:     2024/9/15 13:54
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class DistributionVO {
+    /**
+     * 主键Id
+     */
+    private Integer id;
+    /**
+     * 基金id
+     */
+    private String fundId;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 分红日期
+     */
+    private String distributeDate;
+    /**
+     * 基金分配类型标志:-1-其他,1-分红,2-拆分,3-业绩报酬,4-注资,5-撤资
+     */
+    private Integer distributeType;
+    /**
+     * 分红/拆分比例
+     */
+    private BigDecimal distribution;
+    /**
+     * 单位净值
+     */
+    private BigDecimal nav;
+    /**
+     * 累计单位净值
+     */
+    private BigDecimal cumulativeNavWithdrawal;
+}

+ 38 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/ExcelFailDataVO.java

@@ -0,0 +1,38 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+/**
+ * FileName: ExcelSuccessDataVO
+ * Author:   chenjianhua
+ * Date:     2024/9/16 12:41
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class ExcelFailDataVO {
+
+    /**
+     * 行号
+     */
+    private Integer rowNum;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 净值日期
+     */
+    private String priceDate;
+    /**
+     * 分红类型
+     */
+    private String distributeType;
+    /**
+     * 单位分红/拆分比例
+     */
+    private String distribution;
+    /**
+     * 失败原因
+     */
+    private String failReason;
+}

+ 38 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/ExcelNavAssetFailDataVO.java

@@ -0,0 +1,38 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+/**
+ * FileName: ExcelSuccessDataVO
+ * Author:   chenjianhua
+ * Date:     2024/9/16 12:41
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class ExcelNavAssetFailDataVO {
+
+    /**
+     * 行号
+     */
+    private Integer rowNum;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 净值日期
+     */
+    private String priceDate;
+    /**
+     * 分红类型
+     */
+    private String nav;
+    /**
+     * 单位分红/拆分比例
+     */
+    private String cumulativeNavWithdrawal;
+    /**
+     * 失败原因
+     */
+    private String failReason;
+}

+ 38 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/ExcelNavAssetSuccessDataVO.java

@@ -0,0 +1,38 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+/**
+ * FileName: ExcelSuccessDataVO
+ * Author:   chenjianhua
+ * Date:     2024/9/16 12:41
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class ExcelNavAssetSuccessDataVO {
+
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 净值日期
+     */
+    private String priceDate;
+    /**
+     * 分红类型
+     */
+    private String nav;
+    /**
+     * 单位分红/拆分比例
+     */
+    private String cumulativeNavWithdrawal;
+    /**
+     * 资产规模
+     */
+    private String assetShare;
+    /**
+     * 资产净值
+     */
+    private String assetNet;
+}

+ 30 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/ExcelSuccessDataVO.java

@@ -0,0 +1,30 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+/**
+ * FileName: ExcelSuccessDataVO
+ * Author:   chenjianhua
+ * Date:     2024/9/16 12:41
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class ExcelSuccessDataVO {
+
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 净值日期
+     */
+    private String priceDate;
+    /**
+     * 分红类型
+     */
+    private String distributeType;
+    /**
+     * 单位分红
+     */
+    private String distribution;
+}

+ 50 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/FundAliasVO.java

@@ -0,0 +1,50 @@
+package com.simuwang.base.pojo.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class FundAliasVO {
+    /**
+     * 主键Id
+     */
+    private Integer id;
+    /**
+     * 邮件解析基金名称
+     */
+    private String sourceFundName;
+    /**
+     * 邮件解析基金的备案编码
+     */
+    private String sourceRegisterNumber;
+    /**
+     * 匹配的源数据基金名称
+     */
+    private String targetFundName;
+    /**
+     * 匹配的源基金ID
+     */
+    private String targetFundId;
+    /**
+     * 匹配的源备案编码
+     */
+    private String targetRegisterNumber;
+
+    /**
+     * 未匹配净值数量
+     */
+    private Integer navTotal;
+    /**
+     * 未匹配规模数量
+     */
+    private Integer assetTotal;
+
+    /**
+     * 管理人
+     */
+    private String companyName;
+}

+ 38 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/FundDeletionInfoVO.java

@@ -0,0 +1,38 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+/**
+ * FileName: DeletionInfoDO
+ * Author:   chenjianhua
+ * Date:     2024/9/17 18:45
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class FundDeletionInfoVO {
+    /**
+     * ID
+     */
+    private Integer id;
+    /**
+     * 基金ID
+     */
+    private String fundId;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 缺失类型
+     */
+    private Integer deletionType;
+    /**
+     * 缺失日期
+     */
+    private String deletionDate;
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 25 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/FundDeletionRemarkVO.java

@@ -0,0 +1,25 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * FileName: DeletionInfoDO
+ * Author:   chenjianhua
+ * Date:     2024/9/17 18:45
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class FundDeletionRemarkVO {
+
+    /**
+     * (基金ID-缺失类型)列表
+     */
+    private List<FundDeletionTypeVO> FundDeletionTypeList;
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 21 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/FundDeletionTypeVO.java

@@ -0,0 +1,21 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+/**
+ * FileName: FundDeletionTypeVO
+ * Author:   chenjianhua
+ * Date:     2024/9/17 21:31
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class FundDeletionTypeVO {
+    /**
+     * 基金ID
+     */
+    private String fundId;
+    /**
+     * 缺失类型
+     */
+    private Integer deletionType;
+}

+ 19 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/FundIdListVO.java

@@ -0,0 +1,19 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * FileName: DeletionInfoDO
+ * Author:   chenjianhua
+ * Date:     2024/9/17 18:45
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class FundIdListVO {
+    /**
+     * 基金ID列表
+     */
+    private List<String> fundIdList;
+}

+ 19 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/FundNavAssetDelListVO.java

@@ -0,0 +1,19 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * FileName: FundNavAssetDelVO
+ * Author:   chenjianhua
+ * Date:     2024/9/16 14:24
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class FundNavAssetDelListVO {
+    /**
+     * 批量删除净值规模,按照基金ID和净值日期
+     */
+    private List<FundNavAssetDelVO> fundNavAssetDelVOList;
+}

+ 21 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/FundNavAssetDelVO.java

@@ -0,0 +1,21 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+/**
+ * FileName: FundNavAssetDelVO
+ * Author:   chenjianhua
+ * Date:     2024/9/16 14:24
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class FundNavAssetDelVO {
+    /**
+     * 基金DI
+     */
+    private String fundId;
+    /**
+     * 净值日期
+     */
+    private String priceDate;
+}

+ 47 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/FundNavAssetVO.java

@@ -0,0 +1,47 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * FileName: FundNavAssetVO
+ * Author:   chenjianhua
+ * Date:     2024/9/15 16:49
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class FundNavAssetVO {
+    /**
+     * 基金ID
+     */
+    private String fundId;
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 净值日期
+     */
+    private String priceDate;
+    /**
+     * 单位净值
+     */
+    private BigDecimal nav;
+    /**
+     * 累计净值
+     */
+    private BigDecimal cumulativeNavWithdrawal;
+    /**
+     * 资产份额
+     */
+    private BigDecimal assetShare;
+    /**
+     * 资产净值
+     */
+    private BigDecimal assetNet;
+    /**
+     * 更新时间
+     */
+    private String updateTime;
+}

+ 1 - 1
service-base/src/main/java/com/simuwang/base/pojo/vo/FundReportFrequencyVO.java

@@ -30,5 +30,5 @@ public class FundReportFrequencyVO {
     /**
      * 频率备注
      */
-    private Integer frequencyRemark;
+    private String frequencyRemark;
 }

+ 20 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/IdListVO.java

@@ -0,0 +1,20 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * FileName: IdListVO
+ * Author:   chenjianhua
+ * Date:     2024/9/15 16:03
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class IdListVO {
+
+    /**
+     * 批量删除的ID集合,单个也是
+     */
+    private List<Integer> idList;
+}

+ 0 - 12
service-base/src/main/java/com/simuwang/base/pojo/vo/IdVO.java

@@ -17,16 +17,4 @@ public class IdVO {
      * 主键ID
      */
     private Integer id;
-    /**
-     * 公司ID
-     */
-    private String companyId;
-    /**
-     * 批量ID集合
-     */
-    private List<Integer> idList;
-    /**
-     * 批量CompanyId集合
-     */
-    private List<String> companyIdList;
 }

+ 6 - 2
service-base/src/main/java/com/simuwang/base/pojo/vo/OpenStatusVO.java

@@ -10,8 +10,12 @@ import lombok.Data;
  */
 @Data
 public class OpenStatusVO {
-
+    /**
+     * 是否开启,0-不开启,1-开启
+     */
     private Integer openStatus;
-
+    /**
+     * 主键ID
+     */
     private Integer id;
 }

+ 28 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/ParseParamVO.java

@@ -0,0 +1,28 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * FileName: ParseParamVO
+ * Author:   chenjianhua
+ * Date:     2024/9/17 13:54
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class ParseParamVO {
+    /**
+     * 选择的ID列表
+     */
+    private List<Integer> idList;
+    /**
+     * 解析开始日期
+     */
+    private String startDate;
+    /**
+     * 解析结束日期
+     */
+    private String endDate;
+
+}

+ 3 - 0
service-base/src/main/resources/mapper/AssetMapper.xml

@@ -37,6 +37,9 @@
             and price_date = #{itemDo.priceDate}
         </foreach>
     </insert>
+    <delete id="deleteAsset">
+        update PPW_EMAIL.asset set isvalid =0,updatetime=sysdate() where fund_id=#{fundId} and price_date=#{priceDate} and isvalid=1
+    </delete>
 
     <select id="queryFundNavByDate" resultType="java.lang.String">
         select price_date

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

@@ -33,7 +33,7 @@
             <if test="companyId != null and companyId != ''">company_id=#{companyId},</if>
             <if test="companyName != null and companyName != ''">company_name=#{companyName},</if>
             <if test="email != null and email != ''">email=#{email},</if>
-            <if test="openStatus != null and openStatus != ''">open_status=#{openStatus},</if>
+            <if test="openStatus != null">open_status=#{openStatus},</if>
             <if test="remark != null and remark != ''">remark=#{remark},</if>
             <if test="updaterId != null and updaterId != ''">updaterid=#{updaterId},</if>
             <if test="updateTime != null">updatetime=#{updateTime},</if>
@@ -84,7 +84,7 @@
         <result column="company_name" property="companyName"/>
         <result column="email" property="email"/>
         <result column="open_status" property="openStatus"/>
-        <result column="remark" property="remark"/>
+        <result column="remark" property="sendRemark"/>
     </resultMap>
     <select id="searchEmailConfig" resultMap="BaseVOMap">
         select id,company_id,company_name,email,open_status,remark from
@@ -98,4 +98,8 @@
         select id,company_id,company_name,email,open_status,remark from
             PPW_EMAIL.company_email_config where isvalid =1 and company_id=#{companyId}
     </select>
+    <select id="selectEmailConfig"  resultMap="BaseResultMap">
+        select id,company_id,company_name,email,open_status,remark from
+            PPW_EMAIL.company_email_config where isvalid =1 and company_id=#{companyId} and email=#{email}
+    </select>
 </mapper>

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

@@ -47,7 +47,7 @@
         ON cesh.email = maxce.email
         WHERE cec.isvalid = 1 and c.isvalid=1
         <if test="companyName != null and companyName !=''">
-            and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%'))
+            and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%') or c.register_number like concat('%',#{companyName},'%'))
         </if>
         <if test="email != null and email !=''">
             and cec.email like concat('%',#{email},'%')
@@ -74,7 +74,7 @@
         ON cesh.email = maxce.email
         WHERE cec.isvalid = 1 and c.isvalid=1
         <if test="companyName != null and companyName !=''">
-            and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%'))
+            and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%') or c.register_number like concat('%',#{companyName},'%'))
         </if>
         <if test="email != null and email !=''">
             and cec.email like concat('%',#{email},'%')

+ 195 - 0
service-base/src/main/resources/mapper/DeletionInfoMapper.xml

@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.simuwang.base.mapper.DeletionInfoMapper">
+    <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.DeletionInfoDO">
+        <id column="id" property="id"/>
+        <result column="fund_id" property="fundId"/>
+        <result column="deletion_date" property="deletionDate"/>
+        <result column="deletion_type" property="deletionType"/>
+        <result column="company_name" property="companyName"/>
+        <result column="fund_name" property="fundName"/>
+        <result column="deletion_num" property="deletionNum"/>
+        <result column="processed_num" property="processedNum"/>
+        <result column="isvalid" property="isvalid"/>
+        <result column="creatorid" property="creatorId"/>
+        <result column="createtime" property="createTime"/>
+        <result column="updaterid" property="updaterId"/>
+        <result column="updatetime" property="updateTime"/>
+    </resultMap>
+    <update id="update" parameterType="com.simuwang.base.pojo.dos.FundDeletionInfoDO">
+        update PPW_EMAIL.deletion_info set fund_id=#{fundId},deletion_type=#{deletionType},deletion_date=#{deletionDate},remark=#{remark},updatetime=#{updateTime}
+        where id=#{id} and isvalid=1
+    </update>
+    <update id="batchUpdate">
+        <foreach collection="itemDoList" item="itemDo" index="index" open="" close="" separator=";">
+            update PPW_EMAIL.deletion_info
+            <set>
+                fund_id=#{itemDo.fundId},
+                deletion_type = #{itemDo.deletionType},
+                deletion_date=#{itemDo.deletionDate},
+                remark=#{itemDo.remark},
+                updatetime=#{itemDo.updateTime}
+            </set>
+            where isvalid = 1 and id=#{itemDo.id}
+        </foreach>
+    </update>
+    <update id="updateRemark">
+        update PPW_EMAIL.deletion_info set remark=#{remark} where fund_id=#{fundId} and deletion_type=#{deletionType} and isvalid=1
+    </update>
+    <select id="searchDeletionList" resultMap="BaseResultMap"
+            parameterType="com.simuwang.base.pojo.dto.query.DeletionPageQuery">
+        SELECT
+        d.fund_id,
+        info.fund_name,
+        c.company_name,
+        d.deletion_type,
+        ddn.deletion_num,
+        ddp.processed_num
+        FROM
+        PPW_EMAIL.deletion_info d
+        JOIN PPW_EMAIL.pvn_fund_info info
+        ON d.fund_id = info.fund_id
+        JOIN PPW_EMAIL.pvn_company_info c
+        ON info.trust_id = c.company_id
+        LEFT JOIN
+        (SELECT
+        di.fund_id,
+        di.deletion_type,
+        COUNT(di.fund_id) AS deletion_num
+        FROM
+        PPW_EMAIL.deletion_info di
+        WHERE di.isvalid = 1
+        AND di.remark IS NULL
+        GROUP BY di.fund_id,
+        di.deletion_type) ddn
+        ON ddn.fund_id = d.fund_id
+        AND d.deletion_type = ddn.deletion_type
+        LEFT JOIN
+        (SELECT
+        dip.fund_id,
+        dip.deletion_type,
+        COUNT(dip.fund_id) AS processed_num
+        FROM
+        PPW_EMAIL.deletion_info dip
+        WHERE dip.isvalid = 1
+        AND dip.remark IS NOT NULL
+        GROUP BY dip.fund_id,
+        dip.deletion_type) ddp
+        ON ddp.fund_id = d.fund_id
+        AND d.deletion_type = ddp.deletion_type
+        WHERE d.isvalid = 1
+        AND info.isvalid = 1
+        AND c.isvalid = 1
+        <if test="companyName != null and companyName !=''">
+            and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%'))
+        </if>
+        <if test="fundName != null and fundName !=''">
+            and (info.fund_name like concat('%',#{fundName},'%') or info.fund_short_name like concat('%',#{fundName},'%'))
+        </if>
+        <if test="deletionType != null and deletionType != -1">
+            and d.deletion_type=#{deletionType}
+        </if>
+        <if test="deletionStartNum != null and deletionStartNum != ''">
+            and ddn.deletion_num >= #{deletionStartNum}
+        </if>
+        <if test="deletionEndNum != null and deletionEndNum != ''">
+            and ddn.deletion_num <![CDATA[ <= ]]> #{deletionEndNum}
+        </if>
+        group by d.fund_id,d.deletion_type
+        limit #{offset},#{pageSize}
+    </select>
+    <select id="countDeletion" resultType="java.lang.Long"
+            parameterType="com.simuwang.base.pojo.dto.query.DeletionPageQuery">
+        select count(1) from (select distinct d.fund_id,d.deletion_type
+        FROM
+        PPW_EMAIL.deletion_info d
+        JOIN PPW_EMAIL.pvn_fund_info info
+        ON d.fund_id = info.fund_id
+        JOIN PPW_EMAIL.pvn_company_info c
+        ON info.trust_id = c.company_id
+        LEFT JOIN
+        (SELECT
+        di.fund_id,
+        di.deletion_type,
+        COUNT(di.fund_id) AS deletion_num
+        FROM
+        PPW_EMAIL.deletion_info di
+        WHERE di.isvalid = 1
+        AND di.remark IS NULL
+        GROUP BY di.fund_id,
+        di.deletion_type) ddn
+        ON ddn.fund_id = d.fund_id
+        AND d.deletion_type = ddn.deletion_type
+        LEFT JOIN
+        (SELECT
+        dip.fund_id,
+        dip.deletion_type,
+        COUNT(dip.fund_id) AS processed_num
+        FROM
+        PPW_EMAIL.deletion_info dip
+        WHERE dip.isvalid = 1
+        AND dip.remark IS NOT NULL
+        GROUP BY dip.fund_id,
+        dip.deletion_type) ddp
+        ON ddp.fund_id = d.fund_id
+        AND d.deletion_type = ddp.deletion_type
+        WHERE d.isvalid = 1
+        AND info.isvalid = 1
+        AND c.isvalid = 1
+        <if test="companyName != null and companyName !=''">
+            and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%'))
+        </if>
+        <if test="fundName != null and fundName !=''">
+            and (info.fund_name like concat('%',#{fundName},'%') or info.fund_short_name like concat('%',#{fundName},'%'))
+        </if>
+        <if test="deletionType != null and deletionType != -1">
+            and d.deletion_type=#{deletionType}
+        </if>
+        <if test="deletionStartNum != null and deletionStartNum != ''">
+            and ddn.deletion_num >= #{deletionStartNum}
+        </if>
+        <if test="deletionEndNum != null and deletionEndNum != ''">
+            and ddn.deletion_num <![CDATA[ <= ]]> #{deletionEndNum}
+        </if>
+        group by d.fund_id,d.deletion_type) 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}
+    </select>
+
+    <resultMap id="BaseMap" type="com.simuwang.base.pojo.dos.FundDeletionInfoDO">
+        <id column="id" property="id"/>
+        <result column="fund_id" property="fundId"/>
+        <result column="deletion_date" property="deletionDate"/>
+        <result column="deletion_type" property="deletionType"/>
+        <result column="remark" property="remark"/>
+        <result column="isvalid" property="isvalid"/>
+        <result column="creatorid" property="creatorId"/>
+        <result column="createtime" property="createTime"/>
+        <result column="updaterid" property="updaterId"/>
+        <result column="updatetime" property="updateTime"/>
+    </resultMap>
+    <select id="searchFundDeletionList" resultMap="BaseMap"
+            parameterType="com.simuwang.base.pojo.dto.query.FundDeletionPageQuery">
+        select id,fund_id,deletion_type,deletion_date,remark,isvalid,creatorid,updaterid,createtime,updatetime
+        from PPW_EMAIL.deletion_info where isvalid=1 and fund_id=#{fundId} and remark is null
+        limit #{offset},#{pageSize}
+    </select>
+    <select id="countFundDeletionList" resultType="java.lang.Long"
+            parameterType="com.simuwang.base.pojo.dto.query.FundDeletionPageQuery">
+        select count(1)
+            from PPW_EMAIL.deletion_info where isvalid=1 and fund_id=#{fundId} and remark is null
+    </select>
+    <select id="selectFundDeletionInfoVOList" resultType="com.simuwang.base.pojo.dos.FundDeletionInfoDO"
+            parameterType="java.util.List">
+        select id,fund_id,deletion_type,deletion_date,remark,isvalid,creatorid,updaterid,createtime,updatetime
+        from PPW_EMAIL.deletion_info where isvalid=1 and remark is null
+        <if test="fundIdList.size() > 0">
+            and fund_id in
+            <foreach collection="fundIdList" index="index" item="fundId" separator="," open="(" close=")">
+                #{fundId}
+            </foreach>
+        </if>
+    </select>
+
+</mapper>

+ 128 - 0
service-base/src/main/resources/mapper/DistributionMapper.xml

@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.simuwang.base.mapper.DistributionMapper">
+    <resultMap id="BaseMap" type="com.simuwang.base.pojo.dos.DistributionDO">
+        <id column="id" property="id"/>
+        <result column="fund_id" property="fundId"/>
+        <result column="distribute_date" property="distributeDate"/>
+        <result column="distribute_type" property="distributeType"/>
+        <result column="distribution" property="distribution"/>
+        <result column="isvalid" property="isvalid"/>
+        <result column="creatorid" property="creatorId"/>
+        <result column="createtime" property="createTime"/>
+        <result column="updaterid" property="updaterId"/>
+        <result column="updatetime" property="updateTime"/>
+    </resultMap>
+
+    <resultMap id="BasePageMap" type="com.simuwang.base.pojo.dos.DistributionTablePageDO">
+        <id column="id" property="id"/>
+        <result column="fund_name" property="fundName"/>
+        <result column="company_name" property="companyName"/>
+        <result column="register_number" property="registerNumber"/>
+        <result column="fund_id" property="fundId"/>
+        <result column="distribute_date" property="distributeDate"/>
+        <result column="distribute_type" property="distributeType"/>
+        <result column="distribution" property="distribution"/>
+        <result column="nav" property="nav"/>
+        <result column="cumulative_nav_withdrawal" property="cumulativeNavWithdrawal"/>
+        <result column="isvalid" property="isvalid"/>
+        <result column="creatorid" property="creatorId"/>
+        <result column="createtime" property="createTime"/>
+        <result column="updaterid" property="updaterId"/>
+        <result column="updatetime" property="updateTime"/>
+    </resultMap>
+    <insert id="saveDistribution" parameterType="com.simuwang.base.pojo.dos.DistributionDO">
+        insert into PPW_EMAIL.distribution(fund_id,distribute_date,distribute_type,distribution,isvalid,creatorid,createtime,updatetime,updaterid)
+        values (#{fundId},#{distributeDate},#{distributeType},#{distribution},#{isvalid},#{creatorId},#{createTime},#{updateTime},#{updaterId})
+    </insert>
+    <update id="updateDistributionById" parameterType="com.simuwang.base.pojo.dos.DistributionDO">
+        update PPW_EMAIL.distribution set distribute_date=#{distributeDate},distribute_type=#{distributeType},distribution=#{distribution},updatetime=#{updateTime}
+        where id=#{id} and isvalid =1
+    </update>
+    <delete id="deleteDistribution" parameterType="com.simuwang.base.pojo.vo.IdListVO">
+        update PPW_EMAIL.distribution set isvalid =0,updatetime=sysdate() where isvalid =1 and id in
+        <foreach item="id" collection="ids" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    <select id="searchDistributionList" resultMap="BasePageMap"
+            parameterType="com.simuwang.base.pojo.dto.query.DistributionPageQuery">
+        SELECT DISTINCT
+            d.id,
+            d.fund_id,
+            info.fund_name,
+            info.register_number,
+            c.company_name,
+            d.distribute_date,
+            d.distribute_type,
+            d.distribution,
+            n.nav,
+            n.cumulative_nav_withdrawal,
+            d.updatetime,
+            d.isvalid,
+            d.creatorid,
+            d.createtime,
+            d.updatetime
+        FROM
+            PPW_EMAIL.distribution d
+            JOIN PPW_EMAIL.pvn_fund_info info
+            ON d.fund_id = info.fund_id
+            JOIN PPW_EMAIL.pvn_company_info c
+            ON info.trust_id = c.company_id
+            JOIN PPW_EMAIL.nav n
+            ON n.fund_id = d.fund_id and d.distribute_date=n.price_date
+        WHERE d.isvalid = 1
+            AND info.isvalid = 1
+            AND c.isvalid = 1
+            AND n.isvalid = 1
+        <if test="companyName != null and companyName !=''">
+            and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%'))
+        </if>
+        <if test="fundName != null and fundName !=''">
+            and (info.fund_name like concat('%',#{fundName},'%') or info.fund_short_name like concat('%',#{fundName},'%'))
+        </if>
+        <if test="distributeType != null">
+            and d.distribute_type = #{distributeType}
+        </if>
+        <if test="startDate != null and startDate !=''">
+            and d.distribute_date >= #{startDate}
+        </if>
+        <if test="endDate != null and endDate !=''">
+            and d.distribute_date <![CDATA[ <= ]]> #{endDate}
+        </if>
+        limit #{offset},#{pageSize}
+    </select>
+    <select id="countDistributionList" resultType="java.lang.Long"
+            parameterType="com.simuwang.base.pojo.dto.query.DistributionPageQuery">
+        select count(distinct d.id)
+        from PPW_EMAIL.distribution d
+        join PPW_EMAIL.pvn_fund_info info on d.fund_id = info.fund_id
+        join PPW_EMAIL.pvn_company_info c on info.trust_id = c.company_id
+        join PPW_EMAIL.nav n on n.fund_id = d.fund_id
+        where d.isvalid=1 and info.isvalid =1 and c.isvalid =1 and n.isvalid=1
+        <if test="companyName != null and companyName !=''">
+            and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%'))
+        </if>
+        <if test="fundName != null and fundName !=''">
+            and (info.fund_name like concat('%',#{fundName},'%') or info.fund_short_name like concat('%',#{fundName},'%'))
+        </if>
+        <if test="distributeType != null">
+            and d.distribute_type = #{distributeType}
+        </if>
+        <if test="startDate != null and startDate !=''">
+            and d.distribute_date >= #{startDate}
+        </if>
+        <if test="endDate != null and endDate !=''">
+            and d.distribute_date <![CDATA[ <= ]]> #{endDate}
+        </if>
+    </select>
+    <select id="selectDistributionById" resultMap="BaseMap"
+            parameterType="java.lang.Integer">
+        select id,fund_id,distribute_date,distribute_type,distribution,isvalid,creatorid,createtime,updatetime,updaterid
+        from PPW_EMAIL.distribution where isvalid =1 and id=#{id}
+    </select>
+    <select id="selectDistributionByDate" resultType="com.simuwang.base.pojo.dos.DistributionDO">
+        select id,fund_id,distribute_date,distribute_type,distribution,isvalid,creatorid,createtime,updatetime,updaterid
+        from PPW_EMAIL.distribution where isvalid =1 and fund_id=#{fundId} and distribute_date=#{distributeDate}
+    </select>
+</mapper>

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

@@ -123,6 +123,20 @@
         WHERE efi.isvalid = 1
           AND efi.id =#{fileId}) a
     </select>
+    <select id="selectValuationFileId" resultType="java.lang.Integer"
+            parameterType="java.util.List">
+        SELECT
+            distinct file.id
+        FROM
+            PPW_EMAIL.EMAIL_FILE_INFO file
+                JOIN PPW_EMAIL.EMAIL_PARSE_INFO info
+                     ON file.email_id = info.id
+        WHERE info.email_type = 2
+          AND file.id IN
+        <foreach collection="fileIdList" item="fileId" index="index" separator=",">
+            #{fileId}
+        </foreach>
+    </select>
 
     <update id="updateTimeById">
         update PPW_EMAIL.EMAIL_FILE_INFO

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

@@ -29,6 +29,16 @@
         </foreach>
 
     </insert>
+    <update id="batchUpdate">
+        update PPW_EMAIL.email_fund_asset
+        <set>
+            fund_id = #{itemDo.fundId},
+            exception_status = #{itemDo.exceptionStatus},
+            updatetime=#{itemDo.updateTime}
+        </set>
+        where isvalid = 1
+        and id = #{itemDo.id}
+    </update>
     <select id="searchAssetDetail" resultMap="BaseResultMap"
             parameterType="com.simuwang.base.pojo.dto.query.ParseDetailPageQuery">
         select distinct id,fund_id, fund_name,register_number,price_date,asset_net,asset_share,is_stored,exception_status,updatetime
@@ -86,6 +96,20 @@
         </if>
         )a
     </select>
+    <select id="countNoStoreAsset" resultType="java.lang.Integer" parameterType="java.lang.String">
+        select count(id)
+        from PPW_EMAIL.email_fund_asset
+        where isvalid =1 and exception_status=3
+          and fund_name=#{fundName}
+    </select>
+    <select id="selectNotMappingAsset" resultMap="BaseResultMap"
+            parameterType="java.lang.String">
+        select distinct id,fund_id,file_id, fund_name,register_number,price_date,asset_net,asset_share,is_stored,exception_status,
+                        updatetime
+        from PPW_EMAIL.email_fund_asset
+        where isvalid =1 and exception_status=3
+          and fund_name=#{fundName}
+    </select>
 
     <delete id="deleteByFileId">
         update PPW_EMAIL.email_fund_asset

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

@@ -30,6 +30,21 @@
             #{itemDo.isvalid}, #{itemDo.creatorId}, #{itemDo.createTime}, #{itemDo.updaterId}, #{itemDo.updateTime})
         </foreach>
     </insert>
+    <update id="batchUpdate">
+        <foreach collection="navList" item="itemDo" index="index" open="" close="" separator=";">
+            update PPW_EMAIL.email_fund_nav
+            <set>
+                fund_id = #{itemDo.fundId},
+                exception_status = #{itemDo.exceptionStatus},
+                updatetime=#{itemDo.updateTime}
+            </set>
+            where isvalid = 1
+            and id = #{itemDo.id}
+        </foreach>
+    </update>
+    <delete id="deleteByFileId" parameterType="java.lang.Integer">
+        update PPW_EMAIL.email_fund_nav nav set isvalid = 0,updatetime=sysdate() where file_id=#{fileId}
+    </delete>
     <select id="searchNavDetail" resultMap="BaseResultMap">
         SELECT distinct nav.id,
             nav.fund_id,
@@ -107,6 +122,37 @@
             </if>
         ) a
     </select>
+    <select id="countNoStoreNav" resultType="java.lang.Integer" parameterType="java.lang.String">
+        select count(nav.id)
+        from PPW_EMAIL.email_fund_nav nav
+        where nav.isvalid =1 and nav.exception_status=3
+            and nav.fund_name=#{fundName}
+    </select>
+    <select id="selectFileIdByFundName" resultType="java.lang.Integer" parameterType="java.lang.String">
+        select distinct nav.file_id from PPW_EMAIL.email_fund_nav nav where nav.isvalid =1 and nav.exception_status=3
+            and nav.fund_name=#{fundName}
+    </select>
+    <select id="selectNotMappingNav" resultMap="BaseResultMap"
+            parameterType="java.lang.String">
+        select nav.id,
+               nav.file_id,
+               nav.fund_id,
+               nav.fund_name,
+               nav.register_number,
+               nav.price_date,
+               nav.nav,
+               nav.cumulative_nav_withdrawal,
+               nav.exception_status,
+               nav.is_stored,
+               nav.isvalid,
+               nav.creatorid,
+               nav.updaterid,
+               nav.updatetime,
+               nav.createtime
+        from PPW_EMAIL.email_fund_nav nav
+        where nav.isvalid =1 and nav.exception_status=3
+          and nav.fund_name=#{fundName}
+    </select>
 
     <delete id="deleteByFileId">
         update PPW_EMAIL.email_fund_nav

+ 6 - 0
service-base/src/main/resources/mapper/CompanyInformationMapper.xml

@@ -49,5 +49,11 @@
             and (c.company_name like concat('%',#{keyword},'%') or c.company_short_name like concat('%',#{keyword},'%') or c.register_number like concat('%',#{keyword},'%'))
         </if>
     </select>
+    <select id="getCompanyNameByFundId" resultType="java.lang.String" parameterType="java.lang.String">
+        select distinct company_name from PPW_EMAIL.pvn_company_info c join PPW_EMAIL.pvn_fund_info f
+        on f.trust_id = c.company_id
+        where c.isvalid=1 and f.isvalid=1
+        and f.fund_id=#{fundId}
+    </select>
 
 </mapper>

+ 35 - 0
service-base/src/main/resources/mapper/FundAliasMapper.xml

@@ -14,6 +14,10 @@
         <result column="updaterid" property="updaterId"/>
         <result column="updatetime" property="updateTime"/>
     </resultMap>
+    <update id="saveFundAlias" parameterType="com.simuwang.base.pojo.dos.FundAliasDO">
+        update PPW_EMAIL.fund_alias set target_fund_id=#{targetFundId},target_fund_name=#{targetFundName},target_register_number=#{targetRegisterNumber},updatetime=#{updateTime}
+        where isvalid =1 and id=#{id}
+    </update>
 
     <select id="queryFundByNameAndRegisterNumber" resultMap="BaseResultMap">
         select target_fund_id, target_fund_name, target_register_number
@@ -37,9 +41,40 @@
           and source_register_number = #{registerNumber}
     </select>
 
+    <select id="searchFundAlias" resultMap="BaseResultMap"
+            parameterType="com.simuwang.base.pojo.dto.query.FundAliasPageQuery">
+        select id,source_fund_name,source_register_number,target_fund_id,target_fund_name,target_register_number,isvalid,
+        creatorid,createtime,updatetime,updaterid
+        from PPW_EMAIL.fund_alias where isvalid=1
+        <if test="fundName != null and fundName !=''">
+            and (source_fund_name like concat('%',#{fundName},'%') or source_register_number like concat('%',#{fundName},'%') )
+        </if>
+        <if test="fundAliasName != null and fundAliasName !=''">
+            and (target_fund_name like concat('%',#{fundAliasName},'%')  or target_register_number like concat('%',#{fundAliasName},'%') )
+        </if>
+        limit #{offset},#{pageSize}
+    </select>
+    <select id="countFundAlias" resultType="java.lang.Long"
+            parameterType="com.simuwang.base.pojo.dto.query.FundAliasPageQuery">
+        select count(1) from PPW_EMAIL.fund_alias where isvalid=1
+        <if test="fundName != null and fundName !=''">
+            and (source_fund_name like concat('%',#{fundName},'%') or source_register_number like concat('%',#{fundName},'%') )
+        </if>
+        <if test="fundAliasName != null and fundAliasName !=''">
+            and (target_fund_name like concat('%',#{fundAliasName},'%')  or target_register_number like concat('%',#{fundAliasName},'%') )
+        </if>
+    </select>
+    <select id="searchFundAliasById" resultType="com.simuwang.base.pojo.dos.FundAliasDO"
+            parameterType="java.lang.Integer">
+        select id,source_fund_name,source_register_number,target_fund_id,target_fund_name,target_register_number,isvalid,
+               creatorid,createtime,updatetime,updaterid
+        from PPW_EMAIL.fund_alias where isvalid=1 and id=#{id}
+    </select>
+
     <insert id="insert">
         insert into PPW_EMAIL.fund_alias(source_fund_name, source_register_number)
         values (#{fundName}, #{registerNumber})
     </insert>
 
+
 </mapper>

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


+ 21 - 10
service-base/src/main/resources/mapper/FundInfoMapper.xml

@@ -56,22 +56,22 @@
             and f.fund_id like concat('%',#{fundId},'%')
         </if>
         <if test="fundShortName != null and fundShortName !=''">
-            and (f.fund_name like concat('%',#{fundShortName},'%') or f.fund_short_name like concat('%',#{fundShortName},'%'))
+            and (f.fund_name like concat('%',#{fundShortName},'%') or f.fund_short_name like concat('%',#{fundShortName},'%') or f.register_number like concat('%',#{fundShortName},'%'))
         </if>
         <if test="companyShortName != null and companyShortName !=''">
-            and (c.company_name like concat('%',#{companyShortName},'%') or c.company_short_name like concat('%',#{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 !=''">
             and r.nav_frequency = #{navFrequency}
         </if>
         <if test="assetFrequency != null and assetFrequency !=''">
-            and r.asset_Frequency = #{navFrequency}
+            and r.asset_Frequency = #{assetFrequency}
         </if>
         <if test="startDate != null and startDate !=''">
-            and r.inception_date <![CDATA[ >= ]]> #{startDate}
+            and f.inception_date <![CDATA[ >= ]]> #{startDate}
         </if>
         <if test="endDate != null and endDate !=''">
-            and r.inception_date <![CDATA[ <= ]]> #{endDate}
+            and f.inception_date <![CDATA[ <= ]]> #{endDate}
         </if>
         limit #{offset},#{pageSize}
     </select>
@@ -124,26 +124,37 @@
             and f.fund_id like concat('%',#{fundId},'%')
         </if>
         <if test="fundShortName != null and fundShortName !=''">
-            and (f.fund_name like concat('%',#{fundShortName},'%') or f.fund_short_name like concat('%',#{fundShortName},'%'))
+            and (f.fund_name like concat('%',#{fundShortName},'%') or f.fund_short_name like concat('%',#{fundShortName},'%')  or f.register_number like concat('%',#{fundShortName},'%'))
         </if>
         <if test="companyShortName != null and companyShortName !=''">
-            and (c.company_name like concat('%',#{companyShortName},'%') or c.company_short_name like concat('%',#{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 !=''">
             and r.nav_frequency = #{navFrequency}
         </if>
         <if test="assetFrequency != null and assetFrequency !=''">
-            and r.asset_Frequency = #{navFrequency}
+            and r.asset_Frequency = #{assetFrequency}
         </if>
         <if test="startDate != null and startDate !=''">
-            and r.inception_date <![CDATA[ >= ]]> #{startDate}
+            and f.inception_date <![CDATA[ >= ]]> #{startDate}
         </if>
         <if test="endDate != null and endDate !=''">
-            and r.inception_date <![CDATA[ <= ]]> #{endDate}
+            and f.inception_date <![CDATA[ <= ]]> #{endDate}
         </if>
     </select>
     <select id="getFundNameByFundId" resultType="java.lang.String" parameterType="java.lang.String">
         select fund_name from PPW_EMAIL.pvn_fund_info where fund_id=#{fundId} and isvalid=1
     </select>
+    <select id="queryFundIdByName" resultType="java.lang.String" parameterType="java.lang.String">
+        select fund_id
+        from PPW_EMAIL.pvn_fund_info
+        where isvalid = 1
+          and fund_name = #{fundName} limit 1
+    </select>
+    <select id="getCompanyNameByFundId" resultType="java.lang.String" parameterType="java.lang.String">
+        select c.company_name from PPW_EMAIL.pvn_company_info c
+        join PPW_EMAIL.pvn_fund_info info on info.trust_id=c.company_id
+        where info.fund_id=#{fundId} and info.isvalid=1 and c.isvalid=1
+    </select>
 
 </mapper>

+ 95 - 0
service-base/src/main/resources/mapper/FundNavAssetMapper.xml

@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+    <mapper namespace="com.simuwang.base.mapper.FundNavAssetMapper">
+    <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.FundNavAssetDO">
+        <result column="fund_id" property="fundId"/>
+        <result column="fund_short_name" property="fundName"/>
+        <result column="price_date" property="priceDate"/>
+        <result column="nav" property="nav"/>
+        <result column="cumulative_nav_withdrawal" property="cumulativeNavWithdrawal"/>
+        <result column="asset_share" property="assetShare"/>
+        <result column="asset_net" property="assetNet"/>
+        <result column="updatetime" property="updateTime"/>
+    </resultMap>
+    <select id="searchNavAssetList" resultMap="BaseResultMap"
+            parameterType="com.simuwang.base.pojo.dto.query.FundNavAssetPageQuery">
+        SELECT distinct
+        info.fund_id,
+        info.fund_short_name,
+        IFNULL(
+        nav.price_date,
+        asset.price_date
+        ) AS price_date,
+        nav.nav,
+        nav.cumulative_nav_withdrawal,
+        asset.asset_share,
+        asset.asset_net,
+        CASE
+        WHEN nav.updatetime is null
+        THEN asset.updatetime
+        WHEN asset.updatetime is null
+        THEN nav.updatetime
+        WHEN asset.updatetime >= nav.updatetime
+        THEN asset.updatetime
+        ELSE nav.updatetime
+        END AS updatetime
+        FROM
+        PPW_EMAIL.pvn_fund_info info
+        LEFT JOIN PPW_EMAIL.nav nav
+        ON info.fund_id = nav.fund_id
+        AND nav.isvalid = 1
+        LEFT JOIN PPW_EMAIL.asset asset
+        ON info.fund_id = asset.fund_id
+        AND nav.price_date = asset.price_date
+        AND asset.isvalid = 1
+        WHERE info.isvalid = 1
+        and (nav.nav is not null or asset.asset_share is not null or asset.asset_net is not null)
+        <if test="fundName != null and fundName !=''">
+            and (info.fund_name like concat('%',#{fundName},'%') or info.fund_short_name like concat('%',#{fundName},'%') or info.register_number like concat('%',#{fundName},'%'))
+        </if>
+        <if test="priceStartDate != null and priceStartDate !=''">
+            and (nav.price_date >= #{priceStartDate} or asset.price_date >= #{priceStartDate})
+        </if>
+        <if test="priceEndDate != null and priceEndDate !=''">
+            and (nav.price_date <![CDATA[ <= ]]> #{priceEndDate} or asset.price_date <![CDATA[ <= ]]> #{priceEndDate})
+        </if>
+        <if test="updateStartDate != null and updateStartDate !=''">
+            and (nav.updatetime >= #{updateStartDate} or asset.updatetime >= #{updateStartDate})
+        </if>
+        <if test="updateEndDate != null and updateEndDate !=''">
+            and (nav.updatetime <![CDATA[ <= ]]> #{updateEndDate} or asset.updatetime <![CDATA[ <= ]]> #{updateEndDate})
+        </if>
+        order by fund_name,price_date desc
+        limit #{offset},#{pageSize}
+    </select>
+    <select id="countNavAssetList" resultType="java.lang.Long"
+            parameterType="com.simuwang.base.pojo.dto.query.FundNavAssetPageQuery">
+        SELECT count(1)
+        FROM
+        PPW_EMAIL.pvn_fund_info info
+        LEFT JOIN PPW_EMAIL.nav nav
+        ON info.fund_id = nav.fund_id
+        AND nav.isvalid = 1
+        LEFT JOIN PPW_EMAIL.asset asset
+        ON info.fund_id = asset.fund_id
+        AND nav.price_date = asset.price_date
+        AND asset.isvalid = 1
+        WHERE info.isvalid = 1
+        and (nav.nav is not null or asset.asset_share is not null or asset.asset_net is not null)
+        <if test="fundName != null and fundName !=''">
+            and (info.fund_name like concat('%',#{fundName},'%') or info.fund_short_name like concat('%',#{fundName},'%') or info.register_number like concat('%',#{fundName},'%'))
+        </if>
+        <if test="priceStartDate != null and priceStartDate !=''">
+            and (nav.price_date >= #{priceStartDate} or asset.price_date >= #{priceStartDate})
+        </if>
+        <if test="priceEndDate != null and priceEndDate !=''">
+            and (nav.price_date <![CDATA[ <= ]]> #{priceEndDate} or asset.price_date <![CDATA[ <= ]]> #{priceEndDate})
+        </if>
+        <if test="updateStartDate != null and updateStartDate !=''">
+            and (nav.updatetime >= #{updateStartDate} or asset.updatetime >= #{updateStartDate})
+        </if>
+        <if test="updateEndDate != null and updateEndDate !=''">
+            and (nav.updatetime <![CDATA[ <= ]]> #{updateEndDate} or asset.updatetime <![CDATA[ <= ]]> #{updateEndDate})
+        </if>
+    </select>
+</mapper>

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

@@ -43,9 +43,9 @@
         select id, type, email, password, protocol, server, port, cron, open_status,description,isvalid,creatorid,createtime,updaterid,updatetime
         from PPW_EMAIL.mailbox_info
     </sql>
-    <select id="checkEmailUnique" resultType="com.simuwang.base.pojo.dos.MailboxInfoDO">
+    <select id="selectEmailConfigByEmail" resultType="com.simuwang.base.pojo.dos.MailboxInfoDO">
         <include refid="selectConfigVo"/>
-        where email = #{email} limit 1
+        where email = #{email} and isvalid =1 limit 1
     </select>
     <select id="countEmailConfig" resultType="java.lang.Long"
             parameterType="com.simuwang.base.pojo.dto.query.EmailPageQuery">
@@ -60,5 +60,9 @@
         <include refid="selectConfigVo"/>
         where id = #{id}
     </select>
+    <select id="getAll" resultMap="BaseResultMap">
+        <include refid="selectConfigVo"/>
+        where isvalid = 1
+    </select>
 
 </mapper>

+ 20 - 0
service-base/src/main/resources/mapper/NavMapper.xml

@@ -39,6 +39,26 @@
             and price_date = #{itemDo.priceDate}
         </foreach>
     </insert>
+    <insert id="saveNav" parameterType="com.simuwang.base.pojo.dos.NavDO">
+        insert into PPW_EMAIL.nav(fund_id,price_date,nav,cumulative_nav,cumulative_nav_withdrawal,
+        isvalid, creatorid, createtime, updaterid, updatetime)
+        values
+            (#{fundId},#{priceDate},#{nav},#{cumulativeNav},#{cumulativeNavWithdrawal},
+            #{isvalid}, #{creatorId}, #{createTime}, #{updaterId}, #{updateTime})
+    </insert>
+    <update id="updateNav" parameterType="com.simuwang.base.pojo.dos.NavDO">
+        update PPW_EMAIL.nav
+        <set>
+            nav = #{nav},
+            cumulative_nav_withdrawal = #{cumulativeNavWithdrawal},
+            updatetime=#{updateTime}
+        </set>
+        where isvalid = 1
+        and id=#{id}
+    </update>
+    <delete id="deleteNav">
+        update PPW_EMAIL.nav set isvalid =0,updatetime=sysdate() where fund_id=#{fundId} and price_date=#{priceDate} and isvalid =1
+    </delete>
 
     <select id="queryFundNavByDate" resultType="java.lang.String">
         select price_date

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

@@ -54,7 +54,7 @@ public class EmailParseApiServiceImpl implements EmailParseApiService {
 
     @Override
     public void parseEmail(MailboxInfoDTO mailboxInfoDTO, Date startDate, Date endDate) {
-        emailParseService.parseEmail(mailboxInfoDTO, startDate, endDate);
+        asyncExecutor.execute(() -> emailParseService.parseEmail(mailboxInfoDTO, startDate, endDate));
     }
 
     @Override

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

@@ -190,7 +190,7 @@ public class EmailParseService {
         }
     }
 
-    private void saveNavDo(List<NavDO> navDOList) {
+    public void saveNavDo(List<NavDO> navDOList) {
         if (CollUtil.isEmpty(navDOList)) {
             return;
         }
@@ -210,7 +210,7 @@ public class EmailParseService {
         }
     }
 
-    private void saveAssetDo(List<AssetDO> assetDOList) {
+    public void saveAssetDo(List<AssetDO> assetDOList) {
         if (CollUtil.isEmpty(assetDOList)) {
             return;
         }

+ 0 - 163
service-manage/src/main/java/com/simuwang/manage/api/base/BaseController.java

@@ -1,163 +0,0 @@
-package com.simuwang.manage.api.base;
-
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
-import com.simuwang.base.common.conts.HttpStatus;
-import com.simuwang.base.common.page.PageDomain;
-import com.simuwang.base.common.page.TableDataInfo;
-import com.simuwang.base.common.page.TableSupport;
-import com.simuwang.base.common.result.AjaxResult;
-import com.simuwang.base.common.util.DateUtils;
-import com.simuwang.base.common.util.PageUtils;
-import com.simuwang.base.common.util.SqlUtil;
-import com.simuwang.base.common.util.StringUtil;
-import com.smppw.common.pojo.enums.status.ResultCode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.bind.WebDataBinder;
-import org.springframework.web.bind.annotation.InitBinder;
-
-import java.beans.PropertyEditorSupport;
-import java.util.Date;
-import java.util.List;
-
-/**
- * FileName: BaseController
- * Author:   chenjianhua
- * Date:     2024/9/8 10:02
- * Description: ${DESCRIPTION}
- */
-public class BaseController {
-        protected final Logger logger = LoggerFactory.getLogger(this.getClass());
-
-        /**
-         * 将前台传递过来的日期格式的字符串,自动转化为Date类型
-         */
-        @InitBinder
-        public void initBinder(WebDataBinder binder)
-        {
-            // Date 类型转换
-            binder.registerCustomEditor(Date.class, new PropertyEditorSupport()
-            {
-                @Override
-                public void setAsText(String text)
-                {
-                    setValue(DateUtils.parseDate(text));
-                }
-            });
-        }
-
-        /**
-         * 设置请求分页数据
-         */
-        protected void startPage()
-        {
-            PageUtils.startPage();
-        }
-
-        /**
-         * 设置请求排序数据
-         */
-        protected void startOrderBy()
-        {
-            PageDomain pageDomain = TableSupport.buildPageRequest();
-            if (StringUtil.isNotEmpty(pageDomain.getOrderBy()))
-            {
-                String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
-                PageHelper.orderBy(orderBy);
-            }
-        }
-
-        /**
-         * 清理分页的线程变量
-         */
-        protected void clearPage()
-        {
-            PageUtils.clearPage();
-        }
-
-        /**
-         * 响应请求分页数据
-         */
-        @SuppressWarnings({ "rawtypes", "unchecked" })
-        protected TableDataInfo getDataTable(List<?> list)
-        {
-            TableDataInfo rspData = new TableDataInfo();
-            rspData.setCode(HttpStatus.SUCCESS);
-            rspData.setMsg(null);
-            rspData.setRows(list);
-            rspData.setTotal(new PageInfo(list).getTotal());
-            return rspData;
-        }
-
-    /**
-     * 响应返回结果
-     *
-     * @param rows 影响行数
-     * @return 操作结果
-     */
-    protected AjaxResult toAjax(int rows)
-    {
-        return rows > 0 ? success() : error();
-    }
-
-    /**
-     * 响应返回结果
-     *
-     * @param result 结果
-     * @return 操作结果
-     */
-    protected AjaxResult toAjax(boolean result)
-    {
-        return result ? success() : error();
-    }
-
-    /**
-     * 返回成功
-     */
-    public AjaxResult success()
-    {
-        return AjaxResult.success();
-    }
-
-    /**
-     * 返回失败消息
-     */
-    public AjaxResult error()
-    {
-        return AjaxResult.error();
-    }
-
-    /**
-     * 返回成功消息
-     */
-    public AjaxResult success(String message)
-    {
-        return AjaxResult.success(message);
-    }
-
-    /**
-     * 返回成功数据
-     */
-    public static AjaxResult success(Object data)
-    {
-        return AjaxResult.success("操作成功", data);
-    }
-
-    /**
-     * 返回失败消息
-     */
-    public AjaxResult error(String message)
-    {
-        return AjaxResult.error(message);
-    }
-
-    /**
-     * 返回错误码消息
-     */
-    public AjaxResult error(AjaxResult.Type type, String message)
-    {
-        return new AjaxResult(type, message);
-    }
-
-}

+ 5 - 9
service-manage/src/main/java/com/simuwang/manage/api/company/CompanyEmailSendHistoryController.java

@@ -1,14 +1,10 @@
 package com.simuwang.manage.api.company;
 
 
-import com.simuwang.base.common.page.TableDataInfo;
 import com.simuwang.base.common.support.MybatisPage;
 import com.simuwang.base.pojo.dto.query.CompanyEmailHistoryPageQuery;
 import com.simuwang.base.pojo.dto.query.CompanyEmailPageQuery;
-import com.simuwang.base.pojo.vo.CompanyEmailConfigVO;
-import com.simuwang.base.pojo.vo.CompanyEmailSendHistoryVO;
-import com.simuwang.base.pojo.vo.IdVO;
-import com.simuwang.manage.api.base.BaseController;
+import com.simuwang.base.pojo.vo.*;
 import com.simuwang.manage.service.CompanyEmailConfigService;
 import com.simuwang.manage.service.CompanyEmailSendHistoryService;
 import org.slf4j.Logger;
@@ -24,7 +20,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/v1/company")
-public class CompanyEmailSendHistoryController extends BaseController {
+public class CompanyEmailSendHistoryController{
     private static final Logger logger = LoggerFactory.getLogger(CompanyEmailSendHistoryController.class);
     @Autowired
     private CompanyEmailSendHistoryService companyEmailSendHistoryService;
@@ -72,7 +68,7 @@ public class CompanyEmailSendHistoryController extends BaseController {
      * @return
      */
     @PostMapping("delete-company-email")
-    public boolean deleteEmail(@RequestBody IdVO comyanyEmailIdVO){
+    public boolean deleteEmail(@RequestBody CompanyIdListVO comyanyEmailIdVO){
         companyEmailSendHistoryService.deleteEmail(comyanyEmailIdVO.getCompanyIdList());
         return true;
     }
@@ -83,7 +79,7 @@ public class CompanyEmailSendHistoryController extends BaseController {
      * @return
      */
     @PostMapping("delete-email-history")
-    public boolean deleteEmailHistory(@RequestBody IdVO comyanyEmailIdVO){
+    public boolean deleteEmailHistory(@RequestBody IdListVO comyanyEmailIdVO){
         companyEmailSendHistoryService.deleteEmailHistory(comyanyEmailIdVO.getIdList());
         return true;
     }
@@ -128,7 +124,7 @@ public class CompanyEmailSendHistoryController extends BaseController {
      * @return
      */
     @PostMapping("send-company-email")
-    public boolean sendCompanyEmail(@RequestBody IdVO comyanyEmailIdVO){
+    public boolean sendCompanyEmail(@RequestBody CompanyIdListVO comyanyEmailIdVO){
         companyEmailConfigService.sendCompanyEmail(comyanyEmailIdVO.getCompanyIdList());
         return true;
     }

+ 128 - 0
service-manage/src/main/java/com/simuwang/manage/api/deletion/DeletionController.java

@@ -0,0 +1,128 @@
+package com.simuwang.manage.api.deletion;
+
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.common.util.EncodeUtil;
+import com.simuwang.base.common.util.ExcelUtil;
+import com.simuwang.base.pojo.dto.ExcelDeletionInfoDTO;
+import com.simuwang.base.pojo.dto.query.DeletionPageQuery;
+import com.simuwang.base.pojo.dto.query.FundDeletionPageQuery;
+import com.simuwang.base.pojo.vo.*;
+import com.simuwang.manage.service.DeletionService;
+import com.smppw.common.pojo.ResultVo;
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 缺失管理
+ * Author:   chenjianhua
+ * Date:     2024/9/17 18:16
+ * Description: ${DESCRIPTION}
+ */
+@RestController
+@RequestMapping("/v1/deletion")
+public class DeletionController {
+
+    @Autowired
+    private DeletionService deletionService;
+    private static final Logger logger = LoggerFactory.getLogger(DeletionController.class);
+
+    /**
+     * 查询缺失页面展示数据
+     * @param deletionPageQuery
+     * @return
+     */
+    @RequestMapping("search-deletion-list")
+    public MybatisPage<DeletionInfoVO> searchDeletionList(DeletionPageQuery deletionPageQuery){
+        MybatisPage<DeletionInfoVO> result = deletionService.searchDeletionList(deletionPageQuery);
+        return result;
+    }
+
+    /**
+     * 查询基金缺失明细
+     * @param fundDeletionPageQuery
+     * @return
+     */
+    @RequestMapping("search-fund-deletion")
+    public MybatisPage<FundDeletionInfoVO> searchFundDeletionList(FundDeletionPageQuery fundDeletionPageQuery){
+        MybatisPage<FundDeletionInfoVO> result = deletionService.searchFundDeletionList(fundDeletionPageQuery);
+        return result;
+    }
+
+    /**
+     * 保存缺失备注
+     * @param fundDeletionInfoVOList
+     * @return
+     */
+    @RequestMapping("save-fund-deletion")
+    public ResultVo saveFundDeletionList(@RequestBody List<FundDeletionInfoVO> fundDeletionInfoVOList){
+        deletionService.saveFundDeletionList(fundDeletionInfoVOList);
+        return new ResultVo<>(true);
+    }
+
+    /**
+     * 批量添加缺失备注
+     * @param fundDeletionRemarkVO
+     * @return
+     */
+    @RequestMapping("batch-deletion-remark")
+    public ResultVo saveBatchDeletionRemark(@RequestBody FundDeletionRemarkVO fundDeletionRemarkVO){
+        deletionService.saveBatchDeletionRemark(fundDeletionRemarkVO);
+        return new ResultVo<>(true);
+    }
+
+    /**
+     * 下载数据缺失
+     * @param fundIdListVO
+     * @return
+     */
+    @PostMapping("/download-fund-deletion")
+    public void downloadFundDeletion(@RequestBody FundIdListVO fundIdListVO, HttpServletResponse response, HttpServletRequest request){
+        List<ExcelDeletionInfoDTO> fundDeletionInfoVOList = deletionService.selectFundDeletionInfoVOList(fundIdListVO);
+        Map<String,List<List<String>>> values = new HashMap<>();
+        List<String> head = new ArrayList<>();
+        head.add("基金ID");
+        head.add("基金全称");
+        head.add("管理人");
+        head.add("缺失类型");
+        head.add("缺失日期");
+        head.add("缺失备注");
+        String sheetName = "缺失明细";
+        List<List<String>> dataList = new ArrayList<>();
+        for(ExcelDeletionInfoDTO dto : fundDeletionInfoVOList){
+            List<String> data = new ArrayList<>();
+            data.add(dto.getFundId());
+            data.add(dto.getFundName());
+            data.add(dto.getCompanyName());
+            data.add(dto.getDeletionType());
+            data.add(dto.getDeletionDate());
+            data.add(dto.getRemark());
+            dataList.add(data);
+        }
+        values.put(sheetName,dataList);
+        HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook(sheetName,head,values,null);
+        try {
+            response.setContentType("application/octet-stream");
+            response.addHeader("Content-Disposition", "attachment;filename=" + EncodeUtil.encodeUTF8("缺失明细.xls"));
+            ServletOutputStream outputStream = response.getOutputStream();
+            wb.write(outputStream);
+            outputStream.flush();
+            outputStream.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(),e);
+        }
+    }
+}

+ 75 - 0
service-manage/src/main/java/com/simuwang/manage/api/distribution/DistributionController.java

@@ -0,0 +1,75 @@
+package com.simuwang.manage.api.distribution;
+
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.pojo.dto.query.CompanyEmailPageQuery;
+import com.simuwang.base.pojo.dto.query.DistributionPageQuery;
+import com.simuwang.base.pojo.vo.DistributionTablePageVO;
+import com.simuwang.base.pojo.vo.DistributionVO;
+import com.simuwang.base.pojo.vo.IdListVO;
+import com.simuwang.base.pojo.vo.IdVO;
+import com.simuwang.manage.service.DistributionService;
+import com.smppw.common.pojo.ResultVo;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * FileName: DistributionController
+ * Author:   chenjianhua
+ * Date:     2024/9/15 13:36
+ * Description: ${DESCRIPTION}
+ */
+@RestController
+@RequestMapping("/v1/distribution")
+public class DistributionController {
+
+    @Autowired
+    private DistributionService distributionService;
+    /**
+     * 分红页面展示查询
+     * @param distributionPageQuery
+     * @return
+     */
+    @RequestMapping("search-distribution-list")
+    public MybatisPage<DistributionTablePageVO> searchDistributionList(DistributionPageQuery distributionPageQuery){
+        MybatisPage<DistributionTablePageVO> result = distributionService.searchDistributionList(distributionPageQuery);
+        return result;
+    }
+
+    /**
+     * 保存分红信息
+     * @param distributionVO
+     * @return
+     */
+    @RequestMapping("save-distribution")
+    public ResultVo saveDistribution(@RequestBody DistributionVO distributionVO){
+        ResultVo vo = distributionService.saveDistribution(distributionVO);
+        return vo;
+    }
+
+    /**
+     * 删除分红信息
+     * @param idListVO
+     * @return
+     */
+    @RequestMapping("delete-distribution")
+    public boolean deleteDistribution(IdListVO idListVO){
+        distributionService.deleteDistribution(idListVO);
+        return true;
+    }
+
+    /**
+     * 上传分红信息
+     * @param file
+     * @param response
+     * @param request
+     * @return
+     */
+    @RequestMapping("upload-distribution")
+    public ResultVo uploadDistribution(@RequestParam(value = "file",required = false) MultipartFile file, HttpServletResponse response, HttpServletRequest request){
+        ResultVo vo = distributionService.uploadDistribution(file);
+        return vo;
+    }
+}

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

@@ -3,8 +3,6 @@ package com.simuwang.manage.api.email;
 import com.simuwang.base.common.support.MybatisPage;
 import com.simuwang.base.pojo.dto.query.ParseDetailPageQuery;
 import com.simuwang.base.pojo.vo.EmailFundAssetVO;
-import com.simuwang.base.pojo.vo.EmailFundNavVO;
-import com.simuwang.manage.api.base.BaseController;
 import com.simuwang.manage.service.ParseEmailDetailService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;

+ 27 - 11
service-manage/src/main/java/com/simuwang/manage/api/email/EmailConfigController.java

@@ -2,11 +2,7 @@ package com.simuwang.manage.api.email;
 
 import com.simuwang.base.common.support.MybatisPage;
 import com.simuwang.base.pojo.dto.query.EmailPageQuery;
-import com.simuwang.base.pojo.vo.IdVO;
-import com.simuwang.base.pojo.vo.MailboxInfoTableVO;
-import com.simuwang.base.pojo.vo.MailboxInfoVO;
-import com.simuwang.base.pojo.vo.OpenStatusVO;
-import com.simuwang.manage.api.base.BaseController;
+import com.simuwang.base.pojo.vo.*;
 import com.simuwang.manage.service.EmailConfigService;
 import com.smppw.common.pojo.ResultVo;
 import com.smppw.common.pojo.enums.status.ResultCode;
@@ -15,8 +11,6 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.List;
-
 /**
  * 接收邮箱配置管理
  * Author:   chenjianhua
@@ -25,7 +19,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/v1/email")
-public class EmailConfigController extends BaseController {
+public class EmailConfigController{
 
     @Autowired
     private EmailConfigService emailConfigService;
@@ -102,12 +96,34 @@ public class EmailConfigController extends BaseController {
 
     /**
      * 批量删除邮箱配置
-     * @param idVO --idList
+     * @param idListVO
      * @return
      */
     @RequestMapping("delete-email-config")
-    public boolean deleteEmailConfig(@RequestBody IdVO idVO){
-        emailConfigService.deleteEmailConfig(idVO.getId());
+    public boolean deleteEmailConfig(@RequestBody IdListVO idListVO){
+        emailConfigService.deleteEmailConfig(idListVO.getIdList());
+        return true;
+    }
+
+    /**
+     * 手动触发指定时间区间的邮件解析
+     * @param parseParamVO
+     * @return
+     */
+    @RequestMapping("parse-email")
+    public boolean parseEmail(@RequestBody ParseParamVO parseParamVO){
+        emailConfigService.parseEmail(parseParamVO);
+        return true;
+    }
+
+    /**
+     * 立即执行一次
+     * @param idVO
+     * @return
+     */
+    @RequestMapping("run-once")
+    public boolean runOnce(@RequestBody IdVO idVO){
+        emailConfigService.runOnce(idVO.getId());
         return true;
     }
 

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

@@ -2,9 +2,7 @@ package com.simuwang.manage.api.email;
 
 import com.simuwang.base.common.support.MybatisPage;
 import com.simuwang.base.pojo.dto.query.ParseDetailPageQuery;
-import com.simuwang.base.pojo.vo.EmailFundAssetVO;
 import com.simuwang.base.pojo.vo.EmailFundNavVO;
-import com.simuwang.manage.api.base.BaseController;
 import com.simuwang.manage.service.ParseEmailDetailService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;

+ 0 - 42
service-manage/src/main/java/com/simuwang/manage/api/email/NavController.java

@@ -1,42 +0,0 @@
-package com.simuwang.manage.api.email;
-
-import com.simuwang.base.pojo.vo.FundAssetVO;
-import com.simuwang.base.pojo.vo.FundNavVO;
-import com.smppw.common.pojo.ResultVo;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * FileName: NavController
- * Author:   chenjianhua
- * Date:     2024/9/14 13:59
- * Description: ${DESCRIPTION}
- */
-@RestController
-@RequestMapping("/v1/nav")
-public class NavController {
-
-    /**
-     * 新增基金规模
-     * @param fundAssetVO
-     * @return
-     */
-//    @PostMapping("/save-fund-asset")
-//    public ResultVo saveFundAsset(@RequestBody FundAssetVO fundAssetVO){
-//        parseEmailDetailService.saveFundAsset(fundAssetVO);
-//        return ResultVo.ok(true);
-//    }
-//
-//    /**
-//     * 新增基金规模
-//     * @param fundNavVO
-//     * @return
-//     */
-//    @PostMapping("/save-fund-nav")
-//    public ResultVo saveFundNav(@RequestBody FundNavVO fundNavVO){
-//        parseEmailDetailService.saveFundNav(fundNavVO);
-//        return ResultVo.ok(true);
-//    }
-}

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

@@ -4,10 +4,7 @@ import com.simuwang.base.common.support.MybatisPage;
 import com.simuwang.base.common.util.EncodeUtil;
 import com.simuwang.base.pojo.dto.query.EmailFileQuery;
 import com.simuwang.base.pojo.dto.query.EmailParseQuery;
-import com.simuwang.base.pojo.vo.EmailFileInfoVO;
-import com.simuwang.base.pojo.vo.EmailParseDetailVO;
-import com.simuwang.base.pojo.vo.EmailParseInfoVO;
-import com.simuwang.base.pojo.vo.EmailTypeRuleVO;
+import com.simuwang.base.pojo.vo.*;
 import com.simuwang.daq.service.EmailParseApiService;
 import com.simuwang.manage.service.ParseEmailService;
 import com.smppw.common.pojo.ResultVo;
@@ -124,12 +121,12 @@ public class ParseEmailController{
 
     /**
      * 根据邮件ID重新解析
-     * @param id
+     * @param idVo
      * @return
      */
-    @GetMapping("/reparse/{id}")
-    public ResultVo reparse(@PathVariable("id")Integer id){
-        emailParseApiService.reparseEmail(id);
+    @GetMapping("/reparse")
+    public ResultVo reparse(IdVO idVo){
+        emailParseApiService.reparseEmail(idVo.getId());
         return ResultVo.ok(true);
     }
 }

+ 42 - 2
service-manage/src/main/java/com/simuwang/manage/api/fund/FunAliasController.java

@@ -1,7 +1,13 @@
 package com.simuwang.manage.api.fund;
 
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.pojo.dto.query.FundAliasPageQuery;
+import com.simuwang.base.pojo.vo.FundAliasVO;
+import com.simuwang.base.pojo.vo.IdVO;
+import com.simuwang.manage.service.FundAliasService;
+import com.smppw.common.pojo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * 基金别名管理
@@ -13,6 +19,40 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/v1/alias")
 public class FunAliasController {
 
+    @Autowired
+    private FundAliasService fundAliasService;
 
+    /**
+     * 查询基金别名列表
+     * @param fundAliasPageQuery
+     * @return
+     */
+    @GetMapping("/fund-alias-list")
+    public MybatisPage<FundAliasVO> searchFundAlias(FundAliasPageQuery fundAliasPageQuery){
+        MybatisPage<FundAliasVO> result = fundAliasService.searchFundAlias(fundAliasPageQuery);
+        return result;
+    }
+
+    /**
+     * 根据ID查询基金别名
+     * @param idVO
+     * @return
+     */
+    @GetMapping("/search-fund-alias")
+    public ResultVo<FundAliasVO> searchFundAlias(IdVO idVO){
+        FundAliasVO result = fundAliasService.searchFundAliasById(idVO.getId());
+        return ResultVo.ok(result);
+    }
+
+    /**
+     * 根据ID查询基金别名
+     * @param fundAliasVO
+     * @return
+     */
+    @PostMapping("/save-fund-alias")
+    public ResultVo saveFundAlias(@RequestBody FundAliasVO fundAliasVO){
+        fundAliasService.saveFundAlias(fundAliasVO);
+        return ResultVo.ok(true);
+    }
 
 }

+ 79 - 0
service-manage/src/main/java/com/simuwang/manage/api/navAsset/FundNavAssetController.java

@@ -0,0 +1,79 @@
+package com.simuwang.manage.api.navAsset;
+
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.pojo.dto.query.DistributionPageQuery;
+import com.simuwang.base.pojo.dto.query.FundNavAssetPageQuery;
+import com.simuwang.base.pojo.vo.*;
+import com.simuwang.manage.service.FundNavAssetService;
+import com.smppw.common.pojo.ResultVo;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * 净值规模管理
+ * Author:   chenjianhua
+ * Date:     2024/9/15 16:46
+ * Description: ${DESCRIPTION}
+ */
+@RestController
+@RequestMapping("/v1/nav-asset")
+public class FundNavAssetController {
+
+    @Autowired
+    private FundNavAssetService fundNavAssetService;
+
+    /**
+     * 基金净值规模页面展示查询
+     * @param fundNavAssetPageQuery
+     * @return
+     */
+    @RequestMapping("search-nav-asset-list")
+    public MybatisPage<FundNavAssetVO> searchNavAssetList(FundNavAssetPageQuery fundNavAssetPageQuery){
+        MybatisPage<FundNavAssetVO> result = fundNavAssetService.searchNavAssetList(fundNavAssetPageQuery);
+        return result;
+    }
+
+    /**
+     * 新增基金规模
+     * @param fundAssetVO
+     * @return
+     */
+    @PostMapping("/save-fund-asset")
+    public ResultVo saveFundAsset(@RequestBody FundAssetVO fundAssetVO){
+        fundNavAssetService.saveFundAsset(fundAssetVO);
+        return ResultVo.ok(true);
+    }
+
+    /**
+     * 新增基金规模
+     * @param fundNavVO
+     * @return
+     */
+    @PostMapping("/save-fund-nav")
+    public ResultVo saveFundNav(@RequestBody FundNavVO fundNavVO){
+        fundNavAssetService.saveFundNav(fundNavVO);
+        return ResultVo.ok(true);
+    }
+
+    @RequestMapping("/delete-fund-nav-asset")
+    public ResultVo deleteFundNavAsset(@RequestBody FundNavAssetDelListVO fundNavAssetDelListVO){
+        fundNavAssetService.deleteFundNavAsset(fundNavAssetDelListVO);
+        return ResultVo.ok(true);
+    }
+
+    /**
+     * 上传分红信息
+     * @param file
+     * @param response
+     * @param request
+     * @return
+     */
+    @RequestMapping("upload-nav-asset")
+    public ResultVo uploadNavAsset(@RequestParam(value = "file",required = false) MultipartFile file, HttpServletResponse response, HttpServletRequest request){
+        ResultVo vo = fundNavAssetService.uploadNavAsset(file);
+        return vo;
+    }
+}

+ 103 - 114
service-manage/src/main/java/com/simuwang/manage/api/system/SysConfigController.java

@@ -1,114 +1,103 @@
-package com.simuwang.manage.api.system;
-
-import com.simuwang.base.common.page.TableDataInfo;
-import com.simuwang.base.common.result.AjaxResult;
-import com.simuwang.base.pojo.dos.SysConfigDO;
-import com.simuwang.base.pojo.vo.SysConfigVO;
-import com.simuwang.manage.api.base.BaseController;
-import com.simuwang.manage.service.system.SysConfigService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.ModelMap;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 参数配置 信息操作处理
- *
- * @author ruoyi
- */
-@Controller
-@RequestMapping("/v1/system/config")
-public class SysConfigController extends BaseController
-{
-    private String prefix = "system/config";
-
-    @Autowired
-    private SysConfigService configService;
-
-    @GetMapping()
-    public String config()
-    {
-        return prefix + "/config";
-    }
-
-    /**
-     * 查询参数配置列表
-     */
-    @PostMapping("/list")
-    @ResponseBody
-    public TableDataInfo list(SysConfigVO config)
-    {
-        List<SysConfigDO> list = configService.selectConfigList(config);
-        return getDataTable(list);
-    }
-    /**
-     * 新增参数配置
-     */
-    @GetMapping("/add")
-    public String add()
-    {
-        return prefix + "/add";
-    }
-
-    /**
-     * 新增保存参数配置
-     */
-    @PostMapping("/add")
-    @ResponseBody
-    public AjaxResult addSave(@Validated SysConfigVO config)
-    {
-        if (!configService.checkConfigKeyUnique(config))
-        {
-            return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
-        }
-        return toAjax(configService.insertConfig(config));
-    }
-
-    /**
-     * 修改参数配置
-     */
-    @GetMapping("/edit/{configId}")
-    public String edit(@PathVariable("configId") Long configId, ModelMap mmap)
-    {
-        mmap.put("config", configService.selectConfigById(configId));
-        return prefix + "/edit";
-    }
-
-    /**
-     * 修改保存参数配置
-     */
-    @PostMapping("/edit")
-    @ResponseBody
-    public AjaxResult editSave(@Validated SysConfigVO config)
-    {
-        if (!configService.checkConfigKeyUnique(config))
-        {
-            return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
-        }
-        return toAjax(configService.updateConfig(config));
-    }
-
-    /**
-     * 删除参数配置
-     */
-    @PostMapping("/remove")
-    @ResponseBody
-    public AjaxResult remove(String ids)
-    {
-        configService.deleteConfigByIds(ids);
-        return success();
-    }
-
-    /**
-     * 校验参数键名
-     */
-    @PostMapping("/checkConfigKeyUnique")
-    @ResponseBody
-    public boolean checkConfigKeyUnique(SysConfigVO config)
-    {
-        return configService.checkConfigKeyUnique(config);
-    }
-}
+//package com.simuwang.manage.api.system;
+//
+//import com.simuwang.base.common.result.AjaxResult;
+//import com.simuwang.base.pojo.dos.SysConfigDO;
+//import com.simuwang.base.pojo.vo.SysConfigVO;
+//import com.simuwang.manage.service.system.SysConfigService;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Controller;
+//import org.springframework.ui.ModelMap;
+//import org.springframework.validation.annotation.Validated;
+//import org.springframework.web.bind.annotation.*;
+//
+//import java.util.List;
+//
+///**
+// * 参数配置 信息操作处理
+// *
+// * @author ruoyi
+// */
+//@Controller
+//@RequestMapping("/v1/system/config")
+//public class SysConfigController
+//{
+//    private String prefix = "system/config";
+//
+//    @Autowired
+//    private SysConfigService configService;
+//
+//    @GetMapping()
+//    public String config()
+//    {
+//        return prefix + "/config";
+//    }
+//
+//
+//    /**
+//     * 新增参数配置
+//     */
+//    @GetMapping("/add")
+//    public String add()
+//    {
+//        return prefix + "/add";
+//    }
+//
+//    /**
+//     * 新增保存参数配置
+//     */
+//    @PostMapping("/add")
+//    @ResponseBody
+//    public AjaxResult addSave(@Validated SysConfigVO config)
+//    {
+//        if (!configService.checkConfigKeyUnique(config))
+//        {
+//            return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
+//        }
+//        return toAjax(configService.insertConfig(config));
+//    }
+//
+//    /**
+//     * 修改参数配置
+//     */
+//    @GetMapping("/edit/{configId}")
+//    public String edit(@PathVariable("configId") Long configId, ModelMap mmap)
+//    {
+//        mmap.put("config", configService.selectConfigById(configId));
+//        return prefix + "/edit";
+//    }
+//
+//    /**
+//     * 修改保存参数配置
+//     */
+//    @PostMapping("/edit")
+//    @ResponseBody
+//    public AjaxResult editSave(@Validated SysConfigVO config)
+//    {
+//        if (!configService.checkConfigKeyUnique(config))
+//        {
+//            return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
+//        }
+//        return toAjax(configService.updateConfig(config));
+//    }
+//
+//    /**
+//     * 删除参数配置
+//     */
+//    @PostMapping("/remove")
+//    @ResponseBody
+//    public AjaxResult remove(String ids)
+//    {
+//        configService.deleteConfigByIds(ids);
+//        return success();
+//    }
+//
+//    /**
+//     * 校验参数键名
+//     */
+//    @PostMapping("/checkConfigKeyUnique")
+//    @ResponseBody
+//    public boolean checkConfigKeyUnique(SysConfigVO config)
+//    {
+//        return configService.checkConfigKeyUnique(config);
+//    }
+//}

+ 65 - 0
service-manage/src/main/java/com/simuwang/manage/init/QuartzConfig.java

@@ -0,0 +1,65 @@
+package com.simuwang.manage.init;
+
+import com.alibaba.fastjson.JSON;
+import com.simuwang.base.common.util.QuartzUtils;
+import com.simuwang.base.pojo.dos.MailboxInfoDO;
+import com.simuwang.base.pojo.dto.MailboxInfoDTO;
+import com.simuwang.base.pojo.dto.QuartzBean;
+import com.simuwang.manage.service.EmailConfigService;
+import org.quartz.Scheduler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.annotation.Order;
+
+import java.util.List;
+
+/**
+ * 定时任务启动类
+ * Author:   chenjianhua
+ * Date:     2024/9/17 11:55
+ * Description: ${DESCRIPTION}
+ */
+@Configuration
+@Order(2)
+public class QuartzConfig implements ApplicationRunner {
+    @Autowired
+    private Scheduler scheduler;
+    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    @Autowired
+    private EmailConfigService emailConfigService;
+
+    @Value("${spring.application.name}")
+    private String groupName;
+    private String JOB_CLASS="com.simuwang.manage.task.ParseSchedulerTask";
+    @Override
+    public void run(ApplicationArguments args){
+        List<MailboxInfoDO> mailboxInfoDOS = emailConfigService.getAll();
+        for(MailboxInfoDO mailboxInfoDO : mailboxInfoDOS){
+            try{
+                QuartzBean quartzBean = new QuartzBean();
+                quartzBean.setCronExpression(mailboxInfoDO.getCron());
+                quartzBean.setStatus(mailboxInfoDO.getOpenStatus());
+                quartzBean.setGroupName(groupName);
+                quartzBean.setJobName(mailboxInfoDO.getEmail());
+                quartzBean.setJobClass(JOB_CLASS);
+                //请求参数
+                MailboxInfoDTO paramDTO = new MailboxInfoDTO();
+                paramDTO.setAccount(mailboxInfoDO.getEmail());
+                paramDTO.setPassword(mailboxInfoDO.getPassword());
+                paramDTO.setPort(mailboxInfoDO.getPort());
+                paramDTO.setHost(mailboxInfoDO.getServer());
+                paramDTO.setProtocol(mailboxInfoDO.getProtocol());
+                quartzBean.setJobParam(JSON.toJSONString(paramDTO));
+                QuartzUtils.createScheduleJob(scheduler,quartzBean);
+            }catch (Exception e) {
+                logger.error(e.getMessage(),e);
+            }
+        }
+    }
+}

+ 30 - 0
service-manage/src/main/java/com/simuwang/manage/service/DeletionService.java

@@ -0,0 +1,30 @@
+package com.simuwang.manage.service;
+
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.pojo.dto.ExcelDeletionInfoDTO;
+import com.simuwang.base.pojo.dto.query.DeletionPageQuery;
+import com.simuwang.base.pojo.dto.query.FundDeletionPageQuery;
+import com.simuwang.base.pojo.vo.DeletionInfoVO;
+import com.simuwang.base.pojo.vo.FundDeletionInfoVO;
+import com.simuwang.base.pojo.vo.FundDeletionRemarkVO;
+import com.simuwang.base.pojo.vo.FundIdListVO;
+
+import java.util.List;
+
+/**
+ * FileName: DeletionService
+ * Author:   chenjianhua
+ * Date:     2024/9/17 18:54
+ * Description: ${DESCRIPTION}
+ */
+public interface DeletionService {
+    MybatisPage<DeletionInfoVO> searchDeletionList(DeletionPageQuery deletionPageQuery);
+
+    MybatisPage<FundDeletionInfoVO> searchFundDeletionList(FundDeletionPageQuery fundDeletionPageQuery);
+
+    void saveFundDeletionList(List<FundDeletionInfoVO> fundDeletionInfoVOList);
+
+    void saveBatchDeletionRemark(FundDeletionRemarkVO fundDeletionRemarkVO);
+
+    List<ExcelDeletionInfoDTO> selectFundDeletionInfoVOList(FundIdListVO fundIdListVO);
+}

+ 26 - 0
service-manage/src/main/java/com/simuwang/manage/service/DistributionService.java

@@ -0,0 +1,26 @@
+package com.simuwang.manage.service;
+
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.pojo.dto.query.DistributionPageQuery;
+import com.simuwang.base.pojo.vo.DistributionTablePageVO;
+import com.simuwang.base.pojo.vo.DistributionVO;
+import com.simuwang.base.pojo.vo.IdListVO;
+import com.smppw.common.pojo.ResultVo;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * FileName: DistributionService
+ * Author:   chenjianhua
+ * Date:     2024/9/15 14:07
+ * Description: ${DESCRIPTION}
+ */
+public interface DistributionService {
+
+    MybatisPage<DistributionTablePageVO> searchDistributionList(DistributionPageQuery distributionPageQuery);
+
+    ResultVo saveDistribution(DistributionVO distributionVO);
+
+    void deleteDistribution(IdListVO idListVO);
+
+    ResultVo uploadDistribution(MultipartFile file);
+}

+ 11 - 1
service-manage/src/main/java/com/simuwang/manage/service/EmailConfigService.java

@@ -1,10 +1,12 @@
 package com.simuwang.manage.service;
 
 import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.pojo.dos.MailboxInfoDO;
 import com.simuwang.base.pojo.dto.query.EmailPageQuery;
 import com.simuwang.base.pojo.vo.MailboxInfoTableVO;
 import com.simuwang.base.pojo.vo.MailboxInfoVO;
 import com.simuwang.base.pojo.vo.OpenStatusVO;
+import com.simuwang.base.pojo.vo.ParseParamVO;
 import com.smppw.common.pojo.ResultVo;
 
 import java.util.List;
@@ -22,11 +24,19 @@ public interface EmailConfigService {
 
     ResultVo connectTest(MailboxInfoVO mailboxInfoVO);
 
-    void deleteEmailConfig(Integer id);
+    void deleteEmailConfig(List<Integer> id);
 
     boolean checkEmailUnique(String email);
 
     MailboxInfoVO searchEmailConfigById(Integer id);
 
     void controlEmailConfig(OpenStatusVO openStatusVO);
+
+    List<MailboxInfoDO> getAll();
+
+    MailboxInfoDO selectEmailConfigByEmail(String email);
+
+    void runOnce(Integer id);
+
+    void parseEmail(ParseParamVO parseParamVO);
 }

+ 11 - 0
service-manage/src/main/java/com/simuwang/manage/service/EmailFundAssetService.java

@@ -0,0 +1,11 @@
+package com.simuwang.manage.service;
+
+/**
+ * FileName: EmailFundAssetService
+ * Author:   chenjianhua
+ * Date:     2024/9/15 12:43
+ * Description: ${DESCRIPTION}
+ */
+public interface EmailFundAssetService {
+    void reparseFileAsset(String sourceFundName, String targetFundId);
+}

+ 0 - 0
service-manage/src/main/java/com/simuwang/manage/service/EmailFundInfoService.java


Some files were not shown because too many files changed in this diff