瀏覽代碼

crontab: estrus 过滤掉性别是公牛的数据

Yi 5 天之前
父節點
當前提交
fdec5e84e7
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      module/crontab/neck_ring_estrus.go

+ 5 - 0
module/crontab/neck_ring_estrus.go

@@ -143,6 +143,11 @@ func (e *Entry) CowEstrusWarning(pastureId int64, xToday *XToday, nowTime time.T
 				zaplog.Error("CowEstrusWarning", zap.Any("FindCowInfoByCowId", cowId))
 				continue
 			}
+
+			if cowInfo.Sex == pasturePb.Genders_Male {
+				continue
+			}
+
 			isShow := pasturePb.IsShow_Ok
 			if cowInfo != nil && cowInfo.IsPregnant == pasturePb.IsShow_Ok && level == pasturePb.EstrusLevel_Low {
 				isShow = pasturePb.IsShow_No