宠物uv新增内部裁切
This commit is contained in:
@@ -2716,7 +2716,9 @@ public class ProductService {
|
||||
}
|
||||
double apprise = 0;
|
||||
for (Product product : priceList) {
|
||||
|
||||
product.setPrice(Math.ceil(product.getPrice() + (number - 1) * 0.5));
|
||||
|
||||
product.setWeight(df.format((width + 0.6) * (length + 0.6) * product.getCount() / 10000));
|
||||
if (product.getPrice() < apprise) {
|
||||
product.setPrice(apprise);
|
||||
@@ -2745,6 +2747,7 @@ public class ProductService {
|
||||
crafts.remove("刮板");
|
||||
crafts.remove("熨斗");
|
||||
crafts.remove("哑光");
|
||||
crafts.remove("内部裁切");
|
||||
if (crafts.size() > 0 && "烫金".equals(crafts.get(0))) {
|
||||
crafts.remove(0);
|
||||
}
|
||||
@@ -2772,6 +2775,16 @@ public class ProductService {
|
||||
if ("宠物转印贴".equals(dto.getKind())) {
|
||||
for (Product product : priceList) {
|
||||
product.setPrice(Math.ceil(product.getPrice() == 50 ? product.getPrice() : product.getPrice() * 1.3));
|
||||
double number_price = 0;
|
||||
double number_price_base = 3;
|
||||
for (int i = 0; i < number; i++) {
|
||||
number_price += Math.max(1, number_price_base);
|
||||
number_price_base--;
|
||||
}
|
||||
if ("宠物转印贴".equals(dto.getKind()) && craft_list.contains("内部裁切")) {
|
||||
product.setPrice(Math.ceil(product.getPrice() + 5 * dto.getN_mq_num()));
|
||||
}
|
||||
product.setPrice(Math.ceil(product.getPrice() + number_price));
|
||||
}
|
||||
}
|
||||
// double base = number < 6 && number > 1 ? 5 : 0;
|
||||
@@ -2826,7 +2839,7 @@ public class ProductService {
|
||||
priceList.add(dto2);
|
||||
} else if (dto.getProTypeLabel().equals("种子纸")) {
|
||||
int av_count = count;
|
||||
if (!StringUtils.isEmpty(dto.getSwitchz3Size()) || "2".equals(dto.getZ3type())) {
|
||||
if ("4".equals(dto.getZ3type()) || "2".equals(dto.getZ3type())) {
|
||||
count = Math.max(count, 300);
|
||||
}
|
||||
double price = Math.ceil((length * width * count * 200) / 10000);//价格计算尺寸*数量*200/10000
|
||||
@@ -2851,7 +2864,7 @@ public class ProductService {
|
||||
price += Math.ceil(Math.max(count * 0.15 * number, 5));
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(dto.getSwitchz3Size())) {
|
||||
if ("4".equals(dto.getZ3type())) {
|
||||
price += 100;
|
||||
}
|
||||
craft_list = crafts != null ? Arrays.asList(crafts) : new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user