Commit 3ce30b31 authored by yanghao's avatar yanghao

chore: 客户详情添加报价的字段和查询

parent d1be52e1
......@@ -37,11 +37,14 @@ public class CustomeDetailServiceImpl implements CustomerDetailService {
}
@Override
public PageResult<CustomerOfferBackVo> getCustomerOfferPage(Long customerId, PageParam pageParam) {
public PageResult<CustomerOfferBackVo> getCustomerOfferPage(CustomerOfferQueryVo offerQueryVo, PageParam pageParam) {
IPage<CustomerOfferBackVo> mpPage = MyBatisUtils.buildPage(pageParam);
QueryWrapperX queryWrapper = new QueryWrapperX();
queryWrapper.eq("t.deleted", 0);
queryWrapper.eq("t.relation_id", customerId);
queryWrapper.eq("t.relation_id", offerQueryVo.getCustomerId());
queryWrapper.inIfPresent("dst.guojia", offerQueryVo.getDestCountryId());
queryWrapper.inIfPresent("dst.shi", offerQueryVo.getObjectiveId());
queryWrapper.inIfPresent("dst.id", offerQueryVo.getDestWarehouseId());
customerDetailMapper.selectCustomerOfferPage(mpPage, queryWrapper);
return PageResult.of(mpPage);
}
......
......@@ -22,11 +22,11 @@ public interface CustomerDetailService {
/**
* 获得客户报价分页
*
* @param customerId 客户ID
* @param offerQueryVo 客户ID
* @param pageParam 分页参数
* @return 客户级别分页
*/
PageResult<CustomerOfferBackVo> getCustomerOfferPage(Long customerId, PageParam pageParam);
PageResult<CustomerOfferBackVo> getCustomerOfferPage(CustomerOfferQueryVo offerQueryVo, PageParam pageParam);
/**
* 根据运输方式得到订单总数
......
package cn.iocoder.yudao.module.customer.vo.customerDetail;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -8,6 +9,7 @@ import lombok.Data;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 客户基本信息客户报价 Response VO")
@Data
......@@ -21,6 +23,7 @@ public class CustomerOfferBackVo {
@ApiModelProperty(value = "客户名称")
private String consignorName;
@ApiModelProperty(value = "目的地中文")
private String objectiveName;
......@@ -30,10 +33,44 @@ public class CustomerOfferBackVo {
@ApiModelProperty(value = "取消报价:0,特价审批中:1,草稿:2, 需求确认:3,赢单:4,输单:5,报价完成:6 跟进中:7")
private Integer status;
@ApiModelProperty(value = "业务员名称")
@ApiModelProperty(value = "业务员名称-客户经理")
private String businessManagerName;
@ApiModelProperty(value = "预计结束时间")
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
private Date stopTime;
@ApiModelProperty(value = "创建时间", required = true)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date createTime;
@ExcelProperty("价格有效期开始")
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
private Date startTime;
@ExcelProperty("价格有效期结束")
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
private Date endTime;
@ExcelProperty("重要程度")
private Integer importance;
@ApiModelProperty(value = "联系人名称")
private String relationName;
@ApiModelProperty(value = "联系人区号")
private String relationAreaCode;
@ApiModelProperty(value = "联系人手机号")
private String relationPhone;
// 线路相关
@ExcelProperty("始发仓库id")
private Long startWarehouseId;
@ExcelProperty("目的仓库id")
private Long destWarehouseId;
@ExcelProperty("运输方式")
private String transportType;
}
package cn.iocoder.yudao.module.customer.vo.customerDetail;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel("管理后台 - 客户基本信息报价查询 Request VO")
@Data
public class CustomerOfferQueryVo {
@ApiModelProperty(value = "客户id")
private Long customerId;
@ApiModelProperty(value = "目的国id")
private List<Long> destCountryId ;
@ApiModelProperty(value = "目的地id")
private List<Long> objectiveId;
@ApiModelProperty(value = "目的仓ID")
private List<Long> destWarehouseId;
}
......@@ -19,11 +19,18 @@
s.title_en as objective_name_en,
t.status as status,
t.stop_time as stop_time,
u.nickname as business_manager_name
u.nickname as business_manager_name,
t.create_time, t.start_time, t.end_time, t.importance,
cc.name as relation_name, cc.area_code as relation_area_code, cc.phone_new as relation_phone,
line.start_warehouse_id, line.dest_warehouse_id, line.transport_type
from ecw_offer t
left join ecw_region s
on t.objective_id = s.id
left join ecw_region s on t.objective_id = s.id
left join system_user u on t.follow_up_salesman_id = u.id
left join ecw_customer_contacts cc on (t.relation = 1 and cc.id = t.consignor_id) or (t.relation = 2 and cc.id = t.consignee_id)
left join ecw_warehouse_line line on t.line_id = line.id
left join ecw_warehouse dst on line.dest_warehouse_id = dst.id
${ew.customSqlSegment}
</select>
<select id="selectCustomerFollowPage"
......
......@@ -48,9 +48,9 @@ public class CustomerDetailController {
@GetMapping("/offerPage")
@ApiOperation("获取报价分页")
public CommonResult<PageResult<CustomerOfferBackVo>> getOfferPage(@RequestParam("customerId") Long customerId, PageParam page) {
public CommonResult<PageResult<CustomerOfferBackVo>> getOfferPage(CustomerOfferQueryVo offerQueryVo, PageParam page) {
PageResult<CustomerOfferBackVo> pageResult =
customerDetailService.getCustomerOfferPage(customerId, page);
customerDetailService.getCustomerOfferPage(offerQueryVo, page);
return success(pageResult);
}
......
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