|
|
@@ -2393,6 +2393,8 @@ public class ProductService {
|
|
|
}
|
|
|
return priceList;
|
|
|
case "金属标":
|
|
|
+ craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
|
|
|
+
|
|
|
if ("金属标".equals(dto.getKind())) {
|
|
|
priceList = new PriceUtils().getMetalPrice(priceList, width, length, count, number);
|
|
|
// 根据款数重新算价格
|
|
|
@@ -2409,7 +2411,6 @@ public class ProductService {
|
|
|
}
|
|
|
}
|
|
|
} else if ("UV转印贴".equals(dto.getKind())) {
|
|
|
- craft_list = dto.getCraft() == null ? null : Arrays.asList(dto.getCraft());
|
|
|
if (dto.getCraft() != null && craft_list.size() > 0 && (craft_list.contains("冷转印") || craft_list.contains("烫画"))) {
|
|
|
int[] quantitySteps = {10, 20, 30, 50, 100, 200, 300, 400, 500, 800, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000};
|
|
|
double paperLength = 0, paperWidth = 0;
|
|
|
@@ -2507,6 +2508,12 @@ public class ProductService {
|
|
|
product.setPrice(Math.ceil(product.getPrice() + (number - 1) * 0.5));
|
|
|
}
|
|
|
}
|
|
|
+ if (craft_list.contains("刮板")) {
|
|
|
+ dto.setPcount(dto.getPcount() == null ? 1 : dto.getPcount());
|
|
|
+ for (Product product : priceList) {
|
|
|
+ product.setPrice(product.getPrice() + 2 * Math.max(dto.getPcount(), 1));
|
|
|
+ }
|
|
|
+ }
|
|
|
// double base = number < 6 && number > 1 ? 5 : 0;
|
|
|
double apprise = 0;
|
|
|
for (Product product : priceList) {
|
|
|
@@ -4648,12 +4655,43 @@ public class ProductService {
|
|
|
return getCheTiePrice(dto, length, width);
|
|
|
case "胶带":
|
|
|
return getJiadaoPrice(dto, length, width);
|
|
|
+ case "特光不干胶":
|
|
|
+ return getLightPrice(dto, length, width);
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ private List<Product> getLightPrice(Product dto, Double width, Double length) {
|
|
|
+ List<String> carftList = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
|
|
|
+ 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},
|
|
|
+ };
|
|
|
+ if (carftList.contains("烫金+激凸")) {
|
|
|
+ prices = new double[][]{
|
|
|
+ {620, 620, 620, 698, 698, 852, 852, 980, 1127, 1285, 1465, 1656, 1871, 2095, 2346, 2605, 2892},
|
|
|
+ {640, 640, 640, 720, 720, 880, 880, 1012, 1164, 1327, 1512, 1709, 1931, 2163, 2422, 2689, 2984},
|
|
|
+ {713, 713, 713, 788, 788, 938, 938, 1078, 1240, 1413, 1611, 1821, 2057, 2304, 2581, 2864, 3197},
|
|
|
+ {863, 863, 863, 1050, 1050, 1125, 1125, 1294, 1488, 1696, 1934, 2185, 2469, 2765, 3097, 3437, 3815},
|
|
|
+ {979, 943, 1015, 1160, 1160, 1341, 1341, 1542, 1774, 2022, 2305, 2605, 2944, 3297, 3692, 4098, 4549},
|
|
|
+ {1124, 1160, 1160, 1450, 1595, 1740, 1885, 2168, 2493, 2842, 3240, 3661, 4137, 4633, 5189, 5760, 6393},
|
|
|
+ {1365, 1575, 2135, 2345, 2800, 3150, 3220, 3703, 4258, 4855, 5534, 6254, 7067, 7915, 8864, 9840, 10921},
|
|
|
+ };
|
|
|
+ }
|
|
|
+ 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};
|
|
|
+ double area = (length + 0.4) * (width + 0.4);//加上4毫出血
|
|
|
+
|
|
|
+ return getAreaNextPrice(count_list, dto.getCount(), area, prices, areas, dto.getNumber());
|
|
|
+ }
|
|
|
+
|
|
|
private List<Product> getDalanPrice(Product dto, Double width, Double length) {
|
|
|
//铜版纸200g (售价)
|
|
|
int[][] prices = new int[][]{
|
|
|
@@ -4963,6 +5001,29 @@ public class ProductService {
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
|
|
|
+ private List<Product> getAreaNextPrice(int[] count_list, int count, double area, double[][] prices, double[] areas, int number) {
|
|
|
+ List<Product> priceList = new ArrayList<>();
|
|
|
+ for (int i = 0; i < count_list.length; i++) {
|
|
|
+ int count_item = count_list[i];
|
|
|
+ if (priceList.size() > 2) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (count > count_item) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ int count_index = Arrays.binarySearch(count_list, count_item);
|
|
|
+ double price = 0;
|
|
|
+ if (count_index >= 0) {
|
|
|
+ price = new PriceUtils().TableNextPrice(area, prices[count_index], areas);
|
|
|
+ }
|
|
|
+ Product product = new Product();
|
|
|
+ product.setCount(count_item);
|
|
|
+ product.setPrice(Math.ceil(price * number));
|
|
|
+ priceList.add(product);
|
|
|
+ }
|
|
|
+ return priceList;
|
|
|
+ }
|
|
|
+
|
|
|
private List<Product> getAreaCenterPrice(int[] count_list, int count, double area, int[][] prices,
|
|
|
double[] areas, int number) {
|
|
|
List<Product> priceList = new ArrayList<>();
|