|
|
@@ -676,15 +676,19 @@ public class ProductService {
|
|
|
int tempNumber = dto.getNumber();
|
|
|
List<String> craftList = null;
|
|
|
if (!StringUtils.isEmpty(dto.getCraft())) {
|
|
|
- craftList = Arrays.asList(dto.getCraft());
|
|
|
+ craftList = new ArrayList<>(Arrays.asList(dto.getCraft()));
|
|
|
}
|
|
|
+ Boolean isMq = false;
|
|
|
if (craftList.contains("模切")) {
|
|
|
dto.setNumber(1);
|
|
|
+ isMq = true;
|
|
|
}
|
|
|
priceList = new CouponPrice().getCouponPrice(min, dto, priceList, count, craftList);
|
|
|
+ craftList.remove("模切");
|
|
|
+ dto.setCraft(craftList.toArray(new String[craftList.size()]));
|
|
|
//getCraft(dto, priceList, length * 10, width * 10, min);
|
|
|
|
|
|
- if (craftList.contains("模切")) {
|
|
|
+ if (isMq) {
|
|
|
for (Product product : priceList) {
|
|
|
product.setPrice(Math.floor(product.getPrice() * tempNumber));
|
|
|
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.3 * 0.86));
|
|
|
@@ -793,7 +797,7 @@ public class ProductService {
|
|
|
double w1 = Math.ceil(width / 28.5);
|
|
|
double l2 = Math.ceil(width / 21);
|
|
|
double w2 = Math.ceil(length / 28.5);
|
|
|
- min = (int) Math.min(l1 * w1, l2 * w2);
|
|
|
+ //min = (int) Math.min(l1 * w1, l2 * w2);
|
|
|
|
|
|
int[][] prices = {
|
|
|
{245, 580, 798, 1100, 1425},
|
|
|
@@ -854,9 +858,9 @@ public class ProductService {
|
|
|
Product product = new Product();
|
|
|
product.setCount(item_count);
|
|
|
product.setPrice(Math.ceil((price + carft_price) * number));
|
|
|
- priceList.add(product);
|
|
|
+// priceList.add(product);
|
|
|
}
|
|
|
- return priceList;
|
|
|
+// return priceList;
|
|
|
}
|
|
|
priceList = getHekaPrice(min, dto, priceList, count);
|
|
|
getCraft(dto, priceList, length * 10, width * 10, min);
|
|
|
@@ -2326,7 +2330,7 @@ public class ProductService {
|
|
|
}
|
|
|
} else {
|
|
|
for (Product product : priceList) {
|
|
|
- product.setPrice(product.getPrice() + number);
|
|
|
+ product.setPrice(Math.ceil(product.getPrice() + (number - 1) * 0.5));
|
|
|
}
|
|
|
}
|
|
|
// double base = number < 6 && number > 1 ? 5 : 0;
|
|
|
@@ -2342,20 +2346,6 @@ public class ProductService {
|
|
|
|
|
|
area = length * width * count / 10000;
|
|
|
|
|
|
- // 根据款数重新算价格
|
|
|
-// if (number > 1) {
|
|
|
-// for (Product product : priceList) {
|
|
|
-// if (area <= 0.005) {
|
|
|
-// if (count <= 5) {
|
|
|
-// product.setPrice(Math.ceil(product.getPrice()) + 5 * number);
|
|
|
-// } else {
|
|
|
-// product.setPrice(Math.ceil(product.getPrice() * number));
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// product.setPrice(Math.ceil(product.getPrice() * number));
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
/*
|
|
|
* List<Product> priceList2 = new PriceUtils().UVStickerLessPrice(length, width, count, number, dto.getCraft()); // 比较哪个便宜 if ((priceList.get(0).getPrice() > priceList2.get(0).getPrice()) && priceList2.get(0).getPrice() > 0) { // Double minPrice = Math.min(priceList.get(0).getPrice(), // priceList2.get(0).getPrice()); priceList = new ArrayList<Product>(); Product product = new Product(); product.setCount(count); product.setPrice(priceList2.get(0).getPrice());
|
|
|
* product.setMsg("大张出货(2-3天发货)"); priceList.add(product); return priceList; }
|