|
|
@@ -9,6 +9,7 @@ import org.apache.poi.ss.usermodel.*;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
+import org.springblade.los.Util.BigDecimalUtils;
|
|
|
import org.springblade.los.Util.RegularUtils;
|
|
|
import org.springblade.los.basic.packages.entity.BPackages;
|
|
|
import org.springblade.los.basic.packages.service.IBPackagesService;
|
|
|
@@ -541,6 +542,7 @@ public class TemplateImportServiceImpl implements ITemplateImportService {
|
|
|
}
|
|
|
|
|
|
bills.setQuantity(new BigDecimal(String.valueOf(pkgs.get("value"))).setScale(0, RoundingMode.HALF_UP));
|
|
|
+ bills.setQuantityPackingDescr("SAY " + BigDecimalUtils.convertToEnglish(bills.getQuantity()) + " " + bills.getPackingUnit() + " ONLY.");
|
|
|
|
|
|
//G.W.
|
|
|
double gw = getSheetCellValueAsNumericPrefix(sheet, r + 1, 4);
|
|
|
@@ -817,6 +819,7 @@ public class TemplateImportServiceImpl implements ITemplateImportService {
|
|
|
double bags = getSheetCellValueAsNumericPrefix(sheet,28, 2);
|
|
|
System.out.println("bags:" + bags);
|
|
|
bills.setQuantity(new BigDecimal(bags).setScale(0, RoundingMode.HALF_UP));
|
|
|
+ bills.setQuantityPackingDescr("SAY " + BigDecimalUtils.convertToEnglish(bills.getQuantity()) + " " + bills.getPackingUnit() + " ONLY.");
|
|
|
} else {
|
|
|
throw new RuntimeException("件数不能为空");
|
|
|
}
|
|
|
@@ -1084,6 +1087,7 @@ public class TemplateImportServiceImpl implements ITemplateImportService {
|
|
|
double bags = getSheetCellValueAsNumericPrefix(sheet,28, 2);
|
|
|
System.out.println("bags:" + bags);
|
|
|
bills.setQuantity(new BigDecimal(bags).setScale(0, RoundingMode.HALF_UP));
|
|
|
+ bills.setQuantityPackingDescr("SAY " + BigDecimalUtils.convertToEnglish(bills.getQuantity()) + " " + bills.getPackingUnit() + " ONLY.");
|
|
|
} else {
|
|
|
throw new RuntimeException("件数不能为空");
|
|
|
}
|
|
|
@@ -1320,6 +1324,8 @@ public class TemplateImportServiceImpl implements ITemplateImportService {
|
|
|
sumVol.setScale(3, BigDecimal.ROUND_HALF_UP);
|
|
|
bills.setMeasurement(sumVol);
|
|
|
bills.setCfsMeasurement(sumVol);
|
|
|
+
|
|
|
+ bills.setQuantityPackingDescr("SAY " + BigDecimalUtils.convertToEnglish(bills.getQuantity()) + " " + bills.getPackingUnit() + " ONLY.");
|
|
|
}
|
|
|
}
|
|
|
|