From 01d022ec769a624478b46639984e0fc2d71f59ee Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Mon, 19 Jan 2026 15:57:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A6=99=E8=96=B0=E5=8D=A1?= =?UTF-8?q?=E5=B7=A5=E8=89=BA=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=8F=92=E6=97=97?= =?UTF-8?q?=E6=9D=90=E8=B4=A8=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=88=AE=E5=88=AE?= =?UTF-8?q?=E5=8D=A1=E7=83=AB=E9=87=91=EF=BC=8C=E6=96=B0=E5=A2=9E=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E5=8D=B7=E6=89=93=E7=A0=81=E5=B7=A5=E8=89=BA=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8F=92=E5=8D=A1=E5=B7=A5=E8=89=BA=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=96=E5=8D=96=E7=9B=92=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=B4=BA=E5=8D=A1=E4=BB=B7=E6=A0=BC=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=8D=E5=B9=B2=E8=83=B6=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 68 +++++++++++++---- .../java/lingtao/net/util/AStickersPrice.java | 2 +- .../java/lingtao/net/util/PriceUtils.java | 1 + .../webapp/views/product/aromatherapyCard.jsp | 1 + src/main/webapp/views/product/chaqi.jsp | 15 ++-- src/main/webapp/views/product/coupon.jsp | 75 +++++++++++++++---- src/main/webapp/views/product/insertCard.jsp | 58 ++++++++++++-- src/main/webapp/views/product/takeoutBox.jsp | 2 +- 8 files changed, 182 insertions(+), 40 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index d97616c..20aa972 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -311,7 +311,7 @@ public class ProductService { priceList = StickersDoublePrice.getPrice(length, width, count, number); return priceList; } else if ("插旗".equals(dto.getStickerKind())) { - if (!"250克白卡纸对裱".equals(kind)) { + if ("铜版纸不干胶".equals(kind)) { dto.setKindValue("0"); dto.setLength(length); dto.setWidth(width); @@ -326,6 +326,19 @@ public class ProductService { } priceList = normalSticker(dto, "0", number, area, width, length, count, oldKind, priceList); + if (priceList.size() >= 3) { + priceList = priceList.subList(0, 3); + } + } else if ("PVC不干胶".equals(kind)) { + if (length > 20 && length < 21) { + length = Math.ceil(length); + area = length * width / 10000; + } + if (width > 20 && width < 21) { + width = Math.ceil(width); + area = length * width / 10000; + } + priceList = normalSticker(dto, "1", number, area, width, length, count, oldKind, priceList); if (priceList.size() >= 3) { priceList = priceList.subList(0, 3); } @@ -462,7 +475,7 @@ public class ProductService { } } - if ("覆哑膜".equals(dto.getCraftMo()) && !"1".equals(kind) && !("插旗".equals(dto.getStickerKind()) && "铜版纸不干胶".equals(kind))) { + if ("覆哑膜".equals(dto.getCraftMo()) && !"1".equals(kind) && !("插旗".equals(dto.getStickerKind()) && ("铜版纸不干胶".equals(kind) || "PVC不干胶".equals(kind)))) { for (Product product : priceList) { product.setPrice(Math.ceil(product.getPrice() * 1.2)); } @@ -650,7 +663,25 @@ public class ProductService { priceList = priceList.subList(0, 4); } List crafts_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>(); - + if ("0".equals(kind) && (crafts_list.contains("击凸") || crafts_list.contains("压凹"))) { + priceList = new ArrayList<>(); + Product product = new Product(); + int[] counts = {200, 500, 1000, 2000, 3000, 5000, 10000, 20000, 30000}; + double[] base_price = {180, 200, 220, 400, 550, 880, 1580, 2844, 4266}; + int num = getNum(length, width); + for (int i = 0; i < counts.length; i++) { + product = new Product(); + if (counts[i] < dto.getCount()) { + continue; + } + if (priceList.size() > 3) { + break; + } + product.setPrice(Math.ceil(base_price[i] * num * 0.9 * number)); + product.setCount(counts[i]); + priceList.add(product); + } + } // 根据款数重新算价格/计算重量 for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); @@ -658,7 +689,6 @@ public class ProductService { product.setPrice(Math.floor(product.getPrice() + Math.max(10, product.getCount() * 0.1))); } if (crafts_list.contains("弹力绳捆")) { - product.setPrice(Math.floor(product.getPrice() + Math.ceil(product.getCount() * 20.0 / 5000) * 10)); } product.setWeight(df.format(number * length * width * product.getCount() * 0.00003)); @@ -706,10 +736,7 @@ public class ProductService { dto.setLength(length); dto.setWidth(width); int tempNumber = dto.getNumber(); - List craftList = null; - if (!StringUtils.isEmpty(dto.getCraft())) { - craftList = new ArrayList<>(Arrays.asList(dto.getCraft())); - } + List craftList = !StringUtils.isEmpty(dto.getCraft()) ? new ArrayList<>(Arrays.asList(dto.getCraft())) : new ArrayList<>(); Boolean isMq = false; if (craftList.contains("模切")) { dto.setNumber(1); @@ -717,8 +744,15 @@ public class ProductService { } 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); + List tang_craft = new ArrayList<>(); + if (craftList.contains("单面烫金")) { + tang_craft.add("单面烫金"); + } + if (craftList.contains("双面烫金")) { + tang_craft.add("双面烫金"); + } + dto.setCraft(tang_craft.toArray(new String[tang_craft.size()])); + getCraft(dto, priceList, length * 10, width * 10, min); for (Product product : priceList) { double carft_price = 0; if (craftList.contains("压痕")) { @@ -2500,7 +2534,7 @@ public class ProductService { weight = 0.0; switch (kind) { case "0": - weight = 0.08; + weight = 0.157; break; case "1": weight = 0.25; @@ -2515,7 +2549,7 @@ public class ProductService { // 根据款数重新算价格/计算重量 for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); - product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * 0.86 * weight)); + product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * weight)); } return priceList; // 腰封200克/157克 @@ -5056,7 +5090,7 @@ public class ProductService { {60, 70, 90, 100, 105, 110, 150, 200, 260, 430, 550, 690, 2020, 3080, 5950}, {83, 93, 113, 120, 124, 128, 200, 300, 371, 595, 779, 1041, 3108, 4866, 9669}, {83, 93, 113, 120, 124, 128, 200, 300, 371, 595, 779, 1041, 3108, 4866, 9669}, - {153, 163, 203, 200, 200, 202, 250, 350, 450, 650, 850, 1150, 3250, 4950, 9990}, + {153, 163, 200, 210, 220, 230, 250, 350, 450, 650, 850, 1150, 3250, 4950, 9990}, }; int j = 0; if ("1".equals(dto.getKind())) { @@ -5673,6 +5707,9 @@ public class ProductService { double num = Math.ceil(dto.getCount() / max); double craft_price = 0; double bao_price = 0; + if (carftList.contains("打码")) { + bao_price += Math.max(Math.ceil(0.2 * dto.getCount() * dto.getNumber()), 15); + } if (carftList.contains("单独包装")) { bao_price += Math.ceil(0.2 * dto.getCount() * dto.getNumber()); } @@ -5953,7 +5990,7 @@ public class ProductService { {250, 250, 250, 250, 250, 250, 250, 250, 250, 266, 273, 275, 278, 330, 360, 370, 429, 442, 640, 655, 825, 877}, {370, 370, 370, 370, 370, 370, 370, 370, 370, 371, 372, 373, 375, 480, 500, 515, 545, 632, 800, 886, 1030, 1240}, {510, 510, 510, 510, 510, 510, 510, 510, 510, 589, 600, 605, 610, 750, 800, 820, 932, 1022, 1160, 1458, 1488, 2000}, - {945, 945, 945, 945, 945, 945, 945, 945, 945, 1030, 1040, 1045, 1050, 1200, 1440, 1460, 1798, 2202, 2400, 2950, 3012, 4000}, + {945, 945, 945, 945, 945, 945, 945, 945, 945, 1030, 1040, 1045, 1050, 1200, 1440, 1460, 1798, 2000, 2400, 2950, 3012, 4000}, }; int[] count_list = {200, 500, 1000, 2000, 3000, 5000, 10000}; double[] areas = {4, 16, 25, 30, 35, 36, 40, 45, 48.60, 49, 54, 64, 81, 97.20, 100, 145.80, 172.8, 194.4, 224, 288, 294, 400}; @@ -7293,6 +7330,9 @@ public class ProductService { } else { danjia = 0.1; } + if(dto.getPcount() == 3){ + danjia = 0.5; + } if ("上下编码".equals(dto.getBianma())) { for (Product product : priceList) { product.setPrice(Math.ceil(product.getPrice() + (danjia * product.getCount() * 2 > 120 ? danjia * product.getCount() * 2 : 120))); diff --git a/src/main/java/lingtao/net/util/AStickersPrice.java b/src/main/java/lingtao/net/util/AStickersPrice.java index d0535f9..375acc1 100644 --- a/src/main/java/lingtao/net/util/AStickersPrice.java +++ b/src/main/java/lingtao/net/util/AStickersPrice.java @@ -221,7 +221,7 @@ public class AStickersPrice { List list = new ArrayList(); Product pro = new Product(); int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000}; - int priceArr[] = {56, 63, 84, 108, 150, 240, 456, 684, 912, 1125, 1350, 1575, 1800, 2025, 2250}; + int priceArr[] = {65, 75, 100, 130, 180, 275, 515, 805, 1005, 1205, 1405, 1605, 1805, 2005, 2205}; if (count <= 40000) { for (int i = 0; i < bigCountArr.length; i++) { if (bigCountArr[i] < count || list.size() > 5) { diff --git a/src/main/java/lingtao/net/util/PriceUtils.java b/src/main/java/lingtao/net/util/PriceUtils.java index 0fa3393..5f53674 100644 --- a/src/main/java/lingtao/net/util/PriceUtils.java +++ b/src/main/java/lingtao/net/util/PriceUtils.java @@ -3442,6 +3442,7 @@ public class PriceUtils { } else { pro.setPrice(Math.ceil(price)); } + pro.setWeight(String.valueOf(df.format(width * length * 0.55 / 10000))); pro.setCount(count); list.add(pro); diff --git a/src/main/webapp/views/product/aromatherapyCard.jsp b/src/main/webapp/views/product/aromatherapyCard.jsp index 5be2b00..dfd263c 100644 --- a/src/main/webapp/views/product/aromatherapyCard.jsp +++ b/src/main/webapp/views/product/aromatherapyCard.jsp @@ -106,6 +106,7 @@
常见工艺: +
包装: diff --git a/src/main/webapp/views/product/chaqi.jsp b/src/main/webapp/views/product/chaqi.jsp index 5584660..c13eb00 100644 --- a/src/main/webapp/views/product/chaqi.jsp +++ b/src/main/webapp/views/product/chaqi.jsp @@ -118,6 +118,7 @@ +
@@ -782,7 +783,7 @@ if (TJValue == "彩色印刷") { html += "广东:(2天发货) 中通 顺丰" } - } else if (kindvalue == "铜版纸不干胶") { + } else if (kindvalue == "铜版纸不干胶" || kindvalue == "PVC不干胶") { html += "广东:配牙签(16点前上传系统当天发货,16点后上传系统隔天发货) 中通 圆通 顺丰;
广东:粘牙签(4-5天发货) 中通 圆通 顺丰;" if (!!craft && ("配刮刮膜" == craft || "粘刮刮膜" == craft)) { html = "预计发货时间:
"; @@ -941,15 +942,20 @@ `) + $(".ui_guagua2").hide(); + $(".ui_guagua2").prop('disabled', 'disabled'); if (data.value == "铜版纸不干胶") { $(".ui_guagua2").show(); $(".ui_guagua2").removeAttr('disabled'); $(".fm").show(); $(".fm").find(":input").attr("disabled", false); $(".fm input[name='craftMo'][value='覆亮膜']").attr("checked", true) + } else if (data.value == "PVC不干胶") { + $(".fm").show(); + $(".fm").find(":input").attr("disabled", false); + $(".fm input[name='craftMo'][value='覆亮膜']").attr("checked", true) } else if (data.value == "250克白卡纸对裱") { $(".fm input").removeAttr('checked'); - $(".ui_guagua2").hide(); $(".caiqie").show(); $(".cha_fm").show(); $(".cha_fm").find(":input").attr("disabled", false); @@ -958,7 +964,6 @@ $(".peishua").find(":input").attr("disabled", true); $("input[name='craft']").prop('checked', false); $(".cha_fm input").prop('checked', true); - $(".ui_guagua2").prop('disabled', 'disabled'); $(".ui_cq select[name='count']").empty().append(` @@ -967,9 +972,7 @@ `) } else { - $(".ui_guagua2").hide(); $("input[name='craft']").prop('checked', false); - $(".ui_guagua2").prop('disabled', 'disabled'); $(".ui_guaguasize2").hide(); $(".ui_toothpick").hide(); } @@ -1369,7 +1372,7 @@ let html; if (result.length > 0) { for (let i = 0; i < result.length; i++) { - html += '
'; + html += '
'; } $("#carousel").append(html); diff --git a/src/main/webapp/views/product/coupon.jsp b/src/main/webapp/views/product/coupon.jsp index 9cf1ea7..a26ed8a 100644 --- a/src/main/webapp/views/product/coupon.jsp +++ b/src/main/webapp/views/product/coupon.jsp @@ -515,13 +515,35 @@
- -