|
@@ -601,12 +601,18 @@ public class ProductService {
|
|
|
priceList = priceList.subList(0, 4);
|
|
priceList = priceList.subList(0, 4);
|
|
|
}
|
|
}
|
|
|
List<String> crafts_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
|
List<String> crafts_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
|
|
|
|
+ int[] shengzi = {1, 2, 4, 8, 12, 16, 20, 40};
|
|
|
|
|
+ int[] count_list = {200, 500, 1000, 2000, 3000, 4000, 5000, 10000};
|
|
|
// 根据款数重新算价格/计算重量
|
|
// 根据款数重新算价格/计算重量
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
|
product.setPrice(Math.floor(product.getPrice() * number));
|
|
product.setPrice(Math.floor(product.getPrice() * number));
|
|
|
if (crafts_list.contains("弹力绳")) {
|
|
if (crafts_list.contains("弹力绳")) {
|
|
|
product.setPrice(Math.floor(product.getPrice() + Math.max(10, product.getCount() * 0.1)));
|
|
product.setPrice(Math.floor(product.getPrice() + Math.max(10, product.getCount() * 0.1)));
|
|
|
}
|
|
}
|
|
|
|
|
+ if (crafts_list.contains("弹力绳捆")) {
|
|
|
|
|
+ int currentIndex = Arrays.binarySearch(count_list, product.getCount());
|
|
|
|
|
+ product.setPrice(Math.floor(product.getPrice() + shengzi[currentIndex] * 10));
|
|
|
|
|
+ }
|
|
|
product.setWeight(df.format(number * length * width * product.getCount() * 0.00003));
|
|
product.setWeight(df.format(number * length * width * product.getCount() * 0.00003));
|
|
|
}
|
|
}
|
|
|
return priceList;
|
|
return priceList;
|
|
@@ -691,7 +697,8 @@ public class ProductService {
|
|
|
};
|
|
};
|
|
|
double[] areas = {16, 25, 30, 35, 36, 40, 45, 48.60, 49, 54, 64, 81, 97.20, 100, 145.80, 172.8, 194.4, 224, 288, 294, 400};
|
|
double[] areas = {16, 25, 30, 35, 36, 40, 45, 48.60, 49, 54, 64, 81, 97.20, 100, 145.80, 172.8, 194.4, 224, 288, 294, 400};
|
|
|
double[] tang_areas = {50, 100, 150, 250, 350, 450};
|
|
double[] tang_areas = {50, 100, 150, 250, 350, 450};
|
|
|
- int[] count_list = {200, 500, 1000, 2000, 3000, 5000, 10000};
|
|
|
|
|
|
|
+ count_list = new int[]{200, 500, 1000, 2000, 3000, 5000, 10000};
|
|
|
|
|
+ int[] shenzi_list = {1, 2, 4, 8, 12, 20, 40};
|
|
|
List<String> craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
|
List<String> craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
|
|
for (int i = 0; i < count_list.length; i++) {
|
|
for (int i = 0; i < count_list.length; i++) {
|
|
|
int item_count = count_list[i];
|
|
int item_count = count_list[i];
|
|
@@ -742,6 +749,10 @@ public class ProductService {
|
|
|
if (craft_list.contains("配弹力绳")) {
|
|
if (craft_list.contains("配弹力绳")) {
|
|
|
carft_price += Math.max(0.1 * item_count, 10);
|
|
carft_price += Math.max(0.1 * item_count, 10);
|
|
|
}
|
|
}
|
|
|
|
|
+ if (craft_list.contains("配弹力绳捆")) {
|
|
|
|
|
+ carft_price += 10 * shenzi_list[count_index];
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
double tang_price = 0;
|
|
double tang_price = 0;
|
|
|
if (craft_list.contains("单面烫金") || craft_list.contains("双面烫金")) {
|
|
if (craft_list.contains("单面烫金") || craft_list.contains("双面烫金")) {
|
|
|
tang_price = new PriceUtils().TablePrice(area, tang_prices[count_index], tang_areas);
|
|
tang_price = new PriceUtils().TablePrice(area, tang_prices[count_index], tang_areas);
|
|
@@ -894,6 +905,8 @@ public class ProductService {
|
|
|
int min = getNum(length, width);
|
|
int min = getNum(length, width);
|
|
|
priceList = getHekaPrice(min, product1, priceList, count);
|
|
priceList = getHekaPrice(min, product1, priceList, count);
|
|
|
getCraft(product1, priceList, length * 10, width * 10, min);
|
|
getCraft(product1, priceList, length * 10, width * 10, min);
|
|
|
|
|
+ shengzi = new int[]{1, 2, 4, 8, 12, 16, 20, 40};
|
|
|
|
|
+ count_list = new int[]{200, 500, 1000, 2000, 3000, 4000, 5000, 10000};
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
|
if ("凹凸".equals(dto.getAotu())) {
|
|
if ("凹凸".equals(dto.getAotu())) {
|
|
|
product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 > 153 ? product.getPrice() * 0.09 : 153)));
|
|
product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 > 153 ? product.getPrice() * 0.09 : 153)));
|
|
@@ -901,6 +914,10 @@ public class ProductService {
|
|
|
if (craft.contains("弹力绳")) {
|
|
if (craft.contains("弹力绳")) {
|
|
|
product.setPrice(Math.floor(product.getPrice() + Math.max(10, product.getCount() * 0.1)));
|
|
product.setPrice(Math.floor(product.getPrice() + Math.max(10, product.getCount() * 0.1)));
|
|
|
}
|
|
}
|
|
|
|
|
+ if (craft.contains("弹力绳捆")) {
|
|
|
|
|
+ int currentIndex = Arrays.binarySearch(count_list, product.getCount());
|
|
|
|
|
+ product.setPrice(Math.floor(product.getPrice() + shengzi[currentIndex] * 10));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
// 根据款数重新算价格/计算重量
|
|
// 根据款数重新算价格/计算重量
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
@@ -972,6 +989,8 @@ public class ProductService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ shengzi = new int[]{1, 2, 4, 8, 12, 16, 20, 40};
|
|
|
|
|
+ count_list = new int[]{200, 500, 1000, 2000, 3000, 4000, 5000, 10000};
|
|
|
// +棉绳钱 1分5一条
|
|
// +棉绳钱 1分5一条
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
|
if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("棉绳")) {
|
|
if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("棉绳")) {
|
|
@@ -980,6 +999,10 @@ public class ProductService {
|
|
|
if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("弹力绳")) {
|
|
if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("弹力绳")) {
|
|
|
product.setPrice(product.getPrice() + Math.max(product.getCount() * 0.1, 10));
|
|
product.setPrice(product.getPrice() + Math.max(product.getCount() * 0.1, 10));
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("弹力绳捆")) {
|
|
|
|
|
+ int currentIndex = Arrays.binarySearch(count_list, product.getCount());
|
|
|
|
|
+ product.setPrice(product.getPrice() + 10 * shengzi[currentIndex]);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
|
product.setWeight(df.format(length * width * product.getCount() / 10000 * 0.6));
|
|
product.setWeight(df.format(length * width * product.getCount() / 10000 * 0.6));
|
|
@@ -1105,7 +1128,7 @@ public class ProductService {
|
|
|
priceList.add(dto2);
|
|
priceList.add(dto2);
|
|
|
getCraft(dto, priceList, null, null, 0);
|
|
getCraft(dto, priceList, null, null, 0);
|
|
|
} else if ("素芸".equals(kind)) {
|
|
} else if ("素芸".equals(kind)) {
|
|
|
- int[] count_list = {100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000};
|
|
|
|
|
|
|
+ count_list = new int[]{100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000};
|
|
|
List<String> craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
|
List<String> craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
|
|
double[] prices = {};
|
|
double[] prices = {};
|
|
|
if (craft_list.size() == 0 || craft_list.contains("异形模切")) {
|
|
if (craft_list.size() == 0 || craft_list.contains("异形模切")) {
|
|
@@ -1149,7 +1172,7 @@ public class ProductService {
|
|
|
}
|
|
}
|
|
|
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};
|
|
|
|
|
|
|
+ count_list = new int[]{200, 500, 1000, 2000, 5000, 10000};
|
|
|
// 出血(一边2毫米)
|
|
// 出血(一边2毫米)
|
|
|
length = length * 10 + 4;
|
|
length = length * 10 + 4;
|
|
|
width = width * 10 + 4;
|
|
width = width * 10 + 4;
|
|
@@ -3541,7 +3564,7 @@ public class ProductService {
|
|
|
product.setPrice(Math.floor(product.getPrice() * 1.3));
|
|
product.setPrice(Math.floor(product.getPrice() * 1.3));
|
|
|
}
|
|
}
|
|
|
} else if ("10".equals(kind) || "11".equals(kind)) {
|
|
} else if ("10".equals(kind) || "11".equals(kind)) {
|
|
|
- int[] count_list = {50, 100, 200, 500, 1000};
|
|
|
|
|
|
|
+ count_list = new int[]{50, 100, 200, 500, 1000};
|
|
|
double[] jitu = {};
|
|
double[] jitu = {};
|
|
|
double[] jitu_add = {};
|
|
double[] jitu_add = {};
|
|
|
double[] tang = {};
|
|
double[] tang = {};
|
|
@@ -4190,7 +4213,7 @@ public class ProductService {
|
|
|
{226, 312, 368, 452, 550, 672, 814, 980, 1358, 1636, 1746, 2008, 2190, 2502, 2970},
|
|
{226, 312, 368, 452, 550, 672, 814, 980, 1358, 1636, 1746, 2008, 2190, 2502, 2970},
|
|
|
{274, 470, 594, 784, 988, 1250, 1518, 1854, 2614, 3184, 3398, 3936, 4298, 4916, 5872},
|
|
{274, 470, 594, 784, 988, 1250, 1518, 1854, 2614, 3184, 3398, 3936, 4298, 4916, 5872},
|
|
|
};
|
|
};
|
|
|
- int[] count_list = {500, 1000, 2000, 3000, 5000, 10000, 20000};
|
|
|
|
|
|
|
+ count_list = new int[]{500, 1000, 2000, 3000, 5000, 10000, 20000};
|
|
|
double[] areas = {1, 4, 6, 9, 12, 16, 20, 25, 36, 45, 48.6, 54, 60, 72, 81};
|
|
double[] areas = {1, 4, 6, 9, 12, 16, 20, 25, 36, 45, 48.6, 54, 60, 72, 81};
|
|
|
|
|
|
|
|
area = length * width;
|
|
area = length * width;
|