修正数据错误
This commit is contained in:
@@ -180,7 +180,7 @@ func (r *recipeGenerateManagerImpl) GenerateRecipe(ctx context.Context, pigType
|
||||
}
|
||||
maxAdditionConstraints = append(maxAdditionConstraints, maxAdditionConstraintInfo{
|
||||
materialColIndex: materialColIndex,
|
||||
limit: float64(mat.MaxAdditionRatio),
|
||||
limit: float64(mat.MaxAdditionRatio) / 100.0,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -318,7 +318,7 @@ func (r *recipeGenerateManagerImpl) GenerateRecipe(ctx context.Context, pigType
|
||||
recipe.RecipeIngredients = append(recipe.RecipeIngredients, models.RecipeIngredient{
|
||||
RawMaterialID: materialIDs[i],
|
||||
// 比例: float64 -> float32
|
||||
Percentage: float32(proportion),
|
||||
Percentage: float32(proportion * 100.0),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user