...
|
...
|
@@ -100,7 +100,7 @@ func (ptr *PGCommonStatisticsService) HourProductiveStatistics(queryOptions map[ |
|
|
beginTime = xtime.BeginningOfDay() //time.Now().Add(-time.Hour*5)
|
|
|
endTime = time.Now()
|
|
|
)
|
|
|
if !xtime.IsZero(request.Date.Time()) {
|
|
|
if !xtime.IsZero(request.Date.Time()) && !request.Date.Time().Equal(beginTime) {
|
|
|
beginTime = request.Date.Time().AddDate(0, 0, -1)
|
|
|
endTime = request.Date.Time()
|
|
|
}
|
...
|
...
|
@@ -162,13 +162,13 @@ func (ptr *PGCommonStatisticsService) DailyProductiveStatistics(queryOptions map |
|
|
Total float64 `json:"total"`
|
|
|
}
|
|
|
var (
|
|
|
beingTime = xtime.BeginningOfDay().AddDate(0, 0, -5)
|
|
|
endTime = xtime.BeginningOfDay().AddDate(0, 0, 1)
|
|
|
beingTime = xtime.BeginningOfDay().AddDate(0, 0, -6)
|
|
|
endTime = xtime.BeginningOfDay().AddDate(0, 0, 1).Add(-time.Second)
|
|
|
)
|
|
|
//if !xtime.IsZero(time.Time(request.Date)) {
|
|
|
// beingTime = request.Date.Time().AddDate(0, 0, -5)
|
|
|
// endTime = request.Date.Time().AddDate(0, 0, 1)
|
|
|
//}
|
|
|
if !xtime.IsZero(time.Time(request.Date)) {
|
|
|
beingTime = request.Date.Time().AddDate(0, 0, -6)
|
|
|
endTime = request.Date.Time().AddDate(0, 0, 1).Add(-time.Second)
|
|
|
}
|
|
|
workshop, err := workshopRepository.FindOne(map[string]interface{}{"workshopId": request.WorkshopId})
|
|
|
if err != nil || workshop == nil {
|
|
|
return nil, nil
|
...
|
...
|
|