|
@@ -2491,8 +2491,13 @@ public class ProductService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// double base = number < 6 && number > 1 ? 5 : 0;
|
|
// double base = number < 6 && number > 1 ? 5 : 0;
|
|
|
|
|
+ double apprise = 0;
|
|
|
for (Product product : priceList) {
|
|
for (Product product : priceList) {
|
|
|
product.setWeight(df.format((width + 0.6) * (length + 0.6) * product.getCount() / 10000));
|
|
product.setWeight(df.format((width + 0.6) * (length + 0.6) * product.getCount() / 10000));
|
|
|
|
|
+ if (apprise > product.getPrice()) {
|
|
|
|
|
+ product.setPrice(apprise);
|
|
|
|
|
+ }
|
|
|
|
|
+ apprise = product.getPrice();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* } */
|
|
/* } */
|
|
@@ -4715,7 +4720,7 @@ public class ProductService {
|
|
|
Product pro = new Product();
|
|
Product pro = new Product();
|
|
|
double price = basePrice * dto.getCount() * area * dto.getNumber();
|
|
double price = basePrice * dto.getCount() * area * dto.getNumber();
|
|
|
if (area <= 0.25) {
|
|
if (area <= 0.25) {
|
|
|
- price = basePrice * dto.getCount() * area + dto.getNumber() + 6;
|
|
|
|
|
|
|
+ price = basePrice * dto.getCount() * area * dto.getNumber() + dto.getNumber() + 6;
|
|
|
}
|
|
}
|
|
|
pro.setPrice(Math.ceil(Math.max(price, minPrice)));
|
|
pro.setPrice(Math.ceil(Math.max(price, minPrice)));
|
|
|
pro.setCount(dto.getCount());
|
|
pro.setCount(dto.getCount());
|