修改美纹纸价格,修改烫画向下取并加上设计费,修改宣传单尺寸

This commit is contained in:
2025-06-19 11:54:11 +08:00
parent d188743f49
commit 17def0dd1f
5 changed files with 72 additions and 55 deletions
@@ -2503,7 +2503,7 @@ public class ProductService {
if (dto.getCraft() != null && craft_list.size() > 0 && (craft_list.contains("冷转印") || craft_list.contains("烫画"))) {
int[] quantitySteps = {10, 20, 30, 50, 100, 200, 300, 400, 500, 800, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000};
double paperLength = 0, paperWidth = 0;
double chu = 0.6;
if (craft_list.contains("冷转印")) {
paperLength = 20;
@@ -2512,22 +2512,23 @@ public class ProductService {
if (craft_list.contains("烫画")) {
paperLength = 100;
paperWidth = 57;
chu = 1;
}
if (length == paperLength || length == paperWidth) {
} else {
length = BigDecimal.valueOf(length).add(BigDecimal.valueOf(0.6)).doubleValue();
length = BigDecimal.valueOf(length).add(BigDecimal.valueOf(chu)).doubleValue();
}
if (width == paperLength || width == paperWidth) {
} else {
width = BigDecimal.valueOf(width).add(BigDecimal.valueOf(0.6)).doubleValue();
width = BigDecimal.valueOf(width).add(BigDecimal.valueOf(chu)).doubleValue();
}
//一张大纸能放几个
double num = Math.max(Math.min(Math.floor(paperLength / length) * Math.floor(paperWidth / width), Math.floor(paperLength / width) * Math.floor(paperWidth / length)), 1);
if (craft_list.contains("烫画")) {
num = Math.max(Math.ceil(paperLength / length) * Math.ceil(paperWidth / width), Math.ceil(paperLength / width) * Math.ceil(paperWidth / length));
num = Math.max(Math.floor(paperLength / length) * Math.floor(paperWidth / width), Math.floor(paperLength / width) * Math.floor(paperWidth / length));
}
@@ -2562,9 +2563,9 @@ public class ProductService {
priceList.add(pro);
}
// for (Product product : priceList) {
// product.setPrice(Math.ceil(product.getPrice() + (number - 1) * 0.5));
// }
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() + (number - 1) * 0.5));
}
return priceList;
}