Commit 1c063a5b by zhengxj

finish 统计报价服务商数量 on 20190829

by zhengxj 

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@23683 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent b3d4a49c
package com.glsx.ordercenter.pojo; package com.glsx.ordercenter.pojo;
import com.glsx.ordercenter.dto.*; import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat; import java.util.Date;
import java.util.List;
import javax.validation.constraints.Future; import javax.validation.constraints.Future;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.groups.Default; import javax.validation.groups.Default;
import java.math.BigDecimal;
import java.util.Date; import org.springframework.format.annotation.DateTimeFormat;
import java.util.List;
import com.glsx.ordercenter.dto.CarInfo;
import com.glsx.ordercenter.dto.ChannelInfo;
import com.glsx.ordercenter.dto.MachanicInfo;
import com.glsx.ordercenter.dto.MerchantInfo;
import com.glsx.ordercenter.dto.ServiceInfo;
/** /**
* @author duanht * @author duanht
...@@ -373,7 +379,18 @@ public class SysOrder { ...@@ -373,7 +379,18 @@ public class SysOrder {
// 发布图片 // 发布图片
private List<String> releasePiuctures; private List<String> releasePiuctures;
private Long quotationQuantity;
public Long getQuotationQuantity() {
return quotationQuantity;
}
public void setQuotationQuantity(Long quotationQuantity) {
this.quotationQuantity = quotationQuantity;
}
public String getCheckInAddress() { public String getCheckInAddress() {
return checkInAddress; return checkInAddress;
} }
......
...@@ -1287,7 +1287,6 @@ public class OrderServiceImpl implements IOrderService { ...@@ -1287,7 +1287,6 @@ public class OrderServiceImpl implements IOrderService {
// 待完成(状态6、状态7) // 待完成(状态6、状态7)
// 已完成(状态8) // 已完成(状态8)
// 已拒绝(状态5) // 已拒绝(状态5)
orderCriteria.andMechanicIdEqualTo(userId); orderCriteria.andMechanicIdEqualTo(userId);
switch (orderStatus) { switch (orderStatus) {
...@@ -1409,15 +1408,23 @@ public class OrderServiceImpl implements IOrderService { ...@@ -1409,15 +1408,23 @@ public class OrderServiceImpl implements IOrderService {
if (OrderTypeEnum.BIDDING.getOrderType() == (int) order.getOrderType()) { if (OrderTypeEnum.BIDDING.getOrderType() == (int) order.getOrderType()) {
// 订单报价状态或者服务商报价的价格 // 订单报价状态或者服务商报价的价格
int orderId = order.getId();
SysOrderBiddingRecordsExample sysOrderBiddingRecordsExample = new SysOrderBiddingRecordsExample(); SysOrderBiddingRecordsExample sysOrderBiddingRecordsExample = new SysOrderBiddingRecordsExample();
sysOrderBiddingRecordsExample.createCriteria().andOrderIdEqualTo(order.getId()) sysOrderBiddingRecordsExample.createCriteria().andOrderIdEqualTo(orderId).andServiceIdEqualTo(userId);
.andServiceIdEqualTo(userId);
List<SysOrderBiddingRecords> list = sysOrderBiddingRecordsDao List<SysOrderBiddingRecords> list = sysOrderBiddingRecordsDao
.selectByExample(sysOrderBiddingRecordsExample); .selectByExample(sysOrderBiddingRecordsExample);
if (!list.isEmpty()) { if (!list.isEmpty()) {
// 当前用户报价
order.setPrice(list.get(0).getPrice()); order.setPrice(list.get(0).getPrice());
} }
order.setServiceItems(sysOrderServiceTypeMapper.selectOrderServiceItems(order.getId())); // 订单服务项目
order.setServiceItems(sysOrderServiceTypeMapper.selectOrderServiceItems(orderId));
// 当前报价服务商的 数量
sysOrderBiddingRecordsExample.clear();
sysOrderBiddingRecordsExample.createCriteria().andOrderIdEqualTo(orderId)
.andIsBiddingNotEqualTo(BizConstants.BIDDING_STATUS_DEFAULT);
order.setQuotationQuantity(sysOrderBiddingRecordsDao.countByExample(sysOrderBiddingRecordsExample));
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!