diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 3fd9bce..345b9a2 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -2073,6 +2073,9 @@ public class ProductService { // 产品价格倍数 for (Product product : priceList) { product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + if ("菜单".equals(dto.getKind2Label())) { + product.setPrice(product.getPrice() + 10); + } } // 工艺----如果有覆膜(亮膜哑膜价格一致) diff --git a/src/main/java/lingtao/net/util/PriceUtils.java b/src/main/java/lingtao/net/util/PriceUtils.java index 63fb258..fbe42fd 100644 --- a/src/main/java/lingtao/net/util/PriceUtils.java +++ b/src/main/java/lingtao/net/util/PriceUtils.java @@ -986,8 +986,36 @@ public class PriceUtils { } if ("6".equals(kind)) { if ("无".equals(kind2)) { - double priceArr[] = {50, 34, 27, 27, 26, 25}; - list = acountTag600Price(area, count, priceArr, shengzi, flag, list); + double price = 0; + int[][] prices = { + {144, 148, 166, 188, 193, 210, 232, 249, 251, 273, 317, 392, 464, 476, 674, 1028, 1802}, + {228, 238, 248, 255, 256, 258, 260, 268, 270, 278, 322, 397, 469, 481, 679, 1033, 1807}, + {330, 345, 350, 380, 386, 390, 420, 428, 430, 465, 538, 665, 780, 800, 1108, 1665, 2920}, + {480, 520, 530, 560, 568, 580, 591, 629, 633, 686, 791, 971, 1141, 1170, 1644, 2486, 4329}, + {800, 820, 860, 870, 880, 900, 955, 1016, 1023, 1107, 1276, 1563, 1838, 1885, 2645, 3997, 6955}, + {1400, 1430, 1450, 1527, 1560, 1690, 1852, 1969, 1982, 2145, 2470, 3022, 3549, 3640, 5102, 7702, 13390} + }; + int[] count_list = {500, 1000, 2000, 3000, 5000, 10000}; + double[] areas = {16, 25, 30, 35, 36, 40, 45, 48.6, 49, 54, 64, 81, 97.2, 100, 145.8, 225, 400}; + for (int i = 0; i < count_list.length; i++) { + int count_item = count_list[i]; + if (list.size() > 2) { + break; + } + if (count > count_item) { + continue; + } + int count_index = Arrays.binarySearch(count_list, count_item); + price = 0; + if (count_index >= 0) { + price = new PriceUtils().TablePrice(area * 1000, prices[count_index], areas); + } + Product product = new Product(); + product.setCount(count_item); + product.setPrice(Math.ceil(price)); + list.add(product); + } + } else if ("单面烫黄金".equals(kind2)) { double priceArr[] = {68, 48, 37, 36, 35, 34}; list = acountTag600Price(area, count, priceArr, shengzi, flag, list); diff --git a/src/main/java/lingtao/net/util/ZsPrice.java b/src/main/java/lingtao/net/util/ZsPrice.java index 8d3c92f..03499d7 100644 --- a/src/main/java/lingtao/net/util/ZsPrice.java +++ b/src/main/java/lingtao/net/util/ZsPrice.java @@ -40,6 +40,9 @@ public class ZsPrice { double price = 60; double l = 438.0; double w = 304.0; + if ("10".equals(dto.getKindValue())) { + price = 90; + } if ((length < 8.55 && width < 5.4) || (width < 8.55 && length < 5.4)) { length = 8.55; width = 5.4; @@ -53,7 +56,7 @@ public class ZsPrice { // 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个 int num = (int) Math.ceil(count * number / max); if ("10".equals(dto.getKindValue())) { - price += (num - 1) * 25; + price += (num - 1) * 30; } else { price += (num - 1) * 15; } diff --git a/src/main/webapp/views/product/orders.jsp b/src/main/webapp/views/product/orders.jsp new file mode 100644 index 0000000..ad34d59 --- /dev/null +++ b/src/main/webapp/views/product/orders.jsp @@ -0,0 +1,383 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +
+ +尺寸(CM/厘米) 输入格式: 长 * 宽 - +<%-- --%> diff --git a/src/main/webapp/views/product/tags.jsp b/src/main/webapp/views/product/tags.jsp index e84c1d2..f6a4ed7 100644 --- a/src/main/webapp/views/product/tags.jsp +++ b/src/main/webapp/views/product/tags.jsp @@ -41,7 +41,7 @@
尺寸(CM/厘米) 输入格式: 长 * 宽 - +<%-- --%>