From 41b4f5fba551cfba87e9d53b13c94a9e6d1668fb Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Thu, 25 Sep 2025 14:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=A1=E7=89=87=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 23 ++++++++++++-- src/main/webapp/views/product/coupon.jsp | 30 ++++++++----------- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 9c8311a..3ed5cb4 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -818,6 +818,16 @@ public class ProductService { } return priceList; } + + if (!"7".equals(dto.getKind()) && !"8".equals(dto.getKind()) && !"1".equals(dto.getKind())) { + if ((length < 4 || width < 4)) { + for (int i = 0; i < dto.getCraft().length; i++) { + if ("直角裁切".equals(dto.getCraft()[i])) { + dto.getCraft()[i] = "模切"; + } + } + } + } int min = getNum(length, width); String[] kind_list = {"3", "4", "5", "7"}; dto.setD(""); @@ -825,7 +835,7 @@ public class ProductService { boolean isyaofeng = false; double moqiePrice = 0; - if ("1".equals(dto.getKind()) && !craft_list.contains("模切") && (craft_list.contains("压痕") || craft_list.contains("压点线"))) { + if (!craft_list.contains("模切") && (craft_list.contains("压痕") || craft_list.contains("压点线"))) { //压1痕最小尺寸10.8*5.4cm,压2痕最小尺寸13.5*5.4CM按照贺卡模切价格算 boolean is_moqie = false; if ((craft_list.contains("压痕") && dto.getYaheng() == 1) || (craft_list.contains("压点线") && dto.getDadianxian() == 1)) { @@ -898,8 +908,14 @@ public class ProductService { } //300克铜版纸 贺卡 优惠券 抽奖券 存酒卡价格重新计算 if ((Arrays.asList(kind_list).contains(dto.getKind()) && "2".equals(dto.getKindValue2())) || isyaofeng) { + boolean is_moqie = false; if (dto.getCraft() != null && Arrays.asList(dto.getCraft()).contains("模切")) { + is_moqie = true; + } + + if (is_moqie) { priceList = getOtherHekaPrice(dto, width, length); + moqiePrice = 0; for (int i = 0; i < dto.getCraft().length; i++) { if ("模切".equals(dto.getCraft()[i])) { dto.getCraft()[i] = ""; @@ -4957,7 +4973,7 @@ public class ProductService { for (Product product : priceList) { product.setWeight(df.format(width / 100 * length / 100 * product.getCount() * 0.48 * 1.4)); if (carftList.contains("装opp袋")) { - product.setPrice(Math.ceil(product.getPrice() + product.getCount() * dto.getNumber() * 0.33)); + product.setPrice(Math.ceil(product.getPrice() + Math.max(product.getCount() * dto.getNumber() * 0.33, 100))); } } return priceList; @@ -5114,7 +5130,8 @@ public class ProductService { return new ArrayList<>(); } - private List getAreaNextPrice(int[] count_list, int count, double area, double[][] prices, double[] areas, int number) { + private List getAreaNextPrice(int[] count_list, int count, double area, double[][] prices, + double[] areas, int number) { List priceList = new ArrayList<>(); for (int i = 0; i < count_list.length; i++) { int count_item = count_list[i]; diff --git a/src/main/webapp/views/product/coupon.jsp b/src/main/webapp/views/product/coupon.jsp index 4ce3142..9d96ac6 100644 --- a/src/main/webapp/views/product/coupon.jsp +++ b/src/main/webapp/views/product/coupon.jsp @@ -229,7 +229,7 @@ @@ -456,10 +456,10 @@

工艺 优惠券异形模切+打码限于简单刀版(无法做圆形 椭圆机)最小9*5.4 300克腰封压1痕最小尺寸10.8*5.4cm,压2痕最小尺寸13.5*5.4CM,低于最小尺寸按异形模切报价

-<%--
--%> -<%-- -<%-- title="双面覆哑膜">--%> -<%--
--%> + <%--
--%> + <%-- + <%-- title="双面覆哑膜">--%> + <%--
--%>