Sfoglia il codice sorgente

Process: llplanType传0值问题

Yi 1 anno fa
parent
commit
dd73a871e9
1 ha cambiato i file con 10 aggiunte e 2 eliminazioni
  1. 10 2
      model/formula_estimate.go

+ 10 - 2
model/formula_estimate.go

@@ -243,13 +243,21 @@ type ProcessAnalysisParams struct {
 }
 
 func NewProcessAnalysisParams(pastureId int64, req *operationPb.ProcessAnalysisRequest) *ProcessAnalysisParams {
+	if req.TmrName == nil {
+		req.TmrName = make([]string, 0)
+	}
+
+	lpPlanType := ""
+	if req.PlanType == 0 {
+		lpPlanType = fmt.Sprintf("%d", req.PlanType)
+	}
 	return &ProcessAnalysisParams{
 		PastureId:   fmt.Sprintf("%d", pastureId),
 		StartTime:   req.StartTime,
-		StopTime:    req.StartTime,
+		StopTime:    req.EndTime,
 		TmrTName:    req.TmrName,
 		IsCompleted: "",
-		LpPlanType:  fmt.Sprintf("%d", req.PlanType),
+		LpPlanType:  lpPlanType,
 		FClassId:    req.MixFeedType,
 		Hlzq1:       req.Hlzq1,
 		Hlzq2:       req.Hlzq2,