From ffe86433a8c3881ee52ed6e3207d84560621fe30 Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Mon, 3 Aug 2026 15:07:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=8B=E4=B8=BE=E7=89=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 41 ++- src/main/webapp/views/product/holdSign.jsp | 296 ++++++++++++++++++ 2 files changed, 336 insertions(+), 1 deletion(-) create mode 100644 src/main/webapp/views/product/holdSign.jsp diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 72adfa9..b81a44b 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -4457,12 +4457,51 @@ public class ProductService { case "弹弹乐": priceList = getPianoMusicPrice(dto, width, length, height); return chucklePrice(role, priceList, dto); + case "手举牌": + priceList = getHoldSignPrice(dto, width, length, height); + return chucklePrice(role, priceList, dto); default: break; } return null; } + private List getHoldSignPrice(Product dto, Double width, Double length, Double height) { + 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 area = width * length * count * number / 10000; + double mini_price = 30; + double price = 0; + if (area <= 0.03) { // 0.01 ≤ A ≤ 0.03 + price = 267 * area; + } else if (area <= 0.06) { // 0.03 < A ≤ 0.06 + price = 8.01 + 175 * (area - 0.03); + } else if (area <= 0.12) { // 0.06 < A ≤ 0.12 + price = 13.26 + 89 * (area - 0.06); + } else if (area <= 0.25) { // 0.12 < A ≤ 0.25 + price = 18.60 + 80 * (area - 0.12); + } else if (area <= 0.64) { // 0.25 < A ≤ 0.64 + price = 29.00 + 70 * (area - 0.25); + } else if (area <= 1.44) { // 0.64 < A ≤ 1.44 + price = 56.30 + 60 * (area - 0.64); + } else if (area <= 2.56) { // 1.44 < A ≤ 2.56 + price = 104.30 + 50 * (area - 1.44); + } else if (area <= 5.76) { // 2.56 < A ≤ 5.76 + price = 160.30 + 42 * (area - 2.56); + } else { // 5.76 < A ≤ 10.24 + price = 294.70 + 36.7 * (area - 5.76); + } + double design_price = number * 10; + Product pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.max(Math.ceil(price), mini_price) + design_price); + priceList.add(pro); + return priceList; + } + private List getPianoMusicPrice(Product dto, Double width, Double length, Double height) { List craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()); List priceList = new ArrayList<>(); @@ -5100,7 +5139,7 @@ public class ProductService { if (craft_list.contains("彩色") && craft_list.contains("双面")) { prices = new double[][]{ {233, 277, 336, 454, 838, 1472, 3543, 6929, 33115, 63272}, - {316, 293, 372, 530, 985, 1758, 4229, 8272, 39543, 75558}, + {316, 393, 472, 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}, diff --git a/src/main/webapp/views/product/holdSign.jsp b/src/main/webapp/views/product/holdSign.jsp new file mode 100644 index 0000000..49ac906 --- /dev/null +++ b/src/main/webapp/views/product/holdSign.jsp @@ -0,0 +1,296 @@ +<%@ 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/厘米) +

+
+ +
+

+ 数量(个) +

+
+ +
+

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+

+ 工艺 +

+
+
+ 印面: + +
+
+
+ + +
+
+
+ + +
+

计算结果- + +

+
+ + <%@include file="../acountExpressFee.jsp" %> +
+
+
+
+
+
+
+ +
+
+ +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file