java110
2021-11-18 f34a90c1ba0858628d01279e5e3894cf04c78aed
优化代码
4个文件已修改
41 ■■■■ 已修改文件
java110-bean/src/main/java/com/java110/dto/reportFeeMonthStatistics/ReportFeeMonthStatisticsDto.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/smo/assetExport/impl/ExportReportFeeSMOImpl.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/reportFeeMonthStatistics/ReportFeeMonthStatisticsDto.java
@@ -132,6 +132,7 @@
    private double curReceivedAmount;
    private double hisOweReceivedAmount;
    private double preReceivedAmount;
    private double allHisOweReceivedAmount;
    private String[] configIds;
@@ -697,4 +698,12 @@
    public void setYearMonth(String yearMonth) {
        this.yearMonth = yearMonth;
    }
    public double getAllHisOweReceivedAmount() {
        return allHisOweReceivedAmount;
    }
    public void setAllHisOweReceivedAmount(double allHisOweReceivedAmount) {
        this.allHisOweReceivedAmount = allHisOweReceivedAmount;
    }
}
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
@@ -393,7 +393,8 @@
    <!-- 查询费用月统计信息 大计 add by wuxw 2018-07-03 -->
    <select id="queryReportFeeSummaryMajor" 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
        left join building_room br on t.obj_id = br.room_id and t.obj_type = '3333' and br.status_cd = '0'
        left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
service-api/src/main/java/com/java110/api/smo/assetExport/impl/ExportReportFeeSMOImpl.java
@@ -4,13 +4,11 @@
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.parser.Feature;
import com.java110.api.smo.DefaultAbstractComponentSMO;
import com.java110.core.component.BaseComponentSMO;
import com.java110.api.smo.assetExport.IExportReportFeeSMO;
import com.java110.core.context.IPageData;
import com.java110.dto.fee.FeeConfigDto;
import com.java110.entity.component.ComponentValidateResult;
import com.java110.api.smo.assetExport.IExportReportFeeSMO;
import com.java110.utils.cache.MappingCache;
import com.java110.utils.constant.ServiceConstant;
import com.java110.utils.util.Assert;
import com.java110.utils.util.DateUtil;
import com.java110.utils.util.StringUtil;
@@ -1709,22 +1707,33 @@
        Sheet sheet = workbook.createSheet("费用汇总表");
        Row row = sheet.createRow(0);
        row.createCell(0).setCellValue("日期");
        row.createCell(1).setCellValue("应收金额");
        row.createCell(2).setCellValue("实收金额");
        row.createCell(3).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("欠费金额(单位:元)");
        //查询楼栋信息
        JSONArray rooms = this.getReportFeeSummaryFee(pd, componentValidateResult);
        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("receivableAmount"));
            row.createCell(2).setCellValue(dataObj.getString("receivedAmount"));
            row.createCell(3).setCellValue(dataObj.getString("oweAmount"));
            row.createCell(1).setCellValue(dataObj.getString("hisOweAmount"));
            row.createCell(2).setCellValue(dataObj.getString("curReceivableAmount"));
            row.createCell(3).setCellValue(dataObj.getString("curReceivedAmount"));
            row.createCell(4).setCellValue(dataObj.getString("hisOweReceivedAmount"));
            row.createCell(5).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(6).setCellValue(oweFeeDec.doubleValue() + "");
        }
    }
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
@@ -111,7 +111,7 @@
                for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto1 : reportFeeMonthStatisticsList) {
                    reportFeeMonthStatisticsDto1.setAllReceivableAmount(tmpReportFeeMonthStatisticsDto.getAllReceivableAmount());
                    reportFeeMonthStatisticsDto1.setAllReceivedAmount(tmpReportFeeMonthStatisticsDto.getAllReceivedAmount());
                    reportFeeMonthStatisticsDto1.setAllOweAmount(tmpReportFeeMonthStatisticsDto.getAllOweAmount());
                    reportFeeMonthStatisticsDto1.setAllHisOweReceivedAmount(tmpReportFeeMonthStatisticsDto.getAllHisOweReceivedAmount());
                }
            }
        } else {