新增贺卡opp袋

This commit is contained in:
2025-08-14 17:29:02 +08:00
parent e08fe7a2ea
commit 6cc98d7f16
3 changed files with 133 additions and 61 deletions
@@ -434,7 +434,7 @@ public class ProductService {
}
}
if ("覆哑膜".equals(dto.getCraftMo())) {
if ("覆哑膜".equals(dto.getCraftMo()) && !"1".equals(kind)) {
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * 1.2));
}
@@ -444,12 +444,6 @@ public class ProductService {
priceList = priceList.subList(0, 3);
}
if ("1".equals(kind) && dto.getCraftMo().equals("覆哑膜")) {
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * 1.2));
}
}
if ("13".equals(oldKind)) {
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * 1.2));
@@ -919,6 +913,25 @@ public class ProductService {
if (craft_list.contains("配弹力绳捆")) {
carft_price += 10 * Math.ceil(product.getCount() * 20.0 / 5000);
}
if (craft_list.contains("配弹力绳捆")) {
carft_price += 10 * Math.ceil(product.getCount() * 20.0 / 5000);
}
if (craft_list.contains("opp袋")) {
double carft_base_price = 0;
if ("8*5".equals(dto.getToothpick_size())) {
carft_base_price = 10;
}
if ("10*5".equals(dto.getToothpick_size())) {
carft_base_price = 12;
}
if ("12*5".equals(dto.getToothpick_size())) {
carft_base_price = 14;
}
if ("12*6".equals(dto.getToothpick_size())) {
carft_base_price = 15;
}
carft_price += carft_base_price * Math.ceil(product.getCount() / 1000.0);
}
product.setPrice(Math.floor((product.getPrice() + carft_price) * number));
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.3 * 0.86));
}
@@ -2755,6 +2768,7 @@ public class ProductService {
} else {
max = Math.max(Math.floor(l / length) * Math.floor(w / width), Math.floor(l / width) * Math.floor(w / length));
}
max = Math.max(max, 1);
// 报的数量需要多少张大纸
// 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个
int num = (int) Math.ceil(count * number / max);
@@ -4983,14 +4997,14 @@ public class ProductService {
}
if ("覆哑膜".equals(dto.getCraftMo())) {
prices = new int[][]{
{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},
{125, 127, 127, 128, 129, 131, 132, 139, 139, 139, 258, 275, 357, 479, 1837, 1592, 2216, 3238},
{130, 132, 132, 133, 134, 136, 137, 144, 144, 144, 263, 280, 362, 484, 1842, 1597, 2221, 3243},
{172, 173, 173, 173, 173, 173, 173, 173, 192, 211, 323, 404, 522, 689, 1991, 2281, 3809, 4493},
{206, 218, 228, 235, 241, 247, 252, 276, 300, 324, 517, 725, 893, 1200, 3632, 4212, 7033, 8286},
{294, 304, 314, 322, 324, 327, 332, 346, 372, 392, 650, 886, 1050, 1420, 4407, 5622, 10374, 15555},
{441, 467, 467, 506, 506, 506, 506, 506, 568, 628, 1168, 1446, 1756, 2238, 6492, 9094, 16186, 19052},
{669, 715, 729, 738, 741, 744, 745, 755, 955, 1155, 1763, 2345, 2833, 3737, 11237, 17610, 32346, 38063},
{997, 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};