|
|
@@ -10,11 +10,15 @@ import com.ydtech.modules.order.aop.AuditVerification;
|
|
|
import com.ydtech.modules.order.aop.QuoteVerification;
|
|
|
import com.ydtech.modules.order.components.InsOrdersComponents;
|
|
|
import com.ydtech.modules.order.constants.ya.CarDamageVerification;
|
|
|
+import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
+import com.ydtech.modules.order.entity.InsOrders;
|
|
|
+import com.ydtech.modules.order.entity.crawler.response.YaCrawlerSendSmsCodeResponse;
|
|
|
import com.ydtech.modules.order.entity.crawler.response.YaCrawlerVerifyCodeResponse;
|
|
|
import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
|
|
|
import com.ydtech.modules.order.entity.vo.QuoteAccidentalDrivingVo;
|
|
|
+import com.ydtech.modules.order.service.InsAreaCompanyService;
|
|
|
import com.ydtech.modules.order.service.InsCrawlerOrderService;
|
|
|
import com.ydtech.modules.order.service.InsOrdersService;
|
|
|
import com.ydtech.modules.protocol.entity.dto.PtlAgreementAttributionDto;
|
|
|
@@ -25,6 +29,8 @@ import lombok.RequiredArgsConstructor;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.Objects;
|
|
|
+
|
|
|
@Api(tags = "爬虫对接")
|
|
|
@RequestMapping("/insurance/crawler")
|
|
|
@RestController
|
|
|
@@ -37,6 +43,8 @@ public class InsCrawlerOrderController extends BaseController {
|
|
|
|
|
|
private final InsOrdersService insOrdersService;
|
|
|
|
|
|
+ private final InsAreaCompanyService insAreaCompanyService;
|
|
|
+
|
|
|
|
|
|
@QuoteVerification("报价授权")
|
|
|
@PostMapping("/quote")
|
|
|
@@ -137,15 +145,29 @@ public class InsCrawlerOrderController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @GetMapping(value = "/yaGetMobile")
|
|
|
+ @ApiOperation(value = "永安获取订单验证码")
|
|
|
+ public HttpResult yaGetMobile(String companyId) {
|
|
|
+ InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
|
|
|
+ InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
+ if(Objects.isNull(insOrders)){
|
|
|
+ return HttpResult.error("订单不存在");
|
|
|
+ }
|
|
|
+ JSONObject applyinfo = insOrders.getApplyinfo();
|
|
|
+ String mobile = applyinfo.get("mobile").toString();
|
|
|
+
|
|
|
+ return HttpResult.ok(mobile);
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping(value = "/yaSendCode")
|
|
|
@ApiOperation(value = "永安发送客户信息确认验证码")
|
|
|
public HttpResult yaSendCode(@RequestBody JSONObject jsonObject) {
|
|
|
|
|
|
- boolean result = insuranceCrawlerOrderService.yaSendCode(jsonObject.getString("companyId"),jsonObject.getString("smsCode"));
|
|
|
- if(result){
|
|
|
+ YaCrawlerSendSmsCodeResponse result = insuranceCrawlerOrderService.yaSendCode(jsonObject.getString("companyId"),jsonObject.getString("smsCode"));
|
|
|
+ if(result.getCode() == 200){
|
|
|
return HttpResult.ok("发送成功!");
|
|
|
}else{
|
|
|
- return HttpResult.error("发送失败!");
|
|
|
+ return HttpResult.error(result.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|