Explorar o código

修复 查询业主时的bug

wuxw %!s(int64=6) %!d(string=hai) anos
pai
achega
e9917d8b5f

+ 4 - 0
Api/src/main/java/com/java110/api/listener/fee/QueryFeeListener.java

@@ -3,6 +3,7 @@ package com.java110.api.listener.fee;
 
 import com.alibaba.fastjson.JSONObject;
 import com.java110.api.listener.AbstractServiceApiDataFlowListener;
+import com.java110.common.constant.OwnerTypeConstant;
 import com.java110.common.constant.ResponseConstant;
 import com.java110.common.constant.ServiceCodeConstant;
 import com.java110.common.exception.ListenerExecuteException;
@@ -92,6 +93,8 @@ public class QueryFeeListener extends AbstractServiceApiDataFlowListener {
         ResponseEntity<String> responseEntity = null;
         if (feeDtos == null || feeDtos.size() == 0) {
             responseEntity = new ResponseEntity<String>("{}", HttpStatus.OK);
+            dataFlowContext.setResponseEntity(responseEntity);
+            return ;
         }
 
         FeeDto feeDto = feeDtos.get(0);
@@ -125,6 +128,7 @@ public class QueryFeeListener extends AbstractServiceApiDataFlowListener {
         OwnerDto ownerDto = new OwnerDto();
         ownerDto.setOwnerId(ownerRoomRelDtos.get(0).getOwnerId());
         ownerDto.setCommunityId(feeDto.getCommunityId());
+        ownerDto.setOwnerTypeCd(OwnerTypeConstant.OWNER);
         List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto);
 
         if (ownerDtos == null || ownerDtos.size() != 1) {

+ 43 - 0
WebService/src/main/java/com/java110/web/smo/impl/RoomServiceSMOImpl.java

@@ -1,6 +1,8 @@
 package com.java110.web.smo.impl;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.java110.common.constant.FeeTypeConstant;
 import com.java110.common.constant.PrivilegeCodeConstant;
 import com.java110.common.constant.ResponseConstant;
 import com.java110.common.constant.ServiceConstant;
@@ -18,6 +20,9 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
 
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * 房屋服务实现类
  */
@@ -117,6 +122,43 @@ public class RoomServiceSMOImpl extends BaseComponentSMO implements IRoomService
         responseEntity = this.callCenterService(restTemplate, pd, "",
                 apiUrl,
                 HttpMethod.GET);
+
+        //fee.queryFee
+
+        if (responseEntity.getStatusCode() != HttpStatus.OK) {
+            return responseEntity;
+        }
+
+        JSONObject roomInfo = JSONObject.parseObject(responseEntity.getBody().toString());
+        JSONArray rooms = roomInfo.getJSONArray("rooms");
+
+        Map feeMap = null;
+        JSONObject resultFeeInfo = null;
+        JSONObject roomObj = null;
+        for (int roomIndex = 0; roomIndex < rooms.size(); roomIndex++) {
+            roomObj = rooms.getJSONObject(roomIndex);
+            feeMap = new HashMap();
+            feeMap.put("communityId", communityId);
+            feeMap.put("feeTypeCd", FeeTypeConstant.FEE_TYPE_PROPERTY);
+            feeMap.put("roomId", roomObj.getString("roomId"));
+            apiUrl = ServiceConstant.SERVICE_API_URL + "/api/fee.queryFee" + mapToUrlParam(feeMap);
+            responseEntity = this.callCenterService(restTemplate, pd, "",
+                    apiUrl,
+                    HttpMethod.GET);
+
+            if (responseEntity.getStatusCode() != HttpStatus.OK) {
+                //throw new SMOException(ResponseConstant.RESULT_CODE_ERROR, "当前房屋[" + roomObj.getString("roomNum") + "]没有物业费信息,数据错误");
+
+                continue;
+            }
+
+            resultFeeInfo = JSONObject.parseObject(responseEntity.getBody().toString());
+            roomObj.putAll(resultFeeInfo);
+
+        }
+
+        responseEntity = new ResponseEntity(roomInfo.toJSONString(), HttpStatus.OK);
+
         return responseEntity;
     }
 
@@ -338,6 +380,7 @@ public class RoomServiceSMOImpl extends BaseComponentSMO implements IRoomService
 
     /**
      * 校验根据业主查询房屋信息
+     *
      * @param pd 页面数据封装
      */
     private void validateListRoomByOwner(IPageData pd) {

+ 33 - 9
WebService/src/main/resources/components/ownerPackage/show-owner-rooms/showOwnerRoom.html

@@ -4,15 +4,17 @@
             <div class="ibox-title">
                 <h5>{{roomInfo.roomNum}}房屋信息</h5>
                 <div class="ibox-tools" style="top:10px;">
-                    <button type="button" class="btn btn-primary btn-sm" v-on:click="ownerExitRoomModel(roomInfo.roomId)">
-                        <i class="glyphicon glyphicon-remove"></i> 我要退房</button>
+                    <button type="button" class="btn btn-primary btn-sm"
+                            v-on:click="ownerExitRoomModel(roomInfo.roomId)">
+                        <i class="glyphicon glyphicon-remove"></i> 我要退房
+                    </button>
                 </div>
             </div>
             <div class="ibox-content">
                 <div class="row">
                     <div class="col-sm-4">
                         <div class="form-group">
-                            <label class="col-form-label" >房屋ID:</label>
+                            <label class="col-form-label">房屋ID:</label>
                             <label class="">{{roomInfo.roomId}}</label>
                         </div>
                     </div>
@@ -24,7 +26,7 @@
                     </div>
                     <div class="col-sm-4">
                         <div class="form-group">
-                            <label class="col-form-label" >单元:</label>
+                            <label class="col-form-label">单元:</label>
                             <label class="">{{roomInfo.unitNum}}</label>
                         </div>
                     </div>
@@ -34,7 +36,7 @@
                 <div class="row">
                     <div class="col-sm-4">
                         <div class="form-group">
-                            <label class="col-form-label" >楼层:</label>
+                            <label class="col-form-label">楼层:</label>
                             <label class="">{{roomInfo.layer}}</label>
                         </div>
                     </div>
@@ -46,7 +48,7 @@
                     </div>
                     <div class="col-sm-4">
                         <div class="form-group">
-                            <label class="col-form-label" >户型:</label>
+                            <label class="col-form-label">户型:</label>
                             <label class="">{{roomInfo.apartment}}</label>
                         </div>
                     </div>
@@ -55,7 +57,7 @@
                 <div class="row">
                     <div class="col-sm-4">
                         <div class="form-group">
-                            <label class="col-form-label" >建筑面积:</label>
+                            <label class="col-form-label">建筑面积:</label>
                             <label class="">{{roomInfo.builtUpArea}}</label>
                         </div>
                     </div>
@@ -67,14 +69,36 @@
                     </div>
                     <div class="col-sm-4">
                         <div class="form-group">
-                            <label class="col-form-label" >创建员工:</label>
+                            <label class="col-form-label">创建员工:</label>
                             <label class="">{{roomInfo.userName}}</label>
                         </div>
                     </div>
 
                 </div>
+
+                <div class="row">
+                    <div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label">物业费ID:</label>
+                            <label class="">{{roomInfo.feeId}}</label>
+                        </div>
+                    </div>
+                    <div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label">物业费开始时间:</label>
+                            <label class="">{{roomInfo.startTime}}</label>
+                        </div>
+                    </div>
+                    <div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label">物业费结束时间:</label>
+                            <label class="">{{roomInfo.endTime}}</label>
+                        </div>
+                    </div>
+
+                </div>
             </div>
         </div>
     </div>
     <vc:create name="ownerExitRoom"></vc:create>
-</div>
+</div>

+ 32 - 0
java110-common/src/main/java/com/java110/common/constant/OwnerTypeConstant.java

@@ -0,0 +1,32 @@
+package com.java110.common.constant;
+
+/**
+ * @author wux
+ * @create 2019-02-05 下午11:28
+ * @desc 业务类型
+ *
+ * 用户为1001 开头
+ * 商户为2001 开头
+ * 商品为3001 开头
+ * 评论为4001 开头
+ * 小区为5001 开头
+ * 物业为6001 开头
+ * 代理商为7001 开头
+ * 第八位 3 代表保存 4代表修改 5 代表删除
+ * 第八位之后 为相应业务序列
+ **/
+public class OwnerTypeConstant {
+
+    /**
+     * 业主
+     */
+    public static final String OWNER = "1001";
+
+    /**
+     * 成员
+     */
+    public static final String MEMBER = "1002";
+
+
+
+}

+ 219 - 216
java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml

@@ -5,245 +5,248 @@
 <mapper namespace="feeServiceDaoImpl">
 
     <!-- 保存费用信息 add by wuxw 2018-07-03 -->
-       <insert id="saveBusinessFeeInfo" parameterType="Map">
-           insert into business_pay_fee(
-amount,operate,income_obj_id,fee_type_cd,start_time,end_time,community_id,b_id,fee_id,user_id,payer_obj_id
-) values (
-#{amount},#{operate},#{incomeObjId},#{feeTypeCd},#{startTime},#{endTime},#{communityId},#{bId},#{feeId},#{userId},#{payerObjId}
-)
-       </insert>
-
-
-       <!-- 查询费用信息(Business) add by wuxw 2018-07-03 -->
-       <select id="getBusinessFeeInfo" parameterType="Map" resultType="Map">
-           select  t.amount,t.operate,t.income_obj_id,t.income_obj_id incomeObjId,t.fee_type_cd,t.fee_type_cd feeTypeCd,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId,t.user_id,t.user_id userId,t.payer_obj_id,t.payer_obj_id payerObjId 
-from business_pay_fee t 
-where 1 =1 
-<if test="amount !=null and amount != ''">
-   and t.amount= #{amount}
-</if> 
-<if test="operate !=null and operate != ''">
-   and t.operate= #{operate}
-</if> 
-<if test="incomeObjId !=null and incomeObjId != ''">
-   and t.income_obj_id= #{incomeObjId}
-</if> 
-<if test="feeTypeCd !=null and feeTypeCd != ''">
-   and t.fee_type_cd= #{feeTypeCd}
-</if> 
-<if test="startTime !=null ">
-   and t.start_time= #{startTime}
-</if> 
-<if test="endTime !=null ">
-   and t.end_time= #{endTime}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="bId !=null and bId != ''">
-   and t.b_id= #{bId}
-</if> 
-<if test="feeId !=null and feeId != ''">
-   and t.fee_id= #{feeId}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="payerObjId !=null and payerObjId != ''">
-   and t.payer_obj_id= #{payerObjId}
-</if> 
-
-       </select>
+    <insert id="saveBusinessFeeInfo" parameterType="Map">
+        insert into business_pay_fee(
+        amount,operate,income_obj_id,fee_type_cd,start_time,end_time,community_id,b_id,fee_id,user_id,payer_obj_id
+        ) values (
+        #{amount},#{operate},#{incomeObjId},#{feeTypeCd},#{startTime},#{endTime},#{communityId},#{bId},#{feeId},#{userId},#{payerObjId}
+        )
+    </insert>
 
 
+    <!-- 查询费用信息(Business) add by wuxw 2018-07-03 -->
+    <select id="getBusinessFeeInfo" parameterType="Map" resultType="Map">
+        select t.amount,t.operate,t.income_obj_id,t.income_obj_id incomeObjId,t.fee_type_cd,t.fee_type_cd
+        feeTypeCd,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id
+        communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId,t.user_id,t.user_id userId,t.payer_obj_id,t.payer_obj_id
+        payerObjId
+        from business_pay_fee t
+        where 1 =1
+        <if test="amount !=null and amount != ''">
+            and t.amount= #{amount}
+        </if>
+        <if test="operate !=null and operate != ''">
+            and t.operate= #{operate}
+        </if>
+        <if test="incomeObjId !=null and incomeObjId != ''">
+            and t.income_obj_id= #{incomeObjId}
+        </if>
+        <if test="feeTypeCd !=null and feeTypeCd != ''">
+            and t.fee_type_cd= #{feeTypeCd}
+        </if>
+        <if test="startTime !=null ">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="endTime !=null ">
+            and t.end_time= #{endTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="feeId !=null and feeId != ''">
+            and t.fee_id= #{feeId}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="payerObjId !=null and payerObjId != ''">
+            and t.payer_obj_id= #{payerObjId}
+        </if>
 
+    </select>
 
 
     <!-- 保存费用信息至 instance表中 add by wuxw 2018-07-03 -->
     <insert id="saveFeeInfoInstance" parameterType="Map">
         insert into pay_fee(
-amount,income_obj_id,fee_type_cd,start_time,status_cd,end_time,community_id,b_id,fee_id,user_id,payer_obj_id
-) select t.amount,t.income_obj_id,t.fee_type_cd,t.start_time,'0',t.end_time,t.community_id,t.b_id,t.fee_id,t.user_id,t.payer_obj_id from business_pay_fee t where 1=1
-<if test="amount !=null and amount != ''">
-   and t.amount= #{amount}
-</if> 
-   and t.operate= 'ADD'
-<if test="incomeObjId !=null and incomeObjId != ''">
-   and t.income_obj_id= #{incomeObjId}
-</if> 
-<if test="feeTypeCd !=null and feeTypeCd != ''">
-   and t.fee_type_cd= #{feeTypeCd}
-</if> 
-<if test="startTime !=null ">
-   and t.start_time= #{startTime}
-</if> 
-<if test="endTime !=null ">
-   and t.end_time= #{endTime}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="bId !=null and bId != ''">
-   and t.b_id= #{bId}
-</if> 
-<if test="feeId !=null and feeId != ''">
-   and t.fee_id= #{feeId}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="payerObjId !=null and payerObjId != ''">
-   and t.payer_obj_id= #{payerObjId}
-</if> 
+        amount,income_obj_id,fee_type_cd,start_time,status_cd,end_time,community_id,b_id,fee_id,user_id,payer_obj_id
+        ) select
+        t.amount,t.income_obj_id,t.fee_type_cd,t.start_time,'0',t.end_time,t.community_id,t.b_id,t.fee_id,t.user_id,t.payer_obj_id
+        from business_pay_fee t where 1=1
+        <if test="amount !=null and amount != ''">
+            and t.amount= #{amount}
+        </if>
+        and t.operate= 'ADD'
+        <if test="incomeObjId !=null and incomeObjId != ''">
+            and t.income_obj_id= #{incomeObjId}
+        </if>
+        <if test="feeTypeCd !=null and feeTypeCd != ''">
+            and t.fee_type_cd= #{feeTypeCd}
+        </if>
+        <if test="startTime !=null ">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="endTime !=null ">
+            and t.end_time= #{endTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="feeId !=null and feeId != ''">
+            and t.fee_id= #{feeId}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="payerObjId !=null and payerObjId != ''">
+            and t.payer_obj_id= #{payerObjId}
+        </if>
 
     </insert>
 
 
-
     <!-- 查询费用信息 add by wuxw 2018-07-03 -->
     <select id="getFeeInfo" parameterType="Map" resultType="Map">
-        select  t.amount,t.income_obj_id,t.income_obj_id incomeObjId,t.fee_type_cd,t.fee_type_cd feeTypeCd,t.start_time,t.start_time startTime,t.status_cd,t.status_cd statusCd,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId,t.user_id,t.user_id userId,t.payer_obj_id,t.payer_obj_id payerObjId 
-from pay_fee t 
-where 1 =1 
-<if test="amount !=null and amount != ''">
-   and t.amount= #{amount}
-</if> 
-<if test="incomeObjId !=null and incomeObjId != ''">
-   and t.income_obj_id= #{incomeObjId}
-</if> 
-<if test="feeTypeCd !=null and feeTypeCd != ''">
-   and t.fee_type_cd= #{feeTypeCd}
-</if>
-<if test="feeTypeCds != null ">
-    and t.fee_type_cd in
-    <foreach collection="feeTypeCds" item="item" open="(" close=")" separator=",">
-        #{item}
-    </foreach>
-</if>
-<if test="startTime !=null ">
-   and t.start_time= #{startTime}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="endTime !=null ">
-   and t.end_time= #{endTime}
-</if>
-<if test="arrearsEndTime != null">
-    and t.end_time &lt; #{arrearsEndTime}
-</if>
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="bId !=null and bId != ''">
-   and t.b_id= #{bId}
-</if> 
-<if test="feeId !=null and feeId != ''">
-   and t.fee_id= #{feeId}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="payerObjId !=null and payerObjId != ''">
-   and t.payer_obj_id= #{payerObjId}
-</if> 
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.amount,t.income_obj_id,t.income_obj_id incomeObjId,t.fee_type_cd,t.fee_type_cd
+        feeTypeCd,t.start_time,t.start_time startTime,t.status_cd,t.status_cd statusCd,t.end_time,t.end_time
+        endTime,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId,t.user_id,t.user_id
+        userId,t.payer_obj_id,t.payer_obj_id payerObjId
+        from pay_fee t
+        where 1 =1
+        <if test="amount !=null and amount != ''">
+            and t.amount= #{amount}
+        </if>
+        <if test="incomeObjId !=null and incomeObjId != ''">
+            and t.income_obj_id= #{incomeObjId}
+        </if>
+        <if test="feeTypeCd !=null and feeTypeCd != ''">
+            and t.fee_type_cd= #{feeTypeCd}
+        </if>
+        <if test="feeTypeCds != null ">
+            and t.fee_type_cd in
+            <foreach collection="feeTypeCds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+        <if test="startTime !=null ">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="endTime !=null ">
+            and t.end_time= #{endTime}
+        </if>
+        <if test="arrearsEndTime != null">
+            and t.end_time &lt; #{arrearsEndTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="feeId !=null and feeId != ''">
+            and t.fee_id= #{feeId}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="payerObjId !=null and payerObjId != ''">
+            and t.payer_obj_id= #{payerObjId}
+        </if>
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改费用信息 add by wuxw 2018-07-03 -->
     <update id="updateFeeInfoInstance" parameterType="Map">
-        update  pay_fee t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="amount !=null and amount != ''">
-, t.amount= #{amount}
-</if> 
-<if test="incomeObjId !=null and incomeObjId != ''">
-, t.income_obj_id= #{incomeObjId}
-</if> 
-<if test="feeTypeCd !=null and feeTypeCd != ''">
-, t.fee_type_cd= #{feeTypeCd}
-</if> 
-<if test="startTime !=null ">
-, t.start_time= #{startTime}
-</if> 
-<if test="endTime !=null">
-, t.end_time= #{endTime}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
-<if test="userId !=null and userId != ''">
-, t.user_id= #{userId}
-</if> 
-<if test="payerObjId !=null and payerObjId != ''">
-, t.payer_obj_id= #{payerObjId}
-</if> 
- where 1=1 <if test="bId !=null and bId != ''">
-and t.b_id= #{bId}
-</if> 
-<if test="feeId !=null and feeId != ''">
-and t.fee_id= #{feeId}
-</if> 
+        update pay_fee t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="amount !=null and amount != ''">
+            , t.amount= #{amount}
+        </if>
+        <if test="incomeObjId !=null and incomeObjId != ''">
+            , t.income_obj_id= #{incomeObjId}
+        </if>
+        <if test="feeTypeCd !=null and feeTypeCd != ''">
+            , t.fee_type_cd= #{feeTypeCd}
+        </if>
+        <if test="startTime !=null ">
+            , t.start_time= #{startTime}
+        </if>
+        <if test="endTime !=null">
+            , t.end_time= #{endTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="userId !=null and userId != ''">
+            , t.user_id= #{userId}
+        </if>
+        <if test="payerObjId !=null and payerObjId != ''">
+            , t.payer_obj_id= #{payerObjId}
+        </if>
+        where 1=1
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="feeId !=null and feeId != ''">
+            and t.fee_id= #{feeId}
+        </if>
 
     </update>
 
     <!-- 查询费用数量 add by wuxw 2018-07-03 -->
-     <select id="queryFeesCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from pay_fee t 
-where 1 =1 
-<if test="amount !=null and amount != ''">
-   and t.amount= #{amount}
-</if> 
-<if test="incomeObjId !=null and incomeObjId != ''">
-   and t.income_obj_id= #{incomeObjId}
-</if> 
-<if test="feeTypeCd !=null and feeTypeCd != ''">
-   and t.fee_type_cd= #{feeTypeCd}
-</if>
- <if test="feeTypeCds != null ">
-     and t.fee_type_cd in
-     <foreach collection="feeTypeCds" item="item" open="(" close=")" separator=",">
-         #{item}
-     </foreach>
- </if>
-<if test="startTime !=null">
-   and t.start_time= #{startTime}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="endTime !=null ">
-   and t.end_time= #{endTime}
-</if>
- <if test="arrearsEndTime != null">
-     and t.end_time &lt; #{arrearsEndTime}
- </if>
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="bId !=null and bId != ''">
-   and t.b_id= #{bId}
-</if> 
-<if test="feeId !=null and feeId != ''">
-   and t.fee_id= #{feeId}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="payerObjId !=null and payerObjId != ''">
-   and t.payer_obj_id= #{payerObjId}
-</if> 
-
-
-     </select>
+    <select id="queryFeesCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from pay_fee t
+        where 1 =1
+        <if test="amount !=null and amount != ''">
+            and t.amount= #{amount}
+        </if>
+        <if test="incomeObjId !=null and incomeObjId != ''">
+            and t.income_obj_id= #{incomeObjId}
+        </if>
+        <if test="feeTypeCd !=null and feeTypeCd != ''">
+            and t.fee_type_cd= #{feeTypeCd}
+        </if>
+        <if test="feeTypeCds != null ">
+            and t.fee_type_cd in
+            <foreach collection="feeTypeCds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+        <if test="startTime !=null">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="endTime !=null ">
+            and t.end_time= #{endTime}
+        </if>
+        <if test="arrearsEndTime != null">
+            and t.end_time &lt; #{arrearsEndTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="feeId !=null and feeId != ''">
+            and t.fee_id= #{feeId}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="payerObjId !=null and payerObjId != ''">
+            and t.payer_obj_id= #{payerObjId}
+        </if>
+
+
+    </select>
 
 </mapper>