地市大屏
This commit is contained in:
parent
6edbbe9db3
commit
3221baa785
|
|
@ -100,9 +100,9 @@ public class CityScreenServiceImpl implements CityScreenService {
|
||||||
vo.setFiveYearCount(fiveVO.getDeviceQuantity());
|
vo.setFiveYearCount(fiveVO.getDeviceQuantity());
|
||||||
vo.setFiveToTenYearCount(fiveToTenVO.getDeviceQuantity());
|
vo.setFiveToTenYearCount(fiveToTenVO.getDeviceQuantity());
|
||||||
vo.setAboveTenYearCount(aboveTenVO.getDeviceQuantity());
|
vo.setAboveTenYearCount(aboveTenVO.getDeviceQuantity());
|
||||||
vo.setFiveYearRatio(vo.getTotalValue().compareTo(BigDecimal.ZERO) == 0 ? "0" : String.format("%.2f", (fiveVO.getTotalValue().divide(vo.getTotalValue(), 2, BigDecimal.ROUND_HALF_UP)).multiply(BigDecimal.valueOf(100))));
|
vo.setFiveYearRatio(vo.getTotalValue().compareTo(BigDecimal.ZERO) == 0 ? "0" : String.format("%.1f", (fiveVO.getTotalValue().divide(vo.getTotalValue(), 1, BigDecimal.ROUND_HALF_UP)).multiply(BigDecimal.valueOf(100))));
|
||||||
vo.setFiveYearRatio(vo.getTotalValue().compareTo(BigDecimal.ZERO) == 0 ? "0" : String.format("%.2f", (fiveToTenVO.getTotalValue().divide(vo.getTotalValue(), 2, BigDecimal.ROUND_HALF_UP)).multiply(BigDecimal.valueOf(100))));
|
vo.setFiveToTenYearRatio(vo.getTotalValue().compareTo(BigDecimal.ZERO) == 0 ? "0" : String.format("%.1f", (fiveToTenVO.getTotalValue().divide(vo.getTotalValue(), 1, BigDecimal.ROUND_HALF_UP)).multiply(BigDecimal.valueOf(100))));
|
||||||
vo.setFiveYearRatio(vo.getTotalValue().compareTo(BigDecimal.ZERO) == 0 ? "0" : String.format("%.2f", (aboveTenVO.getTotalValue().divide(vo.getTotalValue(), 2, BigDecimal.ROUND_HALF_UP)).multiply(BigDecimal.valueOf(100))));
|
vo.setAboveTenYearRatio(vo.getTotalValue().compareTo(BigDecimal.ZERO) == 0 ? "0" : String.format("%.1f", (aboveTenVO.getTotalValue().divide(vo.getTotalValue(), 1, BigDecimal.ROUND_HALF_UP)).multiply(BigDecimal.valueOf(100))));
|
||||||
list.add(vo);
|
list.add(vo);
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
|
@ -230,6 +230,7 @@ public class CityScreenServiceImpl implements CityScreenService {
|
||||||
try {
|
try {
|
||||||
return cityScreenMapper.equipmentTurnoverRate(dto);
|
return cityScreenMapper.equipmentTurnoverRate(dto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
logger.error(e.getMessage());
|
logger.error(e.getMessage());
|
||||||
throw new ServiceException("获取装备周转率数据失败");
|
throw new ServiceException("获取装备周转率数据失败");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue