edit
This commit is contained in:
@@ -986,8 +986,36 @@ public class PriceUtils {
|
||||
}
|
||||
if ("6".equals(kind)) {
|
||||
if ("无".equals(kind2)) {
|
||||
double priceArr[] = {50, 34, 27, 27, 26, 25};
|
||||
list = acountTag600Price(area, count, priceArr, shengzi, flag, list);
|
||||
double price = 0;
|
||||
int[][] prices = {
|
||||
{144, 148, 166, 188, 193, 210, 232, 249, 251, 273, 317, 392, 464, 476, 674, 1028, 1802},
|
||||
{228, 238, 248, 255, 256, 258, 260, 268, 270, 278, 322, 397, 469, 481, 679, 1033, 1807},
|
||||
{330, 345, 350, 380, 386, 390, 420, 428, 430, 465, 538, 665, 780, 800, 1108, 1665, 2920},
|
||||
{480, 520, 530, 560, 568, 580, 591, 629, 633, 686, 791, 971, 1141, 1170, 1644, 2486, 4329},
|
||||
{800, 820, 860, 870, 880, 900, 955, 1016, 1023, 1107, 1276, 1563, 1838, 1885, 2645, 3997, 6955},
|
||||
{1400, 1430, 1450, 1527, 1560, 1690, 1852, 1969, 1982, 2145, 2470, 3022, 3549, 3640, 5102, 7702, 13390}
|
||||
};
|
||||
int[] count_list = {500, 1000, 2000, 3000, 5000, 10000};
|
||||
double[] areas = {16, 25, 30, 35, 36, 40, 45, 48.6, 49, 54, 64, 81, 97.2, 100, 145.8, 225, 400};
|
||||
for (int i = 0; i < count_list.length; i++) {
|
||||
int count_item = count_list[i];
|
||||
if (list.size() > 2) {
|
||||
break;
|
||||
}
|
||||
if (count > count_item) {
|
||||
continue;
|
||||
}
|
||||
int count_index = Arrays.binarySearch(count_list, count_item);
|
||||
price = 0;
|
||||
if (count_index >= 0) {
|
||||
price = new PriceUtils().TablePrice(area * 1000, prices[count_index], areas);
|
||||
}
|
||||
Product product = new Product();
|
||||
product.setCount(count_item);
|
||||
product.setPrice(Math.ceil(price));
|
||||
list.add(product);
|
||||
}
|
||||
|
||||
} else if ("单面烫黄金".equals(kind2)) {
|
||||
double priceArr[] = {68, 48, 37, 36, 35, 34};
|
||||
list = acountTag600Price(area, count, priceArr, shengzi, flag, list);
|
||||
|
||||
Reference in New Issue
Block a user