修改烫画价格

This commit is contained in:
2026-02-22 16:01:59 +08:00
parent 1929ebbfa3
commit a204336b58
2 changed files with 25 additions and 30 deletions
@@ -532,8 +532,11 @@ public class ProductService {
if ("12".equals(dto.getToothpick_size())) {
basePrice = basePrice + 0.02;
}
product.setPrice(product.getPrice() + Math.ceil(product.getCount() * basePrice));
if ("0".equals(dto.getKindValue())) {
product.setPrice(product.getPrice() + Math.ceil(product.getCount() * basePrice));
} else {
product.setPrice(product.getPrice() + Math.ceil(product.getCount() * basePrice * number));
}
if ("配牙签".equals(dto.getCraftShua()) && "6.5".equals(dto.getToothpick_size()) && ((width == 9 && length == 2.5) || length == 9 && width == 2.5)) {
if (product.getCount() == 500) {
double other_price = 60;
@@ -577,8 +580,6 @@ public class ProductService {
}
if ("0".equals(dto.getKindValue()) && !"专版打印".contentEquals(dto.getStickerKind())) {
if (number > 1) {
for (Product product : stickersList) {
product.setPrice(product.getPrice() * number);
@@ -2682,7 +2683,7 @@ public class ProductService {
coNumber = 1;
}
double price = new PriceUtils().CalculatePrice(craft_list, baseCount, coNumber, countNum, width * length * dto.getCount() * number, number);
double price = new PriceUtils().CalculatePrice(craft_list, baseCount, coNumber, countNum, width * length * dto.getCount() * number);
Product pro = new Product();
pro.setCount(dto.getCount());
@@ -2697,7 +2698,7 @@ public class ProductService {
}
baseCount = Math.max(Math.ceil(quantitySteps[i] * dto.getNumber() / num), 1);
countNum = Math.max(Math.ceil(dto.getNumber() / num), 1);
double currentPrice = new PriceUtils().CalculatePrice(craft_list, baseCount, coNumber, countNum, width * length * quantitySteps[i] * number, number);
double currentPrice = new PriceUtils().CalculatePrice(craft_list, baseCount, coNumber, countNum, width * length * quantitySteps[i] * number);
pro = new Product();
+18 -24
View File
@@ -3685,7 +3685,7 @@ public class PriceUtils {
}
public double CalculatePrice(List<String> craft_list, double count, int coNumber, double countNum, double area, int number) {
public double CalculatePrice(List<String> craft_list, double count, int coNumber, double countNum, double area) {
if (craft_list.contains("烫画")) {
double basePrice = 0;
area = area / 10000;
@@ -3699,31 +3699,25 @@ public class PriceUtils {
double price = 0;
if (craft_list.contains("冷转印")) {
double banfei = 200;
double numCount = Math.max(Math.ceil(count / number), 1);
//单款数量少于5张的直接版费乘款数
if (numCount > 5) {
if (countNum > 1) {
price = 200 * countNum;
banfei = 0;
count = Math.abs(count - countNum);
}
if (count > 0) {
if (count <= 5) {
price += 200;
} else if (count < 75) {
price += 14 * count + banfei;
} else {
if (count < 89) {
count = 89;
}
price += 14 * count;
}
}
} else {
if (countNum > 1) {
price = 200 * countNum;
banfei = 0;
count = Math.abs(count - countNum);
}
if (count > 0) {
if (count <= 5) {
price += 200;
} else if (count < 75) {
price += 14 * count + banfei;
} else {
if (count < 89) {
count = 89;
}
price += 14 * count;
}
}
price = price + (coNumber - 1) * 100;
}