|
@@ -155,6 +155,8 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
crawlerQuoteRequest.setDiscount(t.getDiscount());
|
|
crawlerQuoteRequest.setDiscount(t.getDiscount());
|
|
|
// 是否需要验车
|
|
// 是否需要验车
|
|
|
crawlerQuoteRequest.setIsInspect(t.getIsInspect());
|
|
crawlerQuoteRequest.setIsInspect(t.getIsInspect());
|
|
|
|
|
+ // 永安商业折扣
|
|
|
|
|
+ crawlerQuoteRequest.setYaBusinessDiscount(t.getDiscount());
|
|
|
// 上次订单
|
|
// 上次订单
|
|
|
if (StringUtils.isNotEmpty(t.getLastCompanyId())) {
|
|
if (StringUtils.isNotEmpty(t.getLastCompanyId())) {
|
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getById(t.getLastCompanyId());
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getById(t.getLastCompanyId());
|
|
@@ -578,6 +580,8 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
quoteRespVo.setCifeeFloat(other.getCifeeFloat());
|
|
quoteRespVo.setCifeeFloat(other.getCifeeFloat());
|
|
|
// 商业费用浮动
|
|
// 商业费用浮动
|
|
|
quoteRespVo.setBifeeFloat(other.getBifeeFloat());
|
|
quoteRespVo.setBifeeFloat(other.getBifeeFloat());
|
|
|
|
|
+ // 永安商业折扣
|
|
|
|
|
+ quoteRespVo.setYaBusinessDiscount(other.getSyDiscount());
|
|
|
|
|
|
|
|
quoteRespVo.setTotalAdjustRate(StringUtils.toDouble(other.getDiscount()));
|
|
quoteRespVo.setTotalAdjustRate(StringUtils.toDouble(other.getDiscount()));
|
|
|
quoteRespVo.setJqAdjustRate(other.getJqDiscount());
|
|
quoteRespVo.setJqAdjustRate(other.getJqDiscount());
|
|
@@ -1041,7 +1045,7 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
public JSONObject sendLoginSmsCode(PtlAgreementAttributionDto agreementAttributionDto) {
|
|
public JSONObject sendLoginSmsCode(PtlAgreementAttributionDto agreementAttributionDto) {
|
|
|
// InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
|
|
// InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
|
|
|
PtlAgreementAttribution attribution = ptlAgreementAttributionService.getOne(new LambdaQueryWrapper<PtlAgreementAttribution>()
|
|
PtlAgreementAttribution attribution = ptlAgreementAttributionService.getOne(new LambdaQueryWrapper<PtlAgreementAttribution>()
|
|
|
- .eq(PtlAgreementAttribution::getTemplateId,agreementAttributionDto.getTemplateId()));
|
|
|
|
|
|
|
+ .eq(PtlAgreementAttribution::getId,agreementAttributionDto.getId()));
|
|
|
|
|
|
|
|
PtlAgreementAttributionDto attributionDto = new PtlAgreementAttributionDto();
|
|
PtlAgreementAttributionDto attributionDto = new PtlAgreementAttributionDto();
|
|
|
BeanUtils.copyProperties(attribution, attributionDto);
|
|
BeanUtils.copyProperties(attribution, attributionDto);
|
|
@@ -1064,6 +1068,7 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
// 泰山发送验证码
|
|
// 泰山发送验证码
|
|
|
if (attribution.getInsCompanyId().equals("TSBX1000000")){
|
|
if (attribution.getInsCompanyId().equals("TSBX1000000")){
|
|
|
TsCrawlerLoginRequest crawlerLoginRequest = new TsCrawlerLoginRequest(attributionDto);
|
|
TsCrawlerLoginRequest crawlerLoginRequest = new TsCrawlerLoginRequest(attributionDto);
|
|
|
|
|
+
|
|
|
TsCrawlerBaseResponse tsResponse = insCrawlerOrderComponents.request(apiUrl, InsuranceEnum.TSBX.getCode(), "获取验证码",
|
|
TsCrawlerBaseResponse tsResponse = insCrawlerOrderComponents.request(apiUrl, InsuranceEnum.TSBX.getCode(), "获取验证码",
|
|
|
crawlerLoginRequest, TsCrawlerBaseResponse.class);
|
|
crawlerLoginRequest, TsCrawlerBaseResponse.class);
|
|
|
if (!tsResponse.getCode().equals(200)) {
|
|
if (!tsResponse.getCode().equals(200)) {
|
|
@@ -1073,7 +1078,22 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
redisTemplate.opsForValue().set(InsuranceEnum.TSBX.getCode()+OrderCacheConstant.BS_ACCESS_TOKEN + attributionDto.getUsername(), JSON.toJSONString(tsResponse.getData()), OrderCacheConstant.TS_ACCESS_TOKEN_TIME,
|
|
redisTemplate.opsForValue().set(InsuranceEnum.TSBX.getCode()+OrderCacheConstant.BS_ACCESS_TOKEN + attributionDto.getUsername(), JSON.toJSONString(tsResponse.getData()), OrderCacheConstant.TS_ACCESS_TOKEN_TIME,
|
|
|
TimeUnit.SECONDS);
|
|
TimeUnit.SECONDS);
|
|
|
}
|
|
}
|
|
|
-// if (attribution.getInsCompanyId().equals(""))
|
|
|
|
|
|
|
+ // 诚泰发送验证码
|
|
|
|
|
+ if (attribution.getInsCompanyId().equals("CHAC1000000")){
|
|
|
|
|
+ CtCrawlerLoginRequest crawlerLoginRequest = new CtCrawlerLoginRequest(attributionDto);
|
|
|
|
|
+ LinkedHashMap<String,String> other = new LinkedHashMap<>();
|
|
|
|
|
+ other.put("phone",agreementAttributionDto.getPhone());
|
|
|
|
|
+ crawlerLoginRequest.setOther(other);
|
|
|
|
|
+ crawlerLoginRequest.setCheck("zs");
|
|
|
|
|
+ response = insCrawlerOrderComponents.request(apiUrl, InsuranceEnum.CHAC.getCode(), "获取验证码",
|
|
|
|
|
+ crawlerLoginRequest, JSONObject.class);
|
|
|
|
|
+ if (!response.getInteger("code").equals(400)) {
|
|
|
|
|
+ throw new SystemException(response.getString("message"));
|
|
|
|
|
+ }
|
|
|
|
|
+ // 将返回参数放入redis
|
|
|
|
|
+ redisTemplate.opsForValue().set(InsuranceEnum.CHAC.getCode()+OrderCacheConstant.BS_ACCESS_TOKEN + attributionDto.getUsername(), JSON.toJSONString(response.getString("data")), OrderCacheConstant.TS_ACCESS_TOKEN_TIME,
|
|
|
|
|
+ TimeUnit.SECONDS);
|
|
|
|
|
+ }
|
|
|
return response;
|
|
return response;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1123,6 +1143,26 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
throw new SystemException("验证码已失效!请重新发送!");
|
|
throw new SystemException("验证码已失效!请重新发送!");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ else if(companyCode.equals(InsuranceEnum.CHAC.getCode())){
|
|
|
|
|
+ CtCrawlerLoginRequest ctCrawlerLoginRequest = new CtCrawlerLoginRequest();
|
|
|
|
|
+ ctCrawlerLoginRequest.setUsername(agreement.getAttribution().getUsername());
|
|
|
|
|
+ ctCrawlerLoginRequest.setPwd(agreement.getAttribution().getPassword());
|
|
|
|
|
+ ctCrawlerLoginRequest.setOther(new LinkedHashMap<>());
|
|
|
|
|
+ ctCrawlerLoginRequest.getOther().put("phone",agreement.getAttribution().getPhone());
|
|
|
|
|
+ ctCrawlerLoginRequest.getOther().put("mescoed",agreement.getAgreement().getSmsCode());
|
|
|
|
|
+ ctCrawlerLoginRequest.setCheck("zs");
|
|
|
|
|
+ // 组装 Other 信息
|
|
|
|
|
+ Map<String,String> otherMap = new HashMap<>();
|
|
|
|
|
+ agreement.getAttribution().getFields().forEach(item->{
|
|
|
|
|
+ otherMap.put(item.getField(),item.getValue());
|
|
|
|
|
+ });
|
|
|
|
|
+ JSONObject response = insCrawlerOrderComponents.request(apiUrl, agreement.getAgreement().getPartnerCompaniesId(), "登录",
|
|
|
|
|
+ ctCrawlerLoginRequest, JSONObject.class);
|
|
|
|
|
+ if (response.getInteger("code") != 200) {
|
|
|
|
|
+ throw new SystemException("登录失败:" + response.getString("token"));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
else{
|
|
else{
|
|
|
// 正常登录流程
|
|
// 正常登录流程
|
|
|
}
|
|
}
|