From b173d31976fc4731b7c247d4038de92134eba317 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 29 六月 2023 11:42:17 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
---
service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryReportFeeDetailRoomCmd.java | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryReportFeeDetailRoomCmd.java b/service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryReportFeeDetailRoomCmd.java
index b857d29..1e315fb 100644
--- a/service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryReportFeeDetailRoomCmd.java
+++ b/service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryReportFeeDetailRoomCmd.java
@@ -6,10 +6,8 @@
import com.java110.core.context.ICmdDataFlowContext;
import com.java110.core.event.cmd.Cmd;
import com.java110.core.event.cmd.CmdEvent;
-import com.java110.dto.RoomDto;
+import com.java110.dto.room.RoomDto;
import com.java110.dto.report.QueryStatisticsDto;
-import com.java110.intf.community.IRoomV1InnerServiceSMO;
-import com.java110.intf.report.IReportFeeMonthStatisticsInnerServiceSMO;
import com.java110.report.statistics.IBaseDataStatistics;
import com.java110.report.statistics.IFeeStatistics;
import com.java110.utils.exception.CmdException;
@@ -19,6 +17,7 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
+import java.math.BigDecimal;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
@@ -38,8 +37,6 @@
@Autowired
private IBaseDataStatistics baseDataStatisticsImpl;
- @Autowired
- private IReportFeeMonthStatisticsInnerServiceSMO reportFeeMonthStatisticsInnerServiceSMOImpl;
@Override
public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
@@ -115,15 +112,24 @@
return datas;
}
+ BigDecimal oweFee = null;
+ BigDecimal receivedFee = null;
for(int dataIndex = 0; dataIndex < datas.size();dataIndex ++){
+ oweFee = new BigDecimal(0.00);
+ receivedFee = new BigDecimal(0.00);
data = datas.getJSONObject(dataIndex);
for(Map info : infos){
if(!data.get("roomId").toString().equals(info.get("objId"))){
continue;
}
+
+ oweFee = oweFee.add(new BigDecimal(info.get("oweFee").toString()));
+ receivedFee = receivedFee.add(new BigDecimal(info.get("receivedFee").toString()));
data.put("oweFee"+info.get("feeTypeCd").toString(),info.get("oweFee"));
data.put("receivedFee"+info.get("feeTypeCd").toString(),info.get("receivedFee"));
}
+ data.put("oweFee",oweFee.doubleValue());
+ data.put("receivedFee",receivedFee.doubleValue());
}
return datas;
--
Gitblit v1.8.0