From 3dfbf2598ab5b16ff76a99c7b75c889e261a08bb Mon Sep 17 00:00:00 2001
From: xiaogang <905166056@qq.com>
Date: 星期五, 20 八月 2021 18:00:58 +0800
Subject: [PATCH] 1、收银台费用计算后台计算2、优化显示细节问题

---
 service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java b/service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
index 4bcd365..05ab68c 100755
--- a/service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
+++ b/service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
@@ -5,13 +5,20 @@
 import com.java110.dto.RoomDto;
 import com.java110.dto.fee.FeeConfigDto;
 import com.java110.dto.fee.FeeDto;
+import com.java110.dto.owner.OwnerDto;
+import com.java110.dto.owner.OwnerRoomRelDto;
+import com.java110.dto.repair.RepairDto;
 import com.java110.dto.repair.RepairUserDto;
 import com.java110.dto.report.ReportDeposit;
 import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
 import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsTotalDto;
+import com.java110.intf.community.IRepairInnerServiceSMO;
 import com.java110.intf.fee.IFeeConfigInnerServiceSMO;
 import com.java110.intf.report.IReportFeeMonthStatisticsInnerServiceSMO;
+import com.java110.intf.user.IOwnerInnerServiceSMO;
+import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO;
 import com.java110.report.bmo.reportFeeMonthStatistics.IGetReportFeeMonthStatisticsBMO;
+import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
 import com.java110.utils.util.DateUtil;
 import com.java110.utils.util.StringUtil;
@@ -40,6 +47,15 @@
 
     @Autowired
     private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl;
+
+    @Autowired
+    private IRepairInnerServiceSMO repairInnerServiceSMOImpl;
+
+    @Autowired
+    private IOwnerRoomRelInnerServiceSMO ownerRoomRelInnerServiceSMOImpl;
+
+    @Autowired
+    private IOwnerInnerServiceSMO ownerInnerServiceSMOImpl;
 
     /**
      * @param reportFeeMonthStatisticsDto
@@ -366,6 +382,25 @@
                 }
                 //璐圭敤椤圭洰
                 reportFeeMonthStatistics.setFeeConfigDtos(feeConfigDtos);
+                if (!StringUtil.isEmpty(reportFeeMonthStatistics.getRepairId())) {
+                    RepairDto repairDto = new RepairDto();
+                    repairDto.setRepairId(reportFeeMonthStatistics.getRepairId());
+                    //鏌ヨ鎶ヤ慨鍗�
+                    List<RepairDto> repairDtos = repairInnerServiceSMOImpl.queryRepairs(repairDto);
+                    Assert.listOnlyOne(repairDtos, "鏌ヨ鎶ヤ慨鍗曢敊璇紒");
+                    if (!StringUtil.isEmpty(repairDtos.get(0).getRepairObjType()) && repairDtos.get(0).getRepairObjType().equals("004")) {
+                        OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto();
+                        ownerRoomRelDto.setRoomId(repairDtos.get(0).getRepairObjId());
+                        List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto);
+                        Assert.listOnlyOne(ownerRoomRelDtos, "鏌ヨ涓氫富鎴垮眿鍏崇郴琛ㄩ敊璇紒");
+                        OwnerDto ownerDto = new OwnerDto();
+                        ownerDto.setOwnerId(ownerRoomRelDtos.get(0).getOwnerId());
+                        ownerDto.setOwnerTypeCd("1001"); //涓氫富鏈汉
+                        List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto);
+                        Assert.listOnlyOne(ownerDtos, "鏌ヨ涓氫富淇℃伅閿欒锛�");
+                        reportFeeMonthStatistics.setOwnerName(ownerDtos.get(0).getName());
+                    }
+                }
                 reportList.add(reportFeeMonthStatistics);
             }
             //搴旀敹鎬婚噾棰�(灏忚)

--
Gitblit v1.8.0