修改冰箱贴价格

This commit is contained in:
2025-12-29 11:51:06 +08:00
parent 2099f32634
commit 4b1a74bf13
2 changed files with 213 additions and 69 deletions
@@ -1758,6 +1758,9 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.ceil((product.getPrice() + addPrice) * product.getPriceMultiple()));
}
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * number * min * zhekou));
}
if ("500克拉丝闪银".equals(kind)) {
String[] craft = dto.getCraft();
if (!StringUtils.isEmpty(craft)) {
@@ -1778,13 +1781,12 @@ public class ProductService {
}
}
} else {
dto.setMaxian(1);
getCraft(dto, priceList, null, null, 0);
}
// 根据位数重新算价格
// 根据款数重新算价格
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * number * min * zhekou));
}
//直角的价格 按照报价系统乘以2.3 异形的按照报价系统的价格乘以1.5哈
if ("金绒".equals(kind) && craft_list.contains("白墨")) {
for (Product product : priceList) {
@@ -5359,24 +5361,58 @@ public class ProductService {
List<String> carft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
List<Product> priceList = new ArrayList<>();
String cailiao = dto.getCailiao();
double price = 0;
double min_price = 50;
double last_price = 1000;
int count = dto.getCount();
int number = dto.getNumber();
double area = width * length * dto.getCount() / 10000 * dto.getNumber();
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;
String weight = "";
if ("冰箱贴".equals(dto.getKindValue())) {
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);
weight = df.format(width * length * 4.17 * dto.getCount() * 0.1 * number / 1000 * Double.parseDouble(cailiao));
}
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 ("对联冰箱贴".equals(dto.getKindValue())) {
double basePrice = 0;
min_price = 55;
double baseWeight = 0.4;
if ("2.3".equals(cailiao) && "70*80".equals(dto.getSize())) {
basePrice = 8;
}
if ("2.3滴塑".equals(cailiao) && "70*80".equals(dto.getSize())) {
basePrice = 10;
}
if ("2.3".equals(cailiao) && "90*100".equals(dto.getSize())) {
basePrice = 10;
baseWeight = 0.6;
}
if ("2.3滴塑".equals(cailiao) && "90*100".equals(dto.getSize())) {
basePrice = 12;
baseWeight = 0.6;
}
if ("2.3滴塑".equals(cailiao)) {
cailiao = "2.3";
}
price = Math.ceil(Math.max((basePrice * count * number), min_price) + 8 * number);
weight = df.format(width * length * 4.17 * dto.getCount() * number * 0.1 / 100000 * Double.parseDouble(cailiao));
}
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;
}
double price = PriceUtils.TableUnitPrice(area, prices, areas, last_price);
double card_price = 0;
if (carft_list.contains("背卡")) {
String card_size = dto.getSize1();
@@ -5443,8 +5479,8 @@ public class ProductService {
Product pro = new Product();
pro.setCount(dto.getCount());
pro.setNumber(dto.getNumber());
pro.setWeight(df.format(width * length * 4.17 * dto.getCount() * 0.1 / 1000 * Double.parseDouble(cailiao)));
pro.setPrice(Math.ceil(Math.max(price, min_price) + ((dto.getNumber() - 1) * 8) + card_price));
pro.setWeight(weight);
pro.setPrice(Math.ceil(price + card_price));
priceList.add(pro);
return priceList;