Bladeren bron

修改bug

785834757 3 maanden geleden
bovenliggende
commit
abb05f48ce

+ 11 - 7
platform/src/main/java/com/jzg/service/impl/SysSystemServiceImpl.java

@@ -658,13 +658,17 @@ public class SysSystemServiceImpl extends ServiceImpl<SysSystemMapper, SysSystem
                         .orderByAsc(EsmInsCompanyTenantSort::getOrderNum)
         );
 
-        List<EsmInsCompany> finalCompanyList1 = companyList;
-        List<EsmInsCompany> finalCompanyList = sortList.stream()
-                .map(EsmInsCompanyTenantSort::getCompanyId)
-                .flatMap(companyId -> finalCompanyList1.stream()
-                        .filter(company -> companyId.equals(company.getId()))
-                        .limit(1)
-                )
+        Map<String, Integer> companySortMap = sortList.stream()
+                .collect(Collectors.toMap(
+                        EsmInsCompanyTenantSort::getCompanyId,
+                        EsmInsCompanyTenantSort::getOrderNum,
+                        (oldVal, newVal) -> oldVal
+                ));
+
+        List<EsmInsCompany> finalCompanyList = companyList.stream()
+                .sorted(Comparator.comparingInt(
+                        company -> companySortMap.getOrDefault(company.getId(), Integer.MAX_VALUE)
+                ))
                 .collect(Collectors.toList());
 
         return finalCompanyList;

+ 2 - 2
platform/src/main/resources/mapper/PtlAgreementAttributionMapper.xml

@@ -35,9 +35,9 @@
         1=1
         and paa.is_delete = '0'
         <if test="ptlAgreementAttributionQueryVo.username != null and ptlAgreementAttributionQueryVo.username != ''">
-            and paa.username like concat('%',#{ptlAgreementAttributionQueryVo.username},'%')
+            and (paa.username like concat('%',#{ptlAgreementAttributionQueryVo.username},'%')
             or paa.user_abbr like concat('%',#{ptlAgreementAttributionQueryVo.username},'%')
-            or eic.name_simple like concat('%',#{ptlAgreementAttributionQueryVo.username},'%')
+            or eic.name_simple like concat('%',#{ptlAgreementAttributionQueryVo.username},'%'))
         </if>
         <if test="ptlAgreementAttributionQueryVo.quoteStatus != null and ptlAgreementAttributionQueryVo.quoteStatus != ''">
             and paa.quote_status = #{ptlAgreementAttributionQueryVo.quoteStatus}

+ 6 - 8
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/aop/aspect/QuoteVerificationAspect.java

@@ -98,7 +98,7 @@ public class QuoteVerificationAspect {
             List<CostsListVo> agreementProductCosts = this.beforeFilter(costsList,insOrdersCarInfo);
             // 设置默认的优先级
             agreementProductCosts = this.setPriorities(agreementProductCosts);
-
+            log.info("过滤的费用列表:{}",JSONObject.toJSONString(agreementProductCosts));
             if (!agreementProductCosts.isEmpty()) {
                 //遍历费用因子
                 String costId = verificationCosts(agreementProductCosts, logs, insOrdersOther, insOrdersCarInfo, insOrdersRisks,
@@ -106,7 +106,7 @@ public class QuoteVerificationAspect {
                 if (costId != null) {
                     // 根据匹配到的协议、费用 开始计算入口费用
                     InsFeeOrders insFeeOrders = calcCosts(agreementInfoVo,costId, insOrders,insOrdersCosts);
-                    log.debug("费用因子校验通过,子订单id:" + insOrders.getId() + ",费用id:" + costId);
+                    log.info("费用因子校验通过,子订单id:" + insOrders.getId() + ",费用id:" + costId);
                     result.getData().setFeeOrders(insFeeOrders);
                     return;
                 }
@@ -203,19 +203,17 @@ public class QuoteVerificationAspect {
 
         for (int i = 0; i < agreementProductCosts.size(); i++) {
             //判断是否匹配
-//            log.debug("费用因子匹配开始:" + agreementProductCosts.get(i).getId());
+            log.info("费用因子匹配开始:" + agreementProductCosts.get(i).getId());
 //
-//            log.debug("车牌号:" + insOrdersCarInfo.getLicenseNo());
-//            log.debug("费用因子备注:" + agreementProductCosts.get(i).getCostsDescription());
-//            logs.append("费用id:" + agreementProductCosts.get(i).getId() + "\n");
-//            logs.append("费用因子描述:" + agreementProductCosts.get(i).getCostsDescription() + "\n");
+            log.info("车牌号:" + insOrdersCarInfo.getLicenseNo());
+            logs.append("费用id:" + agreementProductCosts.get(i).getId() + "\n");
             List<PtlAgreementUndwrtRulesDictLabal> undwrtRulesDictList = ptlNewAgreementClient.getUndwrtRulesDictList();
 
             if (FactorMatch.judgements(agreementProductCosts.get(i).getPtlAgreementCostRuleList(),ruleAttrMappingVoList,undwrtRulesAttrList,logs, undwrtRulesDictList)) {
                 log.info("匹配到的费用id:{}",agreementProductCosts.get(i).getId());
                 return agreementProductCosts.get(i).getId();
             }
-            log.debug("当前费用因子匹配结束\n");
+            log.info("当前费用因子匹配结束\n");
         }
         return null;
     }

+ 2 - 2
tenant/insurance/quotation-summary/src/main/resources/mapper/SysQueryVehicleConfigMapper.xml

@@ -3,9 +3,9 @@
 <mapper namespace="com.jzg.quotation.summary.mapper.SysQueryVehicleConfigMapper">
 
     <sql id="Base_Column_List">
-        id,company_id,company_name,
+        c.id,company_id,company_name,
         url,enabled,username,
-        password
+        password,link
     </sql>
 
     <select id="getByType" resultType="com.jzg.commons.entity.dto.SysQueryVehicleConfigDTO">