diff --git a/config/presets-data/nutrient.json b/config/presets-data/nutrient.json index 3ceffd1..a60fb3a 100644 --- a/config/presets-data/nutrient.json +++ b/config/presets-data/nutrient.json @@ -1742,407 +1742,407 @@ "DL-蛋氨酸98": { "descriptions": "饲料级合成蛋氨酸,几乎100%可利用,是猪限制性氨基酸补充的首选来源,可显著提高生长速度和饲料转化率。", "unit_price": 21.50, - "max_ratio": 1.00 + "max_ratio": 100.00 }, "L-色氨酸98": { "descriptions": "饲料级合成色氨酸,猪的第四限制性氨基酸,缺乏时严重影响采食量和生长,补充可提升猪只食欲和免疫力。", "unit_price": 68.00, - "max_ratio": 1.00 + "max_ratio": 100.00 }, "L-苏氨酸98": { "descriptions": "饲料级合成苏氨酸,猪的第三限制性氨基酸,主要影响蛋白沉积和免疫器官发育,仔猪阶段尤为重要。", "unit_price": 10.80, - "max_ratio": 1.00 + "max_ratio": 100.00 }, "L-赖氨酸HCl 98": { "descriptions": "饲料级赖氨酸盐酸盐,猪的第一限制性氨基酸,低蛋白日粮配方核心,降低氮排放的同时维持生长性能。", "unit_price": 11.20, - "max_ratio": 1.00 + "max_ratio": 100.00 }, "乳清粉": { "descriptions": "仔猪最优质的乳源蛋白和乳糖来源,提高采食量、促进肠道发育、缓解断奶应激,是教槽料和保育料黄金原料。", "unit_price": 6.50, - "max_ratio": 0.40 + "max_ratio": 40.00 }, "兔肉粉": { "descriptions": "高蛋白高消化率动物蛋白源,氨基酸平衡好,适口性佳,适合高档仔猪料和母猪料使用。", "unit_price": 11.50, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "全株玉米青贮": { "descriptions": "粗饲料来源,提供有效纤维,调节成年母猪肠道健康,降低便秘,价格低廉。", "unit_price": 0.45, - "max_ratio": 0.30 + "max_ratio": 30.00 }, "双低菜籽粕": { "descriptions": "双低菜粕,硫甙和异硫氰酸酯含量低,可部分替代豆粕使用,但仍需注意赖氨酸利用率和甲状腺影响。", "unit_price": 2.40, - "max_ratio": 0.35 + "max_ratio": 35.00 }, "向日葵籽": { "descriptions": "高油分能量原料,富含亚油酸,但纤维高,猪的利用率一般,多用于母猪料。", "unit_price": 5.80, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "啤酒糟干": { "descriptions": "高蛋白高纤维副产品,适口性好,可用于生长肥育猪和母猪料,注意霉菌毒素风险。", "unit_price": 1.90, - "max_ratio": 0.30 + "max_ratio": 30.00 }, "啤酒花渣": { "descriptions": "啤酒副产物,湿态使用时适口性好,可降低母猪便秘,但干物质低、易发霉。", "unit_price": 0.60, - "max_ratio": 0.10 + "max_ratio": 10.00 }, "国产鱼粉60": { "descriptions": "中等品质鱼粉,蛋白高但新鲜度一般,挥发性盐基氮和组胺需关注,仔猪料谨慎使用。", "unit_price": 9.50, - "max_ratio": 0.15 + "max_ratio": 15.00 }, "土豆蛋白": { "descriptions": "高消化率植物浓缩蛋白,氨基酸平衡好,是优质替代血浆和鱼粉的原料之一。", "unit_price": 8.50, - "max_ratio": 1.00 + "max_ratio": 100.00 }, "大豆油": { "descriptions": "高能量油脂,猪利用率极高,用于提高日粮能量浓度,改善皮毛光亮度。", "unit_price": 8.20, - "max_ratio": 0.10 + "max_ratio": 10.00 }, "大豆粕44": { "descriptions": "普通豆粕,蛋白43.8%左右,抗营养因子较高,需关注脲酶和KOH溶解度。", "unit_price": 3.05, - "max_ratio": 0.65 + "max_ratio": 65.00 }, "大豆粕46": { "descriptions": "优质豆粕,蛋白更高,抗营养因子更低,是猪料最常用蛋白原料。", "unit_price": 3.25, - "max_ratio": 0.65 + "max_ratio": 65.00 }, "大豆粕48": { "descriptions": "高蛋白豆粕,抗营养因子最低,低蛋白日粮配方的理想蛋白源。", "unit_price": 3.60, - "max_ratio": 0.65 + "max_ratio": 65.00 }, "大麦": { "descriptions": "能量稍低于玉米,纤维较高,可部分替代玉米,注意DON毒素风险。", "unit_price": 2.10, - "max_ratio": 0.60 + "max_ratio": 60.00 }, "小苏打": { "descriptions": "缓冲剂和钠源,缓解热应激、改善母猪泌乳期酸中毒。", "unit_price": 1.60, - "max_ratio": 0.02 + "max_ratio": 2.00 }, "小麦": { "descriptions": "能量与玉米接近,但黏性大,易导致肠道问题,仔猪料慎用。", "unit_price": 2.55, - "max_ratio": 0.60 + "max_ratio": 60.00 }, "小麦次粉": { "descriptions": "小麦加工副产品,蛋白和磷较高,但DON和ZEN风险高,限量使用。", "unit_price": 2.20, - "max_ratio": 0.25 + "max_ratio": 25.00 }, "小麦麸": { "descriptions": "高纤维原料,用于母猪料促进肠道蠕动,降低便秘。", "unit_price": 1.75, - "max_ratio": 0.40 + "max_ratio": 40.00 }, "木薯干": { "descriptions": "高能量淀粉源,几乎不含蛋白,价格低廉,但需搭配优质蛋白。", "unit_price": 2.05, - "max_ratio": 0.50 + "max_ratio": 50.00 }, "杂交构树叶粉": { "descriptions": "新型蛋白饲料资源,蛋白中等,富含黄酮,但单宁和草酸高,需限量并配合脱毒处理。", "unit_price": 2.20, - "max_ratio": 0.05 + "max_ratio": 5.00 }, "构树叶粉(老叶高纤维)": { "descriptions": "老叶构树粉,纤维更高,适合母猪粗饲料使用。", "unit_price": 1.50, - "max_ratio": 0.10 + "max_ratio": 10.00 }, "柠檬酸渣": { "descriptions": "湿态副产品,适口性好,可用于母猪料降低成本。", "unit_price": 0.50, - "max_ratio": 0.05 + "max_ratio": 5.00 }, "棉籽粕": { "descriptions": "蛋白较高,但游离棉酚严重影响公猪生育力和生长,需严格限量或脱毒。", "unit_price": 2.80, - "max_ratio": 0.03 + "max_ratio": 3.00 }, "棕榈油": { "descriptions": "饱和脂肪酸高,能量高,但熔点高,冬季易凝固,仔猪利用率稍差。", "unit_price": 8.50, - "max_ratio": 0.10 + "max_ratio": 10.00 }, "棕榈粕": { "descriptions": "高纤维高脂肪副产品,能量一般,多用于母猪料。", "unit_price": 1.60, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "椰子粕": { "descriptions": "蛋白和能量中等,适口性好,可部分替代豆粕。", "unit_price": 2.30, - "max_ratio": 0.25 + "max_ratio": 25.00 }, "燕麦": { "descriptions": "能量和脂肪较高,适口性佳,但价格贵,一般少用。", "unit_price": 3.20, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "燕麦草": { "descriptions": "粗饲料,母猪用以增加饱腹感和肠道健康。", "unit_price": 2.60, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "猪肺粉": { "descriptions": "优质动物蛋白,消化率高,适口性极佳,适合高档仔猪料。", "unit_price": 9.00, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "玉米": { "descriptions": "猪最主要的能量原料,淀粉消化率高,毒素风险需关注。", "unit_price": 2.30, - "max_ratio": 1.00 + "max_ratio": 100.00 }, "玉米DDGS": { "descriptions": "高蛋白高脂肪玉米副产品,磷利用率高,适合生长肥育猪和母猪。", "unit_price": 2.15, - "max_ratio": 0.40 + "max_ratio": 40.00 }, "玉米油": { "descriptions": "优质植物油,富含不饱和脂肪酸,能量最高油脂之一。", "unit_price": 9.50, - "max_ratio": 0.10 + "max_ratio": 10.00 }, "玉米胚芽粕": { "descriptions": "蛋白和脂肪较高,磷利用率好,可部分替代豆粕和油。", "unit_price": 2.05, - "max_ratio": 0.25 + "max_ratio": 25.00 }, "玉米蛋白粉60": { "descriptions": "高蛋白高蛋氨酸,色素来源,用于改善猪皮红毛亮。", "unit_price": 4.80, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "玉米青贮": { "descriptions": "粗饲料,母猪用以调节肠道,降低饲料成本。", "unit_price": 0.40, - "max_ratio": 0.30 + "max_ratio": 30.00 }, "瓜子粕": { "descriptions": "葵花籽粕的别称,蛋白较高,纤维也高。", "unit_price": 2.10, - "max_ratio": 0.35 + "max_ratio": 35.00 }, "甜菜粕": { "descriptions": "高可溶性纤维,母猪极佳的防便秘原料。", "unit_price": 1.95, - "max_ratio": 0.30 + "max_ratio": 30.00 }, "石粉": { "descriptions": "最常用的钙源,价格低廉,注意粒度影响吸收率。", "unit_price": 0.18, - "max_ratio": 0.08 + "max_ratio": 8.00 }, "碎米": { "descriptions": "能量接近玉米,蛋白稍低,适口性好。", "unit_price": 2.80, - "max_ratio": 0.60 + "max_ratio": 60.00 }, "磷酸氢钙": { "descriptions": "猪最常用磷钙来源,有效磷高。", "unit_price": 3.20, - "max_ratio": 0.08 + "max_ratio": 8.00 }, "稻草粉": { "descriptions": "最廉价粗纤维来源,母猪限量使用防便秘。", "unit_price": 0.60, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "稻谷": { "descriptions": "带壳稻子,能量低于玉米,纤维高。", "unit_price": 1.90, - "max_ratio": 0.30 + "max_ratio": 30.00 }, "稻谷糠": { "descriptions": "米糠的一种,高脂肪高磷,需注意酸败。", "unit_price": 1.60, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "米糠": { "descriptions": "高能量高磷副产品,注意黄曲霉毒素和酸败。", "unit_price": 1.85, - "max_ratio": 0.25 + "max_ratio": 25.00 }, "米糠粕": { "descriptions": "脱脂米糠,蛋白较高,能量降低。", "unit_price": 1.95, - "max_ratio": 0.25 + "max_ratio": 25.00 }, "红薯干": { "descriptions": "高淀粉低蛋白能量原料,类似木薯。", "unit_price": 2.20, - "max_ratio": 0.50 + "max_ratio": 50.00 }, "肉粉": { "descriptions": "普通肉粉,蛋白和灰分波动大,质量不稳定。", "unit_price": 4.50, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "肉骨粉50": { "descriptions": "含骨较高,钙磷比例好,但蛋白较低。", "unit_price": 4.20, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "脱脂奶粉": { "descriptions": "优质乳蛋白源,仔猪料黄金原料。", "unit_price": 22.00, - "max_ratio": 0.30 + "max_ratio": 30.00 }, "膨化全脂大豆": { "descriptions": "经过高温膨化的全脂大豆,抗营养因子破坏彻底,仔猪可用。", "unit_price": 4.10, - "max_ratio": 0.30 + "max_ratio": 30.00 }, "芝麻粕": { "descriptions": "蛋白高,蛋氨酸丰富,但草酸高,需限量。", "unit_price": 2.90, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "花生秧粉": { "descriptions": "粗饲料,母猪用。", "unit_price": 0.85, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "花生粕": { "descriptions": "蛋白高,但黄曲霉毒素风险极高,猪场慎用。", "unit_price": 3.70, - "max_ratio": 0.05 + "max_ratio": 5.00 }, "苜蓿草块": { "descriptions": "优质粗饲料,富含维生素和未知生长因子,母猪和仔猪都适用。", "unit_price": 2.40, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "苜蓿草粉": { "descriptions": "蛋白较高,但皂苷和香豆素可能影响采食。", "unit_price": 2.50, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "苹果渣": { "descriptions": "湿态副产品,适口性好,母猪喜欢。", "unit_price": 0.55, - "max_ratio": 0.10 + "max_ratio": 10.00 }, "菜籽粕": { "descriptions": "普通菜粕,硫甙高,对甲状腺影响大,猪限量使用。", "unit_price": 2.30, - "max_ratio": 0.15 + "max_ratio": 15.00 }, "葡萄糖": { "descriptions": "快速能量源,教槽料常用,缓解应激。", "unit_price": 3.80, - "max_ratio": 0.15 + "max_ratio": 15.00 }, "葵花籽粕": { "descriptions": "高纤维蛋白源,赖氨酸低,需补充赖氨酸。", "unit_price": 2.10, - "max_ratio": 0.35 + "max_ratio": 35.00 }, "蔗糖": { "descriptions": "高能量碳水,教槽料诱食用。", "unit_price": 6.50, - "max_ratio": 0.10 + "max_ratio": 10.00 }, "虾粉": { "descriptions": "优质动物蛋白,含虾青素,改善体色。", "unit_price": 6.00, - "max_ratio": 0.10 + "max_ratio": 10.00 }, "蚕蛹粉": { "descriptions": "高蛋白高脂肪,氨基酸平衡好,但脂肪易氧化。", "unit_price": 8.00, - "max_ratio": 0.15 + "max_ratio": 15.00 }, "蚕豆": { "descriptions": "蛋白较高,淀粉消化率好,但含抗营养因子。", "unit_price": 3.40, - "max_ratio": 0.50 + "max_ratio": 50.00 }, "蟹粉": { "descriptions": "高蛋白高灰分动物蛋白,钙磷丰富。", "unit_price": 4.50, - "max_ratio": 0.10 + "max_ratio": 10.00 }, "血浆蛋白粉": { "descriptions": "仔猪断奶料黄金功能性蛋白,IgG高,促进肠道发育和免疫。", "unit_price": 45.00, - "max_ratio": 0.05 + "max_ratio": 5.00 }, "血粉": { "descriptions": "赖氨酸极高,但适口性差,需喷涂使用。", "unit_price": 6.50, - "max_ratio": 0.05 + "max_ratio": 5.00 }, "豆磷脂": { "descriptions": "高能量乳化剂,促进脂肪消化,改善皮毛。", "unit_price": 6.80, - "max_ratio": 0.01 + "max_ratio": 1.00 }, "豌豆": { "descriptions": "蛋白中等,淀粉消化好,可部分替代玉米和豆粕。", "unit_price": 3.50, - "max_ratio": 0.50 + "max_ratio": 50.00 }, "豌豆蛋白": { "descriptions": "豌豆浓缩蛋白,蛋白高,抗营养因子低。", "unit_price": 9.50, - "max_ratio": 0.25 + "max_ratio": 25.00 }, "进口鱼粉65": { "descriptions": "高品质鱼粉,新鲜度好,仔猪和母猪料优质蛋白源。", "unit_price": 12.80, - "max_ratio": 0.30 + "max_ratio": 30.00 }, "食盐": { "descriptions": "提供钠和氯,调节电解质平衡。", "unit_price": 0.50, - "max_ratio": 0.01 + "max_ratio": 1.00 }, "饲料酵母粉": { "descriptions": "富含核苷酸和小肽,促进肠道健康和免疫。", "unit_price": 6.50, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "高粱": { "descriptions": "能量接近玉米,但单宁高影响消化率,需选低单宁品种。", "unit_price": 2.20, - "max_ratio": 0.50 + "max_ratio": 50.00 }, "鱼油": { "descriptions": "富含DHA和EPA,促进脑发育和抗炎,母猪和仔猪推荐。", "unit_price": 18.00, - "max_ratio": 0.03 + "max_ratio": 3.00 }, "鸡肉粉": { "descriptions": "优质陆基动物蛋白,消化率高,适口性好。", "unit_price": 7.50, - "max_ratio": 0.25 + "max_ratio": 25.00 }, "鸭肉粉": { "descriptions": "与鸡肉粉类似,脂肪稍高。", "unit_price": 7.20, - "max_ratio": 0.20 + "max_ratio": 20.00 }, "鹅肉粉": { "descriptions": "蛋白和脂肪中等,质量稳定。", "unit_price": 7.00, - "max_ratio": 0.20 + "max_ratio": 20.00 } }, "nutrients": { diff --git a/internal/domain/recipe/recipe_generate_manager.go b/internal/domain/recipe/recipe_generate_manager.go index 676bb02..6296cea 100644 --- a/internal/domain/recipe/recipe_generate_manager.go +++ b/internal/domain/recipe/recipe_generate_manager.go @@ -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), }) }