Ver código fonte

首页bug 修复

wuxw 6 anos atrás
pai
commit
d7f041e488

+ 6 - 1
Api/src/main/java/com/java110/api/listener/index/QueryIndexStatisticListener.java

@@ -22,6 +22,7 @@ import com.java110.dto.OwnerRoomRelDto;
 import com.java110.dto.RoomDto;
 import com.java110.event.service.api.ServiceDataFlowEvent;
 import com.java110.vo.api.ApiFeeVo;
+import com.java110.vo.api.ApiIndexStatisticVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.HttpStatus;
@@ -65,9 +66,10 @@ public class QueryIndexStatisticListener extends AbstractServiceApiDataFlowListe
         JSONObject reqJson = dataFlowContext.getReqJson();
         validateIndexStatistic(reqJson);
         // 查询业主 总数量
+        ApiIndexStatisticVo apiIndexStatisticVo = new ApiIndexStatisticVo();
         OwnerDto ownerDto = BeanConvertUtil.covertBean(reqJson, OwnerDto.class);
         int ownerCount = ownerInnerServiceSMOImpl.queryOwnersCount(ownerDto);
-        int noEnterRoomCount =
+        int noEnterRoomOwnerCount = ownerInnerServiceSMOImpl.queryNoEnterRoomOwnerCount(ownerDto);
         // 查询房屋 总数量
 
         // 查询停车位 总数量
@@ -75,6 +77,9 @@ public class QueryIndexStatisticListener extends AbstractServiceApiDataFlowListe
         // 查询商铺 总数量
 
 
+        apiIndexStatisticVo.setOwnerCount(ownerCount + "");
+        apiIndexStatisticVo.setNoEnterRoomCount(noEnterRoomOwnerCount + "");
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiIndexStatisticVo), HttpStatus.OK);
         dataFlowContext.setResponseEntity(responseEntity);
     }
 

+ 7 - 0
UserService/src/main/java/com/java110/user/dao/IOwnerServiceDao.java

@@ -91,4 +91,11 @@ public interface IOwnerServiceDao {
      */
      List<Map> getOwnerInfoByCondition(Map info) throws DAOException;
 
+    /**
+     * 查询没有入驻的 业主数量
+     * @param info 信息
+     * @return 未入驻业主数量
+     */
+     int queryNoEnterRoomOwnerCount(Map info);
+
 }

+ 12 - 0
UserService/src/main/java/com/java110/user/dao/impl/OwnerServiceDaoImpl.java

@@ -164,5 +164,17 @@ public class OwnerServiceDaoImpl extends BaseServiceDao implements IOwnerService
         return businessOwnerInfos;
     }
 
+    @Override
+    public int queryNoEnterRoomOwnerCount(Map info) {
+        logger.debug("查询业主数据 入参 info : {}", info);
+
+        List<Map> businessOwnerInfos = sqlSessionTemplate.selectList("ownerServiceDaoImpl.queryNoEnterRoomOwnerCount", info);
+        if (businessOwnerInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessOwnerInfos.get(0).get("count").toString());
+    }
+
 
 }

+ 6 - 0
UserService/src/main/java/com/java110/user/smo/impl/OwnerInnerServiceSMOImpl.java

@@ -194,6 +194,12 @@ public class OwnerInnerServiceSMOImpl extends BaseServiceSMO implements IOwnerIn
         return owners;
     }
 
+
+    @Override
+    public int queryNoEnterRoomOwnerCount(OwnerDto ownerDto) {
+        return ownerServiceDaoImpl.queryNoEnterRoomOwnerCount(BeanConvertUtil.beanCovertMap(ownerDto));
+    }
+
     public IUserInnerServiceSMO getUserInnerServiceSMOImpl() {
         return userInnerServiceSMOImpl;
     }

+ 10 - 0
java110-core/src/main/java/com/java110/core/smo/owner/IOwnerInnerServiceSMO.java

@@ -69,4 +69,14 @@ public interface IOwnerInnerServiceSMO {
     @RequestMapping(value = "/queryOwnersByCondition", method = RequestMethod.POST)
     List<OwnerDto> queryOwnersByCondition(@RequestBody OwnerDto ownerDto);
 
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param ownerDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryNoEnterRoomOwnerCount", method = RequestMethod.POST)
+    int queryNoEnterRoomOwnerCount(@RequestBody OwnerDto ownerDto);
+
 }

+ 17 - 0
java110-db/src/main/resources/mapper/owner/OwnerServiceDaoImplMapper.xml

@@ -333,5 +333,22 @@ and t.member_id= #{memberId}
         limit #{page}, #{row}
     </if>
     </select>
+    <!-- 查询未入驻业主 总数 -->
+    <select id="queryNoEnterRoomOwnerCount" parameterType="Map" resultType="Map">
+        SELECT
+            COUNT(1) count
+        FROM
+            building_owner_room_rel a,
+            building_owner o,
+            s_community_member m
+        WHERE a.`state` IN ('2001', '2003')
+            AND a.`owner_id` = o.`owner_id`
+            AND o.`owner_id` = m.`member_id`
+            AND m.`member_type_cd` = '390001200005'
+            AND m.`community_id` = #{communityId}
+            AND a.`status_cd` = '0'
+            AND o.`status_cd` = '0'
+            AND m.`status_cd` = '0'
+    </select>
 
 </mapper>