edit
This commit is contained in:
@@ -549,7 +549,7 @@ public class ProductService {
|
||||
case "2":
|
||||
// 单个产品的面积
|
||||
area = (length + 0.3) * (width + 0.3) / 10000;
|
||||
priceList = new PriceUtils().rollLabelPrice(kind, area, count, dto.getCraft(), dto.getYinbai());
|
||||
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));
|
||||
@@ -2822,7 +2822,7 @@ public class ProductService {
|
||||
if ("0".equals(kind)) {
|
||||
priceList = new PosterPrice().acountPrice00(kind2, area, count, number);
|
||||
} else if ("1".equals(kind)) {// 室内写真
|
||||
priceList = new PosterPrice().acountPrice01(kind2, area, count, number);
|
||||
priceList = new PosterPrice().acountPrice01(kind2, area, count, number, width * 100, length * 100);
|
||||
} else if ("2".equals(kind)) {// 户外写真
|
||||
if ("24".equals(kind2)) {
|
||||
double base_price = 0;
|
||||
@@ -2900,14 +2900,12 @@ public class ProductService {
|
||||
|
||||
} else {
|
||||
|
||||
priceList = new PosterPrice().acountPrice02(kind2, area, count, number);
|
||||
priceList = new PosterPrice().acountPrice02(kind2, area, count, number, width * 100, length * 100);
|
||||
}
|
||||
} else if ("3".equals(kind)) {// 布
|
||||
if (kind2.equals("11") || kind2.equals("12") || kind2.equals("13")) {
|
||||
priceList = new PriceUtils().getDbPrice(kind2, width, length, count, priceList);
|
||||
for (Product product : priceList) {
|
||||
product.setPrice(Math.ceil(product.getPrice() * number));
|
||||
}
|
||||
priceList = new PriceUtils().getDbPrice(kind2, width * 100, length * 100, count, priceList, number);
|
||||
|
||||
} else if (kind2.equals("10")) {
|
||||
length *= 100;
|
||||
width *= 100;
|
||||
@@ -2927,12 +2925,13 @@ public class ProductService {
|
||||
product.setWeight(df.format(0.075 * length * width * product.getCount() / 10000 * number));
|
||||
}
|
||||
} else {
|
||||
priceList = new PosterPrice().acountPrice03(kind2, length, width, area, count, number, dto.getCraftBu());
|
||||
priceList = new PosterPrice().acountPrice03(kind2, length * 100, width * 100, area, count, number, dto.getCraftBu());
|
||||
}
|
||||
|
||||
// 7.27 海报、合版封套 *1.15
|
||||
// 除550灯布/双喷布
|
||||
if (!"1".equals(kind2) && !"7".equals(kind2) && !"11".equals(kind2) && !"12".equals(kind2) && !"10".equals(kind2) && !"6".equals(kind2) && !"13".equals(kind2)) {
|
||||
List<String> kind2_list = Arrays.asList("1", "2", "6", "7", "8", "10", "11", "12", "13");
|
||||
if (!kind2_list.contains(kind2)) {
|
||||
for (Product product : priceList) {
|
||||
product.setPrice(Math.ceil(product.getPrice() * 1.15));
|
||||
}
|
||||
@@ -2956,9 +2955,6 @@ public class ProductService {
|
||||
product.setWeight(df.format(wei * product.getCount() * number));
|
||||
}
|
||||
}
|
||||
if ("1".equals(kind) || "2".equals(kind) || "3".equals(kind)) {
|
||||
//priceList = new PriceUtils().getFbPrice(dto, number, width, length, count, priceList);
|
||||
}
|
||||
}
|
||||
return priceList;
|
||||
// 扇子
|
||||
@@ -3509,6 +3505,50 @@ public class ProductService {
|
||||
for (Product product : priceList) {
|
||||
product.setPrice(Math.floor(product.getPrice() * 1.3));
|
||||
}
|
||||
} else if ("10".equals(kind) || "11".equals(kind)) {
|
||||
int[] count_list = {50, 100, 200, 500, 1000};
|
||||
double[] jitu = {};
|
||||
double[] jitu_add = {};
|
||||
double[] tang = {};
|
||||
double[] yaao = {};
|
||||
if ("10".equals(kind)) {
|
||||
jitu = new double[]{267, 317, 450, 733, 1200};
|
||||
jitu_add = new double[]{190, 210, 250, 320, 440};
|
||||
tang = new double[]{250, 283, 383, 650, 980};
|
||||
yaao = new double[]{250, 267, 383, 617, 950};
|
||||
} else if ("11".equals(kind)) {
|
||||
jitu = new double[]{267, 317, 417, 667, 1080};
|
||||
jitu_add = new double[]{95, 105, 125, 160, 220};
|
||||
tang = new double[]{250, 300, 350, 583, 930};
|
||||
yaao = new double[]{250, 283, 317, 533, 900};
|
||||
}
|
||||
craft_list = Arrays.asList(dto.getCraft());
|
||||
for (int i = 0; i < count_list.length; i++) {
|
||||
if (priceList.size() > 2) {
|
||||
break;
|
||||
}
|
||||
int count_item = count_list[i];
|
||||
if (count > count_item) {
|
||||
continue;
|
||||
}
|
||||
Product product = new Product();
|
||||
product.setCount(count_item);
|
||||
if (craft_list.contains("击凸")) {
|
||||
product.setPrice(jitu[i]);
|
||||
if (dto.getJtcolor() != null && dto.getJtcolor().length > 1) {
|
||||
product.setPrice(jitu[i] + jitu_add[i]);
|
||||
}
|
||||
}
|
||||
if (craft_list.contains("烫金")) {
|
||||
product.setPrice(tang[i]);
|
||||
}
|
||||
if (craft_list.contains("无色压凹")) {
|
||||
product.setPrice(yaao[i]);
|
||||
}
|
||||
|
||||
priceList.add(product);
|
||||
}
|
||||
|
||||
} else {
|
||||
priceList = new PriceUtils().tags600Price(dto, kind, kind2, area, count);
|
||||
// 服装吊牌里面的900克吊牌把价格*1.3倍
|
||||
@@ -4105,6 +4145,39 @@ public class ProductService {
|
||||
pro.setWeight(df.format(Math.ceil(zhongliang * dto.getCount() * number)));
|
||||
priceList.add(pro);
|
||||
return priceList;
|
||||
case "防伪标":
|
||||
int[][] prices = {
|
||||
{176, 176, 176, 176, 176, 176, 176, 176, 180, 184, 192, 192, 202, 228, 228},
|
||||
{180, 180, 182, 184, 186, 188, 196, 206, 240, 260, 274, 286, 306, 344, 360},
|
||||
{184, 184, 184, 194, 214, 228, 264, 290, 358, 408, 434, 466, 506, 572, 650},
|
||||
{190, 202, 210, 224, 256, 282, 332, 374, 478, 554, 590, 660, 716, 814, 942},
|
||||
{200, 232, 254, 290, 338, 392, 468, 544, 728, 864, 920, 1046, 1138, 1298, 1520},
|
||||
{226, 312, 368, 452, 550, 672, 814, 980, 1358, 1636, 1746, 2008, 2190, 2502, 2970},
|
||||
{274, 470, 594, 784, 988, 1250, 1518, 1854, 2614, 3184, 3398, 3936, 4298, 4916, 5872},
|
||||
};
|
||||
int[] count_list = {500, 1000, 2000, 3000, 5000, 10000, 20000};
|
||||
double[] areas = {1, 4, 6, 9, 12, 16, 20, 25, 36, 45, 48.6, 54, 60, 72, 81};
|
||||
|
||||
area = length * width;
|
||||
for (int i = 0; i < count_list.length; i++) {
|
||||
int count_item = count_list[i];
|
||||
if (priceList.size() > 2) {
|
||||
break;
|
||||
}
|
||||
if (count > count_item) {
|
||||
continue;
|
||||
}
|
||||
int count_index = Arrays.binarySearch(count_list, count_item);
|
||||
price = 0;
|
||||
if (count_index >= 0) {
|
||||
price = new PriceUtils().TablePrice(area, prices[count_index], areas);
|
||||
}
|
||||
Product product = new Product();
|
||||
product.setCount(count_item);
|
||||
product.setPrice(Math.ceil(price * number));
|
||||
priceList.add(product);
|
||||
}
|
||||
return priceList;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user