package crontab import ( "encoding/json" "fmt" "kpt-pasture/model" "kpt-pasture/util" "sort" "testing" "time" ) func TestCalculateCFT(t *testing.T) { activeTimeParse, _ := time.Parse(model.LayoutTime, "2025-03-04 01:00:00") println(activeTimeParse.Format(model.LayoutTime)) } func recalculate(neckRingList []*model.NeckRingOriginal) []*model.NeckActiveHabit { originalMapData := make(map[string]*model.NeckRingOriginalMerge) // 合并成2个小时的 for _, v := range neckRingList { xframeId := util.XFrameId(v.Frameid) mapKey := fmt.Sprintf("%s%s%s%s%d", v.NeckRingNumber, model.JoinKey, v.ActiveDate, model.JoinKey, xframeId) // 0001/2023-12-04/0 0001/2023-12-03/4 if originalMapData[mapKey] == nil { originalMapData[mapKey] = new(model.NeckRingOriginalMerge) } originalMapData[mapKey].IsMageData(v, xframeId) } currTime := time.Now().Local() res := make([]*model.NeckActiveHabit, 0) // 算平均值 for k, v := range originalMapData { // 过滤掉合并后不等于6条数据 if v.RecordCount > model.DefaultRecordCount { delete(originalMapData, k) continue } else if v.RecordCount < model.DefaultRecordCount { currMaxXframeId := util.FrameIdMapReverse[int32(currTime.Hour())] activeDateString := fmt.Sprintf("%s %02d:00:00", v.ActiveDate, v.XframeId*2+1) activeDate, _ := time.Parse(model.LayoutTime, activeDateString) if currMaxXframeId-v.XframeId <= 1 && currTime.Add(-1*time.Hour).Unix() < activeDate.Unix() { delete(originalMapData, k) continue } } v.SumAvg() } if len(originalMapData) <= 0 { return res } res = model.NeckRingOriginalMap(originalMapData).ForMatData() sort.Sort(model.NeckActiveHabitSlice(res)) return res } func TestRecalculate(t *testing.T) { str := `[ { "id": 39746398, "pastureId": 1, "uuid": "321434420250303101", "neckRingNumber": "3214344", "activeDate": "2025-03-03", "hours": 20, "frameid": 101, "rumina": 0, "intake": 18, "inactive": 0, "gasp": 0, "high": 669, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 59, "voltage": 297, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190705", "receiveNumber": "869701075190705", "createdAt": 1741074907, "updatedAt": 1741074907 }, { "id": 39746815, "pastureId": 1, "uuid": "321434420250303102", "neckRingNumber": "3214344", "activeDate": "2025-03-03", "hours": 20, "frameid": 102, "rumina": 0, "intake": 16, "inactive": 0, "gasp": 0, "high": 710, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 58, "voltage": 297, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190705", "receiveNumber": "869701075190705", "createdAt": 1741075214, "updatedAt": 1741075214 }, { "id": 39755830, "pastureId": 1, "uuid": "321434420250303103", "neckRingNumber": "3214344", "activeDate": "2025-03-03", "hours": 21, "frameid": 103, "rumina": 0, "intake": 15, "inactive": 0, "gasp": 0, "high": 681, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 58, "voltage": 297, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190705", "receiveNumber": "869701075190705", "createdAt": 1741075500, "updatedAt": 1741075500 }, { "id": 39757863, "pastureId": 1, "uuid": "321434420250303104", "neckRingNumber": "3214344", "activeDate": "2025-03-03", "hours": 21, "frameid": 104, "rumina": 2, "intake": 13, "inactive": 4, "gasp": 0, "high": 547, "active": 15, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 57, "voltage": 297, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190705", "receiveNumber": "869701075190705", "createdAt": 1741075778, "updatedAt": 1741075778 }, { "id": 39758419, "pastureId": 1, "uuid": "321434420250303105", "neckRingNumber": "3214344", "activeDate": "2025-03-03", "hours": 21, "frameid": 105, "rumina": 19, "intake": 0, "inactive": 20, "gasp": 0, "high": 8, "active": 0, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 56, "voltage": 297, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190705", "receiveNumber": "869701075190705", "createdAt": 1741076414, "updatedAt": 1741076414 }, { "id": 39764857, "pastureId": 1, "uuid": "321434420250303105", "neckRingNumber": "3214344", "activeDate": "2025-03-03", "hours": 21, "frameid": 105, "rumina": 19, "intake": 0, "inactive": 20, "gasp": 0, "high": 8, "active": 0, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 57, "voltage": 297, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190705", "receiveNumber": "869701075190705", "createdAt": 1741076699, "updatedAt": 1741076699 }, { "id": 39775243, "pastureId": 1, "uuid": "321434420250303106", "neckRingNumber": "3214344", "activeDate": "2025-03-03", "hours": 22, "frameid": 106, "rumina": 20, "intake": 0, "inactive": 13, "gasp": 0, "high": 44, "active": 7, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 57, "voltage": 297, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190705", "receiveNumber": "869701075190705", "createdAt": 1741078780, "updatedAt": 1741078780 }, { "id": 39712376, "pastureId": 1, "uuid": "105622025030471", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 14, "frameid": 71, "rumina": 7, "intake": 0, "inactive": 20, "gasp": 0, "high": 6, "active": 0, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741070601, "updatedAt": 1741070601 }, { "id": 39712377, "pastureId": 1, "uuid": "105622025030472", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 14, "frameid": 72, "rumina": 17, "intake": 0, "inactive": 20, "gasp": 0, "high": 8, "active": 0, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741070601, "updatedAt": 1741070601 }, { "id": 39741114, "pastureId": 1, "uuid": "105622025030473", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 15, "frameid": 73, "rumina": 14, "intake": 0, "inactive": 20, "gasp": 0, "high": 6, "active": 0, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741074193, "updatedAt": 1741074193 }, { "id": 39741115, "pastureId": 1, "uuid": "105622025030474", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 15, "frameid": 74, "rumina": 16, "intake": 0, "inactive": 20, "gasp": 0, "high": 18, "active": 1, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741074193, "updatedAt": 1741074193 }, { "id": 39741116, "pastureId": 1, "uuid": "105622025030475", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 15, "frameid": 75, "rumina": 0, "intake": 0, "inactive": 20, "gasp": 0, "high": 16, "active": 1, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741074193, "updatedAt": 1741074193 }, { "id": 39770269, "pastureId": 1, "uuid": "105622025030476", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 16, "frameid": 76, "rumina": 0, "intake": 2, "inactive": 3, "gasp": 0, "high": 386, "active": 13, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741077796, "updatedAt": 1741077796 }, { "id": 39774441, "pastureId": 1, "uuid": "105622025030476", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 16, "frameid": 76, "rumina": 0, "intake": 2, "inactive": 3, "gasp": 0, "high": 386, "active": 13, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741078112, "updatedAt": 1741078112 }, { "id": 39770270, "pastureId": 1, "uuid": "105622025030481", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 16, "frameid": 81, "rumina": 0, "intake": 1, "inactive": 0, "gasp": 0, "high": 374, "active": 13, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741077796, "updatedAt": 1741077796 }, { "id": 39774442, "pastureId": 1, "uuid": "105622025030481", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 16, "frameid": 81, "rumina": 0, "intake": 1, "inactive": 0, "gasp": 0, "high": 374, "active": 13, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741078112, "updatedAt": 1741078112 }, { "id": 39770271, "pastureId": 1, "uuid": "105622025030482", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 16, "frameid": 82, "rumina": 1, "intake": 2, "inactive": 3, "gasp": 0, "high": 440, "active": 17, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741077796, "updatedAt": 1741077796 }, { "id": 39774443, "pastureId": 1, "uuid": "105622025030482", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 16, "frameid": 82, "rumina": 1, "intake": 2, "inactive": 3, "gasp": 0, "high": 440, "active": 17, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741078112, "updatedAt": 1741078112 }, { "id": 39798900, "pastureId": 1, "uuid": "105622025030483", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 17, "frameid": 83, "rumina": 4, "intake": 3, "inactive": 2, "gasp": 0, "high": 691, "active": 20, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741081392, "updatedAt": 1741081392 }, { "id": 39798901, "pastureId": 1, "uuid": "105622025030484", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 17, "frameid": 84, "rumina": 2, "intake": 3, "inactive": 0, "gasp": 0, "high": 468, "active": 17, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741081392, "updatedAt": 1741081392 }, { "id": 39798949, "pastureId": 1, "uuid": "105622025030485", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 17, "frameid": 85, "rumina": 1, "intake": 6, "inactive": 0, "gasp": 0, "high": 549, "active": 17, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741081395, "updatedAt": 1741081395 }, { "id": 39832313, "pastureId": 1, "uuid": "105622025030486", "neckRingNumber": "10562", "activeDate": "2025-03-04", "hours": 18, "frameid": 86, "rumina": 0, "intake": 16, "inactive": 0, "gasp": 0, "high": 674, "active": 20, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 301, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741085617, "updatedAt": 1741085617 }, { "id": 39712469, "pastureId": 1, "uuid": "105742025030471", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 14, "frameid": 71, "rumina": 0, "intake": 15, "inactive": 0, "gasp": 0, "high": 564, "active": 20, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741070601, "updatedAt": 1741070601 }, { "id": 39712470, "pastureId": 1, "uuid": "105742025030472", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 14, "frameid": 72, "rumina": 0, "intake": 0, "inactive": 13, "gasp": 0, "high": 190, "active": 7, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741070601, "updatedAt": 1741070601 }, { "id": 39741207, "pastureId": 1, "uuid": "105742025030473", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 15, "frameid": 73, "rumina": 18, "intake": 0, "inactive": 20, "gasp": 0, "high": 29, "active": 1, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741074196, "updatedAt": 1741074196 }, { "id": 39741208, "pastureId": 1, "uuid": "105742025030474", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 15, "frameid": 74, "rumina": 20, "intake": 0, "inactive": 20, "gasp": 0, "high": 31, "active": 0, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741074196, "updatedAt": 1741074196 }, { "id": 39741209, "pastureId": 1, "uuid": "105742025030475", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 15, "frameid": 75, "rumina": 11, "intake": 0, "inactive": 20, "gasp": 0, "high": 58, "active": 3, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741074196, "updatedAt": 1741074196 }, { "id": 39774444, "pastureId": 1, "uuid": "105742025030476", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 16, "frameid": 76, "rumina": 1, "intake": 0, "inactive": 15, "gasp": 0, "high": 391, "active": 9, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741078112, "updatedAt": 1741078112 }, { "id": 39770362, "pastureId": 1, "uuid": "105742025030476", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 16, "frameid": 76, "rumina": 1, "intake": 0, "inactive": 15, "gasp": 0, "high": 391, "active": 9, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741077796, "updatedAt": 1741077796 }, { "id": 39774445, "pastureId": 1, "uuid": "105742025030481", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 16, "frameid": 81, "rumina": 0, "intake": 0, "inactive": 0, "gasp": 0, "high": 391, "active": 13, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741078112, "updatedAt": 1741078112 }, { "id": 39770363, "pastureId": 1, "uuid": "105742025030481", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 16, "frameid": 81, "rumina": 0, "intake": 0, "inactive": 0, "gasp": 0, "high": 391, "active": 13, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741077796, "updatedAt": 1741077796 }, { "id": 39774446, "pastureId": 1, "uuid": "105742025030482", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 16, "frameid": 82, "rumina": 0, "intake": 0, "inactive": 0, "gasp": 0, "high": 323, "active": 13, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741078112, "updatedAt": 1741078112 }, { "id": 39770364, "pastureId": 1, "uuid": "105742025030482", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 16, "frameid": 82, "rumina": 0, "intake": 0, "inactive": 0, "gasp": 0, "high": 323, "active": 13, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741077796, "updatedAt": 1741077796 }, { "id": 39799040, "pastureId": 1, "uuid": "105742025030483", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 17, "frameid": 83, "rumina": 0, "intake": 1, "inactive": 0, "gasp": 0, "high": 691, "active": 20, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741081395, "updatedAt": 1741081395 }, { "id": 39799041, "pastureId": 1, "uuid": "105742025030484", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 17, "frameid": 84, "rumina": 1, "intake": 0, "inactive": 0, "gasp": 0, "high": 621, "active": 20, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741081395, "updatedAt": 1741081395 }, { "id": 39799042, "pastureId": 1, "uuid": "105742025030485", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 17, "frameid": 85, "rumina": 6, "intake": 0, "inactive": 0, "gasp": 0, "high": 518, "active": 20, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741081395, "updatedAt": 1741081395 }, { "id": 39827555, "pastureId": 1, "uuid": "105742025030486", "neckRingNumber": "10574", "activeDate": "2025-03-04", "hours": 18, "frameid": 86, "rumina": 0, "intake": 13, "inactive": 0, "gasp": 0, "high": 707, "active": 20, "other": 0, "firmwareVersion": 57, "hardwareVersion": 10, "remain": 6, "voltage": 306, "restartReason": 0, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075191117", "receiveNumber": "869701075191117", "createdAt": 1741085005, "updatedAt": 1741085005 }, { "id": 39861751, "pastureId": 1, "uuid": "1070420250304101", "neckRingNumber": "10704", "activeDate": "2025-03-04", "hours": 20, "frameid": 101, "rumina": 2, "intake": 5, "inactive": 11, "gasp": 0, "high": 228, "active": 9, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741090446, "updatedAt": 1741090446 }, { "id": 39870079, "pastureId": 1, "uuid": "1070420250304102", "neckRingNumber": "10704", "activeDate": "2025-03-04", "hours": 20, "frameid": 102, "rumina": 20, "intake": 0, "inactive": 20, "gasp": 0, "high": 74, "active": 14, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741091644, "updatedAt": 1741091644 }, { "id": 39870180, "pastureId": 1, "uuid": "1070420250304102", "neckRingNumber": "10704", "activeDate": "2025-03-04", "hours": 20, "frameid": 102, "rumina": 20, "intake": 0, "inactive": 20, "gasp": 0, "high": 74, "active": 14, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741091886, "updatedAt": 1741091886 }, { "id": 39878730, "pastureId": 1, "uuid": "1070420250304103", "neckRingNumber": "10704", "activeDate": "2025-03-04", "hours": 21, "frameid": 103, "rumina": 15, "intake": 0, "inactive": 20, "gasp": 0, "high": 53, "active": 13, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741092840, "updatedAt": 1741092840 }, { "id": 39890324, "pastureId": 1, "uuid": "1070420250304104", "neckRingNumber": "10704", "activeDate": "2025-03-04", "hours": 21, "frameid": 104, "rumina": 0, "intake": 0, "inactive": 20, "gasp": 0, "high": 15, "active": 1, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741094041, "updatedAt": 1741094041 }, { "id": 39898562, "pastureId": 1, "uuid": "1070420250304105", "neckRingNumber": "10704", "activeDate": "2025-03-04", "hours": 21, "frameid": 105, "rumina": 13, "intake": 0, "inactive": 20, "gasp": 5, "high": 9, "active": 0, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741095241, "updatedAt": 1741095241 }, { "id": 39907240, "pastureId": 1, "uuid": "1070420250304106", "neckRingNumber": "10704", "activeDate": "2025-03-04", "hours": 22, "frameid": 106, "rumina": 20, "intake": 0, "inactive": 20, "gasp": 3, "high": 29, "active": 1, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741096444, "updatedAt": 1741096444 }, { "id": 39765983, "pastureId": 1, "uuid": "107092025030481", "neckRingNumber": "10709", "activeDate": "2025-03-04", "hours": 16, "frameid": 81, "rumina": 14, "intake": 0, "inactive": 20, "gasp": 0, "high": 7, "active": 0, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 305, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741076914, "updatedAt": 1741076914 }, { "id": 39766488, "pastureId": 1, "uuid": "107092025030482", "neckRingNumber": "10709", "activeDate": "2025-03-04", "hours": 16, "frameid": 82, "rumina": 13, "intake": 0, "inactive": 12, "gasp": 0, "high": 119, "active": 5, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 305, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741077242, "updatedAt": 1741077242 }, { "id": 39775232, "pastureId": 1, "uuid": "107092025030483", "neckRingNumber": "10709", "activeDate": "2025-03-04", "hours": 17, "frameid": 83, "rumina": 1, "intake": 10, "inactive": 0, "gasp": 0, "high": 412, "active": 18, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 305, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741078688, "updatedAt": 1741078688 }, { "id": 39794774, "pastureId": 1, "uuid": "107092025030484", "neckRingNumber": "10709", "activeDate": "2025-03-04", "hours": 17, "frameid": 84, "rumina": 0, "intake": 0, "inactive": 0, "gasp": 0, "high": 372, "active": 15, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 305, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741080504, "updatedAt": 1741080504 }, { "id": 39786688, "pastureId": 1, "uuid": "107092025030484", "neckRingNumber": "10709", "activeDate": "2025-03-04", "hours": 17, "frameid": 84, "rumina": 0, "intake": 0, "inactive": 0, "gasp": 0, "high": 372, "active": 15, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 305, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741079623, "updatedAt": 1741079623 }, { "id": 39795227, "pastureId": 1, "uuid": "107092025030485", "neckRingNumber": "10709", "activeDate": "2025-03-04", "hours": 17, "frameid": 85, "rumina": 0, "intake": 0, "inactive": 0, "gasp": 0, "high": 563, "active": 18, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 305, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741080842, "updatedAt": 1741080842 }, { "id": 39803763, "pastureId": 1, "uuid": "107092025030486", "neckRingNumber": "10709", "activeDate": "2025-03-04", "hours": 18, "frameid": 86, "rumina": 7, "intake": 0, "inactive": 0, "gasp": 0, "high": 124, "active": 6, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 305, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741081979, "updatedAt": 1741081979 }, { "id": 39585880, "pastureId": 1, "uuid": "107102025030451", "neckRingNumber": "10710", "activeDate": "2025-03-04", "hours": 10, "frameid": 51, "rumina": 15, "intake": 0, "inactive": 0, "gasp": 0, "high": 139, "active": 14, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741054411, "updatedAt": 1741054411 }, { "id": 39593663, "pastureId": 1, "uuid": "107102025030452", "neckRingNumber": "10710", "activeDate": "2025-03-04", "hours": 10, "frameid": 52, "rumina": 9, "intake": 7, "inactive": 0, "gasp": 0, "high": 346, "active": 15, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741055643, "updatedAt": 1741055643 }, { "id": 39602483, "pastureId": 1, "uuid": "107102025030453", "neckRingNumber": "10710", "activeDate": "2025-03-04", "hours": 11, "frameid": 53, "rumina": 0, "intake": 16, "inactive": 0, "gasp": 0, "high": 524, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741056836, "updatedAt": 1741056836 }, { "id": 39614495, "pastureId": 1, "uuid": "107102025030454", "neckRingNumber": "10710", "activeDate": "2025-03-04", "hours": 11, "frameid": 54, "rumina": 0, "intake": 17, "inactive": 0, "gasp": 0, "high": 558, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741058260, "updatedAt": 1741058260 }, { "id": 39614198, "pastureId": 1, "uuid": "107102025030454", "neckRingNumber": "10710", "activeDate": "2025-03-04", "hours": 11, "frameid": 54, "rumina": 0, "intake": 17, "inactive": 0, "gasp": 0, "high": 558, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741058020, "updatedAt": 1741058020 }, { "id": 39621998, "pastureId": 1, "uuid": "107102025030455", "neckRingNumber": "10710", "activeDate": "2025-03-04", "hours": 11, "frameid": 55, "rumina": 0, "intake": 3, "inactive": 6, "gasp": 0, "high": 141, "active": 7, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741059237, "updatedAt": 1741059237 }, { "id": 39631255, "pastureId": 1, "uuid": "107102025030456", "neckRingNumber": "10710", "activeDate": "2025-03-04", "hours": 12, "frameid": 56, "rumina": 0, "intake": 0, "inactive": 20, "gasp": 0, "high": 4, "active": 0, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741060691, "updatedAt": 1741060691 }, { "id": 39919093, "pastureId": 1, "uuid": "1071820250304111", "neckRingNumber": "10718", "activeDate": "2025-03-04", "hours": 22, "frameid": 111, "rumina": 19, "intake": 0, "inactive": 15, "gasp": 0, "high": 108, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741097888, "updatedAt": 1741097888 }, { "id": 39926993, "pastureId": 1, "uuid": "1071820250304112", "neckRingNumber": "10718", "activeDate": "2025-03-04", "hours": 22, "frameid": 112, "rumina": 15, "intake": 0, "inactive": 20, "gasp": 0, "high": 48, "active": 8, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741098765, "updatedAt": 1741098765 }, { "id": 39936309, "pastureId": 1, "uuid": "1071820250304113", "neckRingNumber": "10718", "activeDate": "2025-03-04", "hours": 23, "frameid": 113, "rumina": 0, "intake": 0, "inactive": 20, "gasp": 0, "high": 25, "active": 0, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741100289, "updatedAt": 1741100289 }, { "id": 39935620, "pastureId": 1, "uuid": "1071820250304113", "neckRingNumber": "10718", "activeDate": "2025-03-04", "hours": 23, "frameid": 113, "rumina": 0, "intake": 0, "inactive": 20, "gasp": 0, "high": 25, "active": 0, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741099964, "updatedAt": 1741099964 }, { "id": 39947890, "pastureId": 1, "uuid": "1071820250304114", "neckRingNumber": "10718", "activeDate": "2025-03-04", "hours": 23, "frameid": 114, "rumina": 0, "intake": 1, "inactive": 19, "gasp": 0, "high": 96, "active": 6, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741101165, "updatedAt": 1741101165 }, { "id": 39956178, "pastureId": 1, "uuid": "1071820250304115", "neckRingNumber": "10718", "activeDate": "2025-03-04", "hours": 23, "frameid": 115, "rumina": 0, "intake": 18, "inactive": 0, "gasp": 0, "high": 433, "active": 19, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741102365, "updatedAt": 1741102365 }, { "id": 39964758, "pastureId": 1, "uuid": "1071820250304116", "neckRingNumber": "10718", "activeDate": "2025-03-04", "hours": 24, "frameid": 116, "rumina": 0, "intake": 14, "inactive": 0, "gasp": 0, "high": 448, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741103565, "updatedAt": 1741103565 }, { "id": 39918690, "pastureId": 1, "uuid": "1072320250304111", "neckRingNumber": "10723", "activeDate": "2025-03-04", "hours": 22, "frameid": 111, "rumina": 0, "intake": 0, "inactive": 20, "gasp": 0, "high": 7, "active": 0, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 174, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741097565, "updatedAt": 1741097565 }, { "id": 39927106, "pastureId": 1, "uuid": "1072320250304112", "neckRingNumber": "10723", "activeDate": "2025-03-04", "hours": 22, "frameid": 112, "rumina": 3, "intake": 0, "inactive": 20, "gasp": 0, "high": 23, "active": 2, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 174, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741098781, "updatedAt": 1741098781 }, { "id": 39927434, "pastureId": 1, "uuid": "1072320250304112", "neckRingNumber": "10723", "activeDate": "2025-03-04", "hours": 22, "frameid": 112, "rumina": 3, "intake": 0, "inactive": 20, "gasp": 0, "high": 23, "active": 2, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 174, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741099092, "updatedAt": 1741099092 }, { "id": 39935746, "pastureId": 1, "uuid": "1072320250304113", "neckRingNumber": "10723", "activeDate": "2025-03-04", "hours": 23, "frameid": 113, "rumina": 15, "intake": 4, "inactive": 16, "gasp": 0, "high": 178, "active": 5, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 174, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741099983, "updatedAt": 1741099983 }, { "id": 39951142, "pastureId": 1, "uuid": "1072320250304114", "neckRingNumber": "10723", "activeDate": "2025-03-04", "hours": 23, "frameid": 114, "rumina": 2, "intake": 17, "inactive": 0, "gasp": 0, "high": 614, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 174, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741101771, "updatedAt": 1741101771 }, { "id": 39956291, "pastureId": 1, "uuid": "1072320250304115", "neckRingNumber": "10723", "activeDate": "2025-03-04", "hours": 23, "frameid": 115, "rumina": 0, "intake": 20, "inactive": 0, "gasp": 0, "high": 628, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 174, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741102387, "updatedAt": 1741102387 }, { "id": 39964870, "pastureId": 1, "uuid": "1072320250304116", "neckRingNumber": "10723", "activeDate": "2025-03-04", "hours": 24, "frameid": 116, "rumina": 0, "intake": 9, "inactive": 0, "gasp": 0, "high": 452, "active": 19, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 174, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741103582, "updatedAt": 1741103582 }, { "id": 39643327, "pastureId": 1, "uuid": "107252025030461", "neckRingNumber": "10725", "activeDate": "2025-03-04", "hours": 12, "frameid": 61, "rumina": 0, "intake": 0, "inactive": 20, "gasp": 0, "high": 18, "active": 0, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741061861, "updatedAt": 1741061861 }, { "id": 39651606, "pastureId": 1, "uuid": "107252025030462", "neckRingNumber": "10725", "activeDate": "2025-03-04", "hours": 12, "frameid": 62, "rumina": 0, "intake": 2, "inactive": 17, "gasp": 0, "high": 115, "active": 3, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741063089, "updatedAt": 1741063089 }, { "id": 39660185, "pastureId": 1, "uuid": "107252025030463", "neckRingNumber": "10725", "activeDate": "2025-03-04", "hours": 13, "frameid": 63, "rumina": 0, "intake": 15, "inactive": 0, "gasp": 0, "high": 734, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741064294, "updatedAt": 1741064294 }, { "id": 39659988, "pastureId": 1, "uuid": "107252025030463", "neckRingNumber": "10725", "activeDate": "2025-03-04", "hours": 13, "frameid": 63, "rumina": 0, "intake": 15, "inactive": 0, "gasp": 0, "high": 734, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741064041, "updatedAt": 1741064041 }, { "id": 39671876, "pastureId": 1, "uuid": "107252025030464", "neckRingNumber": "10725", "activeDate": "2025-03-04", "hours": 13, "frameid": 64, "rumina": 2, "intake": 17, "inactive": 0, "gasp": 0, "high": 589, "active": 19, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741065521, "updatedAt": 1741065521 }, { "id": 39679662, "pastureId": 1, "uuid": "107252025030465", "neckRingNumber": "10725", "activeDate": "2025-03-04", "hours": 13, "frameid": 65, "rumina": 0, "intake": 20, "inactive": 0, "gasp": 0, "high": 607, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741066422, "updatedAt": 1741066422 }, { "id": 39688282, "pastureId": 1, "uuid": "107252025030466", "neckRingNumber": "10725", "activeDate": "2025-03-04", "hours": 14, "frameid": 66, "rumina": 4, "intake": 7, "inactive": 1, "gasp": 0, "high": 470, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741067578, "updatedAt": 1741067578 }, { "id": 39699766, "pastureId": 1, "uuid": "107672025030471", "neckRingNumber": "10767", "activeDate": "2025-03-04", "hours": 14, "frameid": 71, "rumina": 0, "intake": 19, "inactive": 0, "gasp": 0, "high": 600, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741068766, "updatedAt": 1741068766 }, { "id": 39708539, "pastureId": 1, "uuid": "107672025030472", "neckRingNumber": "10767", "activeDate": "2025-03-04", "hours": 14, "frameid": 72, "rumina": 0, "intake": 2, "inactive": 0, "gasp": 0, "high": 337, "active": 16, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741070036, "updatedAt": 1741070036 }, { "id": 39717751, "pastureId": 1, "uuid": "107672025030473", "neckRingNumber": "10767", "activeDate": "2025-03-04", "hours": 15, "frameid": 73, "rumina": 4, "intake": 8, "inactive": 0, "gasp": 0, "high": 45, "active": 3, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741071486, "updatedAt": 1741071486 }, { "id": 39717511, "pastureId": 1, "uuid": "107672025030473", "neckRingNumber": "10767", "activeDate": "2025-03-04", "hours": 15, "frameid": 73, "rumina": 4, "intake": 8, "inactive": 0, "gasp": 0, "high": 45, "active": 3, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741071239, "updatedAt": 1741071239 }, { "id": 39729605, "pastureId": 1, "uuid": "107672025030474", "neckRingNumber": "10767", "activeDate": "2025-03-04", "hours": 15, "frameid": 74, "rumina": 14, "intake": 5, "inactive": 0, "gasp": 0, "high": 241, "active": 18, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741072723, "updatedAt": 1741072723 }, { "id": 39737760, "pastureId": 1, "uuid": "107672025030475", "neckRingNumber": "10767", "activeDate": "2025-03-04", "hours": 15, "frameid": 75, "rumina": 15, "intake": 0, "inactive": 19, "gasp": 0, "high": 34, "active": 1, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741073627, "updatedAt": 1741073627 }, { "id": 39746321, "pastureId": 1, "uuid": "107672025030476", "neckRingNumber": "10767", "activeDate": "2025-03-04", "hours": 16, "frameid": 76, "rumina": 20, "intake": 0, "inactive": 18, "gasp": 0, "high": 94, "active": 4, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741074841, "updatedAt": 1741074841 }, { "id": 39585903, "pastureId": 1, "uuid": "107682025030451", "neckRingNumber": "10768", "activeDate": "2025-03-04", "hours": 10, "frameid": 51, "rumina": 2, "intake": 11, "inactive": 0, "gasp": 0, "high": 542, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741054411, "updatedAt": 1741054411 }, { "id": 39593688, "pastureId": 1, "uuid": "107682025030452", "neckRingNumber": "10768", "activeDate": "2025-03-04", "hours": 10, "frameid": 52, "rumina": 0, "intake": 13, "inactive": 0, "gasp": 0, "high": 543, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741055643, "updatedAt": 1741055643 }, { "id": 39602507, "pastureId": 1, "uuid": "107682025030453", "neckRingNumber": "10768", "activeDate": "2025-03-04", "hours": 11, "frameid": 53, "rumina": 12, "intake": 3, "inactive": 0, "gasp": 0, "high": 227, "active": 11, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741056836, "updatedAt": 1741056836 }, { "id": 39614221, "pastureId": 1, "uuid": "107682025030454", "neckRingNumber": "10768", "activeDate": "2025-03-04", "hours": 11, "frameid": 54, "rumina": 16, "intake": 0, "inactive": 17, "gasp": 1, "high": 73, "active": 4, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741058020, "updatedAt": 1741058020 }, { "id": 39614498, "pastureId": 1, "uuid": "107682025030454", "neckRingNumber": "10768", "activeDate": "2025-03-04", "hours": 11, "frameid": 54, "rumina": 16, "intake": 0, "inactive": 17, "gasp": 1, "high": 73, "active": 4, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741058260, "updatedAt": 1741058260 }, { "id": 39622024, "pastureId": 1, "uuid": "107682025030455", "neckRingNumber": "10768", "activeDate": "2025-03-04", "hours": 11, "frameid": 55, "rumina": 20, "intake": 0, "inactive": 20, "gasp": 0, "high": 6, "active": 1, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741059237, "updatedAt": 1741059237 }, { "id": 39631088, "pastureId": 1, "uuid": "107682025030456", "neckRingNumber": "10768", "activeDate": "2025-03-04", "hours": 12, "frameid": 56, "rumina": 20, "intake": 0, "inactive": 20, "gasp": 12, "high": 0, "active": 0, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 300, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741060454, "updatedAt": 1741060454 }, { "id": 39643330, "pastureId": 1, "uuid": "107902025030461", "neckRingNumber": "10790", "activeDate": "2025-03-04", "hours": 12, "frameid": 61, "rumina": 6, "intake": 5, "inactive": 0, "gasp": 0, "high": 157, "active": 14, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741061861, "updatedAt": 1741061861 }, { "id": 39651445, "pastureId": 1, "uuid": "107902025030462", "neckRingNumber": "10790", "activeDate": "2025-03-04", "hours": 12, "frameid": 62, "rumina": 16, "intake": 4, "inactive": 0, "gasp": 0, "high": 45, "active": 6, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741062766, "updatedAt": 1741062766 }, { "id": 39659991, "pastureId": 1, "uuid": "107902025030463", "neckRingNumber": "10790", "activeDate": "2025-03-04", "hours": 13, "frameid": 63, "rumina": 7, "intake": 4, "inactive": 0, "gasp": 0, "high": 355, "active": 17, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741064041, "updatedAt": 1741064041 }, { "id": 39671879, "pastureId": 1, "uuid": "107902025030464", "neckRingNumber": "10790", "activeDate": "2025-03-04", "hours": 13, "frameid": 64, "rumina": 0, "intake": 20, "inactive": 0, "gasp": 0, "high": 495, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741065521, "updatedAt": 1741065521 }, { "id": 39675509, "pastureId": 1, "uuid": "107902025030464", "neckRingNumber": "10790", "activeDate": "2025-03-04", "hours": 13, "frameid": 64, "rumina": 0, "intake": 20, "inactive": 0, "gasp": 0, "high": 495, "active": 20, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 1, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741065787, "updatedAt": 1741065787 }, { "id": 39710887, "pastureId": 1, "uuid": "107902025030465", "neckRingNumber": "10790", "activeDate": "2025-03-04", "hours": 13, "frameid": 65, "rumina": 0, "intake": 6, "inactive": 0, "gasp": 0, "high": 452, "active": 19, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 4, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741070530, "updatedAt": 1741070530 }, { "id": 39712370, "pastureId": 1, "uuid": "107902025030466", "neckRingNumber": "10790", "activeDate": "2025-03-04", "hours": 14, "frameid": 66, "rumina": 6, "intake": 0, "inactive": 0, "gasp": 0, "high": 209, "active": 8, "other": 0, "firmwareVersion": 55, "hardwareVersion": 0, "remain": 3, "voltage": 301, "restartReason": 158, "upper": 0, "ActiveDateTimeType": 1, "isShow": 2, "imei": "869701075190853", "receiveNumber": "869701075190853", "createdAt": 1741070598, "updatedAt": 1741070598 } ]` neckRingList := make([]*model.NeckRingOriginal, 0) if err := json.Unmarshal([]byte(str), &neckRingList); err != nil { panic(err) } neckRingList = RemoveDuplicates(neckRingList) data := recalculate(neckRingList) b, _ := json.Marshal(data) fmt.Println(string(b)) } func TestIndex(t *testing.T) { }