Commit 1f93d161 authored by yanghao's avatar yanghao

fix: 我的客户-订单标签页 订单数据中返回报价单号和报价id

parent f1d77456
......@@ -23,6 +23,9 @@ public class OrderAssociationOfferInfoEvent {
@ApiModelProperty(value = "主键ID", required = true)
private Long offerId;
@ApiModelProperty(value = "报价单号", required = true)
private String offerNo;
}
......@@ -2056,7 +2056,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
}
OrderAssociationOfferInfoEvent event = new OrderAssociationOfferInfoEvent(orderDO.getOrderId(), null);
OrderAssociationOfferInfoEvent event = new OrderAssociationOfferInfoEvent(orderDO.getOrderId(), null, null);
applicationContext.publishEvent(event);
checkOrderSalesman(orderDO, event.getOfferId(), consignorDO, consigneeDO, orderConsignorDO, orderConsigneeDO);
......
......@@ -2561,7 +2561,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (consignorDO != null && !consignorDO.getNoConsignee() && !vo.getHasConsignee()) {//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
vo.setCustomerId(orderConsignorBackVO.getCustomerId());
} else {
OrderAssociationOfferInfoEvent event = new OrderAssociationOfferInfoEvent(vo.getOrderId(), null);
OrderAssociationOfferInfoEvent event = new OrderAssociationOfferInfoEvent(vo.getOrderId(), null, null);
applicationContext.publishEvent(event);
if (vo.getDrawee() == 1) {//发货人付款
if (vo.getDrawee() == 1 && event.getOfferId() != null) {//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
......
......@@ -438,6 +438,10 @@ public class OrderBackPageVO {
*/
@ApiModelProperty(value = "报价单ID")
private Long offerId;
@ApiModelProperty(value = "报价单号")
private String offerNo;
/**
* 报价单状态
*/
......
......@@ -74,7 +74,7 @@ tenant-id: {{adminTenentId}}
### 查询前20条
GET {{baseUrl}}/ecw/order/customer-order-page?customerDetailId=41694&rows=10&page=1&pageNo=1&destCountryId%5B0%5D=4174&destCountryId%5B1%5D=4175&objectiveId%5B0%5D=4181&objectiveId%5B1%5D=4184&destWarehouseId%5B0%5D=2&destWarehouseId%5B1%5D=4&destWarehouseId%5B2%5D=6
GET {{baseUrl}}/ecw/order/customer-order-page?customerDetailId=5008
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
......
......@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.file.FileNameUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.apollo.core.event.OrderAssociationOfferInfoEvent;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
......@@ -341,6 +342,18 @@ public class OrderController {
public CommonResult<PageResult<OrderBackPageVO>> getCustomerOrderPage(OrderQueryVO query, PageVO page) {
query.setUserType(UserTypeEnum.ADMIN.getValue());
PageResult<OrderBackPageVO> pageResult = orderQueryService.myOrderPage(query, page);
//填充报价单号
List<OrderBackPageVO> list = pageResult.getList();
if (CollectionUtil.isNotEmpty(list)) {
for (OrderBackPageVO vo : list) {
OrderAssociationOfferInfoEvent event = new OrderAssociationOfferInfoEvent(vo.getOrderId(), null, null);
applicationContext.publishEvent(event);
vo.setOfferId(event.getOfferId());
vo.setOfferNo(event.getOfferNo());
}
}
return success(pageResult);
}
......
......@@ -67,6 +67,7 @@ public class OrderAssociationOfferListener {
OfferRespVO offerRespVO = offerService.getOfferByOrderId(event.getOrderId());
if (Objects.nonNull(offerRespVO)) {
event.setOfferId(offerRespVO.getOfferId());
event.setOfferNo(offerRespVO.getNumber());
}
}
}
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