|
@@ -834,6 +834,17 @@ func getCensusIncomeListV2(ch chan models.CensusIncomeChartResp, req fms.IncomeL
|
|
|
}
|
|
|
|
|
|
latestTime = latestTime.AddDate(0, 0, -latestTime.Day()+1)
|
|
|
+ addMonth := 0
|
|
|
+ if req.ListParam == "1" {
|
|
|
+ addMonth = int(3 - latestTime.Month() % 3)
|
|
|
+ }
|
|
|
+ if req.ListParam == "2" {
|
|
|
+ addMonth = int(6 - latestTime.Month() % 6)
|
|
|
+ }
|
|
|
+ if req.ListParam == "3" {
|
|
|
+ addMonth = int(12 - latestTime.Month() % 12)
|
|
|
+ }
|
|
|
+ latestTime = latestTime.AddDate(0,addMonth,0)
|
|
|
|
|
|
var dateSlice []string
|
|
|
var totalMoneySlice, prevTotalMoneySlice []float64
|
|
@@ -1316,7 +1327,7 @@ func getCensusIncomeListV2(ch chan models.CensusIncomeChartResp, req fms.IncomeL
|
|
|
}
|
|
|
|
|
|
incomeChart.Title = "开票到款统计图"
|
|
|
- incomeChart.Date = dateSlice
|
|
|
+ incomeChart.Date = dateSlice[:len(totalMoneySlice)]
|
|
|
incomeChart.TotalMoney = totalMoneySlice
|
|
|
incomeChart.PrevTotalMoney = prevTotalMoneySlice
|
|
|
incomeChart.Yoy = yoySlice
|