修改冰箱贴价格
This commit is contained in:
@@ -6250,32 +6250,86 @@ public class ProductService {
|
|||||||
String cailiao = dto.getCailiao();
|
String cailiao = dto.getCailiao();
|
||||||
double price = 0;
|
double price = 0;
|
||||||
double min_price = 50;
|
double min_price = 50;
|
||||||
double last_price = 1000;
|
|
||||||
int count = dto.getCount();
|
int count = dto.getCount();
|
||||||
int number = dto.getNumber();
|
int number = dto.getNumber();
|
||||||
double area = width * length * dto.getCount() / 10000 * dto.getNumber();
|
double area = width * length * dto.getCount() / 10000 * dto.getNumber();
|
||||||
String weight = "";
|
String weight = "";
|
||||||
if ("冰箱贴".equals(dto.getKindValue())) {
|
if ("冰箱贴".equals(dto.getKindValue())) {
|
||||||
|
|
||||||
double[] areas = {0, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 1, 2, 3, 5, 7, 9, 10, 20, 50};
|
double[] areas = {0.0004, 0.0009, 0.0016, 0.0025, 0.0036, 0.0049, 0.0064, 0.0081, 0.01, 0.0121, 0.0169, 0.0196, 0.0225, 0.0256};
|
||||||
int[] prices = {0, 1500, 1480, 1450, 1400, 1380, 1350, 1200, 1100, 1080, 1050, 1000, 1000, 1000, 1000, 1000};
|
int[] counts = {5, 10, 50, 100, 200, 300, 1000, 2000, 3000, 4000, 5000, 10000, 50000};
|
||||||
if ("2.3".equals(cailiao) && carft_list.contains("激光")) {
|
double[][] prices = {
|
||||||
prices = new int[]{0, 1500, 1400, 1350, 1300, 1280, 1250, 1100, 1000, 950, 900, 850, 850, 850, 850, 850};
|
{10.0, 11.0, 12.0, 13.0, 14.5, 16.0, 17.5, 19.0, 21.0, 23.0, 25.0, 27.0, 29.0, 31.0, 33.0},
|
||||||
last_price = 850;
|
{8.0, 9.0, 10.0, 11.0, 12.2, 13.4, 14.6, 15.8, 17.4, 19.0, 20.6, 22.2, 23.8, 25.4, 27.0},
|
||||||
}
|
{5.5, 6.2, 6.9, 7.6, 8.4, 9.2, 10.0, 10.8, 11.9, 13.0, 14.1, 15.2, 16.3, 17.4, 18.5},
|
||||||
if ("4.2".equals(cailiao) && carft_list.contains("CNC")) {
|
{4.5, 5.1, 5.7, 6.3, 7.0, 7.7, 8.4, 9.1, 9.9, 10.7, 11.5, 12.3, 13.1, 13.9, 14.7},
|
||||||
prices = new int[]{0, 1600, 1500, 1480, 1450, 1400, 1380, 1350, 1300, 1250, 1200, 1200, 1200, 1200, 1200, 1200};
|
{3.8, 4.3, 4.8, 5.3, 5.9, 6.5, 7.1, 7.7, 8.4, 9.1, 9.8, 10.5, 11.2, 11.9, 12.6},
|
||||||
last_price = 1200;
|
{3.2, 3.6, 4.0, 4.4, 4.9, 5.4, 5.9, 6.4, 6.9, 7.4, 7.9, 8.4, 8.9, 9.4, 9.9},
|
||||||
|
{2.8, 3.1, 3.4, 3.7, 4.1, 4.5, 4.9, 5.3, 5.7, 6.1, 6.5, 6.9, 7.3, 7.7, 8.1},
|
||||||
|
{2.65, 2.95, 3.25, 3.5, 3.9, 4.28, 4.65, 5.02, 5.4, 5.78, 6.15, 6.52, 6.88, 7.25, 7.62},
|
||||||
|
{2.55, 2.85, 3.15, 3.38, 3.76, 4.12, 4.48, 4.83, 5.19, 5.55, 5.9, 6.25, 6.6, 6.95, 7.3},
|
||||||
|
{2.45, 2.75, 3.05, 3.26, 3.62, 3.96, 4.31, 4.64, 4.98, 5.32, 5.65, 5.98, 6.32, 6.65, 6.98},
|
||||||
|
{2.35, 2.65, 2.95, 3.15, 3.48, 3.8, 4.15, 4.45, 4.77, 5.1, 5.4, 5.72, 6.05, 6.35, 6.66},
|
||||||
|
{2.3, 2.5, 2.7, 2.9, 3.15, 3.4, 3.65, 3.9, 4.2, 4.5, 4.8, 5.1, 5.4, 5.7, 6.0},
|
||||||
|
{2.0, 2.2, 2.4, 2.6, 2.85, 3.1, 3.35, 3.6, 3.85, 4.1, 4.35, 4.6, 4.85, 5.1, 5.35}
|
||||||
|
};
|
||||||
|
if ("4.2".equals(cailiao) && carft_list.contains("激光")) {
|
||||||
|
prices = new double[][]{
|
||||||
|
{10.0, 11.0, 12.0, 13.0, 14.5, 16.0, 17.5, 19.0, 21.0, 23.0, 25.0, 27.0, 29.0, 31.0, 33.0},
|
||||||
|
{8.8, 9.9, 11.0, 12.1, 13.42, 14.74, 16.06, 17.38, 19.14, 20.9, 22.66, 24.42, 26.18, 27.94, 29.7},
|
||||||
|
{6.05, 6.82, 7.59, 8.36, 9.24, 10.12, 11.0, 11.88, 13.09, 14.3, 15.51, 16.72, 17.93, 19.14, 20.35},
|
||||||
|
{4.95, 5.61, 6.27, 6.93, 7.7, 8.47, 9.24, 10.01, 10.89, 11.77, 12.65, 13.53, 14.41, 15.29, 16.17},
|
||||||
|
{4.18, 4.73, 5.28, 5.83, 6.49, 7.15, 7.81, 8.47, 9.24, 10.01, 10.78, 11.55, 12.32, 13.09, 13.86},
|
||||||
|
{3.52, 3.96, 4.4, 4.84, 5.39, 5.94, 6.49, 7.04, 7.59, 8.14, 8.69, 9.24, 9.79, 10.34, 10.89},
|
||||||
|
{3.08, 3.41, 3.74, 4.07, 4.51, 4.95, 5.39, 5.83, 6.27, 6.71, 7.15, 7.59, 8.03, 8.47, 8.91},
|
||||||
|
{2.915, 3.245, 3.575, 3.85, 4.29, 4.708, 5.115, 5.522, 5.94, 6.358, 6.765, 7.172, 7.568, 7.975, 8.382},
|
||||||
|
{2.805, 3.135, 3.465, 3.718, 4.136, 4.532, 4.928, 5.313, 5.709, 6.105, 6.49, 6.875, 7.26, 7.645, 8.03},
|
||||||
|
{2.695, 3.025, 3.355, 3.586, 3.982, 4.356, 4.741, 5.104, 5.478, 5.852, 6.215, 6.578, 6.952, 7.315, 7.678},
|
||||||
|
{2.585, 2.915, 3.245, 3.465, 3.828, 4.18, 4.565, 4.895, 5.247, 5.61, 5.94, 6.292, 6.655, 6.985, 7.326},
|
||||||
|
{2.53, 2.75, 2.97, 3.19, 3.465, 3.74, 4.015, 4.29, 4.62, 4.95, 5.28, 5.61, 5.94, 6.27, 6.6},
|
||||||
|
{2.2, 2.42, 2.64, 2.86, 3.135, 3.41, 3.685, 3.96, 4.235, 4.51, 4.785, 5.06, 5.335, 5.61, 5.885}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
if ("2.3".equals(cailiao) && carft_list.contains("CNC")) {
|
if ("2.3".equals(cailiao) && carft_list.contains("CNC")) {
|
||||||
prices = new int[]{0, 1500, 1400, 1380, 1350, 1300, 1280, 1250, 1200, 1150, 1100, 1100, 1100, 1100, 1100, 1100};
|
prices = new double[][]{
|
||||||
last_price = 1100;
|
{10.0, 11.0, 12.0, 13.0, 14.5, 16.0, 17.5, 19.0, 21.0, 23.0, 25.0, 27.0, 29.0, 31.0, 33.0},
|
||||||
|
{8.0, 9.0, 10.0, 11.0, 12.2, 13.4, 14.6, 15.8, 17.4, 19.0, 20.6, 22.2, 23.8, 25.4, 27.0},
|
||||||
|
{5.5, 6.2, 6.9, 7.6, 8.4, 9.2, 10.0, 10.8, 11.9, 13.0, 14.1, 15.2, 16.3, 17.4, 18.5},
|
||||||
|
{4.5, 5.1, 5.7, 6.3, 7.0, 7.7, 8.4, 9.1, 9.9, 10.7, 11.5, 12.3, 13.1, 13.9, 14.7},
|
||||||
|
{3.8, 4.3, 4.8, 5.3, 5.9, 6.5, 7.1, 7.7, 8.4, 9.1, 9.8, 10.5, 11.2, 11.9, 12.6},
|
||||||
|
{3.2, 3.6, 4.0, 4.4, 4.9, 5.4, 5.9, 6.4, 6.9, 7.4, 7.9, 8.4, 8.9, 9.4, 9.9},
|
||||||
|
{2.8, 3.1, 3.4, 3.7, 4.1, 4.5, 4.9, 5.3, 5.7, 6.1, 6.5, 6.9, 7.3, 7.7, 8.1},
|
||||||
|
{2.65, 2.95, 3.25, 3.5, 3.9, 4.28, 4.65, 5.02, 5.4, 5.78, 6.15, 6.52, 6.88, 7.25, 7.62},
|
||||||
|
{2.55, 2.85, 3.15, 3.38, 3.76, 4.12, 4.48, 4.83, 5.19, 5.55, 5.9, 6.25, 6.6, 6.95, 7.3},
|
||||||
|
{2.45, 2.75, 3.05, 3.26, 3.62, 3.96, 4.31, 4.64, 4.98, 5.32, 5.65, 5.98, 6.32, 6.65, 6.98},
|
||||||
|
{2.35, 2.65, 2.95, 3.15, 3.48, 3.8, 4.15, 4.45, 4.77, 5.1, 5.4, 5.72, 6.05, 6.35, 6.66},
|
||||||
|
{2.3, 2.5, 2.7, 2.9, 3.15, 3.4, 3.65, 3.9, 4.2, 4.5, 4.8, 5.1, 5.4, 5.7, 6.0},
|
||||||
|
{2.0, 2.2, 2.4, 2.6, 2.85, 3.1, 3.35, 3.6, 3.85, 4.1, 4.35, 4.6, 4.85, 5.1, 5.35}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
price = PriceUtils.TableUnitPrice(area, prices, areas, last_price);
|
if ("4.2".equals(cailiao) && carft_list.contains("CNC")) {
|
||||||
|
prices = new double[][]{
|
||||||
|
{10.0, 11.0, 12.0, 13.0, 14.5, 16.0, 17.5, 19.0, 21.0, 23.0, 25.0, 27.0, 29.0, 31.0, 33.0},
|
||||||
|
{8.96, 10.08, 11.2, 12.32, 13.664, 15.008, 16.352, 17.696, 19.488, 21.28, 23.072, 24.864, 26.656, 28.448, 30.24},
|
||||||
|
{6.16, 6.944, 7.728, 8.512, 9.408, 10.304, 11.2, 12.096, 13.328, 14.56, 15.792, 17.024, 18.256, 19.488, 20.72},
|
||||||
|
{5.04, 5.712, 6.384, 7.056, 7.84, 8.624, 9.408, 10.192, 11.088, 11.984, 12.88, 13.776, 14.672, 15.568, 16.464},
|
||||||
|
{4.256, 4.816, 5.376, 5.936, 6.608, 7.28, 7.952, 8.624, 9.408, 10.192, 10.976, 11.76, 12.544, 13.328, 14.112},
|
||||||
|
{3.584, 4.032, 4.48, 4.928, 5.488, 6.048, 6.608, 7.168, 7.728, 8.288, 8.848, 9.408, 9.968, 10.528, 11.088},
|
||||||
|
{3.136, 3.472, 3.808, 4.144, 4.592, 5.04, 5.488, 5.936, 6.384, 6.832, 7.28, 7.728, 8.176, 8.624, 9.072},
|
||||||
|
{2.968, 3.304, 3.64, 3.92, 4.368, 4.7936, 5.208, 5.6224, 6.048, 6.4736, 6.888, 7.3024, 7.7056, 8.12, 8.5344},
|
||||||
|
{2.856, 3.192, 3.528, 3.7856, 4.2112, 4.6144, 5.0176, 5.4096, 5.8128, 6.216, 6.608, 7.0, 7.392, 7.784, 8.176},
|
||||||
|
{2.744, 3.08, 3.416, 3.6512, 4.0544, 4.4352, 4.8272, 5.1968, 5.5776, 5.9584, 6.328, 6.6976, 7.0784, 7.448, 7.8176},
|
||||||
|
{2.632, 2.968, 3.304, 3.528, 3.8976, 4.256, 4.648, 4.984, 5.3424, 5.712, 6.048, 6.4064, 6.776, 7.112, 7.4592},
|
||||||
|
{2.576, 2.8, 3.024, 3.248, 3.528, 3.808, 4.088, 4.368, 4.704, 5.04, 5.376, 5.712, 6.048, 6.384, 6.72},
|
||||||
|
{2.24, 2.464, 2.688, 2.912, 3.192, 3.472, 3.752, 4.032, 4.312, 4.592, 4.872, 5.152, 5.432, 5.712, 5.992}
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
price = getAreaCenterUnitPriceOne(counts, count * dto.getNumber(), width * length / 10000, prices, areas);
|
||||||
if (carft_list.contains("激光") && carft_list.contains("滴胶")) {
|
if (carft_list.contains("激光") && carft_list.contains("滴胶")) {
|
||||||
price = price * 1.3;
|
price = price * 1.3;
|
||||||
}
|
}
|
||||||
price = Math.max(price, min_price) + ((dto.getNumber() - 1) * 8);
|
price = Math.max(price * count * dto.getNumber(), min_price) + ((dto.getNumber() - 1) * 8);
|
||||||
weight = df.format(width * length * 4.17 * dto.getCount() * 0.1 * number / 1000 * Double.parseDouble(cailiao));
|
weight = df.format(width * length * 4.17 * dto.getCount() * 0.1 * number / 1000 * Double.parseDouble(cailiao));
|
||||||
}
|
}
|
||||||
if ("对联冰箱贴".equals(dto.getKindValue())) {
|
if ("对联冰箱贴".equals(dto.getKindValue())) {
|
||||||
@@ -7256,6 +7310,58 @@ public class ProductService {
|
|||||||
return priceList;
|
return priceList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<Product> getAreaCenterUnitPrice(int[] count_list, int count, double area, int[][] prices, double[] areas, int number) {
|
||||||
|
List<Product> priceList = new ArrayList<>();
|
||||||
|
boolean isLast = false;
|
||||||
|
if (count > count_list[count_list.length - 1]) {
|
||||||
|
isLast = true;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < count_list.length; i++) {
|
||||||
|
int count_item = count_list[i];
|
||||||
|
if (priceList.size() > 2) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (count > count_item && !isLast) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
int count_index = Arrays.binarySearch(count_list, count_item);
|
||||||
|
double price = 0;
|
||||||
|
if (count_index >= 0) {
|
||||||
|
price = new PriceUtils().TablePrice(area, prices[count_index], areas);
|
||||||
|
}
|
||||||
|
if (isLast) {
|
||||||
|
count_item = count;
|
||||||
|
}
|
||||||
|
Product product = new Product();
|
||||||
|
product.setCount(count_item);
|
||||||
|
product.setPrice(Math.ceil(price * number * count_item));
|
||||||
|
priceList.add(product);
|
||||||
|
}
|
||||||
|
return priceList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private double getAreaCenterUnitPriceOne(int[] count_list, int count, double area, double[][] prices, double[] areas) {
|
||||||
|
List<Product> priceList = new ArrayList<>();
|
||||||
|
boolean isLast = false;
|
||||||
|
double price = 0;
|
||||||
|
if (count > count_list[count_list.length - 1]) {
|
||||||
|
isLast = true;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < count_list.length; i++) {
|
||||||
|
int count_item = count_list[i];
|
||||||
|
if (count > count_item && !isLast) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
int count_index = Arrays.binarySearch(count_list, count_item);
|
||||||
|
if (count_index >= 0) {
|
||||||
|
price = PriceUtils.TableDoublePrice(area, prices[count_index], areas);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
private List<Product> lessSticker(Product dto, String kind, Integer number, Double width, Double length,
|
private List<Product> lessSticker(Product dto, String kind, Integer number, Double width, Double length,
|
||||||
int count, List<Product> stickersList, String role) {
|
int count, List<Product> stickersList, String role) {
|
||||||
double price = 0.0;
|
double price = 0.0;
|
||||||
|
|||||||
@@ -7,26 +7,29 @@ import lingtao.net.bean.Product;
|
|||||||
|
|
||||||
public class FgqPrice {
|
public class FgqPrice {
|
||||||
DecimalFormat df = new DecimalFormat("0.00");
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
/**仿古旗报价*/
|
|
||||||
public List<Product> getPrice(int count, Double area, List<Product> list,String[] craftList, String kind, int num) {
|
/**
|
||||||
|
* 仿古旗报价
|
||||||
|
*/
|
||||||
|
public List<Product> getPrice(int count, Double area, List<Product> list, String[] craftList, String kind, int num) {
|
||||||
Product pro = new Product();
|
Product pro = new Product();
|
||||||
pro = new Product();
|
pro = new Product();
|
||||||
pro.setCount(count);
|
pro.setCount(count);
|
||||||
String craft = craftList[0];
|
String craft = craftList[0];
|
||||||
double dj = 0,wei = 0;
|
double dj = 0, wei = 0;
|
||||||
if(kind.equals("1")) {
|
if (kind.equals("1")) {
|
||||||
if(craft.equals("单面")) {
|
if (craft.equals("单面")) {
|
||||||
dj = 90;
|
dj = 90;
|
||||||
wei = 0.065;
|
wei = 0.065;
|
||||||
}else {
|
} else {
|
||||||
dj = 100;
|
dj = 100;
|
||||||
wei = 0.195;
|
wei = 0.195;
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
if(craft.equals("单面")) {
|
if (craft.equals("单面")) {
|
||||||
dj = 100;
|
dj = 100;
|
||||||
wei = 0.165;
|
wei = 0.165;
|
||||||
}else {
|
} else {
|
||||||
dj = 135;
|
dj = 135;
|
||||||
wei = 0.33;
|
wei = 0.33;
|
||||||
}
|
}
|
||||||
@@ -40,12 +43,27 @@ public class FgqPrice {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**手拉旗报价*/
|
/**
|
||||||
|
* 手拉旗报价
|
||||||
|
*/
|
||||||
public List<Product> getSlqPrice(int count, List<Product> list) {
|
public List<Product> getSlqPrice(int count, List<Product> list) {
|
||||||
|
|
||||||
|
double basePrice = 0;
|
||||||
|
if (count > 0 && count <= 10) {
|
||||||
|
basePrice = 30;
|
||||||
|
} else if (count > 10 && count <= 50) {
|
||||||
|
basePrice = 26;
|
||||||
|
} else if (count > 50 && count <= 100) {
|
||||||
|
basePrice = 22;
|
||||||
|
} else if (count > 100 && count <= 200) {
|
||||||
|
basePrice = 20;
|
||||||
|
} else {
|
||||||
|
basePrice = 18;
|
||||||
|
}
|
||||||
Product pro = new Product();
|
Product pro = new Product();
|
||||||
pro = new Product();
|
pro = new Product();
|
||||||
pro.setCount(count);
|
pro.setCount(count);
|
||||||
pro.setPrice(Math.ceil(30 * count));
|
pro.setPrice(Math.ceil(basePrice * count));
|
||||||
list.add(pro);
|
list.add(pro);
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
@@ -55,9 +73,9 @@ public class FgqPrice {
|
|||||||
Product pro = new Product();
|
Product pro = new Product();
|
||||||
pro = new Product();
|
pro = new Product();
|
||||||
pro.setCount(count);
|
pro.setCount(count);
|
||||||
if(type == 1) {
|
if (type == 1) {
|
||||||
pro.setPrice(Math.ceil(16 * count));
|
pro.setPrice(Math.ceil(16 * count));
|
||||||
}else {
|
} else {
|
||||||
pro.setPrice(Math.ceil(12 * count));
|
pro.setPrice(Math.ceil(12 * count));
|
||||||
}
|
}
|
||||||
list.add(pro);
|
list.add(pro);
|
||||||
|
|||||||
@@ -920,6 +920,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
span_result += '免费设计,全国包邮(偏远地区除外)\n'
|
span_result += '免费设计,全国包邮(偏远地区除外)\n'
|
||||||
|
if(window.parent.system_isGai){
|
||||||
|
span_result +="\n亲 现在下单可以参加淘宝活动8.5折折扣哦!"
|
||||||
|
}
|
||||||
// if (!craftSheng) {
|
// if (!craftSheng) {
|
||||||
// span_result += '送通用吊绳'
|
// span_result += '送通用吊绳'
|
||||||
// } else {
|
// } else {
|
||||||
|
|||||||
Reference in New Issue
Block a user