fix decodeActivityId isTimeInRange
| | |
| | | |
| | | if startTime.After(endTime) { |
| | | // 跨越日期的情况 |
| | | //fmt.Println("跨日期",timeStamp, timeStamp.After(startTime), timeStamp.Before(endTime)) |
| | | return timeStamp.After(startTime) || timeStamp.Before(endTime) |
| | | } else { |
| | | // 不跨越日期的情况 |
| | | //fmt.Println("不跨日期",timeStamp, timeStamp.After(startTime), timeStamp.Before(endTime)) |
| | | return timeStamp.After(startTime) && timeStamp.Before(endTime) |
| | | } |
| | | } |
| | |
| | | captureTime := source["picDate"].(string) |
| | | dDate := strings.Split(captureTime, " ")[0] |
| | | dTime := strings.Split(captureTime[:19], " ")[1] |
| | | //fmt.Println(captureTime, dDate, dTime) |
| | | id := source["id"].(string) |
| | | //fmt.Println("sindex: ", sIndex, "documentNumber", tmpInfo["documentNumber"], "id: ", id, "captureTime: ", captureTime) |
| | | if !isTimeInRange(dTime, aHFormat.startTime, aHFormat.endTime) { |
| | | if sDate != "" && len(dataId) >= frequency { |
| | | activeId = append(activeId, dataId...) |
| | | dataId = resetDataId(dataId, id, dDate, dTime, &sDate, &sTime) |
| | | } |
| | | //if sDate != "" && len(dataId) >= frequency { |
| | | // activeId = append(activeId, dataId...) |
| | | // dataId = resetDataId(dataId, id, dDate, dTime, &sDate, &sTime) |
| | | //} |
| | | continue |
| | | } |
| | | if sDate == "" { |