Răsfoiți Sursa

中煤修改
匹配规则按保司过滤

Qchen 3 luni în urmă
părinte
comite
7d9fca3aea

+ 1 - 1
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quotation/zhongmei/crawler/service/Impl/ZhongMeiCrawlerRequestImpl.java

@@ -198,7 +198,7 @@ public class ZhongMeiCrawlerRequestImpl implements ZhongMeiCrawlerRequest {
                 quotedPriceResponse = zmCrawlerRequestComponent.quotedPrice(quotedPriceRequest);
             }
         }
-        if (!quotedPriceResponse.getHead().getReturnCode().equals("0") ) {
+        if (quotedPriceResponse.getHead().getReturnCode().equals("0") ) {
             // 商业险重复投保提示
             ZmCrawlerQuotedPriceResponse.BussinessMainDTO.ContractDTO contract =
                     quotedPriceResponse.getBussinessMain().getContract().stream()

+ 8 - 8
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementUndwrtRulesServiceImpl.java

@@ -8,20 +8,14 @@ import com.jzg.commons.entity.dto.AgreementRulesAddParam;
 import com.jzg.commons.entity.dto.AgreementRulesEditParam;
 import com.jzg.commons.entity.dto.CostAgreementParam;
 import com.jzg.commons.entity.dto.RulesGroupParam;
-import com.jzg.commons.entity.po.PtlAgreementUndwrtRules;
-import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttr;
-import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttrLink;
-import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesDictLabal;
+import com.jzg.commons.entity.po.*;
 import com.jzg.commons.entity.vo.AgreementRulesVo;
 import com.jzg.commons.entity.vo.CostListVo;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.idgen.IdGenerate;
 import com.jzg.organization.mapper.PtlAgreementUndwrtRulesAttrLinkMapper;
 import com.jzg.organization.mapper.PtlAgreementUndwrtRulesMapper;
-import com.jzg.organization.service.PtlAgreementCostService;
-import com.jzg.organization.service.PtlAgreementUndwrtRulesAttrLinkService;
-import com.jzg.organization.service.PtlAgreementUndwrtRulesAttrService;
-import com.jzg.organization.service.PtlAgreementUndwrtRulesService;
+import com.jzg.organization.service.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
@@ -62,6 +56,9 @@ public class PtlAgreementUndwrtRulesServiceImpl extends ServiceImpl<PtlAgreement
     @Autowired
     private PtlAgreementCostService ptlAgreementCostService;
 
+    @Autowired
+    private PtlAgreementService ptlAgreementService;
+
     /**
      * 协议规则列表
      *
@@ -352,12 +349,15 @@ public class PtlAgreementUndwrtRulesServiceImpl extends ServiceImpl<PtlAgreement
     @Override
     public AgreementRulesVo rulesGet(String ruleId) {
         PtlAgreementUndwrtRules rules = baseMapper.selectById(ruleId);
+        PtlAgreement agreement = ptlAgreementService.getById(rules.getAgreementId());
         AgreementRulesVo rulesVo = new AgreementRulesVo();
         BeanUtils.copyProperties(rules, rulesVo);
 
         // 获取费用因子属性(公共逻辑,仅查询一次)
         List<PtlAgreementUndwrtRulesAttr> attrList = agreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
         Map<String, PtlAgreementUndwrtRulesAttr> attrMap = attrList.stream()
+                .filter(attr -> attr.getCompanyIds().equals("all"))
+                .filter(attr -> attr.getCompanyIds().equals(agreement.getCompanyId()))
                 .collect(Collectors.toMap(PtlAgreementUndwrtRulesAttr::getAttrCode, attr -> attr));
 
         // 确定需要处理的规则ID列表