|
@@ -1444,126 +1444,7 @@ public class ProductService {
|
|
|
if (!craft_list.isEmpty()) {
|
|
if (!craft_list.isEmpty()) {
|
|
|
dto.setCraft(craft_list.toArray(new String[craft_list.size()]));
|
|
dto.setCraft(craft_list.toArray(new String[craft_list.size()]));
|
|
|
}
|
|
}
|
|
|
- if (!"素芸".equals(kind) && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) {
|
|
|
|
|
- int[] counts = new int[]{200, 500, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000};
|
|
|
|
|
- Map<String, int[]> prices = null;
|
|
|
|
|
- if (craft_list.contains("单面烫金") && !craft_list.contains("异形模切")) {
|
|
|
|
|
- prices = new HashMap<>();
|
|
|
|
|
- prices.put("萱姿", new int[]{257, 329, 500, 863, 1278, 1692, 2106, 2520, 2934, 3348, 3762, 4177});
|
|
|
|
|
- prices.put("岚蝶", new int[]{229, 263, 354, 571, 846, 1121, 1377, 1645, 1913, 2181, 2449, 2720});
|
|
|
|
|
- prices.put("皙贝", new int[]{226, 260, 349, 560, 840, 1100, 1349, 1600, 1890, 2100, 2400, 2663});
|
|
|
|
|
- prices.put("琮纹", new int[]{229, 263, 354, 571, 846, 1121, 1377, 1645, 1913, 2181, 2449, 2720});
|
|
|
|
|
- prices.put("睿狐", new int[]{229, 263, 354, 571, 846, 1121, 1377, 1645, 1913, 2181, 2449, 2720});
|
|
|
|
|
- prices.put("溪雪", new int[]{229, 263, 354, 571, 846, 1121, 1491, 1782, 2073, 2364, 2655, 2949});
|
|
|
|
|
- prices.put("玉蕊", new int[]{229, 263, 354, 571, 846, 1121, 1377, 1645, 1913, 2181, 2449, 2720});
|
|
|
|
|
- prices.put("金绒", new int[]{365, 375, 557, 921, 1230, 1550, 1937, 2299, 2661, 3053, 3445, 3751});
|
|
|
|
|
- prices.put("芳怡", new int[]{455, 495, 957, 1691, 2365, 3195, 3777, 4431, 5085, 5739, 6939, 7048});
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- if (craft_list.contains("双面烫金") && !craft_list.contains("异形模切")) {
|
|
|
|
|
- prices = new HashMap<>();
|
|
|
|
|
- prices.put("萱姿", new int[]{463, 592, 900, 1553, 2300, 3046, 3791, 4536, 5281, 6026, 6772, 7519});
|
|
|
|
|
- prices.put("岚蝶", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
|
|
|
|
|
- prices.put("皙贝", new int[]{407, 468, 628, 1008, 1512, 1980, 2428, 2880, 3402, 3780, 4320, 4793});
|
|
|
|
|
- prices.put("琮纹", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
|
|
|
|
|
- prices.put("睿狐", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
|
|
|
|
|
- prices.put("溪雪", new int[]{412, 473, 637, 1028, 1523, 2018, 2684, 3208, 3731, 4255, 4779, 5308});
|
|
|
|
|
- prices.put("玉蕊", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
|
|
|
|
|
- prices.put("金绒", new int[]{665, 675, 979, 1597, 2110, 2650, 3269, 3885, 4501, 5117, 5733, 6347});
|
|
|
|
|
- prices.put("芳怡", new int[]{755, 755, 1379, 2367, 3245, 4425, 5109, 5935, 6771, 7597, 8433, 9269});
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-// if (craft_list.contains("单面烫金") && craft_list.contains("圆角") && !craft_list.contains("异形模切")) {
|
|
|
|
|
-// prices = new HashMap<>();
|
|
|
|
|
-// prices.put("萱姿", new int[]{368, 373, 647, 1187, 1560, 2010, 2385, 2731, 3078, 3425, 3771, 4117});
|
|
|
|
|
-// prices.put("岚蝶", new int[]{355, 360, 484, 855, 1194, 1604, 1917, 2278, 2639, 3000, 3361, 3721});
|
|
|
|
|
-// prices.put("皙贝", new int[]{355, 360, 484, 855, 1195, 1605, 1917, 2280, 2648, 3002, 3362, 3721});
|
|
|
|
|
-// prices.put("琮纹", new int[]{355, 360, 484, 855, 1198, 1607, 1917, 2282, 2643, 3004, 3364, 3721});
|
|
|
|
|
-// prices.put("睿狐", new int[]{355, 360, 484, 855, 1200, 1609, 1917, 2283, 2644, 3005, 3366, 3721});
|
|
|
|
|
-// prices.put("溪雪", new int[]{368, 373, 547, 999, 1320, 1730, 2061, 2378, 2696, 3014, 3332, 3649});
|
|
|
|
|
-// prices.put("玉蕊", new int[]{375, 380, 660, 1189, 1655, 2225, 2845, 3373, 3901, 4429, 4957, 5484});
|
|
|
|
|
-// prices.put("金绒", new int[]{475, 480, 760, 1289, 1755, 2225, 2845, 3373, 3901, 4429, 4957, 5484});
|
|
|
|
|
-// prices.put("芳怡", new int[]{546, 594, 1148, 2029, 2838, 3834, 4532, 5310, 6099, 6855, 7666, 8458});
|
|
|
|
|
-//
|
|
|
|
|
-// }
|
|
|
|
|
-// if (craft_list.contains("双面烫金") && craft_list.contains("圆角") && !craft_list.contains("异形模切")) {
|
|
|
|
|
-// prices = new HashMap<>();
|
|
|
|
|
-// prices.put("萱姿", new int[]{662, 671, 1165, 2137, 2808, 3618, 4293, 4916, 5540, 6165, 6800, 8200});
|
|
|
|
|
-// prices.put("岚蝶", new int[]{639, 648, 871, 1539, 2149, 2887, 3451, 4100, 4750, 5400, 6050, 6698});
|
|
|
|
|
-// prices.put("皙贝", new int[]{639, 648, 871, 1539, 2151, 2889, 3451, 4104, 4766, 5404, 6052, 6698});
|
|
|
|
|
-// prices.put("琮纹", new int[]{639, 648, 871, 1539, 2156, 2893, 3451, 4108, 4757, 5407, 6055, 6698});
|
|
|
|
|
-// prices.put("睿狐", new int[]{639, 648, 871, 1539, 2160, 2896, 3451, 4109, 4759, 5409, 6059, 6698});
|
|
|
|
|
-// prices.put("溪雪", new int[]{662, 671, 985, 1798, 2376, 3114, 3710, 4280, 4853, 5425, 5998, 6568});
|
|
|
|
|
-// prices.put("玉蕊", new int[]{675, 684, 1188, 2140, 2979, 4005, 5121, 6071, 7022, 7972, 8923, 9871});
|
|
|
|
|
-// prices.put("金绒", new int[]{546, 594, 1148, 2029, 2838, 3834, 4532, 5310, 6099, 6855, 7666, 8458});
|
|
|
|
|
-// prices.put("芳怡", new int[]{755, 755, 1379, 2367, 3245, 4425, 5109, 5935, 6771, 7597, 8433, 9269});
|
|
|
|
|
-//
|
|
|
|
|
-// }
|
|
|
|
|
- if (craft_list.contains("单面烫金") && !craft_list.contains("圆角") && craft_list.contains("异形模切")) {
|
|
|
|
|
- prices = new HashMap<>();
|
|
|
|
|
- prices.put("萱姿", new int[]{463, 592, 900, 1553, 2300, 3046, 3791, 4536, 5281, 6026, 6772, 7519});
|
|
|
|
|
- prices.put("岚蝶", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
|
|
|
|
|
- prices.put("皙贝", new int[]{407, 468, 628, 1008, 1512, 1980, 2428, 2880, 3402, 3780, 4320, 4793});
|
|
|
|
|
- prices.put("琮纹", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
|
|
|
|
|
- prices.put("睿狐", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
|
|
|
|
|
- prices.put("溪雪", new int[]{412, 473, 637, 1028, 1523, 2018, 2684, 3208, 3731, 4255, 4779, 5308});
|
|
|
|
|
- prices.put("玉蕊", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
|
|
|
|
|
- prices.put("金绒", new int[]{657, 675, 1003, 1658, 2214, 2790, 3487, 4138, 4790, 5495, 6201, 6752});
|
|
|
|
|
- prices.put("芳怡", new int[]{755, 800, 1379, 2367, 3245, 4425, 5109, 5935, 6771, 7597, 8433, 9269});
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- if (craft_list.contains("双面烫金") && !craft_list.contains("圆角") && craft_list.contains("异形模切")) {
|
|
|
|
|
- prices = new HashMap<>();
|
|
|
|
|
- prices.put("萱姿", new int[]{780, 795, 1169, 1916, 2480, 3040, 3636, 4052, 4630, 5208, 5786, 6362});
|
|
|
|
|
- prices.put("岚蝶", new int[]{750, 765, 1078, 1724, 2312, 2872, 3444, 3940, 4566, 5192, 5818, 6442});
|
|
|
|
|
- prices.put("皙贝", new int[]{750, 765, 1078, 1724, 2315, 2875, 3444, 3942, 4568, 5194, 5820, 6442});
|
|
|
|
|
- prices.put("琮纹", new int[]{750, 765, 1078, 1724, 2317, 2877, 3444, 3944, 4570, 5196, 5822, 6442});
|
|
|
|
|
- prices.put("睿狐", new int[]{750, 765, 1078, 1724, 2320, 2880, 3444, 3946, 4572, 5198, 5824, 6442});
|
|
|
|
|
- prices.put("溪雪", new int[]{780, 795, 1169, 1916, 2480, 3040, 3636, 4052, 4630, 5208, 5786, 6362});
|
|
|
|
|
- prices.put("玉蕊", new int[]{795, 825, 1195, 1940, 2600, 3280, 4116, 4600, 5326, 6052, 6778, 7502});
|
|
|
|
|
- prices.put("金绒", new int[]{795, 825, 1195, 1940, 2600, 3280, 4116, 4600, 5326, 6052, 6778, 7502});
|
|
|
|
|
- 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()) {
|
|
|
|
|
- continue;
|
|
|
|
|
- }
|
|
|
|
|
- if (priceList.size() > 3) {
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- Product pro = new Product();
|
|
|
|
|
- pro.setCount(counts[i]);
|
|
|
|
|
- pro.setPrice((double) base_price[i]);
|
|
|
|
|
- priceList.add(pro);
|
|
|
|
|
- }
|
|
|
|
|
- getCraft(dto, priceList, null, null, 0);
|
|
|
|
|
- // 根据位数重新算价格
|
|
|
|
|
- for (Product product : priceList) {
|
|
|
|
|
- product.setPrice(Math.ceil(product.getPrice() * min * zhekou));
|
|
|
|
|
- }
|
|
|
|
|
- // 根据款数重新算价格
|
|
|
|
|
- for (Product product : priceList) {
|
|
|
|
|
- product.setPrice(Math.ceil(product.getPrice() * number));
|
|
|
|
|
- product.setWeight(df.format(number * (length) / 100 * (width) / 100 * product.getCount() * 0.3 * 0.86));
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- return priceList;
|
|
|
|
|
- }
|
|
|
|
|
if ("雅柔".equals(kind) || "萱姿".equals(kind)) {
|
|
if ("雅柔".equals(kind) || "萱姿".equals(kind)) {
|
|
|
kind = "珠光";
|
|
kind = "珠光";
|
|
|
dto.setKindValue("珠光");
|
|
dto.setKindValue("珠光");
|
|
@@ -1703,6 +1584,9 @@ public class ProductService {
|
|
|
if (craft_list.contains("圆角")) {
|
|
if (craft_list.contains("圆角")) {
|
|
|
craft_price += 4 * itemCount / 100;
|
|
craft_price += 4 * itemCount / 100;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (craft_list.contains("印刷颜色") && dto.getCo_number() != null && dto.getCo_number() > 0) {
|
|
|
|
|
+ craft_price += 5 * (dto.getCo_number() - 1);
|
|
|
|
|
+ }
|
|
|
if ((craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
|
|
if ((craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
|
|
|
double tangPrice = 45 + 0.1 * itemCount;
|
|
double tangPrice = 45 + 0.1 * itemCount;
|
|
|
if (craft_list.contains("双面烫金") || craft_list.contains("双面烫镭射银")) {
|
|
if (craft_list.contains("双面烫金") || craft_list.contains("双面烫镭射银")) {
|
|
@@ -1826,7 +1710,6 @@ public class ProductService {
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
|
product.setPrice(Math.ceil(product.getPrice() * number));
|
|
product.setPrice(Math.ceil(product.getPrice() * number));
|
|
|
}
|
|
}
|
|
|
- return priceList;
|
|
|
|
|
} else {
|
|
} else {
|
|
|
// 产品位数
|
|
// 产品位数
|
|
|
double zhekou = 1;
|
|
double zhekou = 1;
|
|
@@ -1901,6 +1784,22 @@ public class ProductService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (!"素芸".equals(kind)) {
|
|
|
|
|
+ double tang_price = 0;
|
|
|
|
|
+ double base_tang = 0;
|
|
|
|
|
+ if (craft_list.contains("单面烫金")) {
|
|
|
|
|
+ tang_price = 80;
|
|
|
|
|
+ base_tang = 0.15;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (craft_list.contains("双面烫金")) {
|
|
|
|
|
+ tang_price = 160;
|
|
|
|
|
+ base_tang = 0.15;
|
|
|
|
|
+ }
|
|
|
|
|
+ for (Product product : priceList) {
|
|
|
|
|
+ product.setPrice(Math.ceil(product.getPrice() + (tang_price + base_tang * product.getCount()) * number));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
// int tzWei = Integer.parseInt(Pattern.compile("[^0-9]").matcher(kind).replaceAll("").trim());// 获取材质中的克数
|
|
// int tzWei = Integer.parseInt(Pattern.compile("[^0-9]").matcher(kind).replaceAll("").trim());// 获取材质中的克数
|
|
|
int tzWei = 300;// 获取材质中的克数
|
|
int tzWei = 300;// 获取材质中的克数
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
@@ -2688,7 +2587,7 @@ public class ProductService {
|
|
|
product.setPrice(Math.floor(product.getPrice() * 4));
|
|
product.setPrice(Math.floor(product.getPrice() * 4));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- } else if ("UV转印贴".equals(dto.getKind())) {
|
|
|
|
|
|
|
+ } else if ("UV转印贴".equals(dto.getKind()) || "宠物转印贴".equals(dto.getKind())) {
|
|
|
if (dto.getCraft() != null && craft_list.size() > 0 && (craft_list.contains("冷转印") || craft_list.contains("烫画"))) {
|
|
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};
|
|
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;
|
|
double paperLength = 0, paperWidth = 0;
|
|
@@ -2798,6 +2697,11 @@ public class ProductService {
|
|
|
product.setPrice(product.getPrice() + 2 * Math.max(dto.getPcount(), 1));
|
|
product.setPrice(product.getPrice() + 2 * Math.max(dto.getPcount(), 1));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if ("宠物转印贴".equals(dto.getKind())) {
|
|
|
|
|
+ for (Product product : priceList) {
|
|
|
|
|
+ product.setPrice(Math.ceil(product.getPrice() * 1.3));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
// double base = number < 6 && number > 1 ? 5 : 0;
|
|
// double base = number < 6 && number > 1 ? 5 : 0;
|
|
|
double apprise = 0;
|
|
double apprise = 0;
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
@@ -5853,18 +5757,16 @@ public class ProductService {
|
|
|
double max_width = 290;
|
|
double max_width = 290;
|
|
|
double max_length = 390;
|
|
double max_length = 390;
|
|
|
double base_price = 21;
|
|
double base_price = 21;
|
|
|
- double min_price = 50;
|
|
|
|
|
|
|
+ double min_price = 35;
|
|
|
if ("2".equals(dto.getKind())) {
|
|
if ("2".equals(dto.getKind())) {
|
|
|
max_width = 420;
|
|
max_width = 420;
|
|
|
max_length = 310;
|
|
max_length = 310;
|
|
|
base_price = 35;
|
|
base_price = 35;
|
|
|
- min_price = 60;
|
|
|
|
|
}
|
|
}
|
|
|
if ("3".equals(dto.getKind())) {
|
|
if ("3".equals(dto.getKind())) {
|
|
|
max_width = 420;
|
|
max_width = 420;
|
|
|
max_length = 310;
|
|
max_length = 310;
|
|
|
base_price = 40;
|
|
base_price = 40;
|
|
|
- min_price = 60;
|
|
|
|
|
}
|
|
}
|
|
|
width = width * 10 + 4;
|
|
width = width * 10 + 4;
|
|
|
length = length * 10 + 4;
|
|
length = length * 10 + 4;
|