edi
This commit is contained in:
@@ -2380,8 +2380,8 @@ public class ProductService {
|
||||
if (dto.getCraft() != null && craft_list.size() > 0 && (craft_list.contains("冷转印") || craft_list.contains("烫画"))) {
|
||||
int[] quantitySteps = {10, 20, 30, 50, 100, 200, 300, 400, 500, 800, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000};
|
||||
double paperLength = 0, paperWidth = 0;
|
||||
length = BigDecimal.valueOf(length).add(BigDecimal.valueOf(0.6)).doubleValue();
|
||||
width = BigDecimal.valueOf(width).add(BigDecimal.valueOf(0.6)).doubleValue();
|
||||
|
||||
|
||||
if (craft_list.contains("冷转印")) {
|
||||
paperLength = 20;
|
||||
paperWidth = 27;
|
||||
@@ -2390,9 +2390,23 @@ public class ProductService {
|
||||
paperLength = 100;
|
||||
paperWidth = 57;
|
||||
}
|
||||
if (length == paperLength || length == paperWidth) {
|
||||
|
||||
}else{
|
||||
length = BigDecimal.valueOf(length).add(BigDecimal.valueOf(0.6)).doubleValue();
|
||||
}
|
||||
if (width == paperLength || width == paperWidth) {
|
||||
|
||||
}else{
|
||||
width = BigDecimal.valueOf(width).add(BigDecimal.valueOf(0.6)).doubleValue();
|
||||
}
|
||||
|
||||
//一张大纸能放几个
|
||||
double num = Math.min(Math.floor(paperLength / length) * Math.floor(paperWidth / width), Math.floor(paperLength / width) * Math.floor(paperWidth / length));
|
||||
if (craft_list.contains("烫画")) {
|
||||
num = Math.max(Math.ceil(paperLength / length) * Math.ceil(paperWidth / width), Math.ceil(paperLength / width) * Math.ceil(paperWidth / length));
|
||||
|
||||
}
|
||||
|
||||
double baseCount = Math.max(Math.ceil(dto.getCount() * dto.getNumber() / num), 1);
|
||||
int coNumber = dto.getCo_number();
|
||||
|
||||
Reference in New Issue
Block a user