totalOrder
This commit is contained in:
parent
82b46a918b
commit
8d0669fc2f
|
@ -23,9 +23,11 @@ func (d *ExternalCorpOrder) QueryOwnerOrder(owner string, startTime, endTime int
|
||||||
|
|
||||||
var o []*model.ExternalCorpOrder
|
var o []*model.ExternalCorpOrder
|
||||||
|
|
||||||
|
if owner != "" {
|
||||||
|
tx.Where("cp_user.username = ?", owner)
|
||||||
|
}
|
||||||
tx.Where(orderTable+".status = ?", 2)
|
tx.Where(orderTable+".status = ?", 2)
|
||||||
|
|
||||||
tx.Where("cp_user.username = ?", owner)
|
|
||||||
tx.Where(orderTable+".pay_time >= ?", startTime)
|
tx.Where(orderTable+".pay_time >= ?", startTime)
|
||||||
tx.Where(orderTable+".pay_time <= ?", endTime)
|
tx.Where(orderTable+".pay_time <= ?", endTime)
|
||||||
|
|
||||||
|
@ -48,7 +50,6 @@ func (d *ExternalCorpOrder) QueryProcessOrder(owner string, startTime, endTime i
|
||||||
var o []*model.ExternalCorpOrder
|
var o []*model.ExternalCorpOrder
|
||||||
|
|
||||||
tx.Where(orderTable+".process_status = ?", 2)
|
tx.Where(orderTable+".process_status = ?", 2)
|
||||||
|
|
||||||
tx.Where("cp_user.username = ?", owner)
|
tx.Where("cp_user.username = ?", owner)
|
||||||
tx.Where(orderTable+".pay_time >= ?", startTime)
|
tx.Where(orderTable+".pay_time >= ?", startTime)
|
||||||
tx.Where(orderTable+".pay_time <= ?", endTime)
|
tx.Where(orderTable+".pay_time <= ?", endTime)
|
||||||
|
|
|
@ -31,8 +31,12 @@ func (s *SalaryCalculator1002) Calculate(salary *model.StaffSalary) map[string]i
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("db error:%s", err.Error())
|
log.Errorf("db error:%s", err.Error())
|
||||||
}
|
}
|
||||||
|
totalOrders, err := dao.NewExternalCorpOrder().QueryOwnerOrder("", startTime, endTime)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("db error:%s", err.Error())
|
||||||
|
}
|
||||||
data["orderNum"] = len(orders)
|
data["orderNum"] = len(orders)
|
||||||
|
data["totalOrderNum"] = len(totalOrders)
|
||||||
|
|
||||||
//2.处理的订单
|
//2.处理的订单
|
||||||
processOrders, err := dao.NewExternalCorpOrder().QueryProcessOrder(s.user.Username, startTime, endTime)
|
processOrders, err := dao.NewExternalCorpOrder().QueryProcessOrder(s.user.Username, startTime, endTime)
|
||||||
|
|
Loading…
Reference in New Issue