Răsfoiți Sursa

解决bug:
数据报表-业务员,进入页面后报错

jiakai 4 luni în urmă
părinte
comite
b8713e5c80

+ 5 - 0
consoleStatistics/src/main/java/com/jzg/console/controller/ReportSearchConfigurationController.java

@@ -54,6 +54,7 @@ public class ReportSearchConfigurationController extends BaseController {
             List<ReportSearchConfigurationDto> list = reportSearchConfigurationService.getSearchConfigurationList(userId,routerKey);
             List<ReportSearchConfigurationDto> list = reportSearchConfigurationService.getSearchConfigurationList(userId,routerKey);
             return HttpResult.ok(list);
             return HttpResult.ok(list);
         }catch (Exception e){
         }catch (Exception e){
+            log.error(e.getMessage());
             return HttpResult.error(e.getMessage());
             return HttpResult.error(e.getMessage());
         }
         }
     }
     }
@@ -72,6 +73,7 @@ public class ReportSearchConfigurationController extends BaseController {
             List<ReportSearchConfigurationDto> list = reportSearchConfigurationService.getSearchDefaultList(userId,routerKey);
             List<ReportSearchConfigurationDto> list = reportSearchConfigurationService.getSearchDefaultList(userId,routerKey);
             return HttpResult.ok(list);
             return HttpResult.ok(list);
         }catch (Exception e){
         }catch (Exception e){
+            log.error(e.getMessage());
             return HttpResult.error(e.getMessage());
             return HttpResult.error(e.getMessage());
         }
         }
     }
     }
@@ -89,6 +91,7 @@ public class ReportSearchConfigurationController extends BaseController {
             List<SysDeptVo> deptTree = reportSearchConfigurationService.getDeptTree(userId);
             List<SysDeptVo> deptTree = reportSearchConfigurationService.getDeptTree(userId);
             return HttpResult.ok(deptTree);
             return HttpResult.ok(deptTree);
         }catch (Exception e){
         }catch (Exception e){
+            log.error(e.getMessage());
             return HttpResult.error(e.getMessage());
             return HttpResult.error(e.getMessage());
         }
         }
     }
     }
@@ -106,6 +109,7 @@ public class ReportSearchConfigurationController extends BaseController {
             List<ReportDictDto>  partnerCompanyList= reportSearchConfigurationService.getPartnerCompanyListByCompanyId(companyId);
             List<ReportDictDto>  partnerCompanyList= reportSearchConfigurationService.getPartnerCompanyListByCompanyId(companyId);
             return HttpResult.ok(partnerCompanyList);
             return HttpResult.ok(partnerCompanyList);
         }catch (Exception e){
         }catch (Exception e){
+            log.error(e.getMessage());
             return HttpResult.error(e.getMessage());
             return HttpResult.error(e.getMessage());
         }
         }
     }
     }
@@ -122,6 +126,7 @@ public class ReportSearchConfigurationController extends BaseController {
             List<UserTreeDto>  userManageList= reportSearchConfigurationService.getUserManageListByUserId(userId);
             List<UserTreeDto>  userManageList= reportSearchConfigurationService.getUserManageListByUserId(userId);
             return HttpResult.ok(userManageList);
             return HttpResult.ok(userManageList);
         }catch (Exception e){
         }catch (Exception e){
+            log.error(e.getMessage());
             return HttpResult.error(e.getMessage());
             return HttpResult.error(e.getMessage());
         }
         }
     }
     }

+ 8 - 7
consoleStatistics/src/main/java/com/jzg/console/service/impl/ReportSearchConfigurationServiceImpl.java

@@ -1,5 +1,7 @@
 package com.jzg.console.service.impl;
 package com.jzg.console.service.impl;
 
 
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.map.MapUtil;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jzg.commons.constants.report.enums.SearchKeyCodeEnum;
 import com.jzg.commons.constants.report.enums.SearchKeyCodeEnum;
 import com.jzg.commons.entity.po.SysArea;
 import com.jzg.commons.entity.po.SysArea;
@@ -16,10 +18,7 @@ import com.jzg.console.service.ReportSearchConfigurationService;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 
 
 /**
 /**
@@ -146,9 +145,11 @@ public class ReportSearchConfigurationServiceImpl extends ServiceImpl<ReportSear
             SysDeptVo sysDeptv = new SysDeptVo(item);
             SysDeptVo sysDeptv = new SysDeptVo(item);
             voDept.add(sysDeptv);
             voDept.add(sysDeptv);
         });
         });
-        Map<String, List<SysDeptVo>> map = voDept.stream().collect(Collectors.groupingBy(SysDeptVo::getParentId));
+        Map<String, List<SysDeptVo>> map = voDept.stream()
+                .collect(Collectors.groupingBy(SysDeptVo::getParentId));
         voDept.forEach(i -> i.setChildren(map.getOrDefault(i.getId(), new ArrayList<>())));
         voDept.forEach(i -> i.setChildren(map.getOrDefault(i.getId(), new ArrayList<>())));
-        List<SysDeptVo> sysDeptVos = map.get("0");
+        // 不会为null
+        List<SysDeptVo> sysDeptVos = map.getOrDefault("0", new ArrayList<>());
         List<SysDeptVo> newResultDept = new ArrayList<>();
         List<SysDeptVo> newResultDept = new ArrayList<>();
         newResultDept.addAll(sysDeptVos);
         newResultDept.addAll(sysDeptVos);
         return newResultDept;
         return newResultDept;
@@ -194,7 +195,7 @@ public class ReportSearchConfigurationServiceImpl extends ServiceImpl<ReportSear
         });
         });
         Map<String, List<UserTreeDto>> map = voUserList.stream().collect(Collectors.groupingBy(UserTreeDto::getParentId));
         Map<String, List<UserTreeDto>> map = voUserList.stream().collect(Collectors.groupingBy(UserTreeDto::getParentId));
         voUserList.forEach(i -> i.setChildren(map.getOrDefault(i.getId(), new ArrayList<>())));
         voUserList.forEach(i -> i.setChildren(map.getOrDefault(i.getId(), new ArrayList<>())));
-        List<UserTreeDto> sysUserVos = map.get("0");
+        List<UserTreeDto> sysUserVos = map.getOrDefault("0", new ArrayList<>());
         List<UserTreeDto> newResultDept = new ArrayList<>();
         List<UserTreeDto> newResultDept = new ArrayList<>();
         newResultDept.addAll(sysUserVos);
         newResultDept.addAll(sysUserVos);
         return newResultDept;
         return newResultDept;

+ 3 - 3
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/aop/FactorMatch.java

@@ -130,9 +130,9 @@ public class FactorMatch {
             }
             }
 
 
             if (!useFlag) {
             if (!useFlag) {
-                log.debug("检验的值:" + ptlAgreementProductCostsAttrLink.getMin());
-                log.debug("传入的值:" + ruleAttrMappingVo.getValue());
-                log.debug("规则匹配失败:" + ptlAgreementProductCostsAttrLink.getAttrCode());
+                log.info("检验的值:" + ptlAgreementProductCostsAttrLink.getMin());
+                log.info("传入的值:" + ruleAttrMappingVo.getValue());
+                log.info("规则匹配失败:" + ptlAgreementProductCostsAttrLink.getAttrCode());
 
 
 
 
                 List<PtlAgreementUndwrtRulesAttr> collect = undwrtRulesAttrList.stream()
                 List<PtlAgreementUndwrtRulesAttr> collect = undwrtRulesAttrList.stream()