| | |
| | | reportQueryRecord.setOperator("白单流水物业表"); |
| | | List<ReportQueryRecord> reportQueryRecords = reportFeeInnerServiceSMOImpl.queryReport(BeanConvertUtil.beanCovertMap(reportQueryRecord)); |
| | | |
| | | if (reqJson.containsKey("roomNum") && reqJson.get("roomNum") != "") { |
| | | if (reqJson.containsKey("roomNum") && !(reqJson.get("roomNum").equals(""))) { |
| | | RoomDto roomDto = new RoomDto(); |
| | | String[] roomTitle = reqJson.getString("roomNum").split("-"); |
| | | roomDto.setFloorNum(roomTitle[0]); |
| | |
| | | |
| | | ReportExcelDto reportExcelDto = new ReportExcelDto(); |
| | | reportExcelDto.setOwner(ownerDtos.get(0)); |
| | | reportExcelDto.setRoomDto(roomDtos.get(0)); |
| | | FeeDetailDto feeDetailDto = new FeeDetailDto(); |
| | | List<Map> rooms = roomInnerServiceSMOImpl.queryRoomsAsReport(roomDto); |
| | | |
| | |
| | | RoomDto roomDto = new RoomDto(); |
| | | roomDto.setCommunityId(reqJson.getString("communityId")); |
| | | roomDto.setRow(row); |
| | | roomDto.setPage(page); |
| | | roomDto.setFloorNum(reqJson.containsKey("floorId")&&reqJson.getString("floorId").equals("")?null:reqJson.getString("floorId")); |
| | | roomDto.setPage(page * row - row); |
| | | roomDto.setFloorNum(reqJson.containsKey("floorId")&&!(reqJson.getString("floorId").equals(""))?reqJson.getString("floorId"):null); |
| | | roomDto.setOwnerName(reqJson.containsKey("ownerName")&&reqJson.getString("ownerName").equals("")?null:reqJson.getString("ownerName")); |
| | | List<Map> rooms = roomInnerServiceSMOImpl.queryRoomsAsReport(roomDto); |
| | | if (rooms.size() == 0) { |
| | | ResultVo resultVo = new ResultVo("未查询到数据"); |
| | | resultVo.setTotal(0); |
| | | resultVo.setRecords(0); |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.NOT_FOUND); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | |
| | | strings[7] = rooms.get(i - 1).get("room_area").toString(); |
| | | strings[8] = rooms.get(i - 1).get("name").toString(); |
| | | for (int j = 1; j <= feeConfigDtos.size(); j++) { |
| | | strings[8 + j] = feeConfigDtos.get(j - 1).getSquarePrice(); |
| | | strings[8 + j] = doublequ2(Double.parseDouble(feeConfigDtos.get(j - 1).getSquarePrice()))+""; |
| | | } |
| | | strings[8 + feeConfigDtos.size() + 1] = ""; |
| | | for (int j = 1; j <= feeConfigDtos.size(); j++) { |
| | | strings[8 + feeConfigDtos.size() + 1 + j] = (doublequ2(Double.parseDouble(feeConfigDtos.get(j - 1).getSquarePrice()) * Double.parseDouble(String.valueOf((BigDecimal) rooms.get(i - 1).get("room_area")))))+""; |
| | | } |
| | | strings[8 + (2 * feeConfigDtos.size()) + 2] = (doublequ2(Double.parseDouble(feeConfigDtos.get(feeConfigDtos.size() - 1).getSquarePrice()) * Double.parseDouble(String.valueOf((BigDecimal) rooms.get(i - 1).get("room_area")))))+""; |
| | | strings[8 + (2 * feeConfigDtos.size()) + 2] = Double.parseDouble(strings[8 + (2 * feeConfigDtos.size()) + 2]) * 12+""; |
| | | strings[8 + (2 * feeConfigDtos.size()) + 2] = doublequ2(Double.parseDouble(strings[8 + (2 * feeConfigDtos.size()) + 2]) * 12)+""; |
| | | HashMap<Object, Object> objectObjectHashMap = new HashMap<>(); |
| | | objectObjectHashMap.put("payObjId", map.get("room_id")); |
| | | List<Map> fee = reportFeeInnerServiceSMOImpl.onceRoomFee(objectObjectHashMap); |
| | | double allMoney = 0; |
| | | double allPayMoney = 0; |
| | | int monthCount = 0; |
| | | int noPayMoney = 0; |
| | | int year1 = 0; |
| | | int year2 = 0; |
| | | double noPayMoney = 0; |
| | | double year1 = 0; |
| | | double year2 = 0; |
| | | double discountMoney = 0; |
| | | String noPayDate = ""; |
| | | currentYear = DateUtil.getYear(); |
| | | for (Map map1 : fee){ |
| | | if(map1.containsKey("统计维度") && !(map1.get("统计维度").toString().contains("总计"))){ |
| | | allMoney += ((BigDecimal) map1.get("应收金额")).doubleValue(); |
| | | allPayMoney += ((BigDecimal) map1.get("实收金额")).doubleValue(); |
| | | monthCount += ((BigDecimal)map1.get("未收月数")).intValue(); |
| | | noPayMoney += ((BigDecimal)map1.get("未收金额")).intValue(); |
| | | allMoney = doublequ2(((BigDecimal) map1.get("应收金额")).doubleValue()+allMoney); |
| | | allPayMoney = doublequ2(((BigDecimal) map1.get("实收金额")).doubleValue()+allPayMoney); |
| | | monthCount = ((BigDecimal)map1.get("未收月数")).intValue()+monthCount; |
| | | noPayMoney = doublequ2(((BigDecimal)map1.get("未收金额")).intValue()+noPayMoney); |
| | | noPayDate = noPayDate + map1.get("未收区间"); |
| | | discountMoney += ((BigDecimal)map1.get("折扣金额")).doubleValue(); |
| | | discountMoney = doublequ2(((BigDecimal)map1.get("折扣金额")).doubleValue()+discountMoney); |
| | | if(map1.get("统计维度").equals("2026")){ |
| | | year1 += ((BigDecimal) map1.get("应收金额")).doubleValue(); |
| | | year1 = doublequ2(((BigDecimal) map1.get("应收金额")).doubleValue() + year1); |
| | | } |
| | | if(map1.get("统计维度").equals("2027")){ |
| | | year2 += ((BigDecimal) map1.get("应收金额")).doubleValue(); |
| | | year2 = doublequ2(((BigDecimal) map1.get("应收金额")).doubleValue() + year2); |
| | | } |
| | | } |
| | | |
| | |
| | | objectObjectHashMap.put("payObjId", roomId); |
| | | objectObjectHashMap.put("feeTypeCd",number); |
| | | List<Map> fee = reportFeeInnerServiceSMOImpl.onceRoomFee(objectObjectHashMap); |
| | | String[][] strings = new String[fee.size() + 1][17]; |
| | | setHeader(strings[0]); |
| | | |
| | | String[][] strings = new String[fee.size()][17]; |
| | | for (int i = 0 ; i < fee.size(); i++) { |
| | | Map map = fee.get(i); |
| | | strings[i][0] = (String) map.get("统计维度"); |
| | | strings[i][1] = ((BigDecimal) map.get("应收月数")).toString(); |
| | | strings[i][2] = ((BigDecimal) map.get("应收金额")).toString(); |
| | | strings[i][2] = doublequ2(((BigDecimal) map.get("应收金额")).doubleValue())+""; |
| | | // strings[i][3] = (String) map.get("折扣金额"); |
| | | strings[i][4] = ((BigDecimal) map.get("折扣金额")).toString(); |
| | | strings[i][4] = doublequ2(((BigDecimal) map.get("折扣金额")).doubleValue())+""; |
| | | // strings[i][5] = (String) map.get("折扣金额"); |
| | | // strings[i][6] = (String) map.get("折扣金额"); |
| | | // strings[i][7] = (String) map.get("折扣金额");//申请人 |
| | |
| | | // strings[i][9] = (String) map.get("折扣金额");//发起日期 |
| | | strings[i][10] = Double.parseDouble(strings[i][2]) - Double.parseDouble(strings[i][4])+""; |
| | | strings[i][11] = ((BigDecimal) map.get("已收月数")).toString(); |
| | | strings[i][12] = ((BigDecimal) map.get("实收金额")).toString(); |
| | | strings[i][12] = doublequ2(((BigDecimal) map.get("实收金额")).doubleValue())+""; |
| | | strings[i][13] = (String) map.get("已收区间"); |
| | | strings[i][14] = ((BigDecimal) map.get("未收月数")).toString(); |
| | | strings[i][15] = ((BigDecimal) map.get("未收金额")).toString(); |
| | | strings[i][15] = doublequ2(((BigDecimal) map.get("未收金额")).doubleValue())+""; |
| | | strings[i][16] = (String) map.get("未收区间"); |
| | | } |
| | | return strings; |
| | |
| | | |
| | | // 2. 第一个feeRow循环:原未显式改col,沿用前一个1(按原逻辑保持col=1) |
| | | for (int i = 0; i < feeRow; i++) { |
| | | header.add(createHeaderRow(feeConfigDtos.get(0).getFeeName(), 1, 3)); |
| | | header.add(createHeaderRow(feeConfigDtos.get(i).getFeeName(), 1, 3)); |
| | | } |
| | | |
| | | // 3. 设备运作费:原未改col,沿用前一个1 |
| | |
| | | |
| | | // 4. 第二个feeRow循环:原未显式改col,沿用前一个1(按原逻辑保持col=1) |
| | | for (int i = 0; i < feeRow; i++) { |
| | | header.add(createHeaderRow(feeConfigDtos.get(0).getFeeName(), 1, 3)); |
| | | header.add(createHeaderRow(feeConfigDtos.get(i).getFeeName(), 1, 3)); |
| | | } |
| | | |
| | | // 5. 年应收款:原显式setCol(1),保持col=1 |