修改烫画价格
This commit is contained in:
@@ -532,8 +532,11 @@ public class ProductService {
|
|||||||
if ("12".equals(dto.getToothpick_size())) {
|
if ("12".equals(dto.getToothpick_size())) {
|
||||||
basePrice = basePrice + 0.02;
|
basePrice = basePrice + 0.02;
|
||||||
}
|
}
|
||||||
|
if ("0".equals(dto.getKindValue())) {
|
||||||
product.setPrice(product.getPrice() + Math.ceil(product.getCount() * basePrice));
|
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 ("配牙签".equals(dto.getCraftShua()) && "6.5".equals(dto.getToothpick_size()) && ((width == 9 && length == 2.5) || length == 9 && width == 2.5)) {
|
||||||
if (product.getCount() == 500) {
|
if (product.getCount() == 500) {
|
||||||
double other_price = 60;
|
double other_price = 60;
|
||||||
@@ -577,8 +580,6 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ("0".equals(dto.getKindValue()) && !"专版打印".contentEquals(dto.getStickerKind())) {
|
if ("0".equals(dto.getKindValue()) && !"专版打印".contentEquals(dto.getStickerKind())) {
|
||||||
|
|
||||||
|
|
||||||
if (number > 1) {
|
if (number > 1) {
|
||||||
for (Product product : stickersList) {
|
for (Product product : stickersList) {
|
||||||
product.setPrice(product.getPrice() * number);
|
product.setPrice(product.getPrice() * number);
|
||||||
@@ -2682,7 +2683,7 @@ public class ProductService {
|
|||||||
coNumber = 1;
|
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();
|
Product pro = new Product();
|
||||||
pro.setCount(dto.getCount());
|
pro.setCount(dto.getCount());
|
||||||
@@ -2697,7 +2698,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, number);
|
double currentPrice = new PriceUtils().CalculatePrice(craft_list, baseCount, coNumber, countNum, width * length * quantitySteps[i] * 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, int number) {
|
public double CalculatePrice(List<String> craft_list, double count, int coNumber, double countNum, double area) {
|
||||||
if (craft_list.contains("烫画")) {
|
if (craft_list.contains("烫画")) {
|
||||||
double basePrice = 0;
|
double basePrice = 0;
|
||||||
area = area / 10000;
|
area = area / 10000;
|
||||||
@@ -3699,31 +3699,25 @@ public class PriceUtils {
|
|||||||
double price = 0;
|
double price = 0;
|
||||||
if (craft_list.contains("冷转印")) {
|
if (craft_list.contains("冷转印")) {
|
||||||
double banfei = 200;
|
double banfei = 200;
|
||||||
double numCount = Math.max(Math.ceil(count / number), 1);
|
if (countNum > 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 {
|
|
||||||
price = 200 * countNum;
|
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;
|
price = price + (coNumber - 1) * 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user