wuxw лет назад: 4
Родитель
Сommit
ad7a74ccec

+ 2 - 1
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml

@@ -583,7 +583,8 @@
     <!-- 查询费用月统计信息 add by wuxw 2018-07-03 -->
     <select id="queryReportFloorUnitFeeSummaryMajor" parameterType="Map" resultType="Map">
         select
-        sum(t.cur_received_amount+t.his_owe_received_amount+t.pre_received_amount) allReceivedAmount
+        sum(t.cur_received_amount+t.his_owe_received_amount+t.pre_received_amount) allReceivedAmount,
+        sum(t.his_owe_received_amount) allHisOweReceivedAmount
         from report_fee_month_statistics t
         INNER JOIN building_room br on t.obj_id = br.room_id and br.status_cd = '0'
         inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'

+ 17 - 6
service-api/src/main/java/com/java110/api/smo/assetExport/impl/ExportReportFeeSMOImpl.java

@@ -1622,24 +1622,35 @@ public class ExportReportFeeSMOImpl extends DefaultAbstractComponentSMO implemen
         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(3).setCellValue("历史欠费(单位:元)");
+        row.createCell(4).setCellValue("当月应收(单位:元)");
+        row.createCell(5).setCellValue("当月实收(单位:元)");
+        row.createCell(6).setCellValue("欠费追回(单位:元)");
+        row.createCell(7).setCellValue("预交费用(单位:元)");
+        row.createCell(8).setCellValue("欠费金额(单位:元)");
         //查询楼栋信息
         JSONArray rooms = this.getReportFloorUnitFeeSummary(pd, result);
         if (rooms == null || rooms.size() == 0) {
             return;
         }
         JSONObject dataObj = null;
+        BigDecimal oweFeeDec = null;
         for (int roomIndex = 0; roomIndex < rooms.size(); roomIndex++) {
             row = sheet.createRow(roomIndex + 1);
             dataObj = rooms.getJSONObject(roomIndex);
             row.createCell(0).setCellValue(dataObj.getString("feeYear") + "年" + dataObj.getString("feeMonth") + "月");
             row.createCell(1).setCellValue(dataObj.getString("floorNum") + "栋");
             row.createCell(2).setCellValue(dataObj.getString("unitNum") + "单元");
-            row.createCell(3).setCellValue(dataObj.getString("receivableAmount"));
-            row.createCell(4).setCellValue(dataObj.getString("receivedAmount"));
-            row.createCell(5).setCellValue(dataObj.getString("oweAmount"));
+            row.createCell(3).setCellValue(dataObj.getString("hisOweAmount"));
+            row.createCell(4).setCellValue(dataObj.getString("curReceivableAmount"));
+            row.createCell(5).setCellValue(dataObj.getString("curReceivedAmount"));
+            row.createCell(6).setCellValue(dataObj.getString("hisOweReceivedAmount"));
+            row.createCell(7).setCellValue(dataObj.getString("preReceivedAmount"));
+            oweFeeDec = new BigDecimal(Double.parseDouble(dataObj.getString("hisOweAmount")))
+                    .add(new BigDecimal(Double.parseDouble(dataObj.getString("curReceivableAmount"))))
+                    .subtract(new BigDecimal(Double.parseDouble(dataObj.getString("curReceivedAmount"))))
+                    .subtract(new BigDecimal(Double.parseDouble(dataObj.getString("hisOweReceivedAmount")))).setScale(2, BigDecimal.ROUND_HALF_UP);
+            row.createCell(8).setCellValue(oweFeeDec.doubleValue() < 0 ? "0" : oweFeeDec.doubleValue() + "");
         }
     }
 

+ 1 - 0
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java

@@ -242,6 +242,7 @@ public class GetReportFeeMonthStatisticsBMOImpl implements IGetReportFeeMonthSta
                     reportFeeMonthStatisticsDto1.setAllReceivableAmount(tmpReportFeeMonthStatisticsDto.getAllReceivableAmount());
                     reportFeeMonthStatisticsDto1.setAllReceivedAmount(tmpReportFeeMonthStatisticsDto.getAllReceivedAmount());
                     reportFeeMonthStatisticsDto1.setAllOweAmount(tmpReportFeeMonthStatisticsDto.getAllOweAmount());
+                    reportFeeMonthStatisticsDto1.setAllHisOweReceivedAmount(tmpReportFeeMonthStatisticsDto.getAllHisOweReceivedAmount());
                 }
             }
         } else {

+ 8 - 7
service-report/src/main/java/com/java110/report/smo/impl/ReportCustomComponentFooterV1InnerServiceSMOImpl.java

@@ -83,19 +83,20 @@ public class ReportCustomComponentFooterV1InnerServiceSMOImpl extends BaseServic
     }
 
 
-    private void desCode(List<ReportCustomComponentFooterDto> ReportCustomComponentFooterDtos) {
-        if (ReportCustomComponentFooterDtos == null || ReportCustomComponentFooterDtos.size() < 1) {
+    private void desCode(List<ReportCustomComponentFooterDto> reportCustomComponentFooterDtos) {
+        if (reportCustomComponentFooterDtos == null || reportCustomComponentFooterDtos.size() < 1) {
             return;
         }
-        for (ReportCustomComponentFooterDto reportCustomComponentDto : ReportCustomComponentFooterDtos) {
+        for (ReportCustomComponentFooterDto reportCustomComponentFooterDto : reportCustomComponentFooterDtos) {
             try {
-                if (!StringUtil.isEmpty(reportCustomComponentDto.getComponentSql())) {
-                    reportCustomComponentDto.setComponentSql(new String(Base64Convert.base64ToByte(reportCustomComponentDto.getComponentSql()), "UTF-8"));
+                if (!StringUtil.isEmpty(reportCustomComponentFooterDto.getComponentSql())) {
+                    reportCustomComponentFooterDto.setComponentSql(new String(Base64Convert.base64ToByte(reportCustomComponentFooterDto.getComponentSql()), "UTF-8"));
                 }
-                if (!StringUtil.isEmpty(reportCustomComponentDto.getJavaScript())) {
-                    reportCustomComponentDto.setJavaScript(new String(Base64Convert.base64ToByte(reportCustomComponentDto.getJavaScript()), "UTF-8"));
+                if (!StringUtil.isEmpty(reportCustomComponentFooterDto.getJavaScript())) {
+                    reportCustomComponentFooterDto.setJavaScript(new String(Base64Convert.base64ToByte(reportCustomComponentFooterDto.getJavaScript()), "UTF-8"));
                 }
             } catch (Exception e) {
+
             }
         }
     }