瀏覽代碼

feat: 缺失模块页面功能开发

chenjianhua 7 月之前
父節點
當前提交
a0fb7230f1
共有 29 個文件被更改,包括 1130 次插入571 次删除
  1. 46 0
      service-base/src/main/java/com/simuwang/base/common/enums/DeletionType.java
  2. 0 102
      service-base/src/main/java/com/simuwang/base/common/page/PageDomain.java
  3. 0 85
      service-base/src/main/java/com/simuwang/base/common/page/TableDataInfo.java
  4. 0 56
      service-base/src/main/java/com/simuwang/base/common/page/TableSupport.java
  5. 49 5
      service-base/src/main/java/com/simuwang/base/common/util/ExcelUtil.java
  6. 0 35
      service-base/src/main/java/com/simuwang/base/common/util/PageUtils.java
  7. 38 0
      service-base/src/main/java/com/simuwang/base/mapper/DeletionInfoMapper.java
  8. 2 0
      service-base/src/main/java/com/simuwang/base/mapper/FundInfoMapper.java
  9. 87 0
      service-base/src/main/java/com/simuwang/base/pojo/dos/DeletionInfoDO.java
  10. 69 0
      service-base/src/main/java/com/simuwang/base/pojo/dos/FundDeletionInfoDO.java
  11. 37 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/ExcelDeletionInfoDTO.java
  12. 73 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/query/DeletionPageQuery.java
  13. 25 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/query/FundDeletionPageQuery.java
  14. 47 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/DeletionInfoVO.java
  15. 38 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundDeletionInfoVO.java
  16. 25 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundDeletionRemarkVO.java
  17. 21 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundDeletionTypeVO.java
  18. 19 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/FundIdListVO.java
  19. 195 0
      service-base/src/main/resources/mapper/DeletionInfoMapper.xml
  20. 5 0
      service-base/src/main/resources/mapper/FundInfoMapper.xml
  21. 0 163
      service-manage/src/main/java/com/simuwang/manage/api/base/BaseController.java
  22. 1 3
      service-manage/src/main/java/com/simuwang/manage/api/company/CompanyEmailSendHistoryController.java
  23. 128 0
      service-manage/src/main/java/com/simuwang/manage/api/deletion/DeletionController.java
  24. 0 2
      service-manage/src/main/java/com/simuwang/manage/api/email/EmailAssetDetailController.java
  25. 1 4
      service-manage/src/main/java/com/simuwang/manage/api/email/EmailConfigController.java
  26. 0 2
      service-manage/src/main/java/com/simuwang/manage/api/email/EmailNavDetailController.java
  27. 103 114
      service-manage/src/main/java/com/simuwang/manage/api/system/SysConfigController.java
  28. 30 0
      service-manage/src/main/java/com/simuwang/manage/service/DeletionService.java
  29. 91 0
      service-manage/src/main/java/com/simuwang/manage/service/impl/DeletionServiceImpl.java

+ 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;
+    }
+}

+ 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();
-    }
-}

+ 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);
+}

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

@@ -35,4 +35,6 @@ public interface FundInfoMapper {
     String getFundNameByFundId(String fundId);
 
     String queryFundIdByName(@Param("fundName") String fundName);
+
+    String getCompanyNameByFundId(@Param("fundId") String fundId);
 }

+ 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;
+    }
+}

+ 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;
+    }
+}

+ 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;
+}

+ 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;
+    }
+}

+ 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;
+    }
+}

+ 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;
+
+}

+ 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;
+}

+ 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>

+ 5 - 0
service-base/src/main/resources/mapper/FundInfoMapper.xml

@@ -151,5 +151,10 @@
         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>

+ 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);
-    }
-
-}

+ 1 - 3
service-manage/src/main/java/com/simuwang/manage/api/company/CompanyEmailSendHistoryController.java

@@ -1,12 +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.*;
-import com.simuwang.manage.api.base.BaseController;
 import com.simuwang.manage.service.CompanyEmailConfigService;
 import com.simuwang.manage.service.CompanyEmailSendHistoryService;
 import org.slf4j.Logger;
@@ -22,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;

+ 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);
+        }
+    }
+}

+ 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;

+ 1 - 4
service-manage/src/main/java/com/simuwang/manage/api/email/EmailConfigController.java

@@ -3,7 +3,6 @@ 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.*;
-import com.simuwang.manage.api.base.BaseController;
 import com.simuwang.manage.service.EmailConfigService;
 import com.smppw.common.pojo.ResultVo;
 import com.smppw.common.pojo.enums.status.ResultCode;
