diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index c16f037..dc1194f 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -4733,12 +4733,45 @@ public class ProductService { return getaromatherapyPrice(dto, width, length); case "金属微章": return getbadgePrice(dto, width, length); + case "冰箱贴": + return getfridgePrice(dto, width, length); default: break; } return null; } + private List getfridgePrice(Product dto, Double width, Double length) { + List carft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()); + List priceList = new ArrayList<>(); + String cailiao = dto.getCailiao(); + double min_price = 50; + double last_price = 1000; + double area = width * length * dto.getCount() / 10000 * dto.getNumber(); + double[] areas = {0, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 1, 2, 3, 5, 7, 9, 10, 20, 50}; + int[] prices = {0, 1500, 1480, 1450, 1400, 1380, 1350, 1200, 1100, 1080, 1050, 1000, 1000, 1000, 1000, 1000}; + if ("2.3".equals(cailiao) && carft_list.contains("激光")) { + prices = new int[]{0, 1500, 1400, 1350, 1300, 1280, 1250, 1100, 1000, 950, 900, 850, 850, 850, 850, 850}; + last_price = 850; + } + if ("4.6".equals(cailiao) && carft_list.contains("CNC")) { + prices = new int[]{0, 1600, 1500, 1480, 1450, 1400, 1380, 1350, 1300, 1250, 1200, 1200, 1200, 1200, 1200, 1200}; + last_price = 1200; + } + if ("2.3".equals(cailiao) && carft_list.contains("CNC")) { + prices = new int[]{0, 1500, 1400, 1380, 1350, 1300, 1280, 1250, 1200, 1150, 1100, 1100, 1100, 1100, 1100, 1100}; + last_price = 1100; + } + double price = PriceUtils.TableUnitPrice(area, prices, areas, last_price); + Product pro = new Product(); + pro.setCount(dto.getCount()); + pro.setNumber(dto.getNumber()); + pro.setPrice(Math.ceil(Math.max(price, min_price) + ((dto.getNumber() - 1) * 8))); + priceList.add(pro); + + return priceList; + } + private List getbadgePrice(Product dto, Double width, Double length) { List carft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()); List priceList = new ArrayList<>(); @@ -4747,6 +4780,7 @@ public class ProductService { double[][] prices_list = { {450, 880, 1700, 3250, 5380, 10000, 14728, 23685, 43103}, }; + int[] count_list = { 50, 100, 200, 500, 1000, 2000, 3000, 5000, 10000 }; diff --git a/src/main/webapp/views/product/fridgeMagnet.jsp b/src/main/webapp/views/product/fridgeMagnet.jsp new file mode 100644 index 0000000..44d1860 --- /dev/null +++ b/src/main/webapp/views/product/fridgeMagnet.jsp @@ -0,0 +1,313 @@ +<%@ 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