Browse Source

statictics: add field

Yi 1 year ago
parent
commit
26af9bf14f
2 changed files with 12 additions and 0 deletions
  1. 3 0
      model/formula_estimate.go
  2. 9 0
      module/backend/statistic_service.go

+ 3 - 0
model/formula_estimate.go

@@ -244,6 +244,9 @@ type FeedStatisticsConversions struct {
 	CostOfFormulation         string  `json:"cost_of_formulation"`          // 配方成本
 	FoodIntakeRate            string  `json:"food_intake_rate"`             // 采食率
 	FeedConversionRatio       float64 `json:"feed_conversion_ratio"`        // 饲料转化率
+	FeedFormulaName           string  `json:"feed_formula_name"`            // 配方模板
+	ActualMixedVolume         string  `json:"actual_mixed_volume"`          // 实际混料量
+	SprinkleVolume            string  `json:"sprinkle_volume"`              // 撒料量
 }
 
 type MixedSprinkleDetailRequest struct {

+ 9 - 0
module/backend/statistic_service.go

@@ -501,6 +501,15 @@ func FeedStatisticsConversions(req interface{}) *model.FeedStatisticsConversions
 			if d, t := v["饲料转化率"]; t {
 				feedStatisticsList.FeedConversionRatio = d.(float64)
 			}
+			if d, t := v["配方模板"]; t {
+				feedStatisticsList.FeedFormulaName = d.(string)
+			}
+			if d, t := v["实际混料量"]; t {
+				feedStatisticsList.ActualMixedVolume = d.(string)
+			}
+			if d, t := v["撒料量"]; t {
+				feedStatisticsList.SprinkleVolume = d.(string)
+			}
 		}
 	}
 	return feedStatisticsList