Commit 89789458347969da343f5980ae6b29cf8631d5f5

Authored by 房远帅
1 parent ba20a4da

楚江ERP:规格打印修改支持(--)(++)

... ... @@ -37,12 +37,18 @@ public class LatexFormulaExcelExporterUtil {
37 37 }
38 38
39 39 latex.append(formatScientificNotation(comp.getBase()));
40   - if (comp.getSup() != null) {
  40 + if (comp.getSup() != null && comp.getSup().compareTo(BigDecimal.ZERO) > 0) {
41 41 latex.append("^{+").append(formatScientificNotation(comp.getSup())).append("}");
42 42 }
  43 + if (comp.getSup() != null && comp.getSup().compareTo(BigDecimal.ZERO) < 0) {
  44 + latex.append("^{").append(formatScientificNotation(comp.getSup())).append("}");
  45 + }
43 46
44   - if (comp.getSub() != null) {
45   - latex.append("_{-").append(formatScientificNotation(comp.getSub())).append("}");
  47 + if (comp.getSub() != null && comp.getSub().compareTo(BigDecimal.ZERO) > 0) {
  48 + latex.append("_{+").append(formatScientificNotation(comp.getSub())).append("}");
  49 + }
  50 + if (comp.getSub() != null && comp.getSub().compareTo(BigDecimal.ZERO) < 0) {
  51 + latex.append("_{").append(formatScientificNotation(comp.getSub())).append("}");
46 52 }
47 53
48 54 if (i < componentList.size() - 1) {
... ...