parent
a2bece6b4d
commit
dddd798ad0
|
@ -47,6 +47,7 @@ import javax.script.ScriptException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -384,6 +385,7 @@ public class ContractFormPlugin extends AbstractFormPlugin implements UploadLis
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
|
//todo:保留几位有效数字
|
||||||
Cell cell1 = row.getCell(6);
|
Cell cell1 = row.getCell(6);
|
||||||
Cell cell2 = row.getCell(7);
|
Cell cell2 = row.getCell(7);
|
||||||
if (cell1 != null && cell2 != null && StringUtils.isNotEmpty(cell1.toString()) && StringUtils.isNotEmpty(cell2.toString())) {
|
if (cell1 != null && cell2 != null && StringUtils.isNotEmpty(cell1.toString()) && StringUtils.isNotEmpty(cell2.toString())) {
|
||||||
|
@ -391,7 +393,7 @@ public class ContractFormPlugin extends AbstractFormPlugin implements UploadLis
|
||||||
try {
|
try {
|
||||||
double value1 = cell1.getNumericCellValue();
|
double value1 = cell1.getNumericCellValue();
|
||||||
double value2 = cell2.getNumericCellValue();
|
double value2 = cell2.getNumericCellValue();
|
||||||
results = BigDecimal.valueOf(value1 * value2);
|
results = BigDecimal.valueOf(value1 * value2).setScale(3, RoundingMode.HALF_UP);
|
||||||
contractsummarylist.set("qeug_amounttotal", results); // 合计金额
|
contractsummarylist.set("qeug_amounttotal", results); // 合计金额
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
this.getView().showErrorNotification("清单汇总识别--生成明细失败:" + e.getMessage());
|
this.getView().showErrorNotification("清单汇总识别--生成明细失败:" + e.getMessage());
|
||||||
|
|
Loading…
Reference in New Issue