|
|
@@ -2442,10 +2442,14 @@ public class ProductService {
|
|
|
pro.setPrice(currentPrice);
|
|
|
priceList.add(pro);
|
|
|
}
|
|
|
-
|
|
|
+ double apprise = 0;
|
|
|
for (Product product : priceList) {
|
|
|
product.setPrice(Math.ceil(product.getPrice() + (number - 1) * 0.5));
|
|
|
product.setWeight(df.format((width + 0.6) * (length + 0.6) * product.getCount() / 10000));
|
|
|
+ if (product.getPrice() < apprise) {
|
|
|
+ product.setPrice(apprise);
|
|
|
+ }
|
|
|
+ apprise = product.getPrice();
|
|
|
}
|
|
|
|
|
|
return priceList;
|
|
|
@@ -3592,7 +3596,7 @@ public class ProductService {
|
|
|
} else {
|
|
|
wei = 0.38;
|
|
|
}
|
|
|
- product.setPrice(Math.floor(product.getPrice() * number * base));
|
|
|
+ product.setPrice(Math.floor(product.getPrice() * base * number));
|
|
|
|
|
|
product.setWeight(df.format(wei * length * width * 1.3 * product.getCount() / 10000 * number));
|
|
|
}
|
|
|
@@ -4938,10 +4942,55 @@ public class ProductService {
|
|
|
return stickersList;
|
|
|
}
|
|
|
|
|
|
+ private List<Product> 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},
|
|
|
+ };
|
|
|
+ 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},
|
|
|
+ };
|
|
|
+ }
|
|
|
+ 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},
|
|
|
+ };
|
|
|
+ }
|
|
|
+ int[] count_list = new int[]{200, 500, 1000, 2000, 3000, 5000, 10000, 20000};
|
|
|
+ double[] areas = new double[]{4, 6, 8, 10, 12, 14, 16, 25, 35, 45, 84, 120, 150, 200, 600, 1000, 2000, 2520};
|
|
|
+ double area = length * width;
|
|
|
+ return getAreaCenterPrice(count_list, dto.getCount(), area, prices, areas, dto.getNumber());
|
|
|
+ }
|
|
|
+
|
|
|
private List<Product> normalSticker(Product dto, String kind, Integer number, Double area, Double width, Double
|
|
|
length, int count, String oldKind, List<Product> stickersList) {
|
|
|
+ //pvc
|
|
|
+ if ("1".equals(kind)) {
|
|
|
+ stickersList = getPVCStickerPrice(dto, width, length);
|
|
|
+ }
|
|
|
// 小于21cm的查询数据库-数量在500以上
|
|
|
- if (width < 21 && length < 21) {
|
|
|
+ else if (width < 21 && length < 21) {
|
|
|
dto.setCount(count);
|
|
|
// 9*5.4以内价格一致(查询数据库)
|
|
|
if ((length <= 9 && width > 5 && width <= 5.4) || (width <= 9 && length > 5 && length <= 5.4)) {
|