From 929ee2b0b1fa6047899e75e46a12ef0cf9e695fb Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Thu, 16 Apr 2026 08:37:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A0=E7=89=A9uv=E6=96=B0=E5=A2=9E=E5=86=85?= =?UTF-8?q?=E9=83=A8=E8=A3=81=E5=88=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 17 ++- src/main/webapp/views/product/coupon.jsp | 64 +++++---- src/main/webapp/views/product/metal.jsp | 124 ++++++++++++++---- 3 files changed, 146 insertions(+), 59 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 2212fe2..c25e314 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -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<>(); diff --git a/src/main/webapp/views/product/coupon.jsp b/src/main/webapp/views/product/coupon.jsp index 3936d40..4ad7542 100644 --- a/src/main/webapp/views/product/coupon.jsp +++ b/src/main/webapp/views/product/coupon.jsp @@ -163,6 +163,7 @@ +