ClosedParkingLotChannelQueryServiceImpl.java
2.25 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
package com.zteits.park.biz.closecarpark;
import com.zteits.clouds.api.apibase.bean.BizResult;
import com.zteits.clouds.api.dto.park.dto.ChannelInfoDTO;
import com.zteits.clouds.api.dto.park.dto.closecarpark.ParkingLotChannelRelationDTO;
import com.zteits.clouds.api.dto.park.param.closecarpark.ParkChannelRelationRequest;
import com.zteits.clouds.api.service.park.closecarpark.ClosedParkingLotChannelQueryService;
import com.zteits.park.dao.ChannelDao;
import com.zteits.park.domain.ParkingLotChannel;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.List;
import org.springframework.stereotype.Service;
/**
* Copyright: Copyright (c) 2017 zteits
*
* @ClassName: ClosedParkingLotChannelQueryServiceImpl.java
* @Description:
* @version: v1.0.0
* @author: zengqc
* @date: 2021/6/15 10:26
* Modification History:
* Date Author Version Description
* ---------------------------------------------------------*
* 2021/6/15 10:26 zengqc v1.0.0 创建
*/
@Service("com.zteits.park.biz.closecarpark.ClosedParkingLotChannelQueryServiceImpl")
public class ClosedParkingLotChannelQueryServiceImpl implements ClosedParkingLotChannelQueryService {
@Autowired
private ChannelDao channelDao;
/**
* 根据停车场编号,获取对应的通道信息
*/
@Override
public BizResult<List<ParkingLotChannelRelationDTO>> queryChannelList(ParkChannelRelationRequest request) {
ParkingLotChannel parkingLotChannel = new ParkingLotChannel();
parkingLotChannel.setPlNo(request.getPlNo());
// 根据停车场编号获取通道信息
List<ChannelInfoDTO> dtoList = channelDao.tideChannelChoice(parkingLotChannel);
List<ParkingLotChannelRelationDTO> list = new ArrayList<>();
dtoList.forEach(dto -> {
ParkingLotChannelRelationDTO relationDTO = new ParkingLotChannelRelationDTO();
relationDTO.setChannelId(dto.getId());
relationDTO.setChannelName(dto.getChannelName());
relationDTO.setChannelNumber(dto.getChannelNumber());
relationDTO.setPlNo(dto.getPlNo());
list.add(relationDTO);
});
return new BizResult<>(list);
}
}