ParkingLotDao.java 12.8 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459
package com.zteits.park.dao;

import com.github.pagehelper.PageInfo;
import com.zteits.clouds.api.dto.park.dto.ParkNumInfoDTO;
import com.zteits.clouds.api.dto.park.dto.ParkingLotDTO;
import com.zteits.clouds.api.dto.park.dto.parksource.ParkDeviceStaForEveryDTO;
import com.zteits.clouds.api.dto.park.param.*;
import com.zteits.clouds.api.dto.park.param.parklot.QueryOrgIdsByCityIdsRequest;
import com.zteits.clouds.api.dto.park.param.parksource.QueryParkSourceByOrgIdsRequest;
import com.zteits.clouds.api.dto.pay.PlNameDTO;
import com.zteits.clouds.api.dto.pay.TdBTempParklotDTO;
import com.zteits.clouds.api.dto.pay.param.ChangeBlockForParkLotRequest;
import com.zteits.clouds.api.dto.pay.param.CheckUniqueForPlNameRequest;
import com.zteits.clouds.api.dto.pay.param.ParkTempInfoPageQueryRequest;
import com.zteits.clouds.api.dto.tool.dto.ParkDutyInfoDTO;
import com.zteits.clouds.api.dto.tool.param.ParkDutyInfoQueryReq;
import com.zteits.park.domain.ParkingLot;
import com.zteits.park.domain.*;

import java.util.List;
import java.util.Set;

/**
 * 停车场泊位数据模型
 *
 * Copyright: Copyright (c) 2017  zteits
 *
 * @ClassName: ParkingLotDao.java
 * @Description:
 * @version: v1.0.0
 * @author: zhaowg
 * @date: 2017年6月1日   上午9:28:06
 * Modification History:
 * Date             Author          Version            Description
 * ---------------------------------------------------------*
 * 2017年6月1日      zhaowg              v1.0.0               创建
 */
public interface ParkingLotDao {

    /*******************************停车场基本信息-开始******************************/
    /**
     * 分页查询停车场
     *
     * @param parkingLot
     * @return langlw 2017-08-14
     */
    PageInfo<ParkingLot> queryParkingLotByPark(ParkingLotQueryPageDO parkingLot, Integer pageNum, Integer pageSize);

    /**
     * 通过停车场对象查出停车场信息
     * Parking information is identified through parking lot objects
     * langlw 2017-9-11
     *
     * @param request
     * @return
     */
    List<ParkingLot> queryParkListByPark(QueryParkListByParkRequest request);

    /**
     * 通过plNOs停车场编码和名称
     *
     * @param request
     * @return
     */
    List<ParkingLot> queryParkListAll();
    /*******************************停车场基本信息-结束******************************/

    /**
     * 动态插入
     *
     * @param record
     * @return 2017年6月1日 zhaowg
     */
    int insertSelective(ParkingLot record);

    /**
     * 通过主键查询
     *
     * @param plId
     * @return 2017年6月1日 zhaowg
     */
    ParkingLot selectByPrimaryKey(Long plId);

    /**
     * 通过主键更新
     *
     * @param record
     * @return 2017年6月1日 zhaowg
     */
    int updateByPrimaryKeySelective(ParkingLot record);

    /**
     * 查询某个区县内最大停车场id
     *
     * @param plCountryId
     * @param state
     * @return 2017年6月1日 zhaowg
     */
    String countByPlCountryId(Long plCountryId, Integer state);

    /**
     * 通过GeoHash查询停车场信息
     *
     * @param geoHashs
     * @return 2017年6月5日 zhaowg
     */
    List<ParkingLotAndGeoInfo> queryParkLotByGeoHashs(Set<String> geoHashs);

    /**
     * 根据GeoHash和给定的经纬度查询符合条件的条数
     *
     * @param geoHash9Sets
     * @return 2017年6月5日 zhaowg
     */
    Long queryTabParkCountByDistance(Set<String> geoHash9Sets);

    /**
     * 根据停车场编码查询停车场信息
     *
     * @param record
     * @return 2017年6月5日 zhaowg
     */
    List<ParkingLotAndGeoInfo> queryParkingLotAndGeo(ParkingLot record);

    /**
     * 查询符合条件的记录条数
     *
     * @param example
     * @return 2017年6月6日 zhaowg
     */
    long countByExample(ParkingLotExample example);

    /**
     * 通过给定的外部停车场编号查询停车场信息
     *
     * @param plOutNos
     * @return 2017年6月8日 zhaowg
     */
    List<ParkingLot> queryParkingLotByPlOutNos(List<String> plOutNos);

    /**
     * 通过停车场编号列表查询
     *
     * @param plNos
     * @return 2017年11月30日 zhaowg
     */
    List<ParkingLot> queryParkingLotByPlNos(List<String> plNos);

