|
@@ -65,7 +65,7 @@ public class FeedDayServiceImpl extends ServiceImpl<FeedDayMapper, FeedDay> impl
|
|
|
}
|
|
|
if (feedDays.size()>=2) {
|
|
|
BigDecimal yesterdayCountBd = feedDays.get(1).getConsumption();
|
|
|
- todayRatioBd = (todayCountBd.subtract(yesterdayCountBd)).divide(yesterdayCountBd);
|
|
|
+ todayRatioBd = (todayCountBd.subtract(yesterdayCountBd)).divide(yesterdayCountBd,1,BigDecimal.ROUND_HALF_UP);
|
|
|
}
|
|
|
} else {
|
|
|
todayCountBd = BigDecimal.ZERO;
|
|
@@ -86,7 +86,7 @@ public class FeedDayServiceImpl extends ServiceImpl<FeedDayMapper, FeedDay> impl
|
|
|
}
|
|
|
if (feedMonths.size()>=2) {
|
|
|
BigDecimal LastMonthCountBd = feedMonths.get(1).getConsumption();
|
|
|
- thisMonthRatioBd = (thisMonthCountBd.subtract(LastMonthCountBd)).divide(LastMonthCountBd);
|
|
|
+ thisMonthRatioBd = (thisMonthCountBd.subtract(LastMonthCountBd)).divide(LastMonthCountBd,1,BigDecimal.ROUND_HALF_UP);
|
|
|
}
|
|
|
} else {
|
|
|
thisMonthCountBd = BigDecimal.ZERO;
|