diff --git a/src/main/java/lingtao/net/bean/Product.java b/src/main/java/lingtao/net/bean/Product.java index 52f807a..4be5787 100644 --- a/src/main/java/lingtao/net/bean/Product.java +++ b/src/main/java/lingtao/net/bean/Product.java @@ -180,4 +180,6 @@ public class Product { private Double lengthVU; private Double widthUV; + private Integer cropNumber; + } \ No newline at end of file diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 853711a..a6ab239 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -307,10 +307,10 @@ public class ProductService { kind = "3"; } else if ("封口贴铜版纸不干胶".equals(kind)) { priceList = new PriceUtils().getFktPrice(number, priceList); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } else if ("双面印刷不干胶".equals(dto.getStickerKind())) { priceList = StickersDoublePrice.getPrice(length, width, count, number); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } else if ("插旗".equals(dto.getStickerKind())) { if ("铜版纸不干胶".equals(kind)) { dto.setKindValue("0"); @@ -395,7 +395,7 @@ public class ProductService { } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } // return priceList; @@ -406,7 +406,7 @@ public class ProductService { product.setPrice(Math.ceil(product.getPrice() * number)); } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } else if ("13".equals(kind)) { oldKind = "13"; dto.setKindValue("2"); @@ -426,7 +426,7 @@ public class ProductService { product.setPrice(Math.floor(product.getPrice() * number)); product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.25)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } else if ("15".equals(kind) || "16".equals(kind)) { List craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>(); @@ -459,7 +459,7 @@ public class ProductService { } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } // 查询出来的价格集合 List stickersList = new ArrayList(); @@ -485,7 +485,7 @@ public class ProductService { } stickersList = normalSticker(dto, kind, number, area, width, length, count, oldKind, stickersList); if (stickersList == null) { - return chucklePrice(role, stickersList); + return chucklePrice(role, stickersList, dto); } } // 把查出来的集合添加到priceList中 @@ -635,12 +635,12 @@ public class ProductService { } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "1": dto.setWidth(width); dto.setLength(length); priceList = productMapper.getThanPrice(dto); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 卷装标签 case "2": // 单个产品的面积 @@ -651,7 +651,7 @@ public class ProductService { product.setPrice(Math.floor(product.getPrice() * number)); product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.25)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 插卡 case "3": // 菱形单面直角插牌 @@ -717,7 +717,7 @@ public class ProductService { priceList.add(product); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } // 根据款数重新算价格/计算重量 for (Product product : priceList) { @@ -730,7 +730,7 @@ public class ProductService { } product.setWeight(df.format(number * length * width * product.getCount() * 0.00003)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 优惠券 case "4": if ("11".equals(dto.getKind())) {// 圣诞卡 @@ -921,7 +921,7 @@ public class ProductService { priceList.add(product); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } int min = getNum(length, width); String[] kind_list = {"3", "4", "5", "7"}; @@ -1173,7 +1173,7 @@ public class ProductService { } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 吊牌300/600/800克 case "吊牌": // 自定义尺寸 @@ -1226,7 +1226,7 @@ public class ProductService { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 服装吊牌 case "服装吊牌": // 自定义尺寸 @@ -1441,7 +1441,7 @@ public class ProductService { for (Product product : priceList) { product.setWeight(String.valueOf(weight * area * product.getCount() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 特价名片 case "特价名片": // 选了【自定义尺寸】 @@ -1479,7 +1479,7 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 名片-特种纸名片 case "特种纸名片": double addPrice = 5; @@ -1689,7 +1689,7 @@ public class ProductService { product.setPrice(Math.ceil(product.getPrice() + 0.2 * product.getCount() * number)); } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } else if ("草香".equals(kind) || "芳怡".equals(kind)) { int[] count_list = {200, 500, 1000, 2000, 5000, 10000}; // 出血(一边2毫米) @@ -1881,7 +1881,7 @@ public class ProductService { for (Product product : priceList) { product.setWeight(df.format(tzWei / 1000.0 * length * width * product.getCount() / 10000.0 * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 合版封套 case "6": double lengthSize = dto.getLengthSize(); @@ -1930,7 +1930,7 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 房卡套 case "7": lengthSize = dto.getLengthSize(); @@ -1975,7 +1975,7 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 档案袋 case "8": priceList = productMapper.getThanPrice(dto); @@ -1991,11 +1991,11 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 彩色信封 case "9": priceList = getXinFengPrice(dto, width, length, kind, kind2); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 杯套 case "10": if ("5".equals(kind)) { @@ -2017,7 +2017,7 @@ public class ProductService { product.setWeight(df.format(number * 0.3 * product.getCount() / 10000 * length * width)); product.setPrice(Math.ceil(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } else if ("6".equals(kind)) {// 盲盒杯套价格 dto.setPrice(1800.0); priceList.add(dto); @@ -2025,7 +2025,7 @@ public class ProductService { product.setWeight(df.format(number * 0.3 * product.getCount() * 0.29 * 0.07)); product.setPrice(Math.ceil(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } else if ("2".equals(kind)) {// 异形杯套价格计算 priceList = new PriceUtils().getCupSetPrice(count); } else { @@ -2060,7 +2060,7 @@ public class ProductService { product.setPrice(Math.floor(product.getPrice() + number * 50)); } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 牛皮纸手提袋 case "11": List hanbagList = new ArrayList(); @@ -2177,7 +2177,7 @@ public class ProductService { product.setWeight(df.format((width + height) * length * 2 * 0.25 * 1.5 * product.getCount() / 10000)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } double sizeLength = 0.0; double sizeWidth = 0.0; @@ -2268,7 +2268,7 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 250克白牛皮纸 case "12": priceList = productMapper.getThanPrice(dto); @@ -2309,7 +2309,7 @@ public class ProductService { product.setPrice(Math.floor(product.getPrice() * number)); product.setWeight(df.format(length / 1000 * height / 1000 * product.getCount() * 0.25 * 1.25)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 吊旗 case "13": length = length * 10; @@ -2362,7 +2362,7 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 宣传单 case "14": length = length * 10; @@ -2473,7 +2473,7 @@ public class ProductService { product.setPrice(Math.floor(product.getPrice() * number)); product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * weight)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 腰封200克/157克 case "15": // 腰封少数量走的是吊旗少数量的价格 @@ -2541,7 +2541,7 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "金属标": craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()); @@ -2656,7 +2656,7 @@ public class ProductService { product.setPrice(product.getPrice() + 40 * Math.max(dto.getPo_number(), 1)); } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } if (length <= 2) { length = 2.0; @@ -2735,7 +2735,7 @@ public class ProductService { * product.setMsg("大张出货(2-3天发货)"); priceList.add(product); return priceList; } */ } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "卡片少数量": String crafts[] = dto.getCraft(); String craftShua = dto.getCraftShua(); @@ -3189,7 +3189,7 @@ public class ProductService { } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 便签本/联单 case "16": length = length * 10; @@ -3389,7 +3389,7 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 海报(款数*个数=个数) case "17": // 贡缎布 @@ -3404,7 +3404,7 @@ public class ProductService { for (Product product : priceList) { product.setWeight(df.format(0.165 * length * width * product.getCount() / 10000 * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } else if ("6".equals(kind)) {// 条幅craftTiao priceList = PriceUtils.bannerPrice(kind2, length, width, count, number, role); @@ -3458,7 +3458,7 @@ public class ProductService { } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } else if ("5".equals(kind)) {// 刻字 Product pro = new Product(); pro.setCount(count); @@ -3473,7 +3473,7 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.ceil(product.getPrice() * 1.15)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); } else if ("11".equals(kind)) { } else { @@ -3676,7 +3676,7 @@ public class ProductService { } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 扇子 case "18": if (dto.getKindValue().equals("5")) { @@ -3762,7 +3762,7 @@ public class ProductService { product.setWeight(df.format(Double.valueOf(product.getWeight()) * number)); } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 画册 case "19": // 内页P数加上封面的4P @@ -3812,7 +3812,7 @@ public class ProductService { } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 包装盒 case "20": // 厘米转成毫米 @@ -3871,7 +3871,7 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 透明PVC名片 case "21": if (count <= 10000) { @@ -3892,7 +3892,7 @@ public class ProductService { product.setWeight(df.format(0.38 * 0.0855 * 1.7 * 0.054 * product.getCount() * number)); product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 桌贴 case "22": /* @@ -3912,7 +3912,7 @@ public class ProductService { } product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * 1.7 * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 0.38PVC亮光异型卡片 case "PVC异型卡片": // 印刷价格 @@ -3962,11 +3962,11 @@ public class ProductService { /* * if (priceList.get(0).getPrice() > priceList2.get(0).getPrice()) { // Double minPrice = Math.min(priceList.get(0).getPrice(), // priceList2.get(0).getPrice()); priceList = new ArrayList(); Product product = new Product(); product.setCount(count); product.setPrice(priceList2.get(0).getPrice()); priceList.add(product); } */ - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 滴塑 case "23": priceList = PriceUtils.getDisuPrice(priceList, width, length, count, number, dto); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 透明PVC名片---会员卡 case "24": if (count <= 10000) { @@ -3988,7 +3988,7 @@ public class ProductService { product.setWeight(df.format(0.76 * 1.3 * 0.0855 * 0.054 * product.getCount() * number)); product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 卡片-门挂牌 case "25": priceList = productMapper.getThanPrice(dto); @@ -4017,7 +4017,7 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 毕业证书 case "26": priceList = new PriceUtils().getDiploma(count); @@ -4025,11 +4025,11 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 暖心贴 case "27": priceList = getWarmStickerPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 彩色信纸 case "彩色信纸": length = length * 10; @@ -4066,7 +4066,7 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); // 复印纸 case "复印纸": priceList = new PriceUtils().getCopyPaper(kind, kind2, kind3, count, size); @@ -4074,10 +4074,10 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "婚礼卡": priceList = new PriceUtils().getWeddingCardPrice(length, width, count, number, dto.getCraftMo(), dto.getCraftShua()); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "刮刮卡": // 选了【自定义尺寸】 if (dto.isSwitchSize()) { @@ -4140,7 +4140,7 @@ public class ProductService { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "66": String craftTang = dto.getCraftTang().replace("双面烫银", "双面烫金"); if (!kind.equals("500克黑卡")) { @@ -4169,7 +4169,7 @@ public class ProductService { product.setPrice(Math.floor(product.getPrice() * number)); product.setWeight(df.format(0.09 * 0.054 * product.getCount() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "餐垫纸": priceList = new PriceUtils().getPlaceMatPrice(kind, length, width, count); craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>(); @@ -4187,7 +4187,7 @@ public class ProductService { product.setPrice(Math.ceil(product.getPrice() * 1.9)); } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "节目单": priceList = productMapper.getThanPrice(dto); if (StringUtils.isEmpty(dto.getCraft())) { @@ -4200,7 +4200,7 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "硫酸纸吊牌": priceList = new PriceUtils().getAcidTagsPrice(length, width, dto.getSize1(), count); // 根据款数重新算价格 @@ -4218,25 +4218,25 @@ public class ProductService { product.setWeight(df.format(product.getCount() * number * (0.135 * area + area1 * 0.3))); product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "杯垫": priceList = getBeiDianPrice(dto, width, length, role, kind2, kind); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "锦旗": // 单价*产品数量*款数 priceList = new PriceUtils().getJQPrice(kind3, number, width, length, count, priceList); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "号码布": // 单价*产品数量*款数 priceList = new PriceUtils().getHmbPrice(kind3, number, width, length, count, priceList); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "彩旗": // 单价*产品数量*款数 priceList = new PriceUtils().getCQPrice(number, width, length, count, priceList); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "硫酸纸": priceList = getLiuSuanzhiPrice(dto, width, length, role, proType); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "亚克力": priceList = new PriceUtils().getYklPrice(dto, number, width, length, count, priceList); for (Product product : priceList) { @@ -4250,7 +4250,7 @@ public class ProductService { product.setPrice(Math.floor(product.getPrice() * number)); } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "帆布": priceList = new PriceUtils().getFbPrice(dto, number, width, length, count, priceList); List carftList = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()); @@ -4267,7 +4267,7 @@ public class ProductService { } } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "29"://慕斯垫 priceList = productMapper.getMsdPrice(dto); @@ -4297,7 +4297,7 @@ public class ProductService { product.setWeight(df.format(0.8 * area * product.getCount() / 10000 * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "串旗": priceList = new PriceUtils().getCqPrice(width, length, count, number, priceList); if (dto.getCraft() != null) { @@ -4313,12 +4313,12 @@ public class ProductService { } } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "桌布": width = width / 100; length = length / 100; priceList = new PriceUtils().getTableClothPrice(length, width, count, number, priceList); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "仿古旗": area = length * width * count / 10000; priceList = new FgqPrice().getPrice(count, area, priceList, dto.getCraft(), dto.getKindValue(), number); @@ -4330,24 +4330,24 @@ public class ProductService { } product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "手拉旗": priceList = getShouLaQiPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "筷子套": priceList = new KztPrice().getPrice(count, length, priceList); for (Product product : priceList) { product.setWeight(df.format(length * 3 * number * 0.157)); product.setPrice(Math.floor(product.getPrice() * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "一次性纸杯": priceList = new PaperCupPrice().getPrice(count, priceList); for (Product product : priceList) { product.setPrice(Math.ceil(product.getPrice() * number * 1.2)); product.setWeight(df.format(6 * product.getCount() / 1000 * number)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "PVC证件": // 价格按照大纸裁 priceList = new ZsPrice().getPrice(count, length, width, priceList, number, dto.getCraftSheng()); @@ -4361,10 +4361,10 @@ public class ProductService { width = width / 10; product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * number * 1.3)); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "数码PVC": priceList = getsmPVCPrice(dto, width, length, role); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "班旗": priceList = new BqPrice().getPrice(count, length, priceList, number, dto.getCraftShua(), dto.getCraft()); List craLists = !StringUtils.isEmpty(dto.getCraft()) ? Arrays.asList(dto.getCraft()) : new ArrayList<>(); @@ -4382,10 +4382,10 @@ public class ProductService { product.setWeight(df.format(0.075 * length * width * product.getCount() / 10000 * number + product.getCount() * wei * number )); } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "卡贴": priceList = getkaTiePrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "会员卡卡套": priceList = new FerruleUtil().getPrice(length, count, priceList); if (number > 1) { @@ -4393,103 +4393,103 @@ public class ProductService { product.setPrice(Math.floor(product.getPrice() * number)); } } - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "手提杯托": priceList = getTuoBeiPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "天幕": priceList = getTianMuPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "挂布": priceList = getGuaBuPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "定制衫": priceList = getClotherPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "手绘": priceList = getShouhuiPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "奖牌": priceList = getMedalPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "防伪标": priceList = getantiLabelPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "透卡": priceList = getPETPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "澜达海报": priceList = getDalanPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "水标": priceList = getShuibiaoPrice(dto, length, width); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "镭射吊牌": priceList = getLeiseDiaoPrice(dto, length, width); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "刻字车贴": priceList = getCheTiePrice(dto, length, width); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "胶带": priceList = getJiadaoPrice(dto, length, width); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "特光不干胶": priceList = getLightPrice(dto, length, width); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "淋膜纸": priceList = getLingmoPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "香薰卡": priceList = getaromatherapyPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "金属微章": priceList = getbadgePrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "冰箱贴": priceList = getfridgePrice(dto, width, length, role); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "帆布袋": priceList = getCanvasBagPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "外卖盒": priceList = getTakeoutBoxPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "方巾纸": priceList = getHandkerPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "鼠标垫": priceList = getMousePadPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "手环": priceList = getWristBandPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "手提塑料袋": priceList = getPlasticBagPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "纸碗": priceList = getPaperBowlPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "挂画": priceList = getWallPaintingPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "电线胶": priceList = getWireTapePrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "包装纸": priceList = getWrappingPaper(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "撕撕乐": priceList = getTearingJoyPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "哑粉纸": priceList = getYaFenPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "UV打印亚克力": priceList = getUVDayinYKLPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); case "躺椅": priceList = getDeckCharitPrice(dto, width, length); - return chucklePrice(role, priceList); + return chucklePrice(role, priceList, dto); default: break; } @@ -8559,8 +8559,15 @@ public class ProductService { } } - public List chucklePrice(String role, List list) { + public List chucklePrice(String role, List list, Product dto) { // + List craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()); + + if (craft_list.contains("抠图")) { + for (Product product : list) { + product.setPrice(Math.ceil(product.getPrice() + 5 * dto.getCropNumber())); + } + } List roleList = Arrays.asList("1045", "1061", "1029", "1054", "1053", "1055"); boolean isIn = false; for (String s : roleList) { diff --git a/src/main/webapp/views/main.jsp b/src/main/webapp/views/main.jsp index be59875..ab2d4b2 100644 --- a/src/main/webapp/views/main.jsp +++ b/src/main/webapp/views/main.jsp @@ -590,7 +590,7 @@