|
@@ -4337,9 +4337,14 @@ func (c *ScheduleApiController) GetScheduleOne() {
|
4337
|
4337
|
ids := strings.Split(patitionIdStr, ",")
|
4338
|
4338
|
fmt.Println("patitonStr", ids)
|
4339
|
4339
|
schedule_type, _ := c.GetInt64("schedule_type")
|
|
4340
|
+ is_before, _ := c.GetInt64("is_before")
|
|
4341
|
+ start_time := c.GetString("start_time")
|
|
4342
|
+ end_time := c.GetString("end_time")
|
|
4343
|
+
|
4340
|
4344
|
adminInfo := c.GetAdminUserInfo()
|
4341
|
4345
|
|
4342
|
4346
|
thisTime := time.Now()
|
|
4347
|
+
|
4343
|
4348
|
today := thisTime.Format("2006-01-02")
|
4344
|
4349
|
if week < 1 || week > 4 {
|
4345
|
4350
|
week = 2
|
|
@@ -4378,9 +4383,17 @@ func (c *ScheduleApiController) GetScheduleOne() {
|
4378
|
4383
|
loc, _ := time.LoadLocation("Local")
|
4379
|
4384
|
theStarTime, _ := time.ParseInLocation(timeLayout, weekStartTime, loc)
|
4380
|
4385
|
theEndTime, _ := time.ParseInLocation(timeLayout, weekEndTime, loc)
|
|
4386
|
+
|
4381
|
4387
|
weekStartPoint := theStarTime.Unix()
|
4382
|
4388
|
weekEndPoint := theEndTime.Unix()
|
4383
|
|
-
|
|
4389
|
+ if is_before > 0 {
|
|
4390
|
+ timeLayout := "2006-01-02 15:04:05"
|
|
4391
|
+ loc, _ := time.LoadLocation("Local")
|
|
4392
|
+ theStarTime, _ := time.ParseInLocation(timeLayout, start_time, loc)
|
|
4393
|
+ theEndTime, _ := time.ParseInLocation(timeLayout, end_time, loc)
|
|
4394
|
+ weekStartPoint = theStarTime.Unix()
|
|
4395
|
+ weekEndPoint = theEndTime.Unix()
|
|
4396
|
+ }
|
4384
|
4397
|
schdules, _ := service.GetWeekScheduleTwo(adminInfo.CurrentOrgId, weekStartPoint, weekEndPoint, ids, schedule_type)
|
4385
|
4398
|
schedulesGroup, _ := service.GetScheduleTotalCount(adminInfo.CurrentOrgId, weekStartPoint, weekEndPoint, ids, schedule_type)
|
4386
|
4399
|
c.ServeSuccessJSON(map[string]interface{}{
|