Преглед на файлове

Merge remote-tracking branch 'origin/master'

lixiaolong преди 1 седмица
родител
ревизия
d3c71b09c4

+ 5 - 3
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementCostServiceImpl.java

@@ -1,7 +1,9 @@
 package com.jzg.organization.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.ReUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -449,7 +451,7 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
                 .filter(attr -> StrUtil.isNotEmpty(attr.getAttrName()))
                 .sorted(Comparator.comparing(PtlAgreementUndwrtRulesAttr::getSort, Comparator.nullsLast(Integer::compareTo)))
                 .collect(Collectors.toList());
-        if (sortedAttrs.isEmpty()) {
+        if (CollUtil.isEmpty(sortedAttrs)) {
             return;
         }
         // cost_rules 各段以 ";\t\t" 分隔
@@ -463,7 +465,7 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
             List<String> segList = Arrays.stream(costRules.split(separator))
                     .filter(s -> !s.isEmpty())
                     .collect(Collectors.toList());
-            if (segList.isEmpty()) {
+            if (CollUtil.isEmpty(segList)) {
                 continue;
             }
             // 为每段确定排序值:用 contains 判断包含哪个属性名,取对应 sort
@@ -471,7 +473,7 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
             for (String seg : segList) {
                 Integer sortVal = null;
                 for (PtlAgreementUndwrtRulesAttr attr : sortedAttrs) {
-                    if (seg.contains(attr.getAttrName())) {
+                    if (seg.startsWith(StrUtil.trim(ReUtil.replaceAll(attr.getAttrName(), "[((].*?[))]", "")))) {
                         sortVal = attr.getSort();
                         break;
                     }

+ 1 - 2
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlSchemeServiceImpl.java

@@ -40,7 +40,6 @@ import com.jzg.organization.client.OrgClient;
 import com.jzg.organization.client.PlatformClient;
 import com.jzg.organization.mapper.*;
 import com.jzg.organization.service.*;
-import io.seata.spring.annotation.GlobalTransactional;
 import org.apache.http.util.TextUtils;
 import org.redisson.api.RedissonClient;
 import org.slf4j.Logger;
@@ -184,7 +183,7 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
                 }
             }
         }
-        //校验驾意险座位数范围不可重复
+        // 自选驾意险,校验座位数范围不可重复
         if(!ptlSchemeSaveVo.getSchemeType().equals("2")) {
             validateDrivingIntentionSeatRange(ptlSchemeInsuranceDrivingIntentionList);
         }