From 54a627368f2c66773970484c6fcf0eb44bd5efaa Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 12 七月 2022 09:28:44 +0800
Subject: [PATCH] 完成 报表结算,应该以费用开始时间(或者结束时间)为准。(水电抄表一般为下个月才导入系统,应收金额应该结算到上个月)
---
service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java b/service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java
index f9cac68..7827117 100755
--- a/service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java
+++ b/service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java
@@ -5,6 +5,7 @@
import com.java110.core.log.LoggerFactory;
import com.java110.core.smo.IComputeFeeSMO;
import com.java110.dto.RoomDto;
+import com.java110.dto.fee.FeeConfigDto;
import com.java110.dto.fee.FeeDto;
import com.java110.dto.owner.OwnerCarDto;
import com.java110.dto.report.ReportCarDto;
@@ -513,6 +514,8 @@
reportFeeMonthStatisticsPo.setPreReceivedAmount(getReceivedAmount(tmpReportFeeDto, 3) + "");
reportFeeMonthStatisticsPo.setUpdateTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
reportFeeMonthStatisticsServiceDaoImpl.saveReportFeeMonthStatisticsInfo(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsPo));
+ //澶勭悊姘寸數璐癸紝姘寸數璐规牴鎹紑濮嬫椂闂磋鍦ㄧ浉搴旀湀琛ュ厖鏁版嵁
+ dealMeteWater(reportFeeMonthStatisticsPo, tmpReportFeeDto);
}
@@ -526,6 +529,45 @@
reportFeeMonthStatisticsServiceDaoImpl.updateReportFeeMonthStatisticsOwe(BeanConvertUtil.beanCovertMap(tmpReportFeeMonthStatisticsPo));
}
+ /**
+ * 澶勭悊姘寸數璐�
+ *
+ * @param reportFeeMonthStatisticsPo
+ * @param tmpReportFeeDto
+ */
+ private void dealMeteWater(ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo, ReportFeeDto tmpReportFeeDto) {
+
+ //濡傛灉鏄� 姘磋垂 鐢佃垂 鐓ゆ皵璐�
+ if (!FeeConfigDto.FEE_TYPE_CD_METER.equals(tmpReportFeeDto.getFeeTypeCd())
+ && !FeeConfigDto.FEE_TYPE_CD_WATER.equals(tmpReportFeeDto.getFeeTypeCd())
+ && !FeeConfigDto.FEE_TYPE_CD_GAS.equals(tmpReportFeeDto.getFeeTypeCd())
+ ) {
+ return;
+ }
+ //鏍规嵁璐圭敤寮�濮嬫椂闂� 璁$畻鏈堜唤
+ Date endTime = tmpReportFeeDto.getEndTime();
+ //鍘婚櫎 0 鍥犱负琛ㄩ噷鐨勬湀浠芥槸娌℃湁闆�
+ String curMonth = Integer.parseInt(DateUtil.getFormatTimeString(endTime, "MM"))+"";
+ String curYear = DateUtil.getFormatTimeString(endTime, "YYYY");
+ //鏌ヨ鏄惁瀛樺湪 鏁版嵁
+ ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = new ReportFeeMonthStatisticsDto();
+ reportFeeMonthStatisticsDto.setCommunityId(tmpReportFeeDto.getCommunityId());
+ reportFeeMonthStatisticsDto.setConfigId(tmpReportFeeDto.getConfigId());
+ reportFeeMonthStatisticsDto.setObjId(tmpReportFeeDto.getPayerObjId());
+ //reportFeeMonthStatisticsDto.setFeeId(tmpReportFeeDto.getFeeId());
+ reportFeeMonthStatisticsDto.setObjType(tmpReportFeeDto.getPayerObjType());
+ reportFeeMonthStatisticsDto.setFeeYear(curYear);
+ reportFeeMonthStatisticsDto.setFeeMonth(curMonth);
+ List<ReportFeeMonthStatisticsDto> statistics = BeanConvertUtil.covertBeanList(
+ reportFeeMonthStatisticsServiceDaoImpl.getReportFeeMonthStatisticsInfo(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto)),
+ ReportFeeMonthStatisticsDto.class);
+ if (!ListUtil.isNull(statistics)) {
+ return;
+ }
+ reportFeeMonthStatisticsPo.setStatisticsId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_statisticsId));
+ reportFeeMonthStatisticsServiceDaoImpl.saveReportFeeMonthStatisticsInfo(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsPo));
+ }
+
/**
* @return
--
Gitblit v1.8.0