|
|
@@ -7,6 +7,7 @@ import lingtao.net.bean.SysUser;
|
|
|
import lingtao.net.dao.ProductMapper;
|
|
|
import lingtao.net.dao.QuoteLogMapper;
|
|
|
import lingtao.net.util.*;
|
|
|
+import lingtao.net.vo.FunReturnVo;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -866,6 +867,17 @@ public class ProductService {
|
|
|
// return priceList;
|
|
|
}
|
|
|
priceList = getHekaPrice(min, dto, priceList, count);
|
|
|
+ //四个位拼多多价格调整
|
|
|
+ if (role.indexOf("1045") > -1 && min == 4) {
|
|
|
+ for (Product product : priceList) {
|
|
|
+ if (product.getCount() == 200) {
|
|
|
+ product.setPrice(product.getPrice() - 30);
|
|
|
+ }
|
|
|
+ if (product.getCount() == 500) {
|
|
|
+ product.setPrice(product.getPrice() - 10);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
getCraft(dto, priceList, length * 10, width * 10, min);
|
|
|
// 刮刮膜增加价格
|
|
|
if (dto.getKind().equals("13")) {
|
|
|
@@ -1925,7 +1937,7 @@ public class ProductService {
|
|
|
}
|
|
|
// 给产品加上重量
|
|
|
for (Product product : priceList) {
|
|
|
- product.setWeight(df.format(number * length / 1000 * height / 1000 * product.getCount() * 0.13 * 1.25));
|
|
|
+ product.setWeight(df.format(product.getCount() * 0.03));
|
|
|
}
|
|
|
} else {
|
|
|
if ("4".equals(dto.getK())) {
|
|
|
@@ -1935,172 +1947,21 @@ public class ProductService {
|
|
|
double[] base_price = null;
|
|
|
length = 0.0;
|
|
|
height = 0.0;
|
|
|
+ width = 0.0;
|
|
|
List<String> kind2ValueList = Arrays.asList("11", "12", "31", "37", "38", "62");
|
|
|
if ("0".equals(kindValue) && !kind2ValueList.contains(kind2Value)) {
|
|
|
base_count = new int[]{100, 500, 1000, 2000, 3000, 5000, 10000};
|
|
|
} else {
|
|
|
base_count = new int[]{500, 1000, 2000, 3000, 5000, 10000};
|
|
|
}
|
|
|
- if ("1".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{420, 627, 1056, 1980, 2920, 4785, 9240};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{726, 1073, 1914, 2723, 4290, 7920};
|
|
|
- }
|
|
|
- length = 25.0;
|
|
|
- height = 23.0;
|
|
|
- }
|
|
|
- if ("2".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{480, 644, 1089, 2046, 2970, 4785, 9240};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{743, 1089, 1947, 2772, 4372, 8085};
|
|
|
- }
|
|
|
- length = 24.0;
|
|
|
- height = 26.5;
|
|
|
- }
|
|
|
- if ("3".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{480, 730, 1320, 2330, 3300, 5280, 9800};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{770, 1200, 2380, 3400, 5300, 9500};
|
|
|
- }
|
|
|
- length = 28.0;
|
|
|
- height = 26.5;
|
|
|
- }
|
|
|
- if ("4".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{420, 576, 896, 1600, 2304, 3760, 7040};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{576, 880, 1568, 2256, 3600, 6880};
|
|
|
- }
|
|
|
- length = 13.0;
|
|
|
- height = 16.0;
|
|
|
- }
|
|
|
- if ("5".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{450, 733, 980, 1700, 2500, 4000, 7600};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{651, 890, 1480, 2150, 3450, 6625};
|
|
|
- }
|
|
|
- length = 11.0;
|
|
|
- height = 25.0;
|
|
|
- }
|
|
|
- if ("6".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{390, 658, 1030, 1800, 2600, 4200, 8350};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{593, 1000, 1720, 2500, 4000, 7800};
|
|
|
- }
|
|
|
- length = 16.0;
|
|
|
- height = 23.0;
|
|
|
- }
|
|
|
- if ("7".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{320, 520, 860, 1550, 2240, 3750, 6900};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{500, 890, 1530, 2130, 3430, 6280};
|
|
|
- }
|
|
|
- length = 21.0;
|
|
|
- height = 27.0;
|
|
|
- }
|
|
|
- if ("8".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{400, 540, 1100, 1640, 2400, 3950, 7380};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{560, 980, 1640, 2230, 3600, 6580};
|
|
|
- }
|
|
|
- length = 21.0;
|
|
|
- height = 26.5;
|
|
|
- }
|
|
|
- if ("9".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{500, 760, 1200, 2260, 3300, 5200, 9910};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{700, 1100, 1920, 2800, 4400, 8500};
|
|
|
- }
|
|
|
- length = 25.0;
|
|
|
- height = 27.0;
|
|
|
- }
|
|
|
- if ("10".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{600, 970, 1450, 2480, 3600, 5450, 9380};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{910, 1350, 2300, 3400, 5100, 8600};
|
|
|
- }
|
|
|
- length = 32.0;
|
|
|
- height = 27.0;
|
|
|
- }
|
|
|
- if ("11".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{1192, 1600, 2800, 4100, 6500, 11280};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{920, 1350, 2250, 3500, 6350, 10800};
|
|
|
- }
|
|
|
- length = 32.0;
|
|
|
- height = 39.0;
|
|
|
- }
|
|
|
- if ("12".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{1419, 2013, 3234, 4800, 7672, 11385};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{1338, 1898, 3069, 4500, 7260, 10395};
|
|
|
- }
|
|
|
- length = 25.0;
|
|
|
- height = 32.0;
|
|
|
- }
|
|
|
- if ("31".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{528, 875, 1650, 2426, 3878, 7590};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{680, 957, 1716, 2475, 3878, 7095};
|
|
|
- }
|
|
|
- length = 23.0;
|
|
|
- height = 21.0;
|
|
|
- }
|
|
|
- if ("37".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{600, 990, 1848, 2723, 4455, 8580};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{710, 1040, 1848, 2624, 4125, 7755};
|
|
|
- }
|
|
|
- length = 23.0;
|
|
|
- height = 21.0;
|
|
|
- }
|
|
|
- if ("38".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{600, 924, 1650, 2376, 3878, 7260};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{600, 908, 1617, 2328, 3713, 7095};
|
|
|
- }
|
|
|
- length = 21.0;
|
|
|
- height = 21.0;
|
|
|
- }
|
|
|
- if ("62".equals(kind2Value)) {
|
|
|
- if ("0".equals(kindValue)) {
|
|
|
- base_price = new double[]{578, 975, 1848, 2673, 5360, 10240};
|
|
|
- }
|
|
|
- if ("1".equals(kindValue)) {
|
|
|
- base_price = new double[]{693, 1008, 1749, 2475, 4960, 9600};
|
|
|
- }
|
|
|
- length = 24.0;
|
|
|
- height = 32.0;
|
|
|
+ FunReturnVo funReturnVo = new PriceUtils().getBagTagPrice(kind2Value, kindValue);
|
|
|
+ if (funReturnVo.getBase_price() != null) {
|
|
|
+ base_price = funReturnVo.getBase_price();
|
|
|
+ width = funReturnVo.getWidth();
|
|
|
+ height = funReturnVo.getHeight();
|
|
|
+ length = funReturnVo.getLength();
|
|
|
}
|
|
|
+
|
|
|
Product pro = null;
|
|
|
double color_price = 0;
|
|
|
double bei_price = 0;
|
|
|
@@ -2139,7 +2000,7 @@ public class ProductService {
|
|
|
|
|
|
for (Product product : priceList) {
|
|
|
product.setPrice(product.getPrice() * number);
|
|
|
- product.setWeight(df.format(number * length / 1000 * height / 1000 * product.getCount() * 0.13 * 1.25));
|
|
|
+ product.setWeight(df.format((width + height) * length * 2 * 0.25 * 1.5 * product.getCount() / 10000));
|
|
|
}
|
|
|
|
|
|
return priceList;
|