forked from github/dataease
feat(视图): 同比环比
This commit is contained in:
parent
b05581c198
commit
76e83b6896
@ -509,7 +509,7 @@ public class ChartViewService {
|
|||||||
if (StringUtils.equalsIgnoreCase(resultData, "sub")) {
|
if (StringUtils.equalsIgnoreCase(resultData, "sub")) {
|
||||||
item[dataIndex] = new BigDecimal(cValue).subtract(new BigDecimal(lastValue)).toString();
|
item[dataIndex] = new BigDecimal(cValue).subtract(new BigDecimal(lastValue)).toString();
|
||||||
} else if (StringUtils.equalsIgnoreCase(resultData, "percent")) {
|
} else if (StringUtils.equalsIgnoreCase(resultData, "percent")) {
|
||||||
if (Integer.parseInt(lastValue) == 0) {
|
if (new BigDecimal(lastValue).compareTo(BigDecimal.ZERO) == 0) {
|
||||||
item[dataIndex] = null;
|
item[dataIndex] = null;
|
||||||
} else {
|
} else {
|
||||||
item[dataIndex] = new BigDecimal(cValue)
|
item[dataIndex] = new BigDecimal(cValue)
|
||||||
|
Loading…
Reference in New Issue
Block a user