|
|
@@ -362,8 +362,8 @@ public class PosterPrice {
|
|
|
// 户外写真白胶(国产)
|
|
|
case "0":
|
|
|
areas = new double[]{2, 5, 7, 8, 10, 20, 50};
|
|
|
- prices = new double[]{50, 40, 35, 32, 26, 24, 22};
|
|
|
- last_price = 26;
|
|
|
+ prices = new double[]{38, 38, 33, 30, 25, 23, 21};
|
|
|
+ last_price = 19;
|
|
|
min_price += 50 - 5;
|
|
|
// 根据面积得到单价
|
|
|
weight = String.valueOf(DecimalFormat.format(area * 0.24 * number));
|
|
|
@@ -372,8 +372,8 @@ public class PosterPrice {
|
|
|
case "1":
|
|
|
// 根据面积得到单价
|
|
|
areas = new double[]{2, 5, 7, 8, 10, 20, 50};
|
|
|
- prices = new double[]{50, 40, 35, 32, 26, 24, 22};
|
|
|
- last_price = 26;
|
|
|
+ prices = new double[]{38, 38, 33, 30, 25, 23, 21};
|
|
|
+ last_price = 19;
|
|
|
min_price += 50 - 5;
|
|
|
weight = String.valueOf(DecimalFormat.format(area * 0.25 * number));
|
|
|
break;
|
|
|
@@ -417,27 +417,44 @@ public class PosterPrice {
|
|
|
weight = String.valueOf(DecimalFormat.format(area * 0.24 * number));
|
|
|
break;
|
|
|
}
|
|
|
- if (width * length < 40 * 50) {
|
|
|
- price = new PriceUtils().getTestPrice(length, width, count, number, areas, prices, min_price, last_price);
|
|
|
- } else {
|
|
|
- danjia = last_price;
|
|
|
+ Product pro = new Product();
|
|
|
+ List<Product> list = new ArrayList<Product>();
|
|
|
+ pro.setCount(count);
|
|
|
+ danjia = last_price;
|
|
|
+
|
|
|
+ if ("0".equals(kind2) || "1".equals(kind2)) {
|
|
|
for (int i = 0; i < areas.length; i++) {
|
|
|
if (area <= areas[i]) {
|
|
|
danjia = prices[i];
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- price = Math.max(area * danjia, min_price);
|
|
|
- }
|
|
|
- Product pro = new Product();
|
|
|
- List<Product> list = new ArrayList<Product>();
|
|
|
- pro.setCount(count);
|
|
|
- // 价格 = 面积 * 单价 + (款数-1) * 40
|
|
|
- if (number > 1 && width * length >= 40 * 50) {
|
|
|
- pro.setPrice(Math.ceil(price * number));
|
|
|
- } else {
|
|
|
+ price = Math.max(area * danjia, min_price) * number;
|
|
|
+ if (area < areas[0]) {
|
|
|
+ price = min_price + 10 * number;
|
|
|
+ }
|
|
|
pro.setPrice(Math.ceil(price));
|
|
|
+ } else {
|
|
|
+ if (width * length < 40 * 50) {
|
|
|
+ price = new PriceUtils().getTestPrice(length, width, count, number, areas, prices, min_price, last_price);
|
|
|
+ } else {
|
|
|
+ for (int i = 0; i < areas.length; i++) {
|
|
|
+ if (area <= areas[i]) {
|
|
|
+ danjia = prices[i];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ price = Math.max(area * danjia, min_price);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 价格 = 面积 * 单价 + (款数-1) * 40
|
|
|
+ if (number > 1 && width * length >= 40 * 50) {
|
|
|
+ pro.setPrice(Math.ceil(price * number));
|
|
|
+ } else {
|
|
|
+ pro.setPrice(Math.ceil(price));
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
pro.setWeight(weight);
|
|
|
list.add(pro);
|
|
|
return list;
|