| | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.entity.component.ComponentValidateResult; |
| | | import com.java110.dto.system.ComponentValidateResult; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.ListUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.xssf.streaming.SXSSFWorkbook; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpHeaders; |
| | |
| | | public static final String RESOURCE_STAFF_FEE_MANAGE = "staffFeeManage"; |
| | | public static final String REPORT_PAY_FEE_DEPOSIT = "reportPayFeeDeposit"; |
| | | public static final String INSPECTION_TASK_DETAILS = "inspectionTaskDetails"; |
| | | |
| | | public static final String EXPORT_EXCEL = "exportExcel"; |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | |
| | | pdHeaders.remove("user_id"); |
| | | pdHeaders.put("user-id", result.getUserId()); |
| | | pdHeaders.put("user_id", result.getUserId()); |
| | | pdHeaders.put("login-user-id",result.getLoginUserId()); |
| | | pdHeaders.put("login-user-id", result.getLoginUserId()); |
| | | } |
| | | |
| | | Assert.hasKeyAndValue(JSONObject.parseObject(pd.getReqData()), "communityId", "请求中未包含小区"); |
| | | Assert.hasKeyAndValue(JSONObject.parseObject(pd.getReqData()), "pagePath", "请求中未包含页面"); |
| | | |
| | |
| | | break; |
| | | case INSPECTION_TASK_DETAILS: |
| | | inspectionTaskDetails(pd, result, workbook); |
| | | |
| | | } |
| | | ByteArrayOutputStream os = new ByteArrayOutputStream(); |
| | | MultiValueMap headers = new HttpHeaders(); |
| | |
| | | // 保存数据 |
| | | return new ResponseEntity<Object>(context, headers, HttpStatus.OK); |
| | | } |
| | | |
| | | |
| | | private void reportListOweFee(IPageData pd, ComponentValidateResult result, Workbook workbook) { |
| | | JSONObject reqJson = JSONObject.parseObject(pd.getReqData()); |
| | |
| | | for (int roomIndex = 0; roomIndex < deadlineFees.size(); roomIndex++) { |
| | | row = sheet.createRow(roomIndex + 1); |
| | | dataObj = deadlineFees.getJSONObject(roomIndex); |
| | | row.createCell(0).setCellValue(dataObj.getString("objNameNum")); |
| | | row.createCell(0).setCellValue(dataObj.getString("objName")); |
| | | row.createCell(1).setCellValue(dataObj.getString("feeName")); |
| | | row.createCell(2).setCellValue(dataObj.getString("deadlineTime")); |
| | | row.createCell(3).setCellValue(dataObj.getString("oweDay")); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | private void resourceStoreUseRecordManage(IPageData pd, ComponentValidateResult result, Workbook workbook) { |
| | | Sheet sheet = workbook.createSheet("物品使用记录"); |
| | | Row row = sheet.createRow(0); |
| | |
| | | JSONObject reqJson = JSONObject.parseObject(pd.getReqData()); |
| | | reqJson.put("page", 1); |
| | | reqJson.put("row", 10000); |
| | | reqJson.put("hasOweFee","Y"); |
| | | reqJson.put("hasOweFee", "Y"); |
| | | apiUrl = "/reportOweFee/queryReportAllOweFee" + mapToUrlParam(reqJson); |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", apiUrl, HttpMethod.GET); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { //跳过 保存单元信息 |
| | |
| | | JSONObject reqJson = JSONObject.parseObject(pd.getReqData()); |
| | | reqJson.put("page", 1); |
| | | reqJson.put("row", 10000); |
| | | apiUrl = "/reportFeeMonthStatistics/queryPrePayment" + mapToUrlParam(reqJson); |
| | | apiUrl = "/reportFeeMonthStatistics.queryPrePayment" + mapToUrlParam(reqJson); |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", apiUrl, HttpMethod.GET); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { //跳过 保存单元信息 |
| | | return null; |
| | |
| | | JSONObject reqJson = JSONObject.parseObject(pd.getReqData()); |
| | | reqJson.put("page", 1); |
| | | reqJson.put("row", 10000); |
| | | apiUrl = "/reportFeeMonthStatistics/queryDeadlineFee" + mapToUrlParam(reqJson); |
| | | apiUrl = "/reportFeeMonthStatistics.queryDeadlineFee" + mapToUrlParam(reqJson); |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", apiUrl, HttpMethod.GET); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { //跳过 保存单元信息 |
| | | return null; |
| | |
| | | row.createCell(0).setCellValue("费用编号"); |
| | | row.createCell(1).setCellValue("房号"); |
| | | row.createCell(2).setCellValue("业主"); |
| | | row.createCell(3).setCellValue("面积"); |
| | | row.createCell(4).setCellValue("费用项"); |
| | | row.createCell(5).setCellValue("费用开始时间"); |
| | | row.createCell(6).setCellValue("更新时间"); |
| | | row.createCell(7).setCellValue("欠费时长(天)"); |
| | | row.createCell(8).setCellValue("欠费金额"); |
| | | row.createCell(3).setCellValue("业主电话"); |
| | | row.createCell(4).setCellValue("面积"); |
| | | row.createCell(5).setCellValue("费用项"); |
| | | row.createCell(6).setCellValue("开始时间"); |
| | | row.createCell(7).setCellValue("结束时间"); |
| | | row.createCell(8).setCellValue("欠费时长(天)"); |
| | | row.createCell(9).setCellValue("欠费时长(月)"); |
| | | row.createCell(10).setCellValue("欠费金额"); |
| | | |
| | | //查询楼栋信息 |
| | | JSONArray rooms = this.getReportOweFeeDetail(pd, result); |
| | | if (rooms == null || rooms.size() == 0) { |
| | | if (ListUtil.isNull(rooms)) { |
| | | return; |
| | | } |
| | | JSONObject dataObj = null; |
| | | BigDecimal monthDec = null; |
| | | for (int roomIndex = 0; roomIndex < rooms.size(); roomIndex++) { |
| | | row = sheet.createRow(roomIndex + 1); |
| | | dataObj = rooms.getJSONObject(roomIndex); |
| | | row.createCell(0).setCellValue(roomIndex + 1); |
| | | row.createCell(1).setCellValue(dataObj.getString("objName")); |
| | | row.createCell(2).setCellValue(dataObj.getString("ownerName")); |
| | | row.createCell(3).setCellValue(dataObj.getString("builtUpArea")); |
| | | row.createCell(4).setCellValue(dataObj.getString("feeName")); |
| | | row.createCell(5).setCellValue(dataObj.getString("feeCreateTime")); |
| | | row.createCell(6).setCellValue(dataObj.getString("updateTime")); |
| | | row.createCell(7).setCellValue(dataObj.getString("oweDay")); |
| | | row.createCell(8).setCellValue(dataObj.getString("oweAmount")); |
| | | row.createCell(3).setCellValue(dataObj.getString("ownerTel")); |
| | | row.createCell(4).setCellValue(dataObj.getString("builtUpArea")); |
| | | row.createCell(5).setCellValue(dataObj.getString("feeName")); |
| | | row.createCell(6).setCellValue(dataObj.getString("startTime")); |
| | | row.createCell(7).setCellValue(dataObj.getString("endTime")); |
| | | row.createCell(8).setCellValue(dataObj.getString("oweDay")); |
| | | monthDec = new BigDecimal(dataObj.getString("oweDay")); |
| | | monthDec = monthDec.divide(new BigDecimal("30"), 2, BigDecimal.ROUND_HALF_UP); |
| | | row.createCell(9).setCellValue(monthDec.doubleValue()); |
| | | row.createCell(10).setCellValue(dataObj.getString("oweAmount")); |
| | | } |
| | | } |
| | | |
| | |
| | | String[] split = receivedAmount.split("-"); |
| | | receivedAmount = split[1]; |
| | | } |
| | | if(!StringUtil.isEmpty(str) || !StringUtil.isEmpty(discount)) { |
| | | if (!StringUtil.isEmpty(str) || !StringUtil.isEmpty(discount)) { |
| | | row.createCell(7).setCellValue(receivedAmount + "(" + str + discount + ")"); |
| | | } else { |
| | | row.createCell(7).setCellValue(receivedAmount); |
| | |
| | | JSONObject reqJson = JSONObject.parseObject(pd.getReqData()); |
| | | reqJson.put("page", 1); |
| | | reqJson.put("row", 10000); |
| | | apiUrl = "/reportFeeMonthStatistics/queryReportFeeSummary" + mapToUrlParam(reqJson); |
| | | apiUrl = "/reportFeeMonthStatistics.queryReportFeeSummary" + mapToUrlParam(reqJson); |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", apiUrl, HttpMethod.GET); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { //跳过 保存单元信息 |
| | | return null; |