修改卡片工艺
This commit is contained in:
@@ -410,6 +410,22 @@ public class ProductService {
|
||||
oldKind = "13";
|
||||
dto.setKindValue("2");
|
||||
kind = "2";
|
||||
} else if ("17".equals(kind) || "18".equals(kind)) {
|
||||
// 单个产品的面积
|
||||
area = (length + 0.3) * (width + 0.3) / 10000;
|
||||
if ("17".equals(kind)) {
|
||||
kind = "6";
|
||||
}
|
||||
if ("18".equals(kind)) {
|
||||
kind = "7";
|
||||
}
|
||||
priceList = new PriceUtils().rollLabelPrice(kind, area, count, dto.getCraft(), dto.getYinbai(), dto.getCraftTang(), getStickersTanBasePrice(area * 10000));
|
||||
// 根据款数重新算价格/计算重量
|
||||
for (Product product : priceList) {
|
||||
product.setPrice(Math.floor(product.getPrice() * number));
|
||||
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.25));
|
||||
}
|
||||
return priceList;
|
||||
} else if ("15".equals(kind) || "16".equals(kind)) {
|
||||
List<String> craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
||||
|
||||
@@ -1800,7 +1816,7 @@ public class ProductService {
|
||||
}
|
||||
} else {
|
||||
dto.setMaxian(1);
|
||||
getCraft(dto, priceList, null, null, 0);
|
||||
getCraft(dto, priceList, length, width, 0);
|
||||
}
|
||||
// 根据位数重新算价格
|
||||
// 根据款数重新算价格
|
||||
@@ -7786,20 +7802,30 @@ public class ProductService {
|
||||
}
|
||||
}
|
||||
if ("特种纸名片".equals(dto.getProTypeValue()) && craftList.contains("异形模切") && !craftList.contains("单面烫金") && !craftList.contains("双面烫金")) {// 200-500张按照原有的价格乘以3倍 1000-5000张按照原有的价格乘以2.4倍 5000-10000张按照原有的价格乘以2倍
|
||||
double[] prices = {140, 190, 260, 470, 690, 1110, 2190};
|
||||
int[] counts = {200, 500, 1000, 2000, 3000, 5000, 10000};
|
||||
int num = getNum(width, length);
|
||||
if (num == 1) {
|
||||
} else if (num == 2) {
|
||||
prices = new double[]{250, 350, 475, 860, 1250, 2025, 3990};
|
||||
} else if (num == 3) {
|
||||
prices = new double[]{340, 470, 625, 1140, 1650, 2675, 5250};
|
||||
} else if (num == 5) {
|
||||
prices = new double[]{475, 650, 870, 1575, 2290, 3425, 6750};
|
||||
} else if (num == 6) {
|
||||
prices = new double[]{600, 800, 1100, 1900, 2550, 4000, 7900};
|
||||
} else {
|
||||
prices = new double[]{750, 950, 1300, 2500, 3450, 4900, 9400};
|
||||
}
|
||||
for (Product product : priceList) {
|
||||
if (200 <= product.getCount() && product.getCount() <= 500) {
|
||||
product.setPrice(Math.ceil(product.getPrice() * 3));
|
||||
}
|
||||
if (500 < product.getCount() && product.getCount() <= 1000) {
|
||||
product.setPrice(Math.ceil(product.getPrice() * 2.6));
|
||||
}
|
||||
if (1000 < product.getCount() && product.getCount() <= 5000) {
|
||||
product.setPrice(Math.ceil(product.getPrice() * 2.4));
|
||||
}
|
||||
if (5000 < product.getCount() && product.getCount() <= 10000) {
|
||||
product.setPrice(Math.ceil(product.getPrice() * 2));
|
||||
for (int i = 0; i < counts.length; i++) {
|
||||
if (counts[i] == product.getCount()) {
|
||||
product.setPrice(prices[i]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (craftList.contains("异形")) {// 广告扇工艺(选了异形,每把+3毛钱
|
||||
for (Product product : priceList) {
|
||||
|
||||
Reference in New Issue
Block a user