|
@@ -600,10 +600,13 @@ public class ProductService {
|
|
|
if (priceList.size() >= 4) {
|
|
if (priceList.size() >= 4) {
|
|
|
priceList = priceList.subList(0, 4);
|
|
priceList = priceList.subList(0, 4);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ List<String> crafts_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
|
|
// 根据款数重新算价格/计算重量
|
|
// 根据款数重新算价格/计算重量
|
|
|
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("弹力绳")) {
|
|
|
|
|
+ product.setPrice(Math.floor(product.getPrice() + Math.max(10, product.getCount() * 0.1)));
|
|
|
|
|
+ }
|
|
|
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;
|
|
@@ -646,6 +649,8 @@ public class ProductService {
|
|
|
}
|
|
}
|
|
|
} else if ("13".equals(dto.getKind())) {
|
|
} else if ("13".equals(dto.getKind())) {
|
|
|
int min = getNum(length, width);
|
|
int min = getNum(length, width);
|
|
|
|
|
+ dto.setLength(length);
|
|
|
|
|
+ dto.setWidth(width);
|
|
|
int tempNumber = dto.getNumber();
|
|
int tempNumber = dto.getNumber();
|
|
|
List<String> craftList = null;
|
|
List<String> craftList = null;
|
|
|
if (!StringUtils.isEmpty(dto.getCraft())) {
|
|
if (!StringUtils.isEmpty(dto.getCraft())) {
|
|
@@ -654,8 +659,8 @@ public class ProductService {
|
|
|
if (craftList.contains("模切")) {
|
|
if (craftList.contains("模切")) {
|
|
|
dto.setNumber(1);
|
|
dto.setNumber(1);
|
|
|
}
|
|
}
|
|
|
- priceList = new CouponPrice().getCouponPrice(min, dto, priceList, count);
|
|
|
|
|
- getCraft(dto, priceList, length * 10, width * 10, min);
|
|
|
|
|
|
|
+ priceList = new CouponPrice().getCouponPrice(min, dto, priceList, count, craftList);
|
|
|
|
|
+ //getCraft(dto, priceList, length * 10, width * 10, min);
|
|
|
|
|
|
|
|
if (craftList.contains("模切")) {
|
|
if (craftList.contains("模切")) {
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
@@ -668,7 +673,7 @@ public class ProductService {
|
|
|
area = length * width;
|
|
area = length * width;
|
|
|
int[][] prices = {
|
|
int[][] prices = {
|
|
|
{106, 106, 106, 106, 106, 107, 108, 109, 116, 130, 131, 133, 142, 193, 195, 198, 246, 430, 438, 557, 573},
|
|
{106, 106, 106, 106, 106, 107, 108, 109, 116, 130, 131, 133, 142, 193, 195, 198, 246, 430, 438, 557, 573},
|
|
|
- {139, 139, 139, 139, 143, 145, 147, 160, 162, 171, 176, 179, 205, 255, 260, 266, 279, 490, 497, 628, 632,},
|
|
|
|
|
|
|
+ {139, 139, 139, 139, 143, 145, 147, 160, 162, 171, 176, 179, 205, 255, 260, 266, 279, 490, 497, 628, 632},
|
|
|
{226, 237, 245, 253, 255, 256, 258, 265, 269, 280, 290, 310, 325, 395, 410, 445, 453, 650, 721, 914, 920},
|
|
{226, 237, 245, 253, 255, 256, 258, 265, 269, 280, 290, 310, 325, 395, 410, 445, 453, 650, 721, 914, 920},
|
|
|
{313, 342, 343, 375, 380, 385, 390, 395, 398, 400, 405, 409, 418, 540, 545, 555, 620, 811, 836, 1056, 1128},
|
|
{313, 342, 343, 375, 380, 385, 390, 395, 398, 400, 405, 409, 418, 540, 545, 555, 620, 811, 836, 1056, 1128},
|
|
|
{465, 510, 515, 553, 559, 565, 571, 581, 587, 599, 610, 615, 629, 810, 820, 830, 921, 1200, 1250, 1580, 1685},
|
|
{465, 510, 515, 553, 559, 565, 571, 581, 587, 599, 610, 615, 629, 810, 820, 830, 921, 1200, 1250, 1580, 1685},
|