From 67fdad896c2b2021e905ab727da4b61ff3d5610b Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Mon, 27 Jul 2026 11:40:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B2=99=E6=BB=A9=E6=97=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 74 +++- src/main/webapp/views/product/beachFlag.jsp | 334 ++++++++++++++++++ src/main/webapp/views/product/handBag.jsp | 3 +- 3 files changed, 396 insertions(+), 15 deletions(-) create mode 100644 src/main/webapp/views/product/beachFlag.jsp diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index a7f74a0..ddbddd6 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -4428,12 +4428,56 @@ public class ProductService { case "夹板": priceList = getSplintPrice(dto, width, length); return chucklePrice(role, priceList, dto); + case "沙滩旗": + priceList = getBeachFlagPrice(dto, width, length); + return chucklePrice(role, priceList, dto); default: break; } return null; } + private List getBeachFlagPrice(Product dto, Double width, Double length) { + List craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()); + List priceList = new ArrayList<>(); + + int count = dto.getCount(); + int number = dto.getNumber(); + + double base_price = 0; + int sizeIndex = 0; + if (Math.max(length, width) == 200 && Math.min(length, width) == 50) { + sizeIndex = 0; + } + if (Math.max(length, width) == 240 && Math.min(length, width) == 60) { + sizeIndex = 1; + } + if (Math.max(length, width) == 340 && Math.min(length, width) == 70) { + sizeIndex = 2; + } + if (Math.max(length, width) == 410 && Math.min(length, width) == 80) { + sizeIndex = 3; + } + double[][] prices = { + {115.50, 129.50, 168.50, 209.50}, + {115.50, 129.50, 168.50, 209.50}, + {129.00, 149.00, 200.67, 253.67}, + }; + if (craft_list.contains("水滴型")) { + prices = new double[][]{ + {115.50, 129.50, 168.50, 209.50}, + {115.50, 129.50, 168.50, 209.50}, + {129.00, 149.00, 200.67, 253.67}, + }; + } + Product pro = new Product(); + pro.setCount(count); + pro.setNumber(number); + pro.setPrice(Math.ceil((Math.max(prices[Integer.parseInt(dto.getKind())][sizeIndex] * count * number, 30)))); + priceList.add(pro); + return priceList; + } + private List getSplintPrice(Product dto, Double width, Double length) { List craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()); List priceList = new ArrayList<>(); @@ -4668,12 +4712,13 @@ public class ProductService { return priceList; } else if ("5".equals(dto.getK())) { - int[] counts = {100, 200, 500, 1000, 2000, 5000, 10000, 50000, 100000}; + int[] counts = {100, 200, 300, 500, 1000, 2000, 5000, 10000, 50000, 100000}; double[][] prices = { - {140, 190, 380, 690, 1330, 3110, 5980, 27540, 51430}, - {150, 230, 460, 850, 1640, 3790, 7320, 34060, 64290}, - {160, 240, 500, 930, 1790, 4170, 8060, 36960, 70000}, - {170, 270, 560, 1040, 2000, 4700, 8960, 41310, 78580}, + {140, 190, 253, 380, 690, 1330, 3110, 5980, 27540, 51430}, + {150, 230, 307, 460, 850, 1640, 3790, 7320, 34060, 64290}, + {160, 240, 327, 500, 930, 1790, 4170, 8060, 36960, 70000}, + {170, 270, 367, 560, 1040, 2000, 4700, 8960, 41310, 78580}, + {200, 320, 440, 680, 1290, 2490, 4960, 11200, 51600, 98160}, }; if (craft_list.contains("单色") && craft_list.contains("双面")) { prices = new double[][]{ @@ -4686,19 +4731,20 @@ public class ProductService { } if (craft_list.contains("彩色") && craft_list.contains("单面")) { prices = new double[][]{ - {150, 198, 363, 691, 1329, 3215, 6286, 30001, 57143}, - {166, 214, 439, 838, 1615, 3858, 7572, 36429, 70000}, - {175, 253, 477, 911, 1758, 4215, 8286, 39286, 75715}, - {183, 276, 537, 1014, 1958, 4715, 9286, 44286, 85715}, + {150, 198, 253, 363, 691, 1329, 3215, 6286, 30001, 57143}, + {166, 214, 289, 439, 838, 1615, 3858, 7572, 36429, 70000}, + {175, 253, 328, 477, 911, 1758, 4215, 8286, 39286, 75715}, + {183, 276, 363, 537, 1014, 1958, 4715, 9286, 44286, 85715}, + {215, 343, 445, 650, 1215, 2415, 5800, 11430, 54570, 105715}, }; } if (craft_list.contains("彩色") && craft_list.contains("双面")) { prices = new double[][]{ - {233, 277, 454, 838, 1472, 3543, 6929, 33115, 63272}, - {316, 293, 530, 985, 1758, 4229, 8272, 39543, 75558}, - {325, 333, 568, 1058, 1901, 4572, 8943, 42758, 81700}, - {333, 355, 628, 1161, 2100, 5043, 9872, 47258, 90300}, - {366, 406, 740, 1397, 2558, 6143, 12029, 57543, 109958}, + {233, 277, 336, 454, 838, 1472, 3543, 6929, 33115, 63272}, + {316, 293, 372, 530, 985, 1758, 4229, 8272, 39543, 75558}, + {325, 333, 411, 568, 1058, 1901, 4572, 8943, 42758, 81700}, + {333, 355, 446, 628, 1161, 2100, 5043, 9872, 47258, 90300}, + {366, 406, 517, 740, 1397, 2558, 6143, 12029, 57543, 109958}, }; } double baseRate = 0; diff --git a/src/main/webapp/views/product/beachFlag.jsp b/src/main/webapp/views/product/beachFlag.jsp new file mode 100644 index 0000000..7e88b30 --- /dev/null +++ b/src/main/webapp/views/product/beachFlag.jsp @@ -0,0 +1,334 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + +
+
+

沙滩旗

+
+
+ +

+ 材质 +

+
+ +
+ +

+ 尺寸(CM/厘米) 旗杆尺寸:2.8m +

+
+ +
+

+ 数量(个) +

+
+ +
+

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+

+ 工艺 整套配件:旗杆,底座,水袋,旗面 +

+
+
+ 形状: + + +
+
+ 裁切工艺: + +
+
+ 常见工艺: + +
+
+
+ + +
+
+
+ + +
+

计算结果- + +

+
+ + <%@include file="../acountExpressFee.jsp" %> +
+
+
+
+
+
+
+ +
+
+ +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/handBag.jsp b/src/main/webapp/views/product/handBag.jsp index a42abfb..83f1b3e 100644 --- a/src/main/webapp/views/product/handBag.jsp +++ b/src/main/webapp/views/product/handBag.jsp @@ -124,6 +124,7 @@ +

@@ -562,7 +563,7 @@ } } $(".lbstd select[name='count']").empty().append(html) - $(".lbstd select[name='kind2Value']").empty().append(sizeHtml) + //$(".lbstd select[name='kind2Value']").empty().append(sizeHtml) form.render(); }) // 自定义数量