修改天幕

This commit is contained in:
2026-05-01 10:07:21 +08:00
parent 451a226990
commit 3abc4938de
3 changed files with 88 additions and 41 deletions
@@ -5089,25 +5089,29 @@ public class ProductService {
}
private List<Product> getTianMuPrice(Product dto, Double width, Double length) {
List<String> craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
List<String> craft_lists = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
List<String> craft_list = new ArrayList<>(craft_lists);
List<Product> priceList = new ArrayList<>();
int count = dto.getCount();
int number = dto.getNumber();
double area = length * width / 10000;
if (dto.getCraftShua().contains("空白") && dto.getCraftQie() != null && dto.getCraftQie().contains("模切")) {
dto.setCraftShua("定制");
if (craft_list.contains("空白") && craft_list.contains("模切")) {
craft_list.add("定制");
}
priceList = CanopyUtil.getPrice(area, count, priceList, dto.getKindValue(), dto.getCraftShua());
priceList = CanopyUtil.getPrice(area, count, priceList, dto.getKindValue(), craft_list);
if (number > 1) {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
}
if (dto.getShuliang() != null) {
for (Product product : priceList) {
for (Product product : priceList) {
if (craft_list.contains("安装包")) {
product.setPrice(Math.floor(product.getPrice() + dto.getShuliang() * 50));
product.setWeight(String.valueOf(Double.parseDouble(product.getWeight()) + dto.getShuliang() * 3.3));
}
if (craft_list.contains("防风绳")) {
product.setPrice(Math.floor(product.getPrice() + dto.getPcount() * 2));
}
product.setWeight(String.valueOf(Double.parseDouble(product.getWeight()) + dto.getShuliang() * 3.3));
}
return priceList;