|
|
@@ -18,12 +18,14 @@ import com.ydtech.modules.order.service.InsOrdersService;
|
|
|
import com.ydtech.modules.protocol.entity.dto.PtlAgreementInsCompanyDto;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Api(tags = "订单")
|
|
|
@RequestMapping("/insurance/order")
|
|
|
@@ -105,12 +107,23 @@ public class InsOrdersController extends BaseController {
|
|
|
|
|
|
@PostMapping("/queryQuoteHistory")
|
|
|
@ApiOperation(value = "查询报价历史")
|
|
|
- public HttpResult<List<InsAreaCompany>> queryQuoteHistory(@RequestBody QuoteHistoryVo quoteHistoryVo) {
|
|
|
- this.insOrdersService.existOrder(quoteHistoryVo.getOrderNo());
|
|
|
+ public HttpResult<List<InsAreaCompanyHistoryVo>> queryQuoteHistory(@RequestBody QuoteHistoryVo quoteHistoryVo) {
|
|
|
+ InsOrders insOrders = this.insOrdersService.existOrder(quoteHistoryVo.getOrderNo());
|
|
|
+
|
|
|
LambdaQueryWrapper<InsAreaCompany> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(!ObjectUtils.isEmpty(quoteHistoryVo.getOrderNo()), InsAreaCompany::getOrderno, quoteHistoryVo.getOrderNo()).eq(!ObjectUtils.isEmpty(quoteHistoryVo.getOrderStatus()), InsAreaCompany::getOrderstatus, quoteHistoryVo.getOrderStatus()).orderByAsc(InsAreaCompany::getCreatetime);
|
|
|
+ wrapper.eq(!ObjectUtils.isEmpty(quoteHistoryVo.getOrderNo()), InsAreaCompany::getOrderno, quoteHistoryVo.getOrderNo())
|
|
|
+ .eq(!ObjectUtils.isEmpty(quoteHistoryVo.getOrderStatus()), InsAreaCompany::getOrderstatus, quoteHistoryVo.getOrderStatus())
|
|
|
+ .orderByAsc(InsAreaCompany::getCreatetime);
|
|
|
List<InsAreaCompany> insAreaCompanies = this.insAreaCompanyService.getBaseMapper().selectList(wrapper);
|
|
|
- return HttpResult.ok("success", insAreaCompanies);
|
|
|
+
|
|
|
+ List<InsAreaCompanyHistoryVo> collect = insAreaCompanies.stream().map(a -> {
|
|
|
+ InsAreaCompanyHistoryVo insAreaCompanyHistoryVo = new InsAreaCompanyHistoryVo();
|
|
|
+ BeanUtils.copyProperties(a, insAreaCompanyHistoryVo);
|
|
|
+ insAreaCompanyHistoryVo.setLicenseno(insOrders.getLicenseno());
|
|
|
+ return insAreaCompanyHistoryVo;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+
|
|
|
+ return HttpResult.ok("success", collect);
|
|
|
}
|
|
|
|
|
|
@PostMapping("/getByCompanyId")
|