mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-07 03:20:06 +08:00
update 查询充电枪口 地锁列表
This commit is contained in:
@@ -12,11 +12,7 @@ import com.jsowell.common.core.redis.RedisCache;
|
|||||||
import com.jsowell.common.enums.DelFlagEnum;
|
import com.jsowell.common.enums.DelFlagEnum;
|
||||||
import com.jsowell.common.enums.ykc.PileConnectorDataBaseStatusEnum;
|
import com.jsowell.common.enums.ykc.PileConnectorDataBaseStatusEnum;
|
||||||
import com.jsowell.common.enums.ykc.PileConnectorStatusEnum;
|
import com.jsowell.common.enums.ykc.PileConnectorStatusEnum;
|
||||||
import com.jsowell.common.util.BytesUtil;
|
import com.jsowell.common.util.*;
|
||||||
import com.jsowell.common.util.DateUtils;
|
|
||||||
import com.jsowell.common.util.PageUtils;
|
|
||||||
import com.jsowell.common.util.SecurityUtils;
|
|
||||||
import com.jsowell.common.util.StringUtils;
|
|
||||||
import com.jsowell.pile.domain.PileBasicInfo;
|
import com.jsowell.pile.domain.PileBasicInfo;
|
||||||
import com.jsowell.pile.domain.PileConnectorInfo;
|
import com.jsowell.pile.domain.PileConnectorInfo;
|
||||||
import com.jsowell.pile.domain.PileModelInfo;
|
import com.jsowell.pile.domain.PileModelInfo;
|
||||||
@@ -26,13 +22,7 @@ import com.jsowell.pile.dto.QueryPileDTO;
|
|||||||
import com.jsowell.pile.dto.ReplaceMerchantStationDTO;
|
import com.jsowell.pile.dto.ReplaceMerchantStationDTO;
|
||||||
import com.jsowell.pile.mapper.PileBasicInfoMapper;
|
import com.jsowell.pile.mapper.PileBasicInfoMapper;
|
||||||
import com.jsowell.pile.mapper.PileMerchantInfoMapper;
|
import com.jsowell.pile.mapper.PileMerchantInfoMapper;
|
||||||
import com.jsowell.pile.service.IPileBasicInfoService;
|
import com.jsowell.pile.service.*;
|
||||||
import com.jsowell.pile.service.IPileConnectorInfoService;
|
|
||||||
import com.jsowell.pile.service.IPileMerchantInfoService;
|
|
||||||
import com.jsowell.pile.service.IPileModelInfoService;
|
|
||||||
import com.jsowell.pile.service.IPileSimInfoService;
|
|
||||||
import com.jsowell.pile.service.IPileStationInfoService;
|
|
||||||
import com.jsowell.pile.service.SimCardService;
|
|
||||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||||
import com.jsowell.pile.vo.base.PileInfoVO;
|
import com.jsowell.pile.vo.base.PileInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.GroundLockInfoVO;
|
import com.jsowell.pile.vo.uniapp.GroundLockInfoVO;
|
||||||
@@ -43,7 +33,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.cglib.beans.BulkBean;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.StopWatch;
|
import org.springframework.util.StopWatch;
|
||||||
|
|
||||||
@@ -714,15 +703,16 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
|||||||
@Override
|
@Override
|
||||||
public List<GroundLockInfoVO> getGroundLockInfo(String stationId) {
|
public List<GroundLockInfoVO> getGroundLockInfo(String stationId) {
|
||||||
List<GroundLockInfoVO> resultList = new ArrayList<>();
|
List<GroundLockInfoVO> resultList = new ArrayList<>();
|
||||||
GroundLockInfoVO vo = null;
|
GroundLockInfoVO vo;
|
||||||
GroundLockInfoVO.LockInfo lockInfo = null;
|
List<GroundLockInfoVO.LockInfo> lockInfoList;
|
||||||
List<GroundLockInfoVO.LockInfo> lockInfoList = new ArrayList<>();
|
|
||||||
// 根据站点id查出该站点下所有桩(区分单双枪)
|
// 根据站点id查出该站点下所有桩(区分单双枪)
|
||||||
List<PileConnectorInfoVO> connectorInfoVOList = pileConnectorInfoService.selectConnectorListByStationId(Long.parseLong(stationId));
|
List<PileConnectorInfoVO> connectorInfoVOList = pileConnectorInfoService.selectConnectorListByStationId(Long.parseLong(stationId));
|
||||||
// 根据pileSn分组
|
// 根据pileSn分组
|
||||||
Map<String, List<PileConnectorInfoVO>> collect = connectorInfoVOList.stream().collect(Collectors.groupingBy(PileConnectorInfoVO::getPileSn));
|
Map<String, List<PileConnectorInfoVO>> collect = connectorInfoVOList.stream().collect(Collectors.groupingBy(PileConnectorInfoVO::getPileSn));
|
||||||
|
|
||||||
for (Map.Entry<String, List<PileConnectorInfoVO>> entry : collect.entrySet()) {
|
for (Map.Entry<String, List<PileConnectorInfoVO>> entry : collect.entrySet()) {
|
||||||
vo = new GroundLockInfoVO();
|
vo = new GroundLockInfoVO();
|
||||||
|
lockInfoList = new ArrayList<>();
|
||||||
String pileSn = entry.getKey();
|
String pileSn = entry.getKey();
|
||||||
List<PileConnectorInfoVO> list = entry.getValue();
|
List<PileConnectorInfoVO> list = entry.getValue();
|
||||||
for (PileConnectorInfoVO pileConnectorInfoVO : list) {
|
for (PileConnectorInfoVO pileConnectorInfoVO : list) {
|
||||||
@@ -740,12 +730,11 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
|||||||
// 升锁状态
|
// 升锁状态
|
||||||
parkingLockStatus = "升锁";
|
parkingLockStatus = "升锁";
|
||||||
}
|
}
|
||||||
lockInfo = GroundLockInfoVO.LockInfo.builder()
|
lockInfoList.add(GroundLockInfoVO.LockInfo.builder()
|
||||||
.connectorCode(pileConnectorInfoVO.getPileConnectorCode())
|
.connectorCode(pileConnectorInfoVO.getPileConnectorCode())
|
||||||
.lockStatus(parkingLockStatus)
|
.lockStatus(parkingLockStatus)
|
||||||
.parkingStatus(data.getParkingStatus())
|
.parkingStatus(data.getParkingStatus())
|
||||||
.build();
|
.build());
|
||||||
lockInfoList.add(lockInfo);
|
|
||||||
}
|
}
|
||||||
vo.setPileSn(pileSn);
|
vo.setPileSn(pileSn);
|
||||||
vo.setLockInfos(lockInfoList);
|
vo.setLockInfos(lockInfoList);
|
||||||
|
|||||||
Reference in New Issue
Block a user