From 1e056a10deac963e4b878fe2aad24a4561ded91d Mon Sep 17 00:00:00 2001
From: zhuyiyi <649091362@qq.com>
Date: Sat, 25 Jul 2026 16:43:38 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=A4=B9=E6=9D=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../lingtao/net/service/ProductService.java | 54 ++++
src/main/webapp/views/product/splint.jsp | 305 ++++++++++++++++++
src/main/webapp/views/product/workPermit.jsp | 6 +-
3 files changed, 361 insertions(+), 4 deletions(-)
create mode 100644 src/main/webapp/views/product/splint.jsp
diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java
index 2437e01..a7f74a0 100644
--- a/src/main/java/lingtao/net/service/ProductService.java
+++ b/src/main/java/lingtao/net/service/ProductService.java
@@ -4425,12 +4425,66 @@ public class ProductService {
case "标识牌":
priceList = getSignboardPrice(dto, width, length);
return chucklePrice(role, priceList, dto);
+ case "夹板":
+ priceList = getSplintPrice(dto, width, length);
+ return chucklePrice(role, priceList, dto);
default:
break;
}
return null;
}
+ 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<>();
+
+ int count = dto.getCount();
+ int number = dto.getNumber();
+
+ int[] end_counts = {1, 5, 10, 50, 100, 200, 500, 1000, 3000, 5000, 10000};
+ int[] start_counts = {1, 1, 5, 10, 50, 100, 200, 500, 1000, 3000, 5000};
+ double[] height_price = {30.00, 30.00, 28.00, 27.00, 26.00, 25.00, 24.00, 23.00, 22.00, 21.00, 20.50};
+ double[] low_price = {30.00, 28.00, 27.00, 26.00, 25.00, 24.00, 23.00, 22.00, 21.00, 20.50, 19.50};
+
+ if (Math.max(width, length) == 32 && Math.min(width, length) == 22) {
+ height_price = new double[]{30.00, 30.00, 27.00, 25.00, 23.00, 21.00, 20.00, 19.00, 18.00, 17.50, 17.00};
+ low_price = new double[]{30.00, 27.00, 25.00, 23.00, 21.00, 20.00, 19.00, 18.00, 17.50, 17.00, 15.75};
+ }
+ double basePrice = 0;
+ if (count > end_counts[end_counts.length - 1]) {
+ if (craft_list.contains("带透明边")) {
+ basePrice = (low_price[low_price.length - 1] + 1) * count;
+ } else {
+ basePrice = low_price[low_price.length - 1] * count;
+ }
+ } else {
+ // 查找匹配的区间
+ for (int i = 0; i < end_counts.length; i++) {
+ if (count <= end_counts[i]) {
+ int startN = start_counts[i];
+ int endN = end_counts[i];
+ double highPrice = height_price[i];
+ double lowPrice = low_price[i];
+ if (craft_list.contains("带透明边")) {
+ highPrice += 1;
+ lowPrice += 1;
+ }
+ basePrice = new PriceUtils().calcByTargetN(startN, highPrice, endN, lowPrice, count);
+ break;
+ }
+ }
+ }
+
+ double design_price = Math.ceil((number) * 0);
+
+ Product pro = new Product();
+ pro.setCount(count);
+ pro.setNumber(number);
+ pro.setPrice(Math.ceil((Math.max(basePrice * number, 30) + design_price)));
+ priceList.add(pro);
+ return priceList;
+ }
+
private List getSignboardPrice(Product dto, Double width, Double length) {
List craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
List priceList = new ArrayList<>();
diff --git a/src/main/webapp/views/product/splint.jsp b/src/main/webapp/views/product/splint.jsp
new file mode 100644
index 0000000..c23b1b8
--- /dev/null
+++ b/src/main/webapp/views/product/splint.jsp
@@ -0,0 +1,305 @@
+<%@ 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" %>
+
+
+
+
+
+<%@include file="/views/copyResult.jsp" %>
+
+
\ No newline at end of file
diff --git a/src/main/webapp/views/product/workPermit.jsp b/src/main/webapp/views/product/workPermit.jsp
index fdb282f..414dfb7 100644
--- a/src/main/webapp/views/product/workPermit.jsp
+++ b/src/main/webapp/views/product/workPermit.jsp
@@ -45,15 +45,13 @@
款数
-
+
客户旺旺
-
+
工艺