Yi 2 долоо хоног өмнө
parent
commit
0401c88ef1

+ 1 - 2
module/backend/event_base_more.go

@@ -4,7 +4,6 @@ import (
 	"context"
 	"kpt-pasture/model"
 	"net/http"
-	"strings"
 
 	pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow"
 	"gitee.com/xuyiping_admin/pkg/logger/zaplog"
@@ -447,7 +446,7 @@ func (s *StoreEntry) ImmunizationBatch(ctx context.Context, req *pasturePb.Immun
 	if err = s.DB.Model(new(model.EventImmunizationPlan)).
 		Where("pasture_id = ?", userModel.AppPasture.Id).
 		Where("plan_id = ?", req.PlanId).
-		Where("ear_number IN (?)", strings.Join(req.EarNumbers, ",")).
+		Where("ear_number IN (?)", req.EarNumbers).
 		Find(&eventImmunizationList).Error; err != nil {
 		return xerr.WithStack(err)
 	}

+ 0 - 1
module/backend/event_health_more.go

@@ -219,7 +219,6 @@ func (s *StoreEntry) NeckRingUpdateHealth(ctx context.Context, pastureId, cowId
 	neckRingHealth := &model.NeckRingHealth{}
 	if err := s.DB.Model(new(model.NeckRingHealth)).
 		Where("pasture_id = ?", pastureId).
-		Where("is_show = ?", pasturePb.IsShow_Ok).
 		Where("id = ?", neckRingHealthWarning.NeckRingHealthId).
 		First(neckRingHealth).Error; err != nil {
 		return xerr.WithStack(err)

+ 1 - 0
module/crontab/neck_ring_health.go

@@ -60,6 +60,7 @@ func (e *Entry) updateNeckRingHealth(pastureId int64, healthWarningList []*model
 		if isImmunization {
 			v.IsImmunization = pasturePb.IsShow_Ok
 		}
+		v.IsShow = pasturePb.IsShow_Ok
 	}
 	zaplog.Info("HealthWarning", zap.Any("healthWarningList", healthWarningList))
 	if err := e.DB.Model(new(model.NeckRingHealth)).