修改冷转印价格
This commit is contained in:
@@ -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));
|
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 baseCount = Math.max(Math.ceil(dto.getCount() * dto.getNumber() / num), 1);
|
||||||
double countNum = Math.max(Math.ceil(dto.getNumber() / num), 1);
|
double countNum = Math.max(Math.ceil(dto.getNumber() / num), 1);
|
||||||
int coNumber = dto.getCo_number() == null ? 1 : dto.getCo_number();
|
int coNumber = dto.getCo_number() == null ? 1 : dto.getCo_number();
|
||||||
@@ -2683,7 +2682,7 @@ public class ProductService {
|
|||||||
coNumber = 1;
|
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();
|
Product pro = new Product();
|
||||||
pro.setCount(dto.getCount());
|
pro.setCount(dto.getCount());
|
||||||
@@ -2698,7 +2697,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
baseCount = Math.max(Math.ceil(quantitySteps[i] * dto.getNumber() / num), 1);
|
baseCount = Math.max(Math.ceil(quantitySteps[i] * dto.getNumber() / num), 1);
|
||||||
countNum = Math.max(Math.ceil(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();
|
pro = new Product();
|
||||||
|
|
||||||
|
|||||||
@@ -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("烫画")) {
|
if (craft_list.contains("烫画")) {
|
||||||
double basePrice = 0;
|
double basePrice = 0;
|
||||||
area = area / 10000;
|
area = area / 10000;
|
||||||
@@ -3699,29 +3699,35 @@ public class PriceUtils {
|
|||||||
double price = 0;
|
double price = 0;
|
||||||
if (craft_list.contains("冷转印")) {
|
if (craft_list.contains("冷转印")) {
|
||||||
double banfei = 200;
|
double banfei = 200;
|
||||||
if (countNum > 1) {
|
double numCount = Math.max(Math.ceil(count / number), 1);
|
||||||
price = 200 * countNum;
|
//单款数量少于5张的直接版费乘款数
|
||||||
banfei = 0;
|
if (numCount > 5) {
|
||||||
count = Math.abs(count - countNum);
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
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 {
|
||||||
|
price = 200 * countNum;
|
||||||
|
}
|
||||||
price = price + (coNumber - 1) * 100;
|
price = price + (coNumber - 1) * 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
return price;
|
return Math.ceil(price);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Product> getYinBaiPrice(List<Product> productList, double width, double length) {
|
public static List<Product> getYinBaiPrice(List<Product> productList, double width, double length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user