|
@@ -1601,79 +1601,135 @@ public class ProductService {
|
|
|
} else if ("素芸".equals(kind)) {
|
|
} else if ("素芸".equals(kind)) {
|
|
|
int[] count_list = {100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000};
|
|
int[] count_list = {100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000};
|
|
|
double[] prices = {};
|
|
double[] prices = {};
|
|
|
- prices = new double[]{144, 272, 528, 660, 1280, 2560, 3840, 6400, 12800};
|
|
|
|
|
|
|
+ if ("500克".equals(dto.getKind())) {
|
|
|
|
|
|
|
|
- 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("圆角")) {
|
|
|
|
|
- prices = new double[]{146, 276, 536, 670, 1300, 2600, 3900, 6500, 13000};
|
|
|
|
|
- }
|
|
|
|
|
- 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("双面烫金") || 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("双面烫金") || 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("压凹"))) {
|
|
|
|
|
- prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- priceList = new ArrayList<>();
|
|
|
|
|
- Product dto2 = null;
|
|
|
|
|
|
|
+ prices = new double[]{144, 272, 528, 660, 1280, 2560, 3840, 6400, 12800};
|
|
|
|
|
|
|
|
- for (int i = 0; i < count_list.length; i++) {
|
|
|
|
|
- double rate = 1.0;
|
|
|
|
|
- if (count_list[i] < count) {
|
|
|
|
|
- continue;
|
|
|
|
|
|
|
+ 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 (priceList.size() > 2) {
|
|
|
|
|
- break;
|
|
|
|
|
|
|
+ if (craft_list.contains("圆角")) {
|
|
|
|
|
+ prices = new double[]{146, 276, 536, 670, 1300, 2600, 3900, 6500, 13000};
|
|
|
}
|
|
}
|
|
|
- if (count_list[i] >= 400) {
|
|
|
|
|
- rate = 0.8;
|
|
|
|
|
|
|
+ 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("双面烫金")) {
|
|
|
|
|
- rate = rate * 1.8;
|
|
|
|
|
|
|
+ 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("双面烫镭射银")) {
|
|
|
|
|
- rate = rate * 1.8;
|
|
|
|
|
|
|
+ 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};
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- dto2 = new Product();
|
|
|
|
|
- dto2.setCount(count_list[i]);
|
|
|
|
|
- dto2.setPrice(Math.ceil(prices[i] * rate));
|
|
|
|
|
- priceList.add(dto2);
|
|
|
|
|
- }
|
|
|
|
|
- if (craft_list.contains("打码")) {
|
|
|
|
|
- double danjia = 0.0;
|
|
|
|
|
- if (dto.getMaxian() == 1) {
|
|
|
|
|
- danjia = 0.8;
|
|
|
|
|
- }
|
|
|
|
|
- if (dto.getMaxian() == 2) {
|
|
|
|
|
- danjia = 1.6;
|
|
|
|
|
|
|
+ if (craft_list.contains("异形模切") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) {
|
|
|
|
|
+ prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
|
|
|
}
|
|
}
|
|
|
- if (dto.getMaxian() == 3) {
|
|
|
|
|
- danjia = 2.4;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ priceList = new ArrayList<>();
|
|
|
|
|
+ Product dto2 = null;
|
|
|
|
|
+
|
|
|
|
|
+ for (int i = 0; i < count_list.length; i++) {
|
|
|
|
|
+ double rate = 1.0;
|
|
|
|
|
+ if (count_list[i] < count) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (priceList.size() > 2) {
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (count_list[i] >= 400) {
|
|
|
|
|
+ rate = 0.8;
|
|
|
|
|
+ }
|
|
|
|
|
+ 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));
|
|
|
|
|
+ priceList.add(dto2);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ int min = getNum(length, width);
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
|
- product.setPrice(Math.ceil(product.getPrice() + product.getCount() * danjia));
|
|
|
|
|
|
|
+ double mqPrice = 0;
|
|
|
|
|
+
|
|
|
|
|
+ if (craft_list.contains("异形模切") && !(craft_list.contains("击凸") || craft_list.contains("压凹") || (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银")))) {
|
|
|
|
|
+ mqPrice = Math.ceil(15 * 0.01 * product.getCount() + 50);
|
|
|
|
|
+ }
|
|
|
|
|
+ product.setPrice(Math.floor(product.getPrice() * number * min + mqPrice));
|
|
|
|
|
+ product.setWeight(df.format(number * (length) / 100 * (width) / 100 * product.getCount() * 0.5));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- int min = getNum(length, width);
|
|
|
|
|
- for (Product product : priceList) {
|
|
|
|
|
- double mqPrice = 0;
|
|
|
|
|
|
|
+ if ("300克".equals(dto.getKind())) {
|
|
|
|
|
+
|
|
|
|
|
+ prices = new double[]{70, 140, 280, 350, 700, 1400, 2100, 3500, 7000};
|
|
|
|
|
+ if ((width <= 9 && length <= 5.4) || (length <= 9 && width <= 5.4)) {
|
|
|
|
|
+
|
|
|
|
|
+ } else if (width < 10 && length < 10) {
|
|
|
|
|
+
|
|
|
|
|
+ prices = new double[]{128, 256, 512, 640, 1280, 2560, 3840, 6400, 12800};
|
|
|
|
|
+
|
|
|
|
|
+ } else {
|
|
|
|
|
+
|
|
|
|
|
+ prices = new double[]{185, 370, 740, 925, 1850, 3700, 5550, 9250, 18500};
|
|
|
|
|
|
|
|
- if (craft_list.contains("异形模切") && !(craft_list.contains("击凸") || craft_list.contains("压凹") || (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银")))) {
|
|
|
|
|
- mqPrice = Math.ceil(15 * 0.01 * product.getCount() + 50);
|
|
|
|
|
}
|
|
}
|
|
|
- product.setPrice(Math.floor(product.getPrice() * number * min + mqPrice));
|
|
|
|
|
- product.setWeight(df.format(number * (length) / 100 * (width) / 100 * product.getCount() * 0.5));
|
|
|
|
|
|
|
+
|
|
|
|
|
+ priceList = new ArrayList<>();
|
|
|
|
|
+ Product dto2 = null;
|
|
|
|
|
+
|
|
|
|
|
+ for (int i = 0; i < count_list.length; i++) {
|
|
|
|
|
+ int itemCount = count_list[i];
|
|
|
|
|
+ if (count_list[i] < count) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (priceList.size() > 2) {
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ double craft_price = 0;
|
|
|
|
|
+ if (craft_list.contains("圆角")) {
|
|
|
|
|
+ craft_price += 4 * itemCount;
|
|
|
|
|
+ }
|
|
|
|
|
+ if ((craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
|
|
|
|
|
+ double tangPrice = 45 + 0.1 * itemCount;
|
|
|
|
|
+ if (craft_list.contains("双面烫金") || craft_list.contains("双面烫镭射银")) {
|
|
|
|
|
+ tangPrice = 45 * 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ craft_price += tangPrice;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (craft_list.contains("异形模切")) {
|
|
|
|
|
+ craft_price += 60 + 0.1 * itemCount;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (craft_list.contains("击凸") || craft_list.contains("压凹")) {
|
|
|
|
|
+ craft_price += 52 + 0.1 * itemCount;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (craft_list.contains("打码")) {
|
|
|
|
|
+ double danjia = 0.0;
|
|
|
|
|
+ if (dto.getMaxian() == 1) {
|
|
|
|
|
+ danjia = 0.8;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (dto.getMaxian() == 2) {
|
|
|
|
|
+ danjia = 1.6;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (dto.getMaxian() == 3) {
|
|
|
|
|
+ danjia = 2.4;
|
|
|
|
|
+ }
|
|
|
|
|
+ craft_price += danjia * itemCount;
|
|
|
|
|
+ }
|
|
|
|
|
+ dto2 = new Product();
|
|
|
|
|
+ dto2.setCount(count_list[i]);
|
|
|
|
|
+ dto2.setPrice(Math.ceil(prices[i] + craft_price));
|
|
|
|
|
+ priceList.add(dto2);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
return priceList;
|
|
return priceList;
|
|
|
} else if ("草香".equals(kind) || "芳怡".equals(kind)) {
|
|
} else if ("草香".equals(kind) || "芳怡".equals(kind)) {
|
|
|
int[] count_list = {200, 500, 1000, 2000, 5000, 10000};
|
|
int[] count_list = {200, 500, 1000, 2000, 5000, 10000};
|
|
@@ -3841,7 +3897,7 @@ public class ProductService {
|
|
|
}
|
|
}
|
|
|
// 根据款数重新算价格
|
|
// 根据款数重新算价格
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
|
- product.setWeight(df.format(0.38 * 0.0855 * 1.3 * 0.054 * product.getCount() * number));
|
|
|
|
|
|
|
+ product.setWeight(df.format(0.38 * 0.0855 * 1.7 * 0.054 * product.getCount() * number));
|
|
|
product.setPrice(Math.floor(product.getPrice() * number));
|
|
product.setPrice(Math.floor(product.getPrice() * number));
|
|
|
}
|
|
}
|
|
|
return priceList;
|
|
return priceList;
|
|
@@ -3862,7 +3918,7 @@ public class ProductService {
|
|
|
} else {
|
|
} else {
|
|
|
wei = 0.84;
|
|
wei = 0.84;
|
|
|
}
|
|
}
|
|
|
- product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * 1.3 * number));
|
|
|
|
|
|
|
+ product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * 1.7 * number));
|
|
|
}
|
|
}
|
|
|
return priceList;
|
|
return priceList;
|
|
|
// 0.38PVC亮光异型卡片
|
|
// 0.38PVC亮光异型卡片
|
|
@@ -3895,7 +3951,7 @@ public class ProductService {
|
|
|
}
|
|
}
|
|
|
product.setPrice(Math.floor(product.getPrice() * base * number));
|
|
product.setPrice(Math.floor(product.getPrice() * base * number));
|
|
|
|
|
|
|
|
- product.setWeight(df.format(wei * length * width * 1.3 * product.getCount() / 10000 * number));
|
|
|
|
|
|
|
+ product.setWeight(df.format(wei * length * width * 1.7 * product.getCount() / 10000 * number));
|
|
|
}
|
|
}
|
|
|
if (priceList.size() >= 4) {
|
|
if (priceList.size() >= 4) {
|
|
|
priceList = priceList.subList(0, 4);
|
|
priceList = priceList.subList(0, 4);
|
|
@@ -5583,22 +5639,27 @@ public class ProductService {
|
|
|
if (carft_list.contains("UV印刷")) {
|
|
if (carft_list.contains("UV印刷")) {
|
|
|
int pre_count = 0;
|
|
int pre_count = 0;
|
|
|
double miniprice = 400;
|
|
double miniprice = 400;
|
|
|
- double mo_price = 250;
|
|
|
|
|
- double base_price = 4.5;
|
|
|
|
|
- if (width <= 4 && length <= 4) {
|
|
|
|
|
- base_price = 4;
|
|
|
|
|
- }
|
|
|
|
|
- if (width > 6 || length > 6) {
|
|
|
|
|
- base_price = 5.5;
|
|
|
|
|
|
|
+ double mo_price = 300;
|
|
|
|
|
+ double base_price = 3.5;
|
|
|
|
|
+ if (width <= 3 && length <= 3) {
|
|
|
|
|
+
|
|
|
|
|
+ } else if (width <= 4 && length <= 4) {
|
|
|
mo_price = 300;
|
|
mo_price = 300;
|
|
|
|
|
+ base_price = 4;
|
|
|
|
|
+ } else if (width <= 5 && length <= 5) {
|
|
|
|
|
+ mo_price = 320;
|
|
|
|
|
+ base_price = 5;
|
|
|
|
|
+ } else if (width <= 6 && length <= 6) {
|
|
|
|
|
+ mo_price = 340;
|
|
|
|
|
+ base_price = 6;
|
|
|
|
|
+ } else if (width <= 7 && length <= 7) {
|
|
|
|
|
+ mo_price = 380;
|
|
|
|
|
+ base_price = 6.5;
|
|
|
|
|
+ } else if (width <= 8 && length <= 8) {
|
|
|
|
|
+ mo_price = 420;
|
|
|
|
|
+ base_price = 7;
|
|
|
}
|
|
}
|
|
|
- if (base_price < 4.5) {
|
|
|
|
|
- if (count > 100 && count <= 500) {
|
|
|
|
|
- base_price = 3.5;
|
|
|
|
|
- } else if (count > 500) {
|
|
|
|
|
- base_price = 3;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
Product pro = new Product();
|
|
Product pro = new Product();
|
|
|
pro.setCount(count);
|
|
pro.setCount(count);
|
|
|
pro.setWeight(df.format(0.005 * count * dto.getNumber()));
|
|
pro.setWeight(df.format(0.005 * count * dto.getNumber()));
|