| | |
| | | * @param workbook |
| | | */ |
| | | private void getRoomOweFees(IPageData pd, ComponentValidateResult result, Workbook workbook) { |
| | | |
| | | Sheet sheet = workbook.createSheet("催缴单"); |
| | | Drawing patriarch = sheet.createDrawingPatriarch(); |
| | | String apiUrl = ""; |
| | | ResponseEntity<String> responseEntity = null; |
| | | apiUrl = ServiceConstant.SERVICE_API_URL + "/api/feeApi/listAllRoomOweFees?communityId=" + result.getCommunityId(); |
| | | JSONObject reqJson = JSONObject.parseObject(pd.getReqData()); |
| | | apiUrl = ServiceConstant.SERVICE_API_URL + "/api/feeApi/listAllRoomOweFees" + mapToUrlParam(reqJson); |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", apiUrl, HttpMethod.GET); |
| | | |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { //跳过 保存单元信息 |
| | |
| | | |
| | | } |
| | | |
| | | Sheet sheet = workbook.createSheet("催缴单"); |
| | | Drawing patriarch = sheet.createDrawingPatriarch(); |
| | | |
| | | int line = 0; |
| | | double totalPageHeight = 0; |
| | | for (int roomIndex = 0; roomIndex < rooms.size(); roomIndex++) { |
| | | Map info = generatorRoomOweFee(sheet, workbook, rooms.getJSONObject(roomIndex), line, totalPageHeight, patriarch, feePrint); |
| | | Map<String, Object> info = generatorRoomOweFee(sheet, workbook, rooms.getJSONObject(roomIndex), line, totalPageHeight, patriarch, feePrint); |
| | | line = Integer.parseInt(info.get("line").toString()) + 1; |
| | | totalPageHeight = Double.parseDouble(info.get("totalPageHeight").toString()); |
| | | } |
| | |
| | | sheet.addMergedRegion(region); |
| | | |
| | | if (feePrintRemarks != null && feePrintRemarks.length > 0) { |
| | | for(int remarkIndex = 0 ;remarkIndex < feePrintRemarks.length; remarkIndex++) { |
| | | for (int remarkIndex = 0; remarkIndex < feePrintRemarks.length; remarkIndex++) { |
| | | row = sheet.createRow(line + fees.size() + 4 + remarkIndex); |
| | | row.createCell(0).setCellValue(feePrintRemarks[remarkIndex]); |
| | | row.setHeight((short) (defaultRowHeight)); |