update 查询充电枪口 地锁列表

This commit is contained in:
2023-08-05 14:19:31 +08:00
parent a32daacfc4
commit cc3ddce49c

View File

@@ -12,11 +12,7 @@ import com.jsowell.common.core.redis.RedisCache;
import com.jsowell.common.enums.DelFlagEnum;
import com.jsowell.common.enums.ykc.PileConnectorDataBaseStatusEnum;
import com.jsowell.common.enums.ykc.PileConnectorStatusEnum;
import com.jsowell.common.util.BytesUtil;
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.common.util.*;
import com.jsowell.pile.domain.PileBasicInfo;
import com.jsowell.pile.domain.PileConnectorInfo;
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.mapper.PileBasicInfoMapper;
import com.jsowell.pile.mapper.PileMerchantInfoMapper;
import com.jsowell.pile.service.IPileBasicInfoService;
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.service.*;
import com.jsowell.pile.vo.base.MerchantInfoVO;
import com.jsowell.pile.vo.base.PileInfoVO;
import com.jsowell.pile.vo.uniapp.GroundLockInfoVO;
@@ -43,7 +33,6 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cglib.beans.BulkBean;
import org.springframework.stereotype.Service;
import org.springframework.util.StopWatch;
@@ -714,15 +703,16 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
@Override
public List<GroundLockInfoVO> getGroundLockInfo(String stationId) {
List<GroundLockInfoVO> resultList = new ArrayList<>();
GroundLockInfoVO vo = null;
GroundLockInfoVO.LockInfo lockInfo = null;
List<GroundLockInfoVO.LockInfo> lockInfoList = new ArrayList<>();
GroundLockInfoVO vo;
List<GroundLockInfoVO.LockInfo> lockInfoList;
// 根据站点id查出该站点下所有桩区分单双枪
List<PileConnectorInfoVO> connectorInfoVOList = pileConnectorInfoService.selectConnectorListByStationId(Long.parseLong(stationId));
// 根据pileSn分组
Map<String, List<PileConnectorInfoVO>> collect = connectorInfoVOList.stream().collect(Collectors.groupingBy(PileConnectorInfoVO::getPileSn));
for (Map.Entry<String, List<PileConnectorInfoVO>> entry : collect.entrySet()) {
vo = new GroundLockInfoVO();
lockInfoList = new ArrayList<>();
String pileSn = entry.getKey();
List<PileConnectorInfoVO> list = entry.getValue();
for (PileConnectorInfoVO pileConnectorInfoVO : list) {
@@ -740,12 +730,11 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
// 升锁状态
parkingLockStatus = "升锁";
}
lockInfo = GroundLockInfoVO.LockInfo.builder()
lockInfoList.add(GroundLockInfoVO.LockInfo.builder()
.connectorCode(pileConnectorInfoVO.getPileConnectorCode())
.lockStatus(parkingLockStatus)
.parkingStatus(data.getParkingStatus())
.build();
lockInfoList.add(lockInfo);
.build());
}
vo.setPileSn(pileSn);
vo.setLockInfos(lockInfoList);