新增抠图工艺

This commit is contained in:
2026-06-16 14:34:37 +08:00
parent 86839e0b2b
commit 94a369f4b1
80 changed files with 6053 additions and 3645 deletions
+37 -13
View File
@@ -40,18 +40,37 @@ public class PriceUtils {
if ("10*2".equals(dto.getSize())) {
prices = new double[]{220, 300, 337, 412, 600, 680, 1200, 1980};
}
for (int i = 0; i < counts.length; i++) {
if (counts[i] < dto.getCount()) {
continue;
double lastPrice = 0;
int lastCount = 0;
double price = 0;
int countItem = count;
do {
if (countItem > counts[counts.length - 1]) {
price += prices[prices.length - 1];
countItem = countItem - counts[counts.length - 1];
} else {
for (int i = 0; i < counts.length; i++) {
if (counts[i] < countItem) {
lastCount = counts[i];
lastPrice = prices[i];
continue;
}
if (lastPrice == 0 && lastCount == 0) {
price += prices[i];
} else {
price += lastPrice + (countItem - lastCount) * (prices[i] - lastPrice) / (counts[i] - lastCount);
}
break;
}
countItem = 0;
}
if (list.size() > 2) {
break;
}
pro = new Product();
pro.setCount(counts[i]);
pro.setPrice(prices[i] );
list.add(pro);
}
} while (countItem != 0);
pro = new Product();
pro.setCount(count);
pro.setPrice(Math.ceil(price));
list.add(pro);
return list;
}
// 最低收费
@@ -2179,7 +2198,12 @@ public class PriceUtils {
// 第一张大纸价格
double price = 80;
if (craft.size() > 0) {//工艺起步价120
price = 120;
if (!craft.contains("内部模切")) {
price = 120;
}
if (craft.contains("内部模切") && craft.size() > 1) {
price = 120;
}
}
// 换成毫米每边+3
length = length * 10 + 2 * 1.5;
@@ -2200,7 +2224,7 @@ public class PriceUtils {
price = num * 25;
}
price += 10 * craft.size() * num;
if (dto.getN_mq_num() > 0) {
if (craft.contains("内部模切") && dto.getN_mq_num() > 0) {
price += 10 * dto.getN_mq_num();
}
price = Math.ceil(price + (number - 1) * 5);