|
@@ -299,15 +299,13 @@ public class StudentOrderController extends BaseController {
|
|
|
List<Organization> organs = organizationDao.findAllOrgans();
|
|
|
List<OrderStatisDto> orders = studentPaymentOrderDao.getLuckStatis();
|
|
|
|
|
|
- BigDecimal totalMoney = BigDecimal.ZERO;
|
|
|
- Integer totalNum = 0;
|
|
|
+
|
|
|
for (Organization organ : organs) {
|
|
|
boolean flag = false;
|
|
|
for (OrderStatisDto order : orders) {
|
|
|
- totalMoney = totalMoney.add(order.getMoney());
|
|
|
- totalNum += order.getNums();
|
|
|
if (organ.getName().equals(order.getOrganName())) {
|
|
|
flag = true;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
if (!flag) {
|
|
@@ -319,6 +317,13 @@ public class StudentOrderController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ BigDecimal totalMoney = BigDecimal.ZERO;
|
|
|
+ Integer totalNum = 0;
|
|
|
+ for (OrderStatisDto order : orders) {
|
|
|
+ totalMoney = totalMoney.add(order.getMoney());
|
|
|
+ totalNum += order.getNums();
|
|
|
+ }
|
|
|
+
|
|
|
LuckStatisDto luckStatisDto = new LuckStatisDto();
|
|
|
luckStatisDto.setOrderStatisDtoList(orders);
|
|
|
luckStatisDto.setTotalNum(totalNum);
|