修改手提袋重量

This commit is contained in:
2025-08-02 17:13:18 +08:00
parent 28d4b5682a
commit f6dda50c22
4 changed files with 219 additions and 163 deletions
+184 -2
View File
@@ -1,6 +1,7 @@
package lingtao.net.util;
import lingtao.net.bean.Product;
import lingtao.net.vo.FunReturnVo;
import org.springframework.util.StringUtils;
import java.text.DecimalFormat;
@@ -3546,8 +3547,8 @@ public class PriceUtils {
} else if (startIndex == endIndex) {
price = (price_list[endIndex] * areas[endIndex] / areas[endIndex]) * area;
} else {
double end_price = price_list[endIndex]*areas[endIndex];
double start_price = price_list[startIndex]*areas[startIndex];
double end_price = price_list[endIndex] * areas[endIndex];
double start_price = price_list[startIndex] * areas[startIndex];
price = ((areas[endIndex] - area) / (areas[endIndex] - areas[startIndex])) * start_price + ((area - areas[startIndex]) / (areas[endIndex] - areas[startIndex])) * end_price;
}
@@ -3584,4 +3585,185 @@ public class PriceUtils {
return price;
}
public FunReturnVo getBagTagPrice(String kind2Value, String kindValue) {
FunReturnVo vo = new FunReturnVo();
if ("1".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{420, 627, 1056, 1980, 2920, 4785, 9240});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{726, 1073, 1914, 2723, 4290, 7920});
}
vo.setLength(25.0);
vo.setHeight(23.0);
vo.setWidth(15.0);
}
if ("2".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{480, 644, 1089, 2046, 2970, 4785, 9240});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{743, 1089, 1947, 2772, 4372, 8085});
}
vo.setLength(24.0);
vo.setHeight(26.5);
vo.setWidth(14.0);
}
if ("3".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{480, 730, 1320, 2330, 3300, 5280, 9800});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{770, 1200, 2380, 3400, 5300, 9500});
}
vo.setLength(28.0);
vo.setHeight(26.5);
vo.setWidth(15.0);
}
if ("4".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{420, 576, 896, 1600, 2304, 3760, 7040});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{576, 880, 1568, 2256, 3600, 6880});
}
vo.setLength(13.0);
vo.setHeight(16.0);
vo.setWidth(8.0);
}
if ("5".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{450, 733, 980, 1700, 2500, 4000, 7600});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{651, 890, 1480, 2150, 3450, 6625});
}
vo.setLength(11.0);
vo.setHeight(25.0);
vo.setWidth(9.5);
}
if ("6".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{390, 658, 1030, 1800, 2600, 4200, 8350});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{593, 1000, 1720, 2500, 4000, 7800});
}
vo.setLength(16.0);
vo.setHeight(23.0);
vo.setWidth(8.0);
}
if ("7".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{320, 520, 860, 1550, 2240, 3750, 6900});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{500, 890, 1530, 2130, 3430, 6280});
}
vo.setLength(21.0);
vo.setHeight(27.0);
vo.setWidth(11.0);
}
if ("8".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{400, 540, 1100, 1640, 2400, 3950, 7380});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{560, 980, 1640, 2230, 3600, 6580});
}
vo.setLength(21.0);
vo.setHeight(26.5);
vo.setWidth(14.0);
}
if ("9".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{500, 760, 1200, 2260, 3300, 5200, 9910});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{700, 1100, 1920, 2800, 4400, 8500});
}
vo.setLength(25.0);
vo.setHeight(27.0);
vo.setWidth(17.0);
}
if ("10".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{600, 970, 1450, 2480, 3600, 5450, 9380});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{910, 1350, 2300, 3400, 5100, 8600});
}
vo.setLength(32.0);
vo.setHeight(27.0);
vo.setWidth(11.0);
}
if ("11".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{1192, 1600, 2800, 4100, 6500, 11280});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{920, 1350, 2250, 3500, 6350, 10800});
}
vo.setLength(32.0);
vo.setHeight(39.0);
vo.setWidth(11.0);
}
if ("12".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{1419, 2013, 3234, 4800, 7672, 11385});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{1338, 1898, 3069, 4500, 7260, 10395});
}
vo.setLength(25.0);
vo.setHeight(32.0);
vo.setWidth(13.0);
}
if ("31".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{528, 875, 1650, 2426, 3878, 7590});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{680, 957, 1716, 2475, 3878, 7095});
}
vo.setLength(23.0);
vo.setHeight(21.0);
vo.setWidth(15.0);
}
if ("37".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{600, 990, 1848, 2723, 4455, 8580});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{710, 1040, 1848, 2624, 4125, 7755});
}
vo.setLength(23.0);
vo.setHeight(21.0);
vo.setWidth(11.0);
}
if ("38".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{600, 924, 1650, 2376, 3878, 7260});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{600, 908, 1617, 2328, 3713, 7095});
}
vo.setLength(21.0);
vo.setHeight(21.0);
vo.setWidth(14.0);
}
if ("62".equals(kind2Value)) {
if ("0".equals(kindValue)) {
vo.setBase_price(new double[]{578, 975, 1848, 2673, 5360, 10240});
}
if ("1".equals(kindValue)) {
vo.setBase_price(new double[]{693, 1008, 1749, 2475, 4960, 9600});
}
vo.setLength(24.0);
vo.setHeight(32.0);
vo.setWidth(14.0);
}
return vo;
}
}