修改香薰卡价格

This commit is contained in:
2025-12-13 16:36:35 +08:00
parent cb734e7d8f
commit 1c7a3def12
2 changed files with 15 additions and 8 deletions
@@ -1663,12 +1663,12 @@ public class ProductService {
if ("1".equals(dto.getKindValue())) {
// 给产品加上重量 扣除出血的4毫米
for (Product product : priceList) {
product.setWeight(df.format(number * (length - 4) / 100 * (width - 4) / 1000 * product.getCount() * 0.2 * 0.86));
product.setWeight(df.format(number * (length - 4) / 1000 * (width - 4) / 1000 * product.getCount() * 0.2 * 0.86));
}
} else {
// 给产品加上重量
for (Product product : priceList) {
product.setWeight(df.format(number * (length - 4) / 100 * (width - 4) / 1000 * product.getCount() * 0.3 * 0.86));
product.setWeight(df.format(number * (length - 4) / 1000 * (width - 4) / 1000 * product.getCount() * 0.3 * 0.86));
}
}
@@ -5071,7 +5071,7 @@ public class ProductService {
pro = new Product();
pro.setCount(itemCount);
pro.setPrice(Math.ceil(unit_prices[base][i] * itemCount * number));
pro.setWeight(df.format(width * length * 1.8 * itemCount / 10000 ));
pro.setWeight(df.format(width * length * 1.8 * itemCount / 10000));
priceList.add(pro);
}
@@ -5277,13 +5277,14 @@ public class ProductService {
max = Math.max(max, 1);
// 报的数量需要多少张大纸
// 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个
double num = Math.ceil(dto.getCount() * dto.getNumber() / max);
double num = Math.ceil(dto.getCount() / max);
double craft_price = 0;
double bao_price = 0;
if (carftList.contains("单独包装")) {
craft_price += Math.ceil(0.2 * dto.getCount() * dto.getNumber());
bao_price += Math.ceil(0.2 * dto.getCount() * dto.getNumber());
}
if (carftList.contains("真空包装")) {
craft_price += Math.ceil(0.35 * dto.getCount() * dto.getNumber());
bao_price += Math.ceil(0.35 * dto.getCount() * dto.getNumber());
}
if (carftList.contains("配涤纶丝带")) {
craft_price += Math.ceil(0.1 * dto.getCount() * dto.getNumber());
@@ -5311,7 +5312,7 @@ public class ProductService {
cardDesignFee = 20.5;
}
Product pro = new Product();
pro.setPrice(Math.ceil(Math.max(base_price * num + designFee + cardDesignFee, min_price) + craft_price));
pro.setPrice(Math.ceil(Math.max((base_price * num + cardDesignFee) * number, min_price) + designFee + bao_price + (craft_price == 0 ? craft_price : Math.max(craft_price, 5))));
pro.setCount(dto.getCount());
pro.setNumber(dto.getNumber());
pro.setWeight(df.format(dto.getNumber() * (length - 4) / 1000 * (width - 4) / 1000 * dto.getCount() * 0.2 * 0.86));