修改冷转印价格

Esse commit está contido em:
2026-02-03 14:48:24 +08:00
commit 1929ebbfa3
2 arquivos alterados com 26 adições e 21 exclusões
@@ -2675,7 +2675,6 @@ public class ProductService {
num = Math.max(Math.floor(paperLength / length) * Math.floor(paperWidth / width), Math.floor(paperLength / width) * Math.floor(paperWidth / length));
}
double baseCount = Math.max(Math.ceil(dto.getCount() * dto.getNumber() / num), 1);
double countNum = Math.max(Math.ceil(dto.getNumber() / num), 1);
int coNumber = dto.getCo_number() == null ? 1 : dto.getCo_number();
@@ -2683,7 +2682,7 @@ public class ProductService {
coNumber = 1;
}
double price = new PriceUtils().CalculatePrice(craft_list, baseCount, coNumber, countNum, width * length * dto.getCount() * number);
double price = new PriceUtils().CalculatePrice(craft_list, baseCount, coNumber, countNum, width * length * dto.getCount() * number, number);
Product pro = new Product();
pro.setCount(dto.getCount());
@@ -2698,7 +2697,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);
double currentPrice = new PriceUtils().CalculatePrice(craft_list, baseCount, coNumber, countNum, width * length * quantitySteps[i] * number, number);
pro = new Product();
+8 -2
Ver Arquivo
@@ -3685,7 +3685,7 @@ public class PriceUtils {
}
public double CalculatePrice(List<String> craft_list, double count, int coNumber, double countNum, double area) {
public double CalculatePrice(List<String> craft_list, double count, int coNumber, double countNum, double area, int number) {
if (craft_list.contains("烫画")) {
double basePrice = 0;
area = area / 10000;
@@ -3699,6 +3699,9 @@ 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;
@@ -3718,10 +3721,13 @@ public class PriceUtils {
}
}
} else {
price = 200 * countNum;
}
price = price + (coNumber - 1) * 100;
}
return price;
return Math.ceil(price);
}
public static List<Product> getYinBaiPrice(List<Product> productList, double width, double length) {