From e097316fba8904171b159a8c60f35a556d3e80fb Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Fri, 31 Jul 2026 14:07:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=B0=E7=AE=B1=E8=B4=B4?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 73 +++++++++++-------- .../resources/mapper/SysPermissionMapper.xml | 2 +- .../webapp/views/product/fridgeMagnet.jsp | 63 +++++++++++++++- 3 files changed, 107 insertions(+), 31 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 6ee37f8..50baf65 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -7410,6 +7410,40 @@ public class ProductService { return priceList; } + private double getOtherFridgePrice(double width, double length, Product dto, double min_price, List carft_list) { + double price; + String cailiao = dto.getCailiao(); + double last_price = 1000; + double area = width * length * dto.getCount() / 10000 * dto.getNumber(); + if (width * length / 10000 < 0.001) { + double basePrice = 1; + if ("4.2".equals(cailiao)) { + basePrice = 1.5; + } + price = Math.max(basePrice * dto.getCount() * dto.getNumber() + 8 * dto.getNumber(), min_price); + } else { + + 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.2".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; + } + price = PriceUtils.TableUnitPrice(area, prices, areas, last_price); + + } + price = Math.max(price, min_price) + ((dto.getNumber() - 1) * 8); + return price; + } + private List getfridgePrice(Product dto, Double width, Double length, String role) { List carft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()); List priceList = new ArrayList<>(); @@ -7422,35 +7456,16 @@ public class ProductService { double area = width * length * dto.getCount() / 10000 * dto.getNumber(); String weight = ""; if ("冰箱贴".equals(dto.getKindValue())) { - if (width * length / 10000 < 0.001) { - double basePrice = 1; - if ("4.2".equals(cailiao)) { - basePrice = 1.5; - } - price = Math.max(basePrice * count * dto.getNumber() + 8 * dto.getNumber(), min_price); - } else { - - 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.2".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; - } - price = PriceUtils.TableUnitPrice(area, prices, areas, last_price); - if (carft_list.contains("激光") && carft_list.contains("滴胶")) { - price = price * 1.3; - } - + price = getOtherFridgePrice(width, length, dto, min_price, carft_list); + if (carft_list.contains("激光") && carft_list.contains("滴胶")) { + price = price * 1.3; + } + if (carft_list.contains("二层旋转")) { + price += getOtherFridgePrice(dto.getLengthSize(), dto.getWidthSize(), dto, 0, carft_list); + } + if (carft_list.contains("三层旋转")) { + price += getOtherFridgePrice(dto.getLengthTang(), dto.getWidthTang(), dto, 0, carft_list); } - price = Math.max(price, min_price) + ((dto.getNumber() - 1) * 8); weight = df.format(width * length * 4.17 * dto.getCount() * 0.1 * number / 1000 * Double.parseDouble(cailiao)); } @@ -9641,7 +9656,7 @@ public class ProductService { prices = new double[]{200, 280, 380, 688, 1000, 1620, 2420}; } else if (num == 3) { prices = new double[]{272, 376, 500, 912, 1320, 2140, 3100}; - } else if (num == 5) { + } else if (num == 5 || num == 4) { prices = new double[]{380, 520, 696, 1260, 1832, 2740, 4100}; } else if (num == 6) { prices = new double[]{480, 640, 880, 1520, 2040, 3200, 4800}; diff --git a/src/main/resources/mapper/SysPermissionMapper.xml b/src/main/resources/mapper/SysPermissionMapper.xml index 302a0fc..57a78c9 100644 --- a/src/main/resources/mapper/SysPermissionMapper.xml +++ b/src/main/resources/mapper/SysPermissionMapper.xml @@ -55,6 +55,6 @@ select roleId from tbl_sys_user_role where userId = #{userId} ) ) - ORDER BY orderNo ASC,parentId ASC; + ORDER BY orderNo ASC,parentId ASC,perId ASC; \ No newline at end of file diff --git a/src/main/webapp/views/product/fridgeMagnet.jsp b/src/main/webapp/views/product/fridgeMagnet.jsp index e52ff8c..2f39716 100644 --- a/src/main/webapp/views/product/fridgeMagnet.jsp +++ b/src/main/webapp/views/product/fridgeMagnet.jsp @@ -104,6 +104,19 @@ +
+ 旋转工艺: + + + + +
现货背卡尺寸:115*95mm
背纸工艺: @@ -138,7 +151,6 @@