修改冰箱贴价格
This commit is contained in:
@@ -7410,6 +7410,40 @@ public class ProductService {
|
||||
return priceList;
|
||||
}
|
||||
|
||||
private double getOtherFridgePrice(double width, double length, Product dto, double min_price, List<String> carft_list) {
|
||||
double price;
|
||||
String cailiao = dto.getCailiao();
|
||||
double last_price = 1000;
|
||||
double area = width * length * dto.getCount() / 10000 * dto.getNumber();
|
||||
if (width * length / 10000 < 0.001) {
|
||||
double basePrice = 1;
|
||||
if ("4.2".equals(cailiao)) {
|
||||
basePrice = 1.5;
|
||||
}
|
||||
price = Math.max(basePrice * dto.getCount() * dto.getNumber() + 8 * dto.getNumber(), min_price);
|
||||
} else {
|
||||
|
||||
double[] areas = {0, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 1, 2, 3, 5, 7, 9, 10, 20, 50};
|
||||
int[] prices = {0, 1500, 1480, 1450, 1400, 1380, 1350, 1200, 1100, 1080, 1050, 1000, 1000, 1000, 1000, 1000};
|
||||
if ("2.3".equals(cailiao) && carft_list.contains("激光")) {
|
||||
prices = new int[]{0, 1500, 1400, 1350, 1300, 1280, 1250, 1100, 1000, 950, 900, 850, 850, 850, 850, 850};
|
||||
last_price = 850;
|
||||
}
|
||||
if ("4.2".equals(cailiao) && carft_list.contains("CNC")) {
|
||||
prices = new int[]{0, 1600, 1500, 1480, 1450, 1400, 1380, 1350, 1300, 1250, 1200, 1200, 1200, 1200, 1200, 1200};
|
||||
last_price = 1200;
|
||||
}
|
||||
if ("2.3".equals(cailiao) && carft_list.contains("CNC")) {
|
||||
prices = new int[]{0, 1500, 1400, 1380, 1350, 1300, 1280, 1250, 1200, 1150, 1100, 1100, 1100, 1100, 1100, 1100};
|
||||
last_price = 1100;
|
||||
}
|
||||
price = PriceUtils.TableUnitPrice(area, prices, areas, last_price);
|
||||
|
||||
}
|
||||
price = Math.max(price, min_price) + ((dto.getNumber() - 1) * 8);
|
||||
return price;
|
||||
}
|
||||
|
||||
private List<Product> getfridgePrice(Product dto, Double width, Double length, String role) {
|
||||
List<String> carft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
|
||||
List<Product> priceList = new ArrayList<>();
|
||||
@@ -7422,35 +7456,16 @@ public class ProductService {
|
||||
double area = width * length * dto.getCount() / 10000 * dto.getNumber();
|
||||
String weight = "";
|
||||
if ("冰箱贴".equals(dto.getKindValue())) {
|
||||
if (width * length / 10000 < 0.001) {
|
||||
double basePrice = 1;
|
||||
if ("4.2".equals(cailiao)) {
|
||||
basePrice = 1.5;
|
||||
}
|
||||
price = Math.max(basePrice * count * dto.getNumber() + 8 * dto.getNumber(), min_price);
|
||||
} else {
|
||||
|
||||
double[] areas = {0, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 1, 2, 3, 5, 7, 9, 10, 20, 50};
|
||||
int[] prices = {0, 1500, 1480, 1450, 1400, 1380, 1350, 1200, 1100, 1080, 1050, 1000, 1000, 1000, 1000, 1000};
|
||||
if ("2.3".equals(cailiao) && carft_list.contains("激光")) {
|
||||
prices = new int[]{0, 1500, 1400, 1350, 1300, 1280, 1250, 1100, 1000, 950, 900, 850, 850, 850, 850, 850};
|
||||
last_price = 850;
|
||||
}
|
||||
if ("4.2".equals(cailiao) && carft_list.contains("CNC")) {
|
||||
prices = new int[]{0, 1600, 1500, 1480, 1450, 1400, 1380, 1350, 1300, 1250, 1200, 1200, 1200, 1200, 1200, 1200};
|
||||
last_price = 1200;
|
||||
}
|
||||
if ("2.3".equals(cailiao) && carft_list.contains("CNC")) {
|
||||
prices = new int[]{0, 1500, 1400, 1380, 1350, 1300, 1280, 1250, 1200, 1150, 1100, 1100, 1100, 1100, 1100, 1100};
|
||||
last_price = 1100;
|
||||
}
|
||||
price = PriceUtils.TableUnitPrice(area, prices, areas, last_price);
|
||||
if (carft_list.contains("激光") && carft_list.contains("滴胶")) {
|
||||
price = price * 1.3;
|
||||
}
|
||||
|
||||
price = getOtherFridgePrice(width, length, dto, min_price, carft_list);
|
||||
if (carft_list.contains("激光") && carft_list.contains("滴胶")) {
|
||||
price = price * 1.3;
|
||||
}
|
||||
if (carft_list.contains("二层旋转")) {
|
||||
price += getOtherFridgePrice(dto.getLengthSize(), dto.getWidthSize(), dto, 0, carft_list);
|
||||
}
|
||||
if (carft_list.contains("三层旋转")) {
|
||||
price += getOtherFridgePrice(dto.getLengthTang(), dto.getWidthTang(), dto, 0, carft_list);
|
||||
}
|
||||
price = Math.max(price, min_price) + ((dto.getNumber() - 1) * 8);
|
||||
weight = df.format(width * length * 4.17 * dto.getCount() * 0.1 * number / 1000 * Double.parseDouble(cailiao));
|
||||
}
|
||||
|
||||
@@ -9641,7 +9656,7 @@ public class ProductService {
|
||||
prices = new double[]{200, 280, 380, 688, 1000, 1620, 2420};
|
||||
} else if (num == 3) {
|
||||
prices = new double[]{272, 376, 500, 912, 1320, 2140, 3100};
|
||||
} else if (num == 5) {
|
||||
} else if (num == 5 || num == 4) {
|
||||
prices = new double[]{380, 520, 696, 1260, 1832, 2740, 4100};
|
||||
} else if (num == 6) {
|
||||
prices = new double[]{480, 640, 880, 1520, 2040, 3200, 4800};
|
||||
|
||||
Reference in New Issue
Block a user