新增香薰卡工艺,新增插旗材质,新增刮刮卡烫金,新增优惠卷打码工艺,新增插卡工艺,修改外卖盒,修改贺卡价格,修改不干胶价格
This commit is contained in:
@@ -311,7 +311,7 @@ public class ProductService {
|
||||
priceList = StickersDoublePrice.getPrice(length, width, count, number);
|
||||
return priceList;
|
||||
} else if ("插旗".equals(dto.getStickerKind())) {
|
||||
if (!"250克白卡纸对裱".equals(kind)) {
|
||||
if ("铜版纸不干胶".equals(kind)) {
|
||||
dto.setKindValue("0");
|
||||
dto.setLength(length);
|
||||
dto.setWidth(width);
|
||||
@@ -326,6 +326,19 @@ public class ProductService {
|
||||
}
|
||||
priceList = normalSticker(dto, "0", number, area, width, length, count, oldKind, priceList);
|
||||
|
||||
if (priceList.size() >= 3) {
|
||||
priceList = priceList.subList(0, 3);
|
||||
}
|
||||
} else if ("PVC不干胶".equals(kind)) {
|
||||
if (length > 20 && length < 21) {
|
||||
length = Math.ceil(length);
|
||||
area = length * width / 10000;
|
||||
}
|
||||
if (width > 20 && width < 21) {
|
||||
width = Math.ceil(width);
|
||||
area = length * width / 10000;
|
||||
}
|
||||
priceList = normalSticker(dto, "1", number, area, width, length, count, oldKind, priceList);
|
||||
if (priceList.size() >= 3) {
|
||||
priceList = priceList.subList(0, 3);
|
||||
}
|
||||
@@ -462,7 +475,7 @@ public class ProductService {
|
||||
}
|
||||
}
|
||||
|
||||
if ("覆哑膜".equals(dto.getCraftMo()) && !"1".equals(kind) && !("插旗".equals(dto.getStickerKind()) && "铜版纸不干胶".equals(kind))) {
|
||||
if ("覆哑膜".equals(dto.getCraftMo()) && !"1".equals(kind) && !("插旗".equals(dto.getStickerKind()) && ("铜版纸不干胶".equals(kind) || "PVC不干胶".equals(kind)))) {
|
||||
for (Product product : priceList) {
|
||||
product.setPrice(Math.ceil(product.getPrice() * 1.2));
|
||||
}
|
||||
@@ -650,7 +663,25 @@ public class ProductService {
|
||||
priceList = priceList.subList(0, 4);
|
||||
}
|
||||
List<String> crafts_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
||||
|
||||
if ("0".equals(kind) && (crafts_list.contains("击凸") || crafts_list.contains("压凹"))) {
|
||||
priceList = new ArrayList<>();
|
||||
Product product = new Product();
|
||||
int[] counts = {200, 500, 1000, 2000, 3000, 5000, 10000, 20000, 30000};
|
||||
double[] base_price = {180, 200, 220, 400, 550, 880, 1580, 2844, 4266};
|
||||
int num = getNum(length, width);
|
||||
for (int i = 0; i < counts.length; i++) {
|
||||
product = new Product();
|
||||
if (counts[i] < dto.getCount()) {
|
||||
continue;
|
||||
}
|
||||
if (priceList.size() > 3) {
|
||||
break;
|
||||
}
|
||||
product.setPrice(Math.ceil(base_price[i] * num * 0.9 * number));
|
||||
product.setCount(counts[i]);
|
||||
priceList.add(product);
|
||||
}
|
||||
}
|
||||
// 根据款数重新算价格/计算重量
|
||||
for (Product product : priceList) {
|
||||
product.setPrice(Math.floor(product.getPrice() * number));
|
||||
@@ -658,7 +689,6 @@ public class ProductService {
|
||||
product.setPrice(Math.floor(product.getPrice() + Math.max(10, product.getCount() * 0.1)));
|
||||
}
|
||||
if (crafts_list.contains("弹力绳捆")) {
|
||||
|
||||
product.setPrice(Math.floor(product.getPrice() + Math.ceil(product.getCount() * 20.0 / 5000) * 10));
|
||||
}
|
||||
product.setWeight(df.format(number * length * width * product.getCount() * 0.00003));
|
||||
@@ -706,10 +736,7 @@ public class ProductService {
|
||||
dto.setLength(length);
|
||||
dto.setWidth(width);
|
||||
int tempNumber = dto.getNumber();
|
||||
List<String> craftList = null;
|
||||
if (!StringUtils.isEmpty(dto.getCraft())) {
|
||||
craftList = new ArrayList<>(Arrays.asList(dto.getCraft()));
|
||||
}
|
||||
List<String> craftList = !StringUtils.isEmpty(dto.getCraft()) ? new ArrayList<>(Arrays.asList(dto.getCraft())) : new ArrayList<>();
|
||||
Boolean isMq = false;
|
||||
if (craftList.contains("模切")) {
|
||||
dto.setNumber(1);
|
||||
@@ -717,8 +744,15 @@ public class ProductService {
|
||||
}
|
||||
priceList = new CouponPrice().getCouponPrice(min, dto, priceList, count, craftList);
|
||||
craftList.remove("模切");
|
||||
dto.setCraft(craftList.toArray(new String[craftList.size()]));
|
||||
// getCraft(dto, priceList, length * 10, width * 10, min);
|
||||
List<String> tang_craft = new ArrayList<>();
|
||||
if (craftList.contains("单面烫金")) {
|
||||
tang_craft.add("单面烫金");
|
||||
}
|
||||
if (craftList.contains("双面烫金")) {
|
||||
tang_craft.add("双面烫金");
|
||||
}
|
||||
dto.setCraft(tang_craft.toArray(new String[tang_craft.size()]));
|
||||
getCraft(dto, priceList, length * 10, width * 10, min);
|
||||
for (Product product : priceList) {
|
||||
double carft_price = 0;
|
||||
if (craftList.contains("压痕")) {
|
||||
@@ -2500,7 +2534,7 @@ public class ProductService {
|
||||
weight = 0.0;
|
||||
switch (kind) {
|
||||
case "0":
|
||||
weight = 0.08;
|
||||
weight = 0.157;
|
||||
break;
|
||||
case "1":
|
||||
weight = 0.25;
|
||||
@@ -2515,7 +2549,7 @@ public class ProductService {
|
||||
// 根据款数重新算价格/计算重量
|
||||
for (Product product : priceList) {
|
||||
product.setPrice(Math.floor(product.getPrice() * number));
|
||||
product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * 0.86 * weight));
|
||||
product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * weight));
|
||||
}
|
||||
return priceList;
|
||||
// 腰封200克/157克
|
||||
@@ -5056,7 +5090,7 @@ public class ProductService {
|
||||
{60, 70, 90, 100, 105, 110, 150, 200, 260, 430, 550, 690, 2020, 3080, 5950},
|
||||
{83, 93, 113, 120, 124, 128, 200, 300, 371, 595, 779, 1041, 3108, 4866, 9669},
|
||||
{83, 93, 113, 120, 124, 128, 200, 300, 371, 595, 779, 1041, 3108, 4866, 9669},
|
||||
{153, 163, 203, 200, 200, 202, 250, 350, 450, 650, 850, 1150, 3250, 4950, 9990},
|
||||
{153, 163, 200, 210, 220, 230, 250, 350, 450, 650, 850, 1150, 3250, 4950, 9990},
|
||||
};
|
||||
int j = 0;
|
||||
if ("1".equals(dto.getKind())) {
|
||||
@@ -5673,6 +5707,9 @@ public class ProductService {
|
||||
double num = Math.ceil(dto.getCount() / max);
|
||||
double craft_price = 0;
|
||||
double bao_price = 0;
|
||||
if (carftList.contains("打码")) {
|
||||
bao_price += Math.max(Math.ceil(0.2 * dto.getCount() * dto.getNumber()), 15);
|
||||
}
|
||||
if (carftList.contains("单独包装")) {
|
||||
bao_price += Math.ceil(0.2 * dto.getCount() * dto.getNumber());
|
||||
}
|
||||
@@ -5953,7 +5990,7 @@ public class ProductService {
|
||||
{250, 250, 250, 250, 250, 250, 250, 250, 250, 266, 273, 275, 278, 330, 360, 370, 429, 442, 640, 655, 825, 877},
|
||||
{370, 370, 370, 370, 370, 370, 370, 370, 370, 371, 372, 373, 375, 480, 500, 515, 545, 632, 800, 886, 1030, 1240},
|
||||
{510, 510, 510, 510, 510, 510, 510, 510, 510, 589, 600, 605, 610, 750, 800, 820, 932, 1022, 1160, 1458, 1488, 2000},
|
||||
{945, 945, 945, 945, 945, 945, 945, 945, 945, 1030, 1040, 1045, 1050, 1200, 1440, 1460, 1798, 2202, 2400, 2950, 3012, 4000},
|
||||
{945, 945, 945, 945, 945, 945, 945, 945, 945, 1030, 1040, 1045, 1050, 1200, 1440, 1460, 1798, 2000, 2400, 2950, 3012, 4000},
|
||||
};
|
||||
int[] count_list = {200, 500, 1000, 2000, 3000, 5000, 10000};
|
||||
double[] areas = {4, 16, 25, 30, 35, 36, 40, 45, 48.60, 49, 54, 64, 81, 97.20, 100, 145.80, 172.8, 194.4, 224, 288, 294, 400};
|
||||
@@ -7293,6 +7330,9 @@ public class ProductService {
|
||||
} else {
|
||||
danjia = 0.1;
|
||||
}
|
||||
if(dto.getPcount() == 3){
|
||||
danjia = 0.5;
|
||||
}
|
||||
if ("上下编码".equals(dto.getBianma())) {
|
||||
for (Product product : priceList) {
|
||||
product.setPrice(Math.ceil(product.getPrice() + (danjia * product.getCount() * 2 > 120 ? danjia * product.getCount() * 2 : 120)));
|
||||
|
||||
Reference in New Issue
Block a user