    /**
     * 通过给定的外部停车场编号查询停车场信息
     *
     * @param plOutNos
     * @return 2017年6月8日 zhaowg
     */
    ParkingLotDTO queryParkingLotInfoByPlOutNo(String plOutNo);

    /**
     * 通过停车场No删除停车场信息
     *
     * @param opId
     * @param plOutNos
     * @return
     */
    Boolean deleteParkingLotByPlNos(List<String> plNos, Long opId);

    /**
     * 通过给定的停车场编号查询停车场信息
     *
     * @param plNo
     * @return 2017年6月8日 zhaowg
     */
    ParkingLot queryParkingLotInfoByPlNo(String plNo);

    /**
     * 根据给定的城市,统计该城市下不同区县的停车场数量信息
     *
     * @param cityId
     * @return 2017年6月29日 zhaowg
     */
    List<ParkingLotCountStatisticByCountryDO> StatisticParkLotCountByCountry(Long cityId, Integer state);

    /**
     * 通过城市ID获取停车场信息
     *
     * @param cityId 城市ID
     * @param state  停车场状态:1-使用中,2-演示停车场   null 则查询全部
     * @return 2017年7月6日 xiejp
     */
    List<ParkingLot> queryParkLotByCountry(Long cityId, Integer state);

    /**
     * 通过省份,城市ID获取停车场信息
     *
     * @param provId 省份ID
     * @param cityId 城市ID
     * @param state  停车场状态:1-使用中,2-演示停车场   null 则查询全部
     * @return 2017年7月6日 xiejp
     */
    List<ParkingLot> queryParkLotByProvAndCity(Long provId, Long cityId, Integer state);

    /**
     * 通过城市ID和区县ID获取停车场信息 - 分页
     *
     * @param cityId     城市ID
     * @param countryIds 区县ID
     * @param state      停车场状态:1-使用中,2-演示停车场   null 则查询全部
     * @return 2017年7月7日 xiejp
     */
    PageInfo<ParkingLot> queryParkLotByCountryAndParkName(List<String> plNos, Long cityId, List<Long> countryIds,
        String parkNameOrAddress, Integer pageNum, Integer pageSize, Integer state, List<Integer> plTypes);

    /**
     * 通过城市ID和区县ID获取停车场信息 - 分页
     *
     * @param cityId            城市ID
     * @param countryIds        区县ID
     * @param parkNameOrAddress
     * @param state             停车场状态:1-使用中,2-演示停车场   null 则查询全部
     * @return 2017年7月7日 xiejp
     */
    List<ParkingLot> queryParkLotByCountryAndParkNameOfNoPage(Long cityId, List<Long> countryIds,
        String parkNameOrAddress, Integer state);

    /**
     * 查询停车场及停车场经纬度信息.<br/>
     *
     * @param parkingLotAndGeoDO
     * @return
     */
    List<ParkinglotHeatmapHour> queryParkingLotAndGeoInfo(ParkingLotAndGeoDO parkingLotAndGeoDO);

    /**
     * 根据区县ID 与 停车场名称 地址 检索 停车场编号
     *
     * @param countryIds       区县ID集合 必填
     * @param parkNameOrAddres 停车场名称、地址、检索内容
     * @param state            停车场状态:1-使用中,2-演示停车场   null 则查询全部
     * @return
     */
    List<String> queryPlNoCountryAndParkNameAndAddress(List<Long> countryIds, String parkNameOrAddres, Integer state);

    /**
     * 根据停车场编码查询总的车位数
     *
     * @param plNos
     * @return
     */
    long queryBerthNoByPlnos(List<String> plNos);

    /**
     * 根据停车场外部编码更新停车场信息
     *
     * @param parkingLot
     * @return
     */
    Integer updateParkInfoByPlOutNo(ParkingLot parkingLot);

    /**
     * 通过区域块ids查询停车场列表.<br/>
     *
     * @param parkInfoByAreaBlockIdsRequest
     * @return
     */
    List<AreaTreeDO> queryParkInfoByAreaBlockIds(ParkInfoByAreaBlockIdsRequest parkInfoByAreaBlockIdsRequest);

    /**
     * 通过区县分组获取停车场统计信息区分停车场类型
     * langlw 2017-9-6
     *
     * @param cityId 城市ID 不传递默认所有城市分组
     * @param state  停车场状态:1-使用中,2-演示停车场
     * @return
     */
    List<ParkingLotCountStatisticByCountryDO> statisticParkLotCountByCountryForPlType(Long cityId, Integer state);

    /**
     * 查询所有停车场编码
     *
     * @param state 停车场状态 :1-使用中,2-演示停车场
     * @return
     */
    List<String> queryAllPlNo(Integer state);

    /**
     * 查询order域 停车场临时信息
     *
     * @param request
     * @return
     */
    PageInfo<TdBTempParklotDTO> queryParkTempInfoPage(ParkTempInfoPageQueryRequest request);

