新增铜版纸汤镭射银价格

This commit is contained in:
2025-10-13 10:52:24 +08:00
parent 2729347d90
commit 8207377e6e
6 changed files with 227 additions and 54 deletions
@@ -1413,7 +1413,18 @@ public class ProductService {
prices.put("芳怡", new int[]{1245, 1245, 2274, 3904, 5353, 7300, 8428, 9792, 11172, 12534, 13914, 15292});
}
double zhekou = 1;
int min = getNum(length, width);
if (min == 1) {
zhekou = 1;
} else if (min == 2) {
zhekou = 0.83;
} else if (min == 3) {
zhekou = 0.8;
} else {
zhekou = 0.75;
}
int[] base_price = prices.get(kind);
for (int i = 0; i < counts.length; i++) {
if (counts[i] < dto.getCount()) {
@@ -1431,7 +1442,7 @@ public class ProductService {
getCraft(dto, priceList, null, null, 0);
// 根据位数重新算价格
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * min));
product.setPrice(Math.ceil(product.getPrice() * min * zhekou));
}
// 根据款数重新算价格
for (Product product : priceList) {
@@ -1466,10 +1477,22 @@ public class ProductService {
// 报的数量需要多少张大纸
// 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个
int num = (int) Math.ceil(count * number / max);
double zhekou = 1;
int min = getNum(length, width);
if (min == 1) {
zhekou = 1;
} else if (min == 2) {
zhekou = 0.83;
} else if (min == 3) {
zhekou = 0.8;
} else {
zhekou = 0.75;
}
price = fixPrice + (num - 5 > 0 ? num - 5 : 0) * zhang;
Product dto2 = new Product();
dto2.setCount(count);
dto2.setPrice(price + addPrice);
dto2.setPrice(Math.ceil((price + addPrice) * zhekou));
priceList.add(dto2);
getCraft(dto, priceList, null, null, 0);
} else if ("素芸".equals(kind)) {
@@ -1477,7 +1500,7 @@ public class ProductService {
double[] prices = {};
prices = new double[]{144, 272, 528, 660, 1280, 2560, 3840, 6400, 12800};
if (craft_list.contains("击凸") || craft_list.contains("压凹") || (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) {
if (craft_list.contains("击凸") || craft_list.contains("压凹") || (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
}
if (craft_list.contains("圆角")) {
@@ -1486,10 +1509,10 @@ public class ProductService {
if (craft_list.contains("圆角") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) {
prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500};
}
if (craft_list.contains("圆角") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) {
if (craft_list.contains("圆角") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500};
}
if (craft_list.contains("异形模切") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) {
if (craft_list.contains("异形模切") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
}
if (craft_list.contains("异形模切") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) {
@@ -1513,6 +1536,9 @@ public class ProductService {
if (craft_list.contains("双面烫金")) {
rate = rate * 1.8;
}
if (craft_list.contains("双面烫镭射银")) {
rate = rate * 1.8;
}
dto2 = new Product();
dto2.setCount(count_list[i]);
dto2.setPrice(Math.ceil(prices[i] * rate));
@@ -1656,7 +1682,18 @@ public class ProductService {
return priceList;
} else {
// 产品位数
double zhekou = 1;
int min = getNum(length, width);
if (min == 1) {
zhekou = 1;
} else if (min == 2) {
zhekou = 0.83;
} else if (min == 3) {
zhekou = 0.8;
} else {
zhekou = 0.75;
}
priceList = productMapper.getThanPrice(dto);
@@ -1691,7 +1728,7 @@ public class ProductService {
}
// 根据位数重新算价格
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * min));
product.setPrice(Math.ceil(product.getPrice() * min * zhekou));
}
// 根据款数重新算价格
for (Product product : priceList) {
@@ -3455,7 +3492,7 @@ public class ProductService {
product.setWeight(df.format(wei * product.getCount() * number));
}
}
if (number > 1 && width * length * 10000 < 40 * 50) {
if (number > 1 && width != null && length != null && width * length * 10000 < 40 * 50) {
if (("0".equals(kind) && "0".equals(kind2)) || ("1".equals(kind) && ("1".equals(kind2) || "3".equals(kind2) || "8".equals(kind2) || "15".equals(kind2))) || "2".equals(kind)) {
double desFee = 0;
@@ -4041,6 +4078,25 @@ public class ProductService {
case "杯垫":
// 单个产品的面积
area = length * width / 10000;
carft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
double rate = 1;
if ("烫黄金".equals(kind2)) {
if (carft_list.contains("单面烫黄金")) {
kind2 = "单面烫黄金";
}
if (carft_list.contains("双面烫黄金")) {
kind2 = "双面烫黄金";
}
}
if ("烫镭射银".equals(kind2)) {
if (carft_list.contains("单面烫镭射银")) {
kind2 = "单面烫镭射银";
}
if (carft_list.contains("双面烫镭射银")) {
kind2 = "双面烫镭射银";
}
rate = 1.2;
}
// 300克
if ("3".equals(kind)) {
// 异形模切价格
@@ -4069,10 +4125,11 @@ public class ProductService {
}
}
} else if ("6".equals(kind)) {
priceList = new PriceUtils().tags600Price(dto, kind, kind2, area, count);
// for (Product product : priceList) {
// product.setPrice(Math.floor(product.getPrice() * 1.3));
// }
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * rate));
}
} else if ("10".equals(kind) || "11".equals(kind)) {
int[] count_list = {50, 100, 200, 500, 1000};
double[] jitu = {};
@@ -4935,13 +4992,13 @@ public class ProductService {
}
if ("3".equals(dto.getKind())) {
prices = new double[][]{
{91, 158, 210, 234, 514},
{91, 158, 210, 234, 514},
{100, 168, 230, 242, 542},
{100, 168, 230, 251, 550},
{110, 175, 250, 275, 564},
{91, 158, 234, 514},
{91, 158, 234, 514},
{100, 168, 242, 542},
{100, 168, 251, 550},
{110, 175, 275, 564},
};
count_list = new int[]{10, 20, 30, 40, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000};
count_list = new int[]{10, 20, 40, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000};
}
if ("4".equals(dto.getKind())) {
prices = new double[][]{
@@ -6295,16 +6352,16 @@ public class ProductService {
if ("特种纸名片".equals(dto.getProTypeValue()) && craftList.contains("异形模切") && !craftList.contains("单面烫金") && !craftList.contains("双面烫金")) {// 200-500张按照原有的价格乘以3倍 1000-5000张按照原有的价格乘以2.4倍 5000-10000张按照原有的价格乘以2倍
for (Product product : priceList) {
if (200 <= product.getCount() && product.getCount() <= 500) {
product.setPrice(Math.ceil(product.getPrice() * 3));
product.setPrice(Math.ceil(product.getPrice() * 1.9));
}
if (500 < product.getCount() && product.getCount() <= 1000) {
product.setPrice(Math.ceil(product.getPrice() * 2.6));
product.setPrice(Math.ceil(product.getPrice() * 2.3));
}
if (1000 < product.getCount() && product.getCount() <= 5000) {
product.setPrice(Math.ceil(product.getPrice() * 2.4));
}
if (5000 < product.getCount() && product.getCount() <= 10000) {
product.setPrice(Math.ceil(product.getPrice() * 2));
product.setPrice(Math.ceil(product.getPrice() * 2.5));
}
}
}