修改卡片价格

This commit is contained in:
2025-09-17 14:26:24 +08:00
parent f9f42680be
commit 9c2b25287a
6 changed files with 97 additions and 22 deletions
@@ -820,6 +820,7 @@ public class ProductService {
}
int min = getNum(length, width);
String[] kind_list = {"3", "4", "5", "7"};
dto.setD("");
priceList = getHekaPrice(min, dto, priceList, count);
boolean isyaofeng = false;
@@ -3202,6 +3203,7 @@ public class ProductService {
// 海报款数*个数=个数
case "17":
// 贡缎布
crafts_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
if ("7".equals(kind)) {
priceList = PriceUtils.satinClothPrice(kind2, length, width, count, number);
if (dto.getYaheng() != null && dto.getYaheng() > 0) {
@@ -3279,7 +3281,6 @@ public class ProductService {
// 裱板
if ("0".equals(kind)) {
priceList = new PosterPrice().acountPrice00(kind2, area, count, number);
crafts_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
for (Product product : priceList) {
if (crafts_list.contains("铁架支架")) {
product.setPrice(Math.ceil(product.getPrice() + 35 * dto.getZheye()));
@@ -3363,11 +3364,19 @@ public class ProductService {
Product pro = new Product();
pro.setCount(dto.getCount());
pro.setPrice(Math.ceil(price * number));
if (crafts_list.contains("刮板")) {
pro.setPrice(Math.ceil(price * number + 2 * dto.getPcount()));
}
priceList.add(pro);
} else {
priceList = new PosterPrice().acountPrice02(kind2, area, count, number, width * 100, length * 100);
for (Product product : priceList) {
if (crafts_list.contains("刮板")) {
product.setPrice(Math.ceil(product.getPrice() + 2 * dto.getPcount()));
}
}
}
} else if ("3".equals(kind)) {//
if (kind2.equals("11") || kind2.equals("12") || kind2.equals("13")) {
@@ -4818,6 +4827,8 @@ public class ProductService {
}
private List<Product> getJiadaoPrice(Product dto, Double length, Double width) {
List<String> carftList = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
double[][] prices = {
{90, 148, 240, 550},
{100, 160, 250, 550},
@@ -4825,6 +4836,15 @@ public class ProductService {
{120, 180, 266, 595},
{130, 203, 290, 648},
};
if (!carftList.contains("白底黑字")) {
prices = new double[][]{
{138, 148, 240, 550},
{150, 160, 250, 550},
{165, 175, 258, 550},
{170, 180, 266, 595},
{193, 203, 290, 648},
};
}
int[] count_list = new int[]{10, 20, 40, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000};
double[] lengths = {1.2, 1.5, 1.8, 2, 2.4};
if ("2".equals(dto.getKind())) {
@@ -4835,6 +4855,15 @@ public class ProductService {
{137, 240, 316, 630},
{146, 254, 340, 681},
};
if (!carftList.contains("黑底白字")) {
prices = new double[][]{
{226, 236, 290, 587},
{230, 240, 298, 587},
{230, 240, 308, 587},
{230, 240, 316, 630},
{244, 254, 340, 681},
};
}
}
if ("3".equals(dto.getKind())) {
prices = new double[][]{
@@ -4851,7 +4880,6 @@ public class ProductService {
int last_count = 0;
int current_int = Arrays.binarySearch(lengths, length);
double[] prices_list = prices[current_int];
List<String> carftList = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
double craft_price = 0;
if (carftList.contains("切割机")) {
craft_price = Math.ceil(dto.getStickNum() * 15);
@@ -4983,7 +5011,9 @@ public class ProductService {
if (craft_list.contains("满底烫镭射银") && "双面".equals(dto.getCraftShua())) {
product.setPrice(Math.ceil(product.getPrice() * 1.4));
}
if (craft_list.contains("打孔")) {
carft_price += Math.max(0.03 * item_count, 30);
}
if (craft_list.contains("配葫芦针")) {
carft_price += Math.max(0.016 * item_count, 10);
}
@@ -5003,8 +5033,8 @@ public class ProductService {
if (craft_list.contains("穿尼龙绳")) {
carft_price += Math.max(0.2 * item_count, 40);
}
if (craft_list.contains("棉绳")) {
carft_price += Math.max(0.015 * item_count, 40);
if (craft_list.contains("棉绳")) {
carft_price += Math.max(0.015 * item_count, 25);
}
product.setPrice(Math.ceil(product.getPrice() + carft_price) * dto.getNumber());
}