|
@@ -324,7 +324,12 @@ public class ProductService {
|
|
|
width = Math.ceil(width);
|
|
width = Math.ceil(width);
|
|
|
area = length * width / 10000;
|
|
area = length * width / 10000;
|
|
|
}
|
|
}
|
|
|
- priceList = normalSticker(dto, "0", number, area, width, length, count, oldKind, priceList);
|
|
|
|
|
|
|
+ if ("常规".equals(dto.getKind2Value())) {
|
|
|
|
|
+ priceList = normalSticker(dto, "0", number, area, width, length, count, oldKind, priceList);
|
|
|
|
|
+ }
|
|
|
|
|
+ if ("数码".equals(dto.getKind2Value())) {
|
|
|
|
|
+ priceList = lessSticker(dto, "0", number, width, length, count, priceList, role);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (priceList.size() >= 3) {
|
|
if (priceList.size() >= 3) {
|
|
|
priceList = priceList.subList(0, 3);
|
|
priceList = priceList.subList(0, 3);
|
|
@@ -338,7 +343,12 @@ public class ProductService {
|
|
|
width = Math.ceil(width);
|
|
width = Math.ceil(width);
|
|
|
area = length * width / 10000;
|
|
area = length * width / 10000;
|
|
|
}
|
|
}
|
|
|
- priceList = normalSticker(dto, "1", number, area, width, length, count, oldKind, priceList);
|
|
|
|
|
|
|
+ if ("常规".equals(dto.getKind2Value())) {
|
|
|
|
|
+ priceList = normalSticker(dto, "1", number, area, width, length, count, oldKind, priceList);
|
|
|
|
|
+ }
|
|
|
|
|
+ if ("数码".equals(dto.getKind2Value())) {
|
|
|
|
|
+ priceList = lessSticker(dto, "1", number, width, length, count, priceList, role);
|
|
|
|
|
+ }
|
|
|
if (priceList.size() >= 3) {
|
|
if (priceList.size() >= 3) {
|
|
|
priceList = priceList.subList(0, 3);
|
|
priceList = priceList.subList(0, 3);
|
|
|
}
|
|
}
|
|
@@ -497,20 +507,26 @@ public class ProductService {
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
|
double basePrice = 0;
|
|
double basePrice = 0;
|
|
|
if ("粘牙签".equals(dto.getCraftShua())) {
|
|
if ("粘牙签".equals(dto.getCraftShua())) {
|
|
|
- if (product.getCount() <= 500) {
|
|
|
|
|
- basePrice = 0.108;
|
|
|
|
|
- } else if (product.getCount() <= 1000) {
|
|
|
|
|
- basePrice = 0.127;
|
|
|
|
|
- } else if (product.getCount() <= 2000) {
|
|
|
|
|
- basePrice = 0.118;
|
|
|
|
|
- } else if (product.getCount() <= 3000) {
|
|
|
|
|
- basePrice = 0.114;
|
|
|
|
|
- } else if (product.getCount() <= 5000) {
|
|
|
|
|
- basePrice = 0.106;
|
|
|
|
|
- } else {
|
|
|
|
|
- basePrice = 0.086;
|
|
|
|
|
|
|
+ if ("常规".equals(dto.getKind2Value())) {
|
|
|
|
|
+ if (product.getCount() <= 500) {
|
|
|
|
|
+ basePrice = 0.108;
|
|
|
|
|
+ } else if (product.getCount() <= 1000) {
|
|
|
|
|
+ basePrice = 0.127;
|
|
|
|
|
+ } else if (product.getCount() <= 2000) {
|
|
|
|
|
+ basePrice = 0.118;
|
|
|
|
|
+ } else if (product.getCount() <= 3000) {
|
|
|
|
|
+ basePrice = 0.114;
|
|
|
|
|
+ } else if (product.getCount() <= 5000) {
|
|
|
|
|
+ basePrice = 0.106;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ basePrice = 0.086;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if ("数码".equals(dto.getKind2Value())) {
|
|
|
|
|
+ basePrice = 0.5;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
if ("配牙签".equals(dto.getCraftShua())) {
|
|
if ("配牙签".equals(dto.getCraftShua())) {
|
|
|
if (product.getCount() <= 500) {
|
|
if (product.getCount() <= 500) {
|
|
|
basePrice = 0.032;
|
|
basePrice = 0.032;
|
|
@@ -532,10 +548,11 @@ public class ProductService {
|
|
|
if ("12".equals(dto.getToothpick_size())) {
|
|
if ("12".equals(dto.getToothpick_size())) {
|
|
|
basePrice = basePrice + 0.02;
|
|
basePrice = basePrice + 0.02;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
if ("0".equals(dto.getKindValue())) {
|
|
if ("0".equals(dto.getKindValue())) {
|
|
|
- product.setPrice(product.getPrice() + Math.ceil(product.getCount() * basePrice));
|
|
|
|
|
|
|
+ product.setPrice(product.getPrice() + Math.max(Math.ceil(product.getCount() * basePrice), 5));
|
|
|
} else {
|
|
} else {
|
|
|
- product.setPrice(product.getPrice() + Math.ceil(product.getCount() * basePrice * number));
|
|
|
|
|
|
|
+ product.setPrice(product.getPrice() + Math.max(Math.ceil(product.getCount() * basePrice), 5) * number);
|
|
|
}
|
|
}
|
|
|
if ("配牙签".equals(dto.getCraftShua()) && "6.5".equals(dto.getToothpick_size()) && ((width == 9 && length == 2.5) || length == 9 && width == 2.5)) {
|
|
if ("配牙签".equals(dto.getCraftShua()) && "6.5".equals(dto.getToothpick_size()) && ((width == 9 && length == 2.5) || length == 9 && width == 2.5)) {
|
|
|
if (product.getCount() == 500) {
|
|
if (product.getCount() == 500) {
|
|
@@ -6569,7 +6586,7 @@ public class ProductService {
|
|
|
product.setPrice(product.getPrice() + ((dto.getN_mq_num()) * base_price));
|
|
product.setPrice(product.getPrice() + ((dto.getN_mq_num()) * base_price));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if (number > 1) {
|
|
|
|
|
|
|
+ if (number > 1 && dto.getP() != null) {
|
|
|
double desFee = 0;
|
|
double desFee = 0;
|
|
|
if (!role.contains("1045") && !role.contains("1054") && !role.contains("1029")) {
|
|
if (!role.contains("1045") && !role.contains("1054") && !role.contains("1029")) {
|
|
|
if (dto.getP() == 1) {
|
|
if (dto.getP() == 1) {
|