@@ -12,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
@@ -22,7 +19,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/v1/email")
-public class EmailConfigController extends BaseController {
+public class EmailConfigController{
 
     @Autowired
     private EmailConfigService emailConfigService;

+ 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.*;

+ 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);
+//    }
+//}

+ 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);
+}

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

@@ -0,0 +1,91 @@
+package com.simuwang.manage.service.impl;
+
+import com.simuwang.base.common.enums.DeletionType;
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.common.util.DateUtils;
+import com.simuwang.base.common.util.StringUtil;
+import com.simuwang.base.mapper.DeletionInfoMapper;
+import com.simuwang.base.mapper.FundInfoMapper;
+import com.simuwang.base.pojo.dos.DeletionInfoDO;
+import com.simuwang.base.pojo.dos.FundDeletionInfoDO;
+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 org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * FileName: DeletionServiceImpl
+ * Author:   chenjianhua
+ * Date:     2024/9/17 18:54
+ * Description: ${DESCRIPTION}
+ */
+@Service
+public class DeletionServiceImpl implements DeletionService {
+
+    @Autowired
+    private DeletionInfoMapper deletionInfoMapper;
+
+    @Autowired
+    private FundInfoMapper fundInfoMapper;
+    @Override
+    public MybatisPage<DeletionInfoVO> searchDeletionList(DeletionPageQuery deletionPageQuery) {
+        List<DeletionInfoDO> deletionInfoDOList = deletionInfoMapper.searchDeletionList(deletionPageQuery);
+        long total = deletionInfoMapper.countDeletion(deletionPageQuery);
+        List<DeletionInfoVO> dataList = deletionInfoDOList.stream().map(DeletionInfoDO::toVO).collect(Collectors.toList());
+        for(DeletionInfoVO vo : dataList){
+            String fundId = vo.getFundId();
+            String lastDeletionDate = deletionInfoMapper.getLastDeletionDateByFundId(fundId,vo.getDeletionType());
+            vo.setLastDeletionDate(lastDeletionDate);
+        }
+        return MybatisPage.of(total,dataList);
+    }
+
+    @Override
+    public MybatisPage<FundDeletionInfoVO> searchFundDeletionList(FundDeletionPageQuery fundDeletionPageQuery) {
+        List<FundDeletionInfoDO> deletionInfoDOList = deletionInfoMapper.searchFundDeletionList(fundDeletionPageQuery);
+        long total = deletionInfoMapper.countFundDeletionList(fundDeletionPageQuery);
+        List<FundDeletionInfoVO> dataList = deletionInfoDOList.stream().map(FundDeletionInfoDO::toVO).collect(Collectors.toList());
+        for(FundDeletionInfoVO infoVO : dataList){
+            infoVO.setFundName(fundInfoMapper.getFundNameByFundId(infoVO.getFundId()));
+        }
+        return MybatisPage.of(total,dataList);
+    }
+
+    @Override
+    public void saveFundDeletionList(List<FundDeletionInfoVO> fundDeletionInfoVOList) {
+        deletionInfoMapper.batchUpdate(fundDeletionInfoVOList);
+    }
+
+    @Override
+    public void saveBatchDeletionRemark(FundDeletionRemarkVO fundDeletionRemarkVO) {
+        String remark = fundDeletionRemarkVO.getRemark();
+        for(FundDeletionTypeVO remarkVO : fundDeletionRemarkVO.getFundDeletionTypeList()){
+            deletionInfoMapper.updateRemark(remarkVO.getFundId(),remarkVO.getDeletionType(),remark);
+        }
+    }
+
+    @Override
+    public List<ExcelDeletionInfoDTO> selectFundDeletionInfoVOList(FundIdListVO fundIdListVO) {
+        List<ExcelDeletionInfoDTO> result = new ArrayList<>();
+        List<String> fundIdList = fundIdListVO.getFundIdList();
+        List<FundDeletionInfoDO> deletionInfoDOList = deletionInfoMapper.selectFundDeletionInfoVOList(fundIdList);
+        for(FundDeletionInfoDO infoDO : deletionInfoDOList){
+            ExcelDeletionInfoDTO dto = new ExcelDeletionInfoDTO();
+            dto.setFundName(fundInfoMapper.getFundNameByFundId(infoDO.getFundId()));
+            dto.setCompanyName(fundInfoMapper.getCompanyNameByFundId(infoDO.getFundId()));
+            dto.setDeletionType(DeletionType.getDeletionTypeByCode(infoDO.getDeletionType()).getInfo());
+            dto.setDeletionDate(infoDO.getDeletionDate());
+            dto.setRemark(infoDO.getRemark());
+            dto.setFundId(infoDO.getFundId());
+            result.add(dto);
+        }
+        return result;
+    }
+}