diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index ec34e6d..ca459df 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -3983,6 +3983,11 @@ public class ProductService { product.setPrice(Math.floor(product.getPrice() * 1.06)); } } + for (int i = 0; i < priceList.size(); i++) { + if (priceList.get(i).getCount() == 500) { + priceList.get(i).setPrice(Math.floor(priceList.get(i + 1).getPrice() - 5)); + } + } } // 根据款数重新算价格 for (Product product : priceList) { @@ -4584,27 +4589,8 @@ public class ProductService { } return priceList; case "透卡": - prices = new int[][]{ - {136, 163, 177, 190, 197, 227, 257, 303, 333, 407, 430}, - {193, 250, 277, 300, 313, 373, 433, 530, 587, 733, 780}, - {250, 337, 373, 410, 430, 520, 613, 757, 840, 1063, 1133}, - {307, 423, 473, 523, 547, 670, 790, 983, 1097, 1390, 1483}, - {333, 463, 520, 573, 603, 737, 873, 1090, 1210, 1540, 1643}, - {490, 697, 783, 873, 917, 1133, 1350, 1693, 1890, 2417, 2580}, - {533, 760, 857, 953, 1003, 1237, 1477, 1853, 2067, 2643, 2823}, - {990, 1440, 1633, 1830, 1927, 2397, 2873, 3627, 4057, 5207, 5567}, - {2007, 2943, 3347, 3747, 3950, 4927, 5910, 7473, 8367, 10743, 11490}, - {3013, 4413, 5013, 5613, 5913, 7373, 8847, 11180, 12513, 14077, 16007}, - }; - count_list = new int[]{100, 200, 300, 400, 500, 800, 1000, 2000, 5000, 10000}; - areas = new double[]{22.5, 35.1, 40.5, 45.9, 48.6, 67.75, 75, 96, 108, 140, 150}; - area = length * width; - priceList = getAreaCenterPrice(count_list, count, area, prices, areas, number); - for (Product product : priceList) { - product.setWeight(df.format(width / 100 * length / 100 * product.getCount() * 0.48 * 1.4)); - } - return priceList; + return getPETPrice(dto, width, length); case "澜达海报": //铜版纸200g (售价) prices = new int[][]{ @@ -4667,6 +4653,33 @@ public class ProductService { return null; } + private List getPETPrice(Product dto, double length, double width) { + int[][] prices = new int[][]{ + {136, 163, 177, 190, 197, 227, 257, 303, 333, 407, 430}, + {193, 250, 277, 300, 313, 373, 433, 530, 587, 733, 780}, + {250, 337, 373, 410, 430, 520, 613, 757, 840, 1063, 1133}, + {307, 423, 473, 523, 547, 670, 790, 983, 1097, 1390, 1483}, + {333, 463, 520, 573, 603, 737, 873, 1090, 1210, 1540, 1643}, + {490, 697, 783, 873, 917, 1133, 1350, 1693, 1890, 2417, 2580}, + {533, 760, 857, 953, 1003, 1237, 1477, 1853, 2067, 2643, 2823}, + {990, 1440, 1633, 1830, 1927, 2397, 2873, 3627, 4057, 5207, 5567}, + {2007, 2943, 3347, 3747, 3950, 4927, 5910, 7473, 8367, 10743, 11490}, + {3013, 4413, 5013, 5613, 5913, 7373, 8847, 11180, 12513, 14077, 16007}, + }; + int[] count_list = new int[]{100, 200, 300, 400, 500, 800, 1000, 2000, 5000, 10000}; + double[] areas = new double[]{22.5, 35.1, 40.5, 45.9, 48.6, 67.75, 75, 96, 108, 140, 150}; + double area = length * width; + List priceList = getAreaCenterPrice(count_list, dto.getCount(), area, prices, areas, dto.getNumber()); + List carftList = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()); + for (Product product : priceList) { + product.setWeight(df.format(width / 100 * length / 100 * product.getCount() * 0.48 * 1.4)); + if (carftList.contains("装opp袋")) { + product.setPrice(Math.ceil(product.getPrice() + product.getCount() * 0.33)); + } + } + return priceList; + } + private List getCheTiePrice(Product dto, double length, double width) { double minPrice = 35; length = length / 100; @@ -4944,37 +4957,37 @@ public class ProductService { private List getPVCStickerPrice(Product dto, double width, double length) { int[][] prices = new int[][]{ - {85, 93, 101, 109, 117, 125, 133, 141, 149, 157, 165, 173, 181, 189, 197, 205, 213, 221}, - {86, 94, 102, 110, 118, 126, 134, 142, 150, 158, 166, 174, 182, 190, 198, 206, 214, 222}, - {87, 95, 103, 111, 119, 127, 135, 143, 151, 159, 167, 175, 183, 191, 199, 207, 215, 223}, - {88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224}, - {89, 97, 105, 113, 121, 129, 137, 145, 153, 161, 169, 177, 185, 193, 201, 209, 217, 225}, - {90, 98, 106, 114, 122, 130, 138, 146, 154, 162, 170, 178, 186, 194, 202, 210, 218, 226}, - {91, 99, 107, 115, 123, 131, 139, 147, 155, 163, 171, 179, 187, 195, 203, 211, 219, 227}, - {92, 100, 108, 116, 124, 132, 140, 148, 156, 164, 172, 180, 188, 196, 204, 212, 220, 228}, + {85, 86, 86, 87, 88, 89, 90, 95, 95, 95, 177, 189, 246, 331, 1274, 1104, 1537, 2247}, + {90, 91, 91, 92, 93, 94, 95, 100, 100, 100, 182, 194, 251, 336, 1279, 1109, 1542, 2252}, + {119, 120, 120, 120, 120, 120, 120, 120, 133, 146, 224, 280, 362, 478, 1382, 1584, 2645, 3120}, + {143, 151, 158, 163, 167, 171, 175, 191, 208, 225, 359, 503, 620, 833, 2522, 2925, 4884, 5754}, + {204, 211, 218, 223, 225, 227, 230, 240, 258, 272, 451, 615, 729, 986, 3060, 3904, 7204, 10802}, + {306, 324, 324, 351, 351, 351, 351, 351, 394, 436, 811, 1004, 1219, 1554, 4508, 6315, 11240, 13230}, + {485, 496, 506, 512, 514, 516, 517, 524, 663, 802, 1224, 1628, 1967, 2595, 7803, 12229, 22462, 26432}, + {692, 718, 744, 773, 803, 833, 864, 1000, 1195, 1390, 2406, 3162, 3857, 5160, 15626, 24459, 41721, 48082}, }; if ("覆亮膜".equals(dto.getCraftMo())) { prices = new int[][]{ - {229, 237, 245, 253, 261, 269, 277, 285, 293, 301, 309, 317, 325, 333, 341, 349, 357, 365}, - {230, 238, 246, 254, 262, 270, 278, 286, 294, 302, 310, 318, 326, 334, 342, 350, 358, 366}, - {231, 239, 247, 255, 263, 271, 279, 287, 295, 303, 311, 319, 327, 335, 343, 351, 359, 367}, - {232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320, 328, 336, 344, 352, 360, 368}, - {233, 241, 249, 257, 265, 273, 281, 289, 297, 305, 313, 321, 329, 337, 345, 353, 361, 369}, - {234, 242, 250, 258, 266, 274, 282, 290, 298, 306, 314, 322, 330, 338, 346, 354, 362, 370}, - {235, 243, 251, 259, 267, 275, 283, 291, 299, 307, 315, 323, 331, 339, 347, 355, 363, 371}, - {236, 244, 252, 260, 268, 276, 284, 292, 300, 308, 316, 324, 332, 340, 348, 356, 364, 372}, + {85, 86, 86, 87, 88, 89, 90, 95, 95, 95, 177, 189, 246, 331, 1274, 1104, 1537, 2247}, + {90, 91, 91, 92, 93, 94, 95, 100, 100, 100, 182, 194, 251, 336, 1279, 1109, 1542, 2252}, + {119, 120, 120, 120, 120, 120, 120, 120, 133, 146, 224, 280, 362, 478, 1382, 1584, 2645, 3120}, + {143, 151, 158, 163, 167, 171, 175, 191, 208, 225, 359, 503, 620, 833, 2522, 2925, 4884, 5754}, + {204, 211, 218, 223, 225, 227, 230, 240, 258, 272, 451, 615, 729, 986, 3060, 3904, 7204, 10802}, + {306, 324, 324, 351, 351, 351, 351, 351, 394, 436, 811, 1004, 1219, 1554, 4508, 6315, 11240, 13230}, + {485, 496, 506, 512, 514, 516, 517, 524, 663, 802, 1224, 1628, 1967, 2595, 7803, 12229, 22462, 26432}, + {692, 718, 744, 773, 803, 833, 864, 1000, 1195, 1390, 2406, 3162, 3857, 5160, 15626, 24459, 41721, 48082}, }; } if ("覆哑膜".equals(dto.getCraftMo())) { prices = new int[][]{ - {373, 381, 389, 397, 405, 413, 421, 429, 437, 445, 453, 461, 469, 477, 485, 493, 501, 509}, - {374, 382, 390, 398, 406, 414, 422, 430, 438, 446, 454, 462, 470, 478, 486, 494, 502, 510}, - {375, 383, 391, 399, 407, 415, 423, 431, 439, 447, 455, 463, 471, 479, 487, 495, 503, 511}, - {376, 384, 392, 400, 408, 416, 424, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, 512}, - {377, 385, 393, 401, 409, 417, 425, 433, 441, 449, 457, 465, 473, 481, 489, 497, 505, 513}, - {378, 386, 394, 402, 410, 418, 426, 434, 442, 450, 458, 466, 474, 482, 490, 498, 506, 514}, - {379, 387, 395, 403, 411, 419, 427, 435, 443, 451, 459, 467, 475, 483, 491, 499, 507, 515}, - {380, 388, 396, 404, 412, 420, 428, 436, 444, 452, 460, 468, 476, 484, 492, 500, 508, 516}, + {127, 127, 128, 129, 131, 132, 139, 139, 139, 258, 275, 357, 479, 1837, 1592, 2216, 3238}, + {132, 132, 133, 134, 136, 137, 144, 144, 144, 263, 280, 362, 484, 1842, 1597, 2221, 3243}, + {173, 173, 173, 173, 173, 173, 173, 192, 211, 323, 404, 522, 689, 1991, 2281, 3809, 4493}, + {218, 228, 235, 241, 247, 252, 276, 300, 324, 517, 725, 893, 1200, 3632, 4212, 7033, 8286}, + {304, 314, 322, 324, 327, 332, 346, 372, 392, 650, 886, 1050, 1420, 4407, 5622, 10374, 15555}, + {467, 467, 506, 506, 506, 506, 506, 568, 628, 1168, 1446, 1756, 2238, 6492, 9094, 16186, 19052}, + {715, 729, 738, 741, 744, 745, 755, 955, 1155, 1763, 2345, 2833, 3737, 11237, 17610, 32346, 38063}, + {1034, 1072, 1114, 1157, 1200, 1245, 1440, 1721, 2002, 3465, 4554, 5555, 7431, 22502, 35221, 60079, 69239}, }; } int[] count_list = new int[]{200, 500, 1000, 2000, 3000, 5000, 10000, 20000}; @@ -5621,7 +5634,7 @@ public class ProductService { stickersList = new PVCStickersPrice().acountYinbaiPrice(length, width, stickersList); } // 价格*款数 铜版纸放到外面执行 - if (!"0".equals(dto.getKindValue())) { + if (!"0".equals(dto.getKindValue()) && !"1".equals(kind)) { if (number > 1) { for (Product product : stickersList) { product.setPrice(product.getPrice() * number); diff --git a/src/main/java/lingtao/net/util/PriceUtils.java b/src/main/java/lingtao/net/util/PriceUtils.java index 1b7c247..064b877 100644 --- a/src/main/java/lingtao/net/util/PriceUtils.java +++ b/src/main/java/lingtao/net/util/PriceUtils.java @@ -3564,7 +3564,7 @@ public class PriceUtils { if (area < 7.5) { basePrice = 90; } else { - basePrice = 88; + basePrice = 70; } return Math.max(Math.ceil(area * basePrice), 50); } diff --git a/src/main/webapp/views/main.jsp b/src/main/webapp/views/main.jsp index d7f86f5..3de3d26 100644 --- a/src/main/webapp/views/main.jsp +++ b/src/main/webapp/views/main.jsp @@ -432,6 +432,7 @@
【新增】刻字车贴价格更新
+
【新增】PET透卡新增工艺
diff --git a/src/main/webapp/views/product/chetie.jsp b/src/main/webapp/views/product/chetie.jsp index d4aa319..8b8afc5 100644 --- a/src/main/webapp/views/product/chetie.jsp +++ b/src/main/webapp/views/product/chetie.jsp @@ -203,7 +203,7 @@ }); return false; } - if ((size.split("*")[0] > 120 || size.split("*")[1] > 1000) && (size.split("*")[0] > 120 || size.split("*")[1] > 1000)) { + if ((size.split("*")[0] > 120 || size.split("*")[1] > 1000) && (size.split("*")[1] > 120 || size.split("*")[0] > 1000)) { layer.msg("【刻字车贴】尺寸不能大于120*1000 cm", {offset: ['300px', '300px']}, function () { }); return false; diff --git a/src/main/webapp/views/product/pet.jsp b/src/main/webapp/views/product/pet.jsp index befd7cb..10ef78f 100644 --- a/src/main/webapp/views/product/pet.jsp +++ b/src/main/webapp/views/product/pet.jsp @@ -80,6 +80,10 @@ +
+ 其他工艺: + +