| | |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.Java110ThreadPoolFactory; |
| | | import com.java110.dto.floor.FloorDto; |
| | | import com.java110.dto.report.QueryStatisticsDto; |
| | | import com.java110.dto.report.ReportFloorFeeStatisticsDto; |
| | |
| | | import com.java110.report.statistics.IFloorFeeStatistics; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.ListUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private IFloorFeeStatistics floorFeeStatisticsImpl; |
| | | |
| | | @Autowired |
| | | private IFeeStatistics feeStatisticsImpl; |
| | | |
| | | @Autowired |
| | | private IFloorInnerServiceSMO floorInnerServiceSMOImpl; |
| | |
| | | //todo 查询楼栋 |
| | | FloorDto floorDto = new FloorDto(); |
| | | floorDto.setCommunityId(reqJson.getString("communityId")); |
| | | if(reqJson.containsKey("page")) { |
| | | floorDto.setPage(reqJson.getIntValue("page")); |
| | | floorDto.setRow(reqJson.getIntValue("row")); |
| | | } |
| | | List<FloorDto> floorDtos = floorInnerServiceSMOImpl.queryFloors(floorDto); |
| | | |
| | | if (ListUtil.isNull(floorDtos)) { |
| | |
| | | return; |
| | | } |
| | | |
| | | List<String> floorIds = new ArrayList<>(); |
| | | List<Map> datas = new ArrayList<>(); |
| | | Map<String,Object> dataInfo = null; |
| | | Java110ThreadPoolFactory java110ThreadPoolFactory = null; |
| | | try { |
| | | java110ThreadPoolFactory = Java110ThreadPoolFactory.getInstance().createThreadPool(5); |
| | | for(FloorDto floorDto1:floorDtos){ |
| | | floorIds.add(floorDto1.getFloorId()); |
| | | dataInfo = new HashMap<>(); |
| | | dataInfo.put("floorId",floorDto1.getFloorId()); |
| | | dataInfo.put("floorName",floorDto1.getFloorName()); |
| | | dataInfo.put("floorNum",floorDto1.getFloorNum()); |
| | | datas.add(dataInfo); |
| | | queryStatisticsDto.setFloorId(floorDto1.getFloorId()); |
| | | QueryStatisticsDto tmpQueryStatisticsDto = BeanConvertUtil.covertBean(queryStatisticsDto,QueryStatisticsDto.class); |
| | | java110ThreadPoolFactory.submit(() -> { |
| | | //todo 欠费户数 |
| | | List<Map> floorDatas = feeStatisticsImpl.getFloorFeeSummary(tmpQueryStatisticsDto); |
| | | if (!ListUtil.isNull(floorDatas)) { |
| | | datas.add(floorDatas.get(0)); |
| | | } |
| | | queryStatisticsDto.setFloorIds(floorIds.toArray(new String[floorIds.size()])); |
| | | |
| | | //todo 欠费房屋数 oweRoomCount |
| | | List<ReportFloorFeeStatisticsDto> oweRoomCounts = floorFeeStatisticsImpl.getFloorOweRoomCount(queryStatisticsDto); |
| | | |
| | | //todo 收费房屋数 feeRoomCount |
| | | List<ReportFloorFeeStatisticsDto> feeRoomCounts = floorFeeStatisticsImpl.getFloorFeeRoomCount(queryStatisticsDto); |
| | | |
| | | //todo 实收金额 receivedFee |
| | | List<ReportFloorFeeStatisticsDto> receivedFees = floorFeeStatisticsImpl.getFloorReceivedFee(queryStatisticsDto); |
| | | |
| | | //todo 预收金额 preReceivedFee |
| | | List<ReportFloorFeeStatisticsDto> preReceivedFees = floorFeeStatisticsImpl.getFloorPreReceivedFee(queryStatisticsDto); |
| | | |
| | | //todo 历史欠费金额 hisOweFee |
| | | List<ReportFloorFeeStatisticsDto> hisOweFees = floorFeeStatisticsImpl.getFloorHisOweFee(queryStatisticsDto); |
| | | |
| | | //todo 当期应收金额 curReceivableFee |
| | | List<ReportFloorFeeStatisticsDto> curReceivableFees = floorFeeStatisticsImpl.getFloorCurReceivableFee(queryStatisticsDto); |
| | | |
| | | //todo 当期实收金额 curReceivedFee |
| | | List<ReportFloorFeeStatisticsDto> curReceivedFees = floorFeeStatisticsImpl.getFloorCurReceivedFee(queryStatisticsDto); |
| | | |
| | | //todo 欠费追回 hisReceivedFee |
| | | List<ReportFloorFeeStatisticsDto> hisReceivedFees = floorFeeStatisticsImpl.getFloorHisOweFee(queryStatisticsDto); |
| | | return datas; |
| | | }); |
| | | } |
| | | java110ThreadPoolFactory.get(); |
| | | } finally { |
| | | if (java110ThreadPoolFactory != null) { |
| | | java110ThreadPoolFactory.stop(); |
| | | } |
| | | } |
| | | |
| | | //todo 拼接数据 |
| | | computeData(datas,oweRoomCounts,feeRoomCounts,receivedFees,preReceivedFees,hisOweFees,curReceivableFees,curReceivedFees,hisReceivedFees); |
| | | |
| | | //List<Map> datas = feeStatisticsImpl.getFloorFeeSummary(queryStatisticsDto); |
| | | |