| | |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.room.RoomDto; |
| | | import com.java110.dto.report.QueryStatisticsDto; |
| | | import com.java110.report.statistics.IBaseDataStatistics; |
| | | import com.java110.report.statistics.IFeeStatistics; |
| | |
| | | queryStatisticsDto.setLink(reqJson.getString("link")); |
| | | queryStatisticsDto.setPage(reqJson.getInteger("page")); |
| | | queryStatisticsDto.setRow(reqJson.getInteger("row")); |
| | | long count = baseDataStatisticsImpl.getRoomCount(queryStatisticsDto); |
| | | long count = baseDataStatisticsImpl.getReceivedRoomCount(queryStatisticsDto); |
| | | List<RoomDto> rooms = null; |
| | | if (count > 0) { |
| | | rooms = baseDataStatisticsImpl.getRoomInfo(queryStatisticsDto); |
| | | rooms = baseDataStatisticsImpl.getReceivedRoomInfo(queryStatisticsDto); |
| | | } else { |
| | | rooms = new ArrayList<>(); |
| | | } |
| | |
| | | // todo nInfo.put(info.get("feeTypeCd").toString(), tmpInfos); |
| | | infos = washInfos(infos); |
| | | |
| | | BigDecimal oweFee = new BigDecimal(0.00); |
| | | System.out.printf("infos = " + JSONObject.toJSONString(infos)); |
| | | |
| | | BigDecimal receivedFee = null; |
| | | List<Map> itemFees = null; |
| | | String feeTypeCd = ""; |
| | | data.put("receivedFee", "0"); |
| | | |
| | | // todo 根据房屋ID 和payerObjId 比较 合并数据,讲费用大类 横向 放入 data中, |
| | | // todo 并且计算每个 房屋 费用大类的欠费 和房屋的总欠费 |
| | | for (int dataIndex = 0; dataIndex < datas.size(); dataIndex++) { |
| | | receivedFee = new BigDecimal(0.00); |
| | | data = datas.getJSONObject(dataIndex); |
| | | //todo 这里循环费用大类 |
| | | for (Map info : infos) { |
| | |
| | | continue; |
| | | } |
| | | feeTypeCd = info.get("feeTypeCd").toString(); |
| | | oweFee = oweFee.add(new BigDecimal(info.get(feeTypeCd + "receivedFee").toString())); |
| | | receivedFee = receivedFee.add(new BigDecimal(info.get(feeTypeCd + "receivedFee").toString())); |
| | | data.put("receivedFee" + feeTypeCd, info.get(feeTypeCd)); |
| | | } |
| | | data.put("receivedFee", oweFee.doubleValue()); |
| | | data.put("receivedFee", receivedFee.doubleValue()); |
| | | } |
| | | |
| | | return datas; |
| | |
| | | for (Map info : infos) { |
| | | generatorNewInfo(newInfos, info); |
| | | } |
| | | System.out.printf("newInfos = " + JSONObject.toJSONString(newInfos)); |
| | | |
| | | |
| | | List<Map> tmpInfos = null; |
| | | Map dInfo = null; |
| | |
| | | if (!nInfo.get("payerObjId").equals(info.get("payerObjId"))) { |
| | | continue; |
| | | } |
| | | //todo 根据feeTypeCd 去寻找 |
| | | tmpInfos = getTmpInfos(nInfo, info); |
| | | //todo 深拷贝 |
| | | dInfo = new HashMap(); |