|  | @@ -60,17 +60,17 @@ func (e *Entry) GenerateAsynqWorkOrder() error {
 | 
	
		
			
				|  |  |  func (e *Entry) Indicators() error {
 | 
	
		
			
				|  |  |  	indicatorsRemarksList := make([]*model.IndicatorsDetails, 0)
 | 
	
		
			
				|  |  |  	if err := e.DB.Model(new(model.IndicatorsDetails)).
 | 
	
		
			
				|  |  | -		Where("is_show = ?", pasturePb.IsShow_Ok).
 | 
	
		
			
				|  |  |  		Find(&indicatorsRemarksList).Error; err != nil {
 | 
	
		
			
				|  |  |  		return err
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  	nowTime := time.Now().Format(model.LayoutMonth)
 | 
	
		
			
				|  |  | +	zaplog.Info("Indicators", zap.Any("nowTime", nowTime))
 | 
	
		
			
				|  |  |  	for _, v := range indicatorsRemarksList {
 | 
	
		
			
				|  |  |  		switch v.Kind {
 | 
	
		
			
				|  |  |  		case "all_cow":
 | 
	
		
			
				|  |  |  			pastureIdAllCow := e.FindPastureAllCow()
 | 
	
		
			
				|  |  |  			for pastureId, value := range pastureIdAllCow {
 | 
	
		
			
				|  |  | -				e.UpdatePastureIndicators(pastureId, nowTime, v.Kind, fmt.Sprintf("%d", value))
 | 
	
		
			
				|  |  | +				e.UpdatePastureIndicators(pastureId, v, nowTime, fmt.Sprintf("%d", value))
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		case "calving_interval":
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -127,7 +127,7 @@ func (e *Entry) ImmunizationPlan() error {
 | 
	
		
			
				|  |  |  			Select("a.*").
 | 
	
		
			
				|  |  |  			Where("a.pasture_id = ?", plan.PastureId).
 | 
	
		
			
				|  |  |  			Where("a.admission_status = ?", pasturePb.AdmissionStatus_Admission).
 | 
	
		
			
				|  |  | -			Where("NOT EXISTS ( select 1 from event_immunization_plan b where b.pen_id = a.id and b.status = ? and b.plan_day > ?)", plan.Id, pasturePb.IsShow_No, nowTime)
 | 
	
		
			
				|  |  | +			Where("NOT EXISTS ( select 1 from event_immunization_plan b where b.pen_id = a.id and b.status = ? and b.plan_day > ?)", pasturePb.IsShow_No, nowTime)
 | 
	
		
			
				|  |  |  		if plan.CowType > 0 {
 | 
	
		
			
				|  |  |  			pref.Where("a.cow_type = ?", plan.CowType)
 | 
	
		
			
				|  |  |  		}
 | 
	
	
		
			
				|  | @@ -149,12 +149,12 @@ func (e *Entry) ImmunizationPlan() error {
 | 
	
		
			
				|  |  |  			if plan.ImmunizationPlanId > 0 {
 | 
	
		
			
				|  |  |  				pref.Joins("INNER JOIN event_immunization_plan as b ON b.immunization_plan_id = ? ", plan.ImmunizationPlanId).
 | 
	
		
			
				|  |  |  					Where("b.cow_id = a.id").
 | 
	
		
			
				|  |  | -					Where("DATE_ADD(b.reality_time, INTERVAL ? DAY) = ?", plan.Value, time.Now().Format(model.LayoutDate2)).
 | 
	
		
			
				|  |  | +					Where("DATE_ADD(b.reality_day, INTERVAL ? DAY) = ?", plan.Value, time.Now().Format(model.LayoutDate2)).
 | 
	
		
			
				|  |  |  					Where("b.status = ?", pasturePb.IsShow_Ok)
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		if err := pref.Find(&cowList).Error; err != nil {
 | 
	
		
			
				|  |  | +		if err := pref.Find(&cowList).Debug().Error; err != nil {
 | 
	
		
			
				|  |  |  			return xerr.WithStack(err)
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if len(cowList) <= 0 {
 |