    /**
     * 通过服务点id查询停车场-分页
     *
     * @param request
     * @return
     * @throws Exception 2017年12月28日  wangfs.<br/>
     */
    PageInfo<ParkingLot> queryParkingLotForPageByAreaBlockId(QueryParkingLotByAreaBlockRequest request);

    /**
     * 通过服务点id查询停车场-分页
     *
     * @param request
     * @return
     * @throws Exception 2017年12月28日  wangfs.<br/>
     */
    List<ParkingLot> queryParkingLotListByAreaBlockId(QueryParkingLotByAreaBlockRequest request);

    /**
     * 校验停车场名称唯一性.<br/>
     *
     * @param request
     * @return 2018年1月4日  wangfs.<br/>
     */
    Boolean checkUniqueForPlName(CheckUniqueForPlNameRequest request);

    /**
     * 更新停车场块信息.<br/>
     *
     * @param request
     * @return 2018年1月4日  wangfs.<br/>
     */
    Boolean updateBlockForParkLot(ChangeBlockForParkLotRequest request);

    /**
     * 停车场管理-更新停车场块信息
     *
     * @param request
     * @return 2018年1月9日 xiejp
     */
    Boolean updateAreaBlockForParkLot(ChangeBlockForParkLotRequest request);

    /**
     * 通过办事处id更新停车场块信息.<br/>
     *
     * @param request
     * @return 2018年1月4日  wangfs.<br/>
     */
    Boolean updateParkLotBlockNameByBlockId(ChangeBlockForParkLotRequest request);

    /**
     * 根据停车场状态查询停车场扩展信息
     *
     * @param states
     * @param pageNum
     * @param pageSize
     * @return
     * @Author: atao
     * @Date: 2018/3/13 上午11:17
     */
    PageInfo<ParkingLotExtDO> queryParkLotExtByState(List<Integer> states, Integer pageNum, Integer pageSize);

    /**
     * 通过停车场外部编码查询停车场编码
     *
     * @param plOutNo
     * @return Apr 25, 2018 hxz
     */
    String queryPlNoByPlOutNo(String plOutNo);

    /**
     * 通过停车场外部编码查询停车场总车位数
     *
     * @param plOutNo
     * @return Apr 25, 2018 hxz
     */
    Integer queryPlBerthNumByPlOutNo(String plOutNo);

    /**
     * @param
     * @return
     * @Author: atao
     * @Date: 2018/8/26 下午12:15
     */
    List<ParkingLot> queryParkLotByOrgIdAndPlNos(Long orgId, List<String> plNos, Integer plType);

    /**
     * 通过cityIds查询orgIds
     *
     * @param
     * @return
     * @Author: xiejianpeng
     * @Date: 2018/12/28 16:06
     */
    List<Long> getOrgIdsByCityIds(QueryOrgIdsByCityIdsRequest request);

    /**
     * 查询停车下面设备数量
     *
     * @param
     * @return
     * @Author: xiejianpeng
     * @Date: 2018/12/29 10:32
     */
    List<ParkDeviceStaForEveryDTO> queryDeviceStatistic(QueryParkSourceByOrgIdsRequest request);

    /**
     * 停车场数量统计-根据组织id
     *
     * @param
     * @return
     * @Author: xiejianpeng
     * @Date: 2019/1/6 22:46
     */
    Integer queryParkNumStatisticByOrgIds(QueryParkSourceByOrgIdsRequest request);

    /**
     * 停车场数量统计-根据组织id
     *
     * @param
     * @return
     * @Author: xiejianpeng
     * @Date: 2019/1/6 22:46
     */
    ParkNumInfoDTO queryParkNumInfoStatisticByOrgIds(QueryParkSourceByOrgIdsRequest request);

    /**
     * 查询停车场排班信息
     *
     * @param req
     * @return
     */
    List<ParkDutyInfoDTO> queryParkDutyInfo(ParkDutyInfoQueryReq req);

     /**
      * 通过组织id查询停车场信息.<br/>
      * @Auther: wangfs
      * @param
      * @return
      */
       List<ParkingLot> qyeryAllParkingLotByOrgId(ParkDutyInfoQueryReq req);


    List<String> queryBusiPlNameByOrgIds(QueryParkSourceByOrgIdsRequest req);

    /**
     * 根据车场编号查询车场名称
     * @param request
     * @return
     * @Auther niueb 2019/12/12
     */
    List<PlNameDTO> queryPlNameByPlNo(QueryPlNameRequest request);

    /**
     * 查询支持ETC的车场
     * @param req
     * @return
     */
    List<ParkingLot> queryETCParkingLot(QueryETCParkLotRequest req);
    /**
     * 停车场最大编码获取:以 PL 或者 TL 开头的
     * @param prefixStr
     * @return 2020年7月3日 wangfs
     */
    String selectMaxPlNO(String prefixStr);

    List<ParkingLot> queryParkListByOrgId(QueryParkListByParkRequest request);
}