Commit 20a05fe1 by zhengxj

finish 修正安装单总量统计 on 20190322 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18795 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 5c2635ad
......@@ -687,12 +687,11 @@ public class OrderServiceImpl implements IOrderService {
}else{
criteria.andShopIdIn(dataRight);
}
long totalfinishedOrders = orderDao.countByExample(example);
long totalOrders = orderDao.countByExample(example);
BigDecimal unfinishedRatio = BigDecimal.ZERO;
if (totalUnfinishedOrders != 0l && new BigDecimal(totalfinishedOrders)
.add(new BigDecimal(totalUnfinishedOrders)).compareTo(BigDecimal.ZERO) != 0) {
if (totalUnfinishedOrders != 0l ) {
unfinishedRatio = new BigDecimal(totalUnfinishedOrders)
.divide(new BigDecimal(totalfinishedOrders).add(new BigDecimal(totalUnfinishedOrders)), mc)
.divide(new BigDecimal(totalOrders), mc)
.setScale(1, BigDecimal.ROUND_HALF_UP);
}
unfinishedOrders.setRatio(unfinishedRatio);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!