新增木浆棉

This commit is contained in:
2026-07-09 10:09:42 +08:00
parent 03e4bf9029
commit b5f9823175
3 changed files with 429 additions and 2 deletions
@@ -3673,6 +3673,9 @@ public class PriceUtils {
public double calcByTargetN(int startN, double highPrice, int endN, double lowPrice, int targetN) {
// 高价商品个数线性插值
if (endN == startN) {
return highPrice * targetN;
}
double a = startN * (double) (endN - targetN) / (endN - startN);
double b = targetN - a;
double total = a * highPrice + b * lowPrice;