Commit a1048f0c by jianan

来佣匹配-出单经纪公司

parent dfa57c5e
......@@ -748,6 +748,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
// 1. 生效日期独立验证(第一步)
Date effectiveDate = policy.getEffectiveDate();
List<ApiExpectedSpeciesListResponse> validDateList = filterAndCheck(
expectedSpeciesList,
i -> isEffective(i.getEffectiveStart(), i.getEffectiveEnd(), effectiveDate),
......@@ -758,8 +759,16 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
return new MatchResult(Collections.emptyList(), unmatchedConditions);
}
if (validDateList.isEmpty()) {
return new MatchResult(Collections.emptyList(), Collections.emptyList());
// 1. 出单经纪公司独立验证
String reconciliationCompanyBizId = policy.getReconciliationCompanyBizId();
validDateList = filterAndCheck(
validDateList,
i -> i.getReconciliationCompany().equals(reconciliationCompanyBizId),
unmatchedConditions,
"出单经纪公司[" + policy.getReconciliationCompany() + "]");
if (!unmatchedConditions.isEmpty()) {
return new MatchResult(Collections.emptyList(), unmatchedConditions);
}
// 2. 获取第一个规格的条件模板
......@@ -900,12 +909,12 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
ApiExpectedSpeciesListRequest apiExpectedSpeciesListRequest = new ApiExpectedSpeciesListRequest();
apiExpectedSpeciesListRequest.setProductLaunchBizId(productLaunchBizId);
Result<List<ApiExpectedSpeciesListResponse>> result = apiExpectedSpeciesFeignClient.list(apiExpectedSpeciesListRequest);
log.info("查询预计佣规格queryExpectedSpeciesByFeign==========>,{}",JSON.toJSONString(result));
log.info("查询预计佣规格queryExpectedSpeciesByFeign==========>,{}",JSON.toJSONString(result));
if (result != null && result.getCode() == 200) {
return result.getData();
} else {
log.error("查询预计佣规格失败: productLaunchBizId={}", productLaunchBizId);
throw new BusinessException(ResultCode.FAIL.getCode(), "查询预计佣规格失败");
log.error("查询预计佣规格失败: productLaunchBizId={}", productLaunchBizId);
throw new BusinessException(ResultCode.FAIL.getCode(), "查询预计佣规格失败");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment