java110 il y a 4 ans
Parent
commit
b246e4bcca

+ 36 - 0
java110-bean/src/main/java/com/java110/dto/reportOweFee/ReportOweFeeDto.java

@@ -35,6 +35,10 @@ public class ReportOweFeeDto extends PageDto implements Serializable {
     private String payerObjId;
     private String[] payerObjIds;
     private String hasOweFee;
+    private String floorId;
+    private String unitId;
+    private String roomSubType;
+    private String roomNum;
     List<ReportOweFeeItemDto> items;
 
 
@@ -219,4 +223,36 @@ public class ReportOweFeeDto extends PageDto implements Serializable {
     public void setHasOweFee(String hasOweFee) {
         this.hasOweFee = hasOweFee;
     }
+
+    public String getFloorId() {
+        return floorId;
+    }
+
+    public void setFloorId(String floorId) {
+        this.floorId = floorId;
+    }
+
+    public String getUnitId() {
+        return unitId;
+    }
+
+    public void setUnitId(String unitId) {
+        this.unitId = unitId;
+    }
+
+    public String getRoomSubType() {
+        return roomSubType;
+    }
+
+    public void setRoomSubType(String roomSubType) {
+        this.roomSubType = roomSubType;
+    }
+
+    public String getRoomNum() {
+        return roomNum;
+    }
+
+    public void setRoomNum(String roomNum) {
+        this.roomNum = roomNum;
+    }
 }

+ 29 - 1
java110-db/src/main/resources/mapper/report/ReportOweFeeServiceDaoImplMapper.xml

@@ -18,8 +18,22 @@
         select distinct(t.payer_obj_id) payerObjId
         from report_owe_fee t
         LEFT JOIN pay_fee pf on t.fee_id = pf.fee_id
+        LEFT JOIN building_room br on pf.payer_obj_id = br.room_id and br.status_cd = '0'
+        LEFT JOIN building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
         where 1 =1
         and pf.status_cd = '0'
+        <if test="roomSubType !=null and roomSubType != ''">
+            and br.room_sub_type = #{roomSubType}
+        </if>
+        <if test="roomNum !=null and roomNum != ''">
+            and br.room_num = #{roomNum}
+        </if>
+        <if test="floorId !=null and floorId != ''">
+            and bu.floor_id = #{floorId}
+        </if>
+        <if test="unitId !=null and unitId != ''">
+            and bu.unit_id = #{unitId}
+        </if>
         <if test="configName !=null and configName != ''">
             and t.config_name= #{configName}
         </if>
@@ -135,7 +149,7 @@
             </if>
         </set>
         where 1=1
-            and t.owe_id= #{oweId}
+        and t.owe_id= #{oweId}
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
@@ -162,8 +176,22 @@
         select count(distinct(t.payer_obj_id)) count
         from report_owe_fee t
         LEFT JOIN pay_fee pf on t.fee_id = pf.fee_id
+        LEFT JOIN building_room br on pf.payer_obj_id = br.room_id and br.status_cd = '0'
+        LEFT JOIN building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
         where 1 =1
         and pf.status_cd = '0'
+        <if test="roomSubType !=null and roomSubType != ''">
+            and br.room_sub_type = #{roomSubType}
+        </if>
+        <if test="roomNum !=null and roomNum != ''">
+            and br.room_num = #{roomNum}
+        </if>
+        <if test="floorId !=null and floorId != ''">
+            and bu.floor_id = #{floorId}
+        </if>
+        <if test="unitId !=null and unitId != ''">
+            and bu.unit_id = #{unitId}
+        </if>
         <if test="configName !=null and configName != ''">
             and t.config_name= #{configName}
         </if>

+ 13 - 3
service-report/src/main/java/com/java110/report/api/ReportOweFeeApi.java

@@ -97,6 +97,11 @@ public class ReportOweFeeApi {
                                                     @RequestParam(value = "configIds", required = false) String configIds,
                                                     @RequestParam(value = "payObjType", required = false) String payObjType,
                                                     @RequestParam(value = "num", required = false) String num,
+                                                    @RequestParam(value = "ownerName", required = false) String ownerName,
+                                                    @RequestParam(value = "floorId", required = false) String floorId,
+                                                    @RequestParam(value = "unitId", required = false) String unitId,
+                                                    @RequestParam(value = "roomSubType", required = false) String roomSubType,
+                                                    @RequestParam(value = "roomNum", required = false) String roomNum,
                                                     @RequestParam(value = "page") int page,
                                                     @RequestParam(value = "row") int row) {
         ReportOweFeeDto reportOweFeeDto = new ReportOweFeeDto();
@@ -105,6 +110,11 @@ public class ReportOweFeeApi {
         reportOweFeeDto.setPayerObjType(payObjType);
         reportOweFeeDto.setPayerObjName(num);
         reportOweFeeDto.setCommunityId(communityId);
+        reportOweFeeDto.setOwnerName(ownerName);
+        reportOweFeeDto.setFloorId(floorId);
+        reportOweFeeDto.setUnitId(unitId);
+        reportOweFeeDto.setRoomSubType(roomSubType);
+        reportOweFeeDto.setRoomNum(roomNum);
         if (!StringUtil.isEmpty(configIds)) {
             String[] tmpConfigIds = configIds.split(",");
             reportOweFeeDto.setConfigIds(tmpConfigIds);
@@ -122,9 +132,9 @@ public class ReportOweFeeApi {
      */
     @RequestMapping(value = "/queryReportAllOweFee", method = RequestMethod.GET)
     public ResponseEntity<String> queryReportAllOweFee(@RequestParam(value = "communityId") String communityId,
-                                                    @RequestParam(value = "configIds", required = false) String configIds,
-                                                    @RequestParam(value = "payObjType", required = false) String payObjType,
-                                                    @RequestParam(value = "num", required = false) String num) {
+                                                       @RequestParam(value = "configIds", required = false) String configIds,
+                                                       @RequestParam(value = "payObjType", required = false) String payObjType,
+                                                       @RequestParam(value = "num", required = false) String num) {
         ReportOweFeeDto reportOweFeeDto = new ReportOweFeeDto();
         reportOweFeeDto.setPayerObjType(payObjType);
         reportOweFeeDto.setPayerObjName(num);