mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
完善
This commit is contained in:
@@ -25,6 +25,7 @@ import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -72,7 +73,11 @@ public class CoalAnalysisService extends BaseService<CoalAnalysisEntity, CoalAna
|
||||
throw new BizException("计算结果不是数字");
|
||||
}
|
||||
|
||||
map.put(def.getCode(), exec != null ? NumberUtils.toDouble(exec + "") : null);
|
||||
Double value = exec != null ? NumberUtils.toDouble(exec + "") : null;
|
||||
if (value != null) {
|
||||
value = BigDecimal.valueOf(value).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
|
||||
}
|
||||
map.put(def.getCode(), value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user