💄添加订单今日成功率
This commit is contained in:
@@ -107,7 +107,7 @@ func GetOrderByMap(params map[string]string, display, offset int) []OrderInfo {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Limit(display, offset).OrderBy("-update_time").All(&orderInfoList)
|
||||
_, err := qs.Limit(display, offset).OrderBy("-create_time").All(&orderInfoList)
|
||||
if err != nil {
|
||||
logs.Error("get order by map fail: ", err)
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ func QueryTodaySummary(in map[string]string) account.Summary {
|
||||
todayPlatformAll := 0.0
|
||||
todayAgentAll := 0.0
|
||||
todaySuccessNum := 0
|
||||
todayPaidAmount := 0.0
|
||||
|
||||
for _, info := range dataInfo {
|
||||
totalNum += 1
|
||||
@@ -158,6 +159,7 @@ func QueryTodaySummary(in map[string]string) account.Summary {
|
||||
todayPlatformAll += info.PlatformProfit
|
||||
todayAgentAll += info.AgentProfit
|
||||
todaySuccessNum += 1
|
||||
todayPaidAmount += info.FactAmount
|
||||
}
|
||||
|
||||
succeedRate := 0.0
|
||||
@@ -170,10 +172,10 @@ func QueryTodaySummary(in map[string]string) account.Summary {
|
||||
|
||||
return account.Summary{
|
||||
TotalNum: totalNum,
|
||||
TotalAmount: math.Round(todayAllAmount*100) / 100,
|
||||
TotalAmount: todayAllAmount,
|
||||
PaidNum: todaySuccessNum,
|
||||
PaidAmount: todayPaidAmount,
|
||||
PlatformIncome: math.Round(todayPlatformAll*100) / 100,
|
||||
AgencyIncome: todayAgentAll,
|
||||
SucceedRate: succeedRate,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,6 +180,7 @@ let trade = {
|
||||
$("#totalSucceedRate").html(profitSummary.totalProfit.succeedRate)
|
||||
|
||||
$("#TodaySuccessNum").html(profitSummary.todayProfit.paidNum);
|
||||
$("#TodayPaidAmount").html(profitSummary.todayProfit.paidAmount);
|
||||
$("#TodayAllAmount").html(profitSummary.todayProfit.totalAmount);
|
||||
$("#TodaySupplierProfit").html(profitSummary.todayProfit.TadaySupplierProfit);
|
||||
$("#TodayPlatformProfit").html(profitSummary.todayProfit.platformIncome);
|
||||
|
||||
@@ -155,13 +155,17 @@
|
||||
今日订单数:
|
||||
<span id="TodayAllNum"></span>
|
||||
</div>
|
||||
<div class="col-sm-2 color-red" style="font-weight: normal;">
|
||||
今日订单总金额:
|
||||
<span id="TodayAllAmount"></span>
|
||||
</div>
|
||||
<div class="col-sm-2 color-red" style="font-weight: normal;">
|
||||
今日成功订单数:
|
||||
<span id="TodaySuccessNum"></span>
|
||||
</div>
|
||||
<div class="col-sm-2 color-red" style="font-weight: normal;">
|
||||
今日成功订单总金额:
|
||||
<span id="TodayAllAmount"></span>
|
||||
<span id="TodayPaidAmount"></span>
|
||||
</div>
|
||||
|
||||
<!-- <div class="color-red" style="font-weight: normal;">-->
|
||||
|
||||
Reference in New Issue
Block a user