修改海报价格
This commit is contained in:
@@ -1044,6 +1044,20 @@ public class ProductService {
|
||||
product.setPrice(product.getPrice() - 10);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < dto.getCraft().length; i++) {
|
||||
if ("模切".equals(dto.getCraft()[i])) {
|
||||
dto.getCraft()[i] = "";
|
||||
}
|
||||
if ("双面覆哑膜".equals(dto.getCraft()[i])) {
|
||||
dto.getCraft()[i] = "";
|
||||
}
|
||||
if ("压痕".equals(dto.getCraft()[i])) {
|
||||
dto.getCraft()[i] = "";
|
||||
}
|
||||
if ("压点线".equals(dto.getCraft()[i])) {
|
||||
dto.getCraft()[i] = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("1".equals(dto.getKind())) {
|
||||
dto.setLengthTang(length);
|
||||
@@ -1051,9 +1065,8 @@ public class ProductService {
|
||||
}
|
||||
List<String> containList = new ArrayList<>(Arrays.asList("单面星光膜", "双面星光膜", "单面镭射膜", "双面镭射膜", "单面触感膜", "双面触感膜", "单面雪花膜", "双面雪花膜", "单面局部UV", "双面局部UV"));
|
||||
if ("3".equals(dto.getKind()) && "2".equals(dto.getKindValue2()) && craft_list != null && !Collections.disjoint(craft_list, containList)) {
|
||||
|
||||
priceList = gethuafangApiPrice(dto, craft_list, width, length);
|
||||
|
||||
number = 1;
|
||||
}
|
||||
|
||||
getCraft(dto, priceList, length * 10, width * 10, min);
|
||||
@@ -6027,20 +6040,42 @@ public class ProductService {
|
||||
if (priceList.size() > 2) {
|
||||
break;
|
||||
}
|
||||
double price = 0;
|
||||
if ("彩色".equals(dto.getShen_color())) {
|
||||
double basePrice = 0;
|
||||
if (itemCount == 1) {
|
||||
basePrice = 116;
|
||||
} else if (itemCount == 2) {
|
||||
basePrice = 108;
|
||||
} else {
|
||||
basePrice = 98;
|
||||
}
|
||||
price = basePrice * itemCount * number;
|
||||
} else {
|
||||
price = prices[base][i] * number * 1.2;
|
||||
}
|
||||
pro = new Product();
|
||||
pro.setCount(itemCount);
|
||||
pro.setPrice(Math.ceil(prices[base][i] * number * 1.2));
|
||||
pro.setPrice(Math.ceil(price));
|
||||
pro.setNumber(number);
|
||||
pro.setWeight(df.format(baseWeight * itemCount));
|
||||
priceList.add(pro);
|
||||
}
|
||||
if (priceList.size() == 0 && count > maxCount) {
|
||||
double basePrice = prices[base][prices[base].length - 1];
|
||||
double price = 0;
|
||||
if ("彩色".equals(dto.getShen_color())) {
|
||||
basePrice = 98;
|
||||
price = basePrice * count * number;
|
||||
} else {
|
||||
price = basePrice / maxCount * count * number * 1.2;
|
||||
|
||||
}
|
||||
pro = new Product();
|
||||
pro.setCount(count);
|
||||
pro.setPrice(Math.ceil(basePrice / maxCount * count * number * 1.2));
|
||||
pro.setPrice(Math.ceil(price));
|
||||
pro.setNumber(number);
|
||||
pro.setWeight(df.format(baseWeight * count));
|
||||
pro.setWeight(df.format(baseWeight * count * number));
|
||||
priceList.add(pro);
|
||||
}
|
||||
|
||||
@@ -6566,7 +6601,7 @@ public class ProductService {
|
||||
double craft_price = 0;
|
||||
//3万张以内的价格需要加上上机费,1-2色的上机费是200元,3色400
|
||||
if (item_count <= 30000) {
|
||||
craft_price = Math.ceil(Math.max(200, (dto.getCo_number() - 1) * 200));
|
||||
craft_price = Math.ceil(Math.max(250, (dto.getCo_number() - 1) * 250));
|
||||
}
|
||||
double price = 0;
|
||||
price = Math.ceil(Math.max(miniPrice, basePrice * item_count + item_count / 10000 * yunPrice + banPrice + craft_price));
|
||||
|
||||
Reference in New Issue
Block a user