Просмотр исходного кода

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

wangzaijun 6 месяцев назад
Родитель
Сommit
76cc8f09ea

+ 3 - 3
service-base/src/main/java/com/simuwang/base/common/util/NavDataUtil.java

@@ -43,13 +43,13 @@ public class NavDataUtil {
     public static String checkDataFailReason(EmailFundNavDTO fundNavDTO) {
         // 净值日期格式校验
         if (StrUtil.isBlank(fundNavDTO.getPriceDate())) {
-            return "净值日期为空";
+            return "缺少净值日期";
         }
         if (StrUtil.isBlank(fundNavDTO.getFundName()) && StrUtil.isBlank(fundNavDTO.getRegisterNumber())) {
-            return "备案编码和基金名称都为空";
+            return "基金名称和备案编码均缺失";
         }
         if(StrUtil.isBlank(fundNavDTO.getNav()) && StrUtil.isBlank(fundNavDTO.getCumulativeNavWithdrawal()) && StrUtil.isBlank(fundNavDTO.getAssetNet())){
-            return "单位净值、累计净值、资产净值都为空";
+            return "单位净值和累计净值和资产净值均缺失";
         }
         // 单位净值,累计单位净值,资产净值,资产份额数字格式校验
         boolean isvalidNumericFormat = (StrUtil.isBlank(fundNavDTO.getNav()) || StringUtil.isNumeric(fundNavDTO.getNav()))

+ 3 - 3
service-base/src/main/java/com/simuwang/base/common/util/ValuationBusinessUtils.java

@@ -31,13 +31,13 @@ public class ValuationBusinessUtils {
 
     private static final String ERROR_MSG_NOT_EXCEL_FILE = "文件格式错误";
 
-    private static final String ERROR_MSG_NOT_MATCH_TEMPLATE = "估值表模板不支持";
+    private static final String ERROR_MSG_NOT_MATCH_TEMPLATE = "模板不支持";
 
     private static final String ERROR_MSG_NO_DATA = "无数据";
 
     private static final String ERROR_MSG_NOT_NUMBER = "非数值数据";
 
-    private static final String ERROR_MSG_NOT_MARKET_VALUE_OR_AMOUNT = "无市值列或者无数量列,无法导入";
+    private static final String ERROR_MSG_NOT_MARKET_VALUE_OR_AMOUNT = "无市值列或者无数量列";
 
     public static PreAssetsValuationInfo<PreAssetsValuationBase> importFile(ValuationNeedParseParam valuationNeedParseParam) {
         /*
@@ -97,7 +97,7 @@ public class ValuationBusinessUtils {
 
             // 未找到估值表标题
             if (StringUtils.isEmpty(header.getTitle())) {
-                error = preInfo.new Error().setCellNum(0).setRowNum(0).setMsg(ERROR_MSG_NOT_MATCH_TEMPLATE + ":未找到基金名称或备案编码");
+                error = preInfo.new Error().setCellNum(0).setRowNum(0).setMsg(ERROR_MSG_NOT_MATCH_TEMPLATE + ":从文件中未找到基金名称或备案编码");
                 error.setExcelName(valuationNeedParseParam.getOriginFileName());
                 preInfo.setError(error);
                 return preInfo;

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

@@ -221,7 +221,7 @@ public class EmailParseService {
             // 邮件解析失败时 -> 保存失败原因
             int hasPdfFile = emailContentInfoDTOList.stream().map(EmailContentInfoDTO::getFilePath).anyMatch(ExcelUtil::isPdf) ? 1 : 0;
             List<EmailFundNavDTO> navDTOList = fileNameNavMap.values().stream().flatMap(List::stream).toList();
-            failReason = hasPdfFile == 1 && CollUtil.isEmpty(navDTOList) ? "无法从pdf文件中获取到数据" : navDTOList.stream().map(EmailFundNavDTO::getFailReason).distinct().collect(Collectors.joining("/"));
+            failReason = hasPdfFile == 1 && CollUtil.isEmpty(navDTOList) ? "无法从PDF文件中获取到数据" : navDTOList.stream().map(EmailFundNavDTO::getFailReason).distinct().collect(Collectors.joining("/"));
         }
         // 报告邮件有一条失败就表示整个邮件解析失败
         if (Objects.equals(EmailTypeConst.REPORT_EMAIL_TYPE, emailType) && CollUtil.isNotEmpty(dataList)) {

+ 14 - 1
service-manage/src/main/java/com/simuwang/manage/dto/UserInfoVO.java

@@ -32,16 +32,29 @@ public class UserInfoVO {
      * 菜单树
      */
     private MenuTreeDTO menuTree;
+    /**
+     * 菜单权限ID集合
+     */
+    private List<Integer> menuIds;
 
     public UserInfoVO() {
     }
 
-    public UserInfoVO(Integer userId, String username, List<UserRoleDTO> roles, MenuTreeDTO menuTree) {
+    public UserInfoVO(Integer userId, String username, List<UserRoleDTO> roles, MenuTreeDTO menuTree,List<Integer> menuIds) {
         this();
         this.userId = userId;
         this.username = username;
         this.roles = roles;
         this.menuTree = menuTree;
+        this.menuIds = menuIds;
+    }
+
+    public List<Integer> getMenuIds() {
+        return menuIds;
+    }
+
+    public void setMenuIds(List<Integer> menuIds) {
+        this.menuIds = menuIds;
     }
 
     public Integer getUserId() {

+ 7 - 6
service-manage/src/main/java/com/simuwang/manage/service/LoginService.java

@@ -99,15 +99,16 @@ public class LoginService {
                 .distinct().collect(Collectors.toList());
         // 用户权限处理
         List<SysMenuDO> menuList = this.userAuthService.listUserMenuByUserId(userId, 1);
-        // 过滤按钮
-        List<MenuTreeDTO> tempList = menuList.stream()
+        // 返回用户的权限菜单ID
+        List<Integer> menuIds = menuList.stream().map(e -> e.getMenuId()).collect(Collectors.toList());
+        // 全部菜单列表转树结构
+        List<SysMenuDO> allMenuList = this.userAuthService.listUserMenuByUserId(0, 1);
+        List<MenuTreeDTO> allTempList = allMenuList.stream()
                 .map(MenuTreeDTO::new).collect(Collectors.toList());
-        // 菜单列表转树结构
-        List<MenuTreeDTO> trees = TreeUtil.list2Tree(tempList, MenuTreeDTO::getId, MenuTreeDTO::getPid,
+        List<MenuTreeDTO> trees = TreeUtil.list2Tree(allTempList, MenuTreeDTO::getId, MenuTreeDTO::getPid,
                 MenuTreeDTO::getChildren, MenuTreeDTO::setChildren, 0, MenuTreeDTO::getSort);
         MenuTreeDTO root = new MenuTreeDTO(0, "全部菜单", trees);
-        // 返回的数据结构构建
-        UserInfoVO vo = new UserInfoVO(userId, username, roles, root);
+        UserInfoVO vo = new UserInfoVO(userId, username, roles, root,menuIds);
         vo.setEmail(userInfo.getEmail());
         vo.setPhonenumber(userInfo.getPhonenumber());
         return vo;