|
@@ -30,15 +30,13 @@ import javax.validation.Valid;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
-import static com.alibaba.fastjson.JSON.parseObject;
|
|
|
|
|
-
|
|
|
|
|
@Api(tags = "订单")
|
|
@Api(tags = "订单")
|
|
|
@RequestMapping("/insurance/order")
|
|
@RequestMapping("/insurance/order")
|
|
|
@RestController
|
|
@RestController
|
|
|
public class InsOrdersController extends BaseController {
|
|
public class InsOrdersController extends BaseController {
|
|
|
|
|
|
|
|
@Value("${upload.file.path}")
|
|
@Value("${upload.file.path}")
|
|
|
- private String uploadFilePath;
|
|
|
|
|
|
|
+ private String uploadFilePath;
|
|
|
|
|
|
|
|
private final InsOrdersService insOrdersService;
|
|
private final InsOrdersService insOrdersService;
|
|
|
|
|
|
|
@@ -97,7 +95,7 @@ public class InsOrdersController extends BaseController {
|
|
|
|
|
|
|
|
@PostMapping("/orderExportExcel")
|
|
@PostMapping("/orderExportExcel")
|
|
|
@ApiOperation(value = "订单导出excel接口")
|
|
@ApiOperation(value = "订单导出excel接口")
|
|
|
- public HttpResult<String> orderExportExcel(@RequestBody InsOrdersExcelVo insOrdersExcelVo){
|
|
|
|
|
|
|
+ public HttpResult<String> orderExportExcel(@RequestBody InsOrdersExcelVo insOrdersExcelVo) {
|
|
|
return this.insOrdersService.orderExportExcel(insOrdersExcelVo);
|
|
return this.insOrdersService.orderExportExcel(insOrdersExcelVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -124,9 +122,7 @@ public class InsOrdersController extends BaseController {
|
|
|
InsOrders insOrders = this.insOrdersService.existOrder(quoteHistoryVo.getOrderNo());
|
|
InsOrders insOrders = this.insOrdersService.existOrder(quoteHistoryVo.getOrderNo());
|
|
|
|
|
|
|
|
LambdaQueryWrapper<InsAreaCompany> wrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<InsAreaCompany> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(!ObjectUtils.isEmpty(quoteHistoryVo.getOrderNo()), InsAreaCompany::getOrderno, quoteHistoryVo.getOrderNo())
|
|
|
|
|
- .eq(!ObjectUtils.isEmpty(quoteHistoryVo.getOrderStatus()), InsAreaCompany::getOrderstatus, quoteHistoryVo.getOrderStatus())
|
|
|
|
|
- .orderByDesc(InsAreaCompany::getCreatetime);
|
|
|
|
|
|
|
+ wrapper.eq(!ObjectUtils.isEmpty(quoteHistoryVo.getOrderNo()), InsAreaCompany::getOrderno, quoteHistoryVo.getOrderNo()).eq(!ObjectUtils.isEmpty(quoteHistoryVo.getOrderStatus()), InsAreaCompany::getOrderstatus, quoteHistoryVo.getOrderStatus()).orderByDesc(InsAreaCompany::getCreatetime);
|
|
|
List<InsAreaCompany> insAreaCompanies = this.insAreaCompanyService.getBaseMapper().selectList(wrapper);
|
|
List<InsAreaCompany> insAreaCompanies = this.insAreaCompanyService.getBaseMapper().selectList(wrapper);
|
|
|
|
|
|
|
|
List<InsAreaCompanyHistoryVo> collect = insAreaCompanies.stream().map(a -> {
|
|
List<InsAreaCompanyHistoryVo> collect = insAreaCompanies.stream().map(a -> {
|
|
@@ -145,17 +141,14 @@ public class InsOrdersController extends BaseController {
|
|
|
@ApiOperation(value = "通过子订单查询订单信息")
|
|
@ApiOperation(value = "通过子订单查询订单信息")
|
|
|
public HttpResult<OrderVo> getByCompanyId(@RequestSingleParam(value = "companyId") String companyId) {
|
|
public HttpResult<OrderVo> getByCompanyId(@RequestSingleParam(value = "companyId") String companyId) {
|
|
|
String userId = getUserId();
|
|
String userId = getUserId();
|
|
|
- return this.insOrdersService.getByCompanyId(companyId,userId);
|
|
|
|
|
|
|
+ return this.insOrdersService.getByCompanyId(companyId, userId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/getAccidentalDriving")
|
|
@PostMapping("/getAccidentalDriving")
|
|
|
@ApiOperation(value = "获取驾意险")
|
|
@ApiOperation(value = "获取驾意险")
|
|
|
public HttpResult<List<InsAccidentalDriving>> getAccidentalDriving(@RequestBody @Valid AccidentalDrivingQueryVo accidentalDrivingVo) {
|
|
public HttpResult<List<InsAccidentalDriving>> getAccidentalDriving(@RequestBody @Valid AccidentalDrivingQueryVo accidentalDrivingVo) {
|
|
|
LambdaQueryWrapper<InsAccidentalDriving> wrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<InsAccidentalDriving> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(InsAccidentalDriving::getCompanyCode, accidentalDrivingVo.getCompanyCode())
|
|
|
|
|
- .and(i -> i.eq(InsAccidentalDriving::getSeatNumMax, accidentalDrivingVo.getSeatNum())
|
|
|
|
|
- .or(j -> j.le(InsAccidentalDriving::getSeatNumMax, accidentalDrivingVo.getSeatNum())
|
|
|
|
|
- .ge(InsAccidentalDriving::getSeatNumMax, accidentalDrivingVo.getSeatNum())));
|
|
|
|
|
|
|
+ wrapper.eq(InsAccidentalDriving::getCompanyCode, accidentalDrivingVo.getCompanyCode()).and(i -> i.eq(InsAccidentalDriving::getSeatNumMax, accidentalDrivingVo.getSeatNum()).or(j -> j.le(InsAccidentalDriving::getSeatNumMax, accidentalDrivingVo.getSeatNum()).ge(InsAccidentalDriving::getSeatNumMax, accidentalDrivingVo.getSeatNum())));
|
|
|
List<InsAccidentalDriving> insAccidentalDrivings = insAccidentalDrivingService.list(wrapper);
|
|
List<InsAccidentalDriving> insAccidentalDrivings = insAccidentalDrivingService.list(wrapper);
|
|
|
|
|
|
|
|
if (insAccidentalDrivings.isEmpty()) {
|
|
if (insAccidentalDrivings.isEmpty()) {
|
|
@@ -169,17 +162,20 @@ public class InsOrdersController extends BaseController {
|
|
|
public HttpResult<InsOrders> verifyOrders(@RequestBody VerifyOrdersVo verifyOrdersVo) {
|
|
public HttpResult<InsOrders> verifyOrders(@RequestBody VerifyOrdersVo verifyOrdersVo) {
|
|
|
return insOrdersService.verifyOrders(verifyOrdersVo);
|
|
return insOrdersService.verifyOrders(verifyOrdersVo);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
@PostMapping("/getPolicyInsuranceReport")
|
|
@PostMapping("/getPolicyInsuranceReport")
|
|
|
@ApiOperation(value = "分页获取保单清单数据")
|
|
@ApiOperation(value = "分页获取保单清单数据")
|
|
|
public HttpResult<BasePageResult<PolicyInsuranceReportResVo>> getPolicyInsuranceReport(@RequestBody PolicyInsuranceReportReqVo policyInsuranceReportReqVo) {
|
|
public HttpResult<BasePageResult<PolicyInsuranceReportResVo>> getPolicyInsuranceReport(@RequestBody PolicyInsuranceReportReqVo policyInsuranceReportReqVo) {
|
|
|
String userId = getUserId();
|
|
String userId = getUserId();
|
|
|
- BasePageResult<PolicyInsuranceReportResVo> quoteResult = insOrdersService.getPolicyInsuranceReport(policyInsuranceReportReqVo,userId);
|
|
|
|
|
|
|
+ BasePageResult<PolicyInsuranceReportResVo> quoteResult = insOrdersService.getPolicyInsuranceReport(policyInsuranceReportReqVo,
|
|
|
|
|
+ userId);
|
|
|
return HttpResult.ok("success", quoteResult);
|
|
return HttpResult.ok("success", quoteResult);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
@PostMapping("/exportPolicyInsuranceReport")
|
|
@PostMapping("/exportPolicyInsuranceReport")
|
|
|
@ApiOperation(value = "导出保单清单数据")
|
|
@ApiOperation(value = "导出保单清单数据")
|
|
|
public HttpResult<String> exportPolicyInsuranceReport(@RequestBody PolicyInsuranceReportReqVo policyInsuranceReportReqVo) {
|
|
public HttpResult<String> exportPolicyInsuranceReport(@RequestBody PolicyInsuranceReportReqVo policyInsuranceReportReqVo) {
|
|
|
String userId = getUserId();
|
|
String userId = getUserId();
|
|
|
- return insOrdersService.exportPolicyInsuranceReport(policyInsuranceReportReqVo,userId);
|
|
|
|
|
|
|
+ return insOrdersService.exportPolicyInsuranceReport(policyInsuranceReportReqVo, userId);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|