|
@@ -601,8 +601,7 @@ 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));
|
|
@@ -610,8 +609,8 @@ public class ProductService {
|
|
|
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("弹力绳捆")) {
|
|
if (crafts_list.contains("弹力绳捆")) {
|
|
|
- int currentIndex = Arrays.binarySearch(count_list, product.getCount());
|
|
|
|
|
- product.setPrice(Math.floor(product.getPrice() + shengzi[currentIndex] * 10));
|
|
|
|
|
|
|
+
|
|
|
|
|
+ product.setPrice(Math.floor(product.getPrice() + Math.ceil(product.getCount() * 20.0 / 5000) * 10));
|
|
|
}
|
|
}
|
|
|
product.setWeight(df.format(number * length * width * product.getCount() * 0.00003));
|
|
product.setWeight(df.format(number * length * width * product.getCount() * 0.00003));
|
|
|
}
|
|
}
|
|
@@ -675,6 +674,7 @@ public class ProductService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ List<String> craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
|
|
if ("10".equals(dto.getKindValue2())) {
|
|
if ("10".equals(dto.getKindValue2())) {
|
|
|
area = length * width;
|
|
area = length * width;
|
|
|
int[][] prices = {
|
|
int[][] prices = {
|
|
@@ -697,9 +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};
|
|
|
- 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<>();
|
|
|
|
|
|
|
+ int[] count_list = {200, 500, 1000, 2000, 3000, 5000, 10000};
|
|
|
|
|
+
|
|
|
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];
|
|
|
if (count > item_count) {
|
|
if (count > item_count) {
|
|
@@ -750,8 +749,7 @@ public class ProductService {
|
|
|
carft_price += Math.max(0.1 * item_count, 10);
|
|
carft_price += Math.max(0.1 * item_count, 10);
|
|
|
}
|
|
}
|
|
|
if (craft_list.contains("配弹力绳捆")) {
|
|
if (craft_list.contains("配弹力绳捆")) {
|
|
|
- carft_price += 10 * shenzi_list[count_index];
|
|
|
|
|
-
|
|
|
|
|
|
|
+ carft_price += 10 * Math.ceil(item_count * 20.0 / 5000);
|
|
|
}
|
|
}
|
|
|
double tang_price = 0;
|
|
double tang_price = 0;
|
|
|
if (craft_list.contains("单面烫金") || craft_list.contains("双面烫金")) {
|
|
if (craft_list.contains("单面烫金") || craft_list.contains("双面烫金")) {
|
|
@@ -789,7 +787,33 @@ public class ProductService {
|
|
|
}
|
|
}
|
|
|
// 根据款数重新算价格/计算重量
|
|
// 根据款数重新算价格/计算重量
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
|
- product.setPrice(Math.floor(product.getPrice() * number));
|
|
|
|
|
|
|
+ double carft_price = 0;
|
|
|
|
|
+ if (craft_list.contains("配葫芦针")) {
|
|
|
|
|
+ carft_price += Math.max(0.016 * product.getCount(), 10);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (craft_list.contains("配流苏")) {
|
|
|
|
|
+ carft_price += Math.max(0.15 * product.getCount(), 30);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (craft_list.contains("穿流苏")) {
|
|
|
|
|
+ carft_price += Math.max(0.5 * product.getCount(), 100);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (craft_list.contains("配尼龙绳")) {
|
|
|
|
|
+ if ("红色绳子".equals(dto.getShen_color())) {
|
|
|
|
|
+ carft_price += Math.max(0.009 * product.getCount(), 10);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ carft_price += Math.max(0.03 * product.getCount(), 3);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (craft_list.contains("穿尼龙绳")) {
|
|
|
|
|
+ carft_price += Math.max(0.2 * product.getCount(), 40);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (craft_list.contains("配弹力绳")) {
|
|
|
|
|
+ carft_price += Math.max(0.1 * product.getCount(), 10);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (craft_list.contains("配弹力绳捆")) {
|
|
|
|
|
+ carft_price += 10 * Math.ceil(product.getCount() * 20.0 / 5000);
|
|
|
|
|
+ }
|
|
|
|
|
+ product.setPrice(Math.floor((product.getPrice() + carft_price) * number));
|
|
|
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.3 * 0.86));
|
|
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.3 * 0.86));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -905,8 +929,6 @@ 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)));
|
|
@@ -915,8 +937,7 @@ public class ProductService {
|
|
|
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("弹力绳捆")) {
|
|
if (craft.contains("弹力绳捆")) {
|
|
|
- int currentIndex = Arrays.binarySearch(count_list, product.getCount());
|
|
|
|
|
- product.setPrice(Math.floor(product.getPrice() + shengzi[currentIndex] * 10));
|
|
|
|
|
|
|
+ product.setPrice(Math.floor(product.getPrice() + Math.ceil(product.getCount() * 20.0 / 5000) * 10));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// 根据款数重新算价格/计算重量
|
|
// 根据款数重新算价格/计算重量
|
|
@@ -989,8 +1010,6 @@ 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("棉绳")) {
|
|
@@ -1000,8 +1019,7 @@ public class ProductService {
|
|
|
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("弹力绳捆")) {
|
|
if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("弹力绳捆")) {
|
|
|
- int currentIndex = Arrays.binarySearch(count_list, product.getCount());
|
|
|
|
|
- product.setPrice(product.getPrice() + 10 * shengzi[currentIndex]);
|
|
|
|
|
|
|
+ product.setPrice(product.getPrice() + 10 * Math.ceil(product.getCount() * 20.0 / 5000));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
@@ -1128,7 +1146,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)) {
|
|
|
- count_list = new int[]{100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000};
|
|
|
|
|
|
|
+ int[] count_list = {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("异形模切")) {
|
|
@@ -1172,7 +1190,7 @@ public class ProductService {
|
|
|
}
|
|
}
|
|
|
return priceList;
|
|
return priceList;
|
|
|
} else if ("草香".equals(kind) || "芳怡".equals(kind)) {
|
|
} else if ("草香".equals(kind) || "芳怡".equals(kind)) {
|
|
|
- count_list = new int[]{200, 500, 1000, 2000, 5000, 10000};
|
|
|
|
|
|
|
+ int[] count_list = {200, 500, 1000, 2000, 5000, 10000};
|
|
|
// 出血(一边2毫米)
|
|
// 出血(一边2毫米)
|
|
|
length = length * 10 + 4;
|
|
length = length * 10 + 4;
|
|
|
width = width * 10 + 4;
|
|
width = width * 10 + 4;
|
|
@@ -3564,7 +3582,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)) {
|
|
|
- count_list = new int[]{50, 100, 200, 500, 1000};
|
|
|
|
|
|
|
+ int[] count_list = {50, 100, 200, 500, 1000};
|
|
|
double[] jitu = {};
|
|
double[] jitu = {};
|
|
|
double[] jitu_add = {};
|
|
double[] jitu_add = {};
|
|
|
double[] tang = {};
|
|
double[] tang = {};
|
|
@@ -4213,7 +4231,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},
|
|
|
};
|
|
};
|
|
|
- count_list = new int[]{500, 1000, 2000, 3000, 5000, 10000, 20000};
|
|
|
|
|
|
|
+ int[] count_list = {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;
|