From a5e6a69003f869d667a462d3d0273437080de834 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 27 五月 2021 15:03:39 +0800
Subject: [PATCH] 优化代码

---
 service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java |  104 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 103 insertions(+), 1 deletions(-)

diff --git a/service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java b/service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java
old mode 100644
new mode 100755
index 49aa9ab..93b8522
--- a/service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java
+++ b/service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java
@@ -1,6 +1,8 @@
 package com.java110.report.api;
 
 import com.alibaba.fastjson.JSONObject;
+import com.java110.dto.RoomDto;
+import com.java110.dto.repair.RepairUserDto;
 import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
 import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
 import com.java110.report.bmo.reportFeeMonthStatistics.IDeleteReportFeeMonthStatisticsBMO;
@@ -15,8 +17,9 @@
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.Calendar;
-
 
 @RestController
 @RequestMapping(value = "/reportFeeMonthStatistics")
@@ -24,8 +27,10 @@
 
     @Autowired
     private ISaveReportFeeMonthStatisticsBMO saveReportFeeMonthStatisticsBMOImpl;
+
     @Autowired
     private IUpdateReportFeeMonthStatisticsBMO updateReportFeeMonthStatisticsBMOImpl;
+
     @Autowired
     private IDeleteReportFeeMonthStatisticsBMO deleteReportFeeMonthStatisticsBMOImpl;
 
@@ -330,6 +335,53 @@
     }
 
     /**
+     * 鎶ヤ慨缁熻琛�
+     *
+     * @param communityId 灏忓尯id
+     * @return
+     * @serviceCode /reportFeeMonthStatistics/queryRepair
+     * @path /app/reportFeeMonthStatistics/queryRepair
+     */
+    @RequestMapping(value = "/queryRepair", method = RequestMethod.GET)
+    public ResponseEntity<String> queryRepair(@RequestParam(value = "communityId") String communityId,
+                                              @RequestParam(value = "repairId", required = false) String repairId,
+                                              @RequestParam(value = "state", required = false) String state,
+                                              @RequestParam(value = "staffId", required = false) String staffId,
+                                              @RequestParam(value = "staffName", required = false) String staffName,
+                                              @RequestParam(value = "preStaffId", required = false) String preStaffId,
+                                              @RequestParam(value = "preStaffName", required = false) String preStaffName,
+                                              @RequestParam(value = "beginStartTime", required = false) String beginStartTime,
+                                              @RequestParam(value = "beginEndTime", required = false) String beginEndTime,
+                                              @RequestParam(value = "finishStartTime", required = false) String finishStartTime,
+                                              @RequestParam(value = "finishEndTime", required = false) String finishEndTime,
+                                              @RequestParam(value = "page") int page,
+                                              @RequestParam(value = "row") int row) {
+        RepairUserDto repairUserDto = new RepairUserDto();
+        repairUserDto.setCommunityId(communityId);
+        repairUserDto.setRepairId(repairId);
+        repairUserDto.setState(state);
+        repairUserDto.setStaffId(staffId);
+        repairUserDto.setStaffName(staffName);
+        repairUserDto.setPreStaffId(preStaffId);
+        repairUserDto.setPreStaffName(preStaffName);
+        if (!StringUtil.isEmpty(beginStartTime)) {
+            repairUserDto.setBeginStartTime(beginStartTime + " 00:00:00");
+        }
+        if (!StringUtil.isEmpty(beginEndTime)) {
+            repairUserDto.setBeginEndTime(beginEndTime + " 23:59:59");
+        }
+        if (!StringUtil.isEmpty(finishStartTime)) {
+            repairUserDto.setFinishStartTime(finishStartTime + " 00:00:00");
+        }
+        if (!StringUtil.isEmpty(finishEndTime)) {
+            repairUserDto.setFinishEndTime(finishEndTime + " 23:59:59");
+        }
+        repairUserDto.setPage(page);
+        repairUserDto.setRow(row);
+        return getReportFeeMonthStatisticsBMOImpl.queryRepair(repairUserDto);
+    }
+
+    /**
      * 鏌ヨ璐圭敤鍒嗛」琛�
      *
      * @param communityId 灏忓尯ID
@@ -441,4 +493,54 @@
         return getReportFeeMonthStatisticsBMOImpl.queryOwePaymentCount(reportFeeMonthStatisticsDto);
     }
 
+
+    /**
+     * 鏌ヨ璐圭敤鍒嗛」琛�
+     *
+     * @param communityId 灏忓尯ID
+     * @return
+     * @serviceCode /reportFeeMonthStatistics/queryReportProficient
+     * @path /app/reportFeeMonthStatistics/queryReportProficient
+     */
+    @RequestMapping(value = "/queryReportProficient", method = RequestMethod.GET)
+    public ResponseEntity<String> queryReportProficient(@RequestParam(value = "communityId") String communityId) {
+        ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = new ReportFeeMonthStatisticsDto();
+        reportFeeMonthStatisticsDto.setCommunityId(communityId);
+        return getReportFeeMonthStatisticsBMOImpl.queryReportProficientCount(reportFeeMonthStatisticsDto);
+    }
+
+    /**
+     * 鏌ヨ鏈敹璐规埧灞�
+     * select t.* from building_room t
+     * inner join building_unit bu on t.unit_id  = bu.unit_id and bu.status_cd = '0'
+     * inner join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
+     * where t.status_cd = '0'
+     * and not exists(
+     * 	select 1 from pay_fee pf where t.room_id = pf.payer_obj_id and pf.status_cd = '0' and pf.state = '2008001'
+     * )
+     *
+     * limit 10
+     */
+
+    /**
+     * 鏌ヨ璐圭敤鍒嗛」琛�
+     *
+     * @param communityId 灏忓尯ID
+     * @return
+     * @serviceCode /reportFeeMonthStatistics/queryNoFeeRooms
+     * @path /app/reportFeeMonthStatistics/queryNoFeeRooms
+     */
+    @RequestMapping(value = "/queryNoFeeRooms", method = RequestMethod.GET)
+    public ResponseEntity<String> queryNoFeeRooms(
+            @RequestParam(value = "communityId") String communityId,
+            @RequestParam(value = "page") int page,
+            @RequestParam(value = "row") int row
+            ) {
+        RoomDto roomDto = new RoomDto();
+        roomDto.setCommunityId(communityId);
+        roomDto.setPage(page);
+        roomDto.setRow(row);
+        return getReportFeeMonthStatisticsBMOImpl.queryNoFeeRooms(roomDto);
+    }
+
 }

--
Gitblit v1.8.0