新增卡片工艺
This commit is contained in:
@@ -1140,6 +1140,9 @@ public class ProductService {
|
||||
if (craft_list.contains("内部模切")) {
|
||||
carft_price += 15 * dto.getN_mq_num();
|
||||
}
|
||||
if (craft_list.contains("配印章")) {
|
||||
carft_price += 10 * dto.getPo_number();
|
||||
}
|
||||
//腰封的模切费单独计算
|
||||
product.setPrice(Math.ceil((product.getPrice() + carft_price) * number + Math.max(Math.ceil(moqiePrice * product.getCount() * number), moqiePrice > 0 ? 55 : 0)));
|
||||
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.3 * 0.86));
|
||||
@@ -4272,21 +4275,7 @@ public class ProductService {
|
||||
}
|
||||
return priceList;
|
||||
case "数码PVC":
|
||||
// 价格按照大纸裁
|
||||
priceList = ZsPrice.getSmPrice(count, length, width, priceList, number, dto.getCraft(), dto, role);
|
||||
for (Product product : priceList) {
|
||||
if (dto.getKindValue().equals("1") || dto.getKindValue().equals("2") || dto.getKindValue().equals("3")) {
|
||||
wei = 0.38;
|
||||
} else if (dto.getKindValue().equals("4") || dto.getKindValue().equals("5") || dto.getKindValue().equals("6")) {
|
||||
wei = 0.84;
|
||||
} else if (dto.getKindValue().equals("11") || dto.getKindValue().equals("12") || dto.getKindValue().equals("13")) {
|
||||
wei = 0.76;
|
||||
} else {
|
||||
wei = 1;
|
||||
}
|
||||
product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * number * 1.3));
|
||||
}
|
||||
return priceList;
|
||||
return getsmPVCPrice(dto, width, length, role);
|
||||
case "班旗":
|
||||
priceList = new BqPrice().getPrice(count, length, priceList, number, dto.getCraftShua(), dto.getCraft());
|
||||
List<String> craLists = !StringUtils.isEmpty(dto.getCraft()) ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
||||
@@ -4381,6 +4370,33 @@ public class ProductService {
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<Product> getsmPVCPrice(Product dto, Double width, Double length, String role) {
|
||||
List<String> craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
|
||||
List<Product> priceList = new ArrayList<>();
|
||||
int count = dto.getCount();
|
||||
int number = dto.getNumber();
|
||||
double wei = 0;
|
||||
// 价格按照大纸裁
|
||||
priceList = ZsPrice.getSmPrice(count, length, width, priceList, number, dto.getCraft(), dto, role);
|
||||
for (Product product : priceList) {
|
||||
if (craft_list.contains("菜品夹")) {
|
||||
product.setPrice(Math.ceil(product.getPrice() + dto.getStickNum() * 2));
|
||||
}
|
||||
|
||||
if (dto.getKindValue().equals("1") || dto.getKindValue().equals("2") || dto.getKindValue().equals("3")) {
|
||||
wei = 0.38;
|
||||
} else if (dto.getKindValue().equals("4") || dto.getKindValue().equals("5") || dto.getKindValue().equals("6")) {
|
||||
wei = 0.84;
|
||||
} else if (dto.getKindValue().equals("11") || dto.getKindValue().equals("12") || dto.getKindValue().equals("13")) {
|
||||
wei = 0.76;
|
||||
} else {
|
||||
wei = 1;
|
||||
}
|
||||
product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * number * 1.3));
|
||||
}
|
||||
return priceList;
|
||||
}
|
||||
|
||||
private List<Product> getYaFenPrice(Product dto, Double width, Double length) {
|
||||
List<String> craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
|
||||
List<Product> priceList = new ArrayList<>();
|
||||
@@ -5866,6 +5882,7 @@ public class ProductService {
|
||||
//布钱 +人工+印刷+手提
|
||||
Product pro = null;
|
||||
double lastPrice = 0;
|
||||
int lastCount = 0;
|
||||
for (int i = 0; i < counts.length; i++) {
|
||||
int itemCount = counts[i];
|
||||
double basePrice = unit_prices[base][i];
|
||||
@@ -5873,18 +5890,16 @@ public class ProductService {
|
||||
|
||||
if (itemCount < count) {
|
||||
lastPrice = basePrice;
|
||||
lastCount = itemCount;
|
||||
continue;
|
||||
}
|
||||
if (priceList.size() > 2) {
|
||||
break;
|
||||
}
|
||||
if (priceList.size() == 0 && itemCount != count) {
|
||||
if (lastPrice > 0) {
|
||||
basePrice = (lastPrice + basePrice) / 2;
|
||||
}
|
||||
pro = new Product();
|
||||
pro.setCount(count);
|
||||
pro.setPrice(Math.ceil(basePrice * count * number));
|
||||
pro.setPrice(Math.ceil(new PriceUtils().calcByTargetN(lastCount, lastPrice, itemCount, basePrice, count) * number));
|
||||
priceList.add(pro);
|
||||
}
|
||||
pro = new Product();
|
||||
|
||||
Reference in New Issue
Block a user