新增纸碗,新增腰封工艺,新增不干胶工艺

This commit is contained in:
2025-12-20 16:33:02 +08:00
parent de99f53f4b
commit d622d5b937
4 changed files with 439 additions and 7 deletions
@@ -388,14 +388,36 @@ public class ProductService {
kind = "2";
} else if ("15".equals(kind) || "16".equals(kind)) {
List<String> craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
priceList = new SwzStickersPrice().getPrice(count, length, width, number, dto.getCraftTang());
for (Product product : priceList) {
double rate = 1;
if (craft_list.contains("有色激凸")) {
rate = 1.8;
if ("15".equals(kind) && dto.getCraftTang().contains("彩色印刷+烫金")) {
double[][] prices = new double[][]{
{403, 503, 503, 503, 543, 582, 582, 582, 620, 620, 660, 698, 775, 775, 852.5, 853, 853},
{520, 520, 520, 520, 560, 600, 600, 600, 640, 640, 680, 720, 800, 800, 880, 880, 880},
{600, 600, 600, 600, 637.5, 675, 675, 675, 750, 750, 825, 862.5, 975, 975, 1050, 1050, 1125},
{625, 625, 625, 625, 662.5, 700, 700, 700, 775, 775, 850, 887.5, 1000, 1000, 1075, 1075, 1150},
{652, 652, 652, 652, 725, 762, 762, 762, 870, 870, 942, 978, 1051, 1051, 1087, 1087, 1196},
{798, 798, 798, 798, 943, 1015, 1015, 1015, 1087, 1087, 1196, 1196, 1341, 1341, 1450, 1450, 1631},
{910, 910, 910, 910, 1120, 1155, 1225, 1225, 1400, 1470, 1575, 1575, 1680, 1680, 1855, 1925, 2100},
};
int[] count_list = new int[]{200, 500, 1000, 2000, 3000, 5000, 10000};
double[] areas = new double[]{9, 12.25, 16, 20.25, 25, 30.25, 36, 42.25, 49, 56.25, 64, 72.25, 81, 90.25, 100, 110.25, 121};
area = (length + 0.4) * (width + 0.4);//加上4毫出血
priceList = getAreaNextPrice(count_list, dto.getCount(), area, prices, areas, dto.getNumber());
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * 0.8));
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.3));
}
} else {
priceList = new SwzStickersPrice().getPrice(count, length, width, number, dto.getCraftTang());
for (Product product : priceList) {
double rate = 1;
if (craft_list.contains("有色激凸")) {
rate = 1.8;
}
product.setPrice(Math.ceil(product.getPrice() * number * rate));
}
product.setPrice(Math.ceil(product.getPrice() * number * rate));
}
return priceList;
}
// 查询出来的价格集合
@@ -951,6 +973,10 @@ public class ProductService {
}
}
}
if ("1".equals(dto.getKind())) {
dto.setLengthTang(length);
dto.setWidthTang(width);
}
getCraft(dto, priceList, length * 10, width * 10, min);
// 刮刮膜增加价格
if (dto.getKind().equals("13")) {
@@ -4760,12 +4786,77 @@ public class ProductService {
return getWristBandPrice(dto, width, length);
case "手提塑料袋":
return getPlasticBagPrice(dto, width, length);
case "纸碗":
return getPaperBowlPrice(dto, width, length);
default:
break;
}
return null;
}
private List<Product> getPaperBowlPrice(Product dto, Double width, Double length) {
List<String> craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
List<Product> priceList = new ArrayList<>();
int count = dto.getCount();
int number = dto.getNumber();
int[] counts = {1200, 2400, 3600, 4800, 6000, 10000};
double[][] prices = {
{605, 1141, 1557, 2053, 2353, 3557},
{633, 1195, 1641, 2164, 2491, 3788},
{653, 1235, 1699, 2243, 2588, 3951},
};
int sizeIndex = 0;
String size = dto.getSize();
if ("165*64*145".equals(size)) {
sizeIndex = 1;
}
if ("165*75*142".equals(size)) {
sizeIndex = 2;
}
double carftPrice = 0;
if (craft_list.contains("ops盖")) {
carftPrice = 0.102;
}
if (craft_list.contains("pp盖")) {
carftPrice = 0.125;
}
if (craft_list.contains("牛皮纸盖")) {
carftPrice = 0.139;
}
if (craft_list.contains("白卡纸盖")) {
carftPrice = 0.113;
}
for (int i = 0; i < counts.length; i++) {
int itemCount = counts[i];
if (itemCount < count) {
continue;
}
if (priceList.size() > 2) {
break;
}
if (craft_list.contains("金箔") || craft_list.contains("铝箔")) {
carftPrice += 0.115;
}
Product pro = new Product();
pro.setCount(priceList.size() == 0 ? count : itemCount);
pro.setPrice(Math.ceil((prices[sizeIndex][i] + carftPrice * itemCount) * number));
pro.setNumber(number);
priceList.add(pro);
}
if (priceList.size() == 0) {
if (craft_list.contains("金箔") || craft_list.contains("铝箔")) {
carftPrice += 0.115;
}
Product pro = new Product();
pro.setCount(count);
pro.setPrice(Math.ceil((prices[sizeIndex][prices[sizeIndex].length - 1] / counts[counts.length - 1] + carftPrice) * count * number));
pro.setNumber(number);
priceList.add(pro);
}
return priceList;
}
private List<Product> getPlasticBagPrice(Product dto, Double width, Double length) {
List<String> craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
List<Product> priceList = new ArrayList<>();