mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update
This commit is contained in:
@@ -20,6 +20,7 @@ import com.jsowell.common.enums.ykc.PileStatusEnum;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.SecurityUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.spring.SpringUtils;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
@@ -82,7 +83,7 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||
private PileMerchantInfoService pileMerchantInfoService;
|
||||
|
||||
@Autowired
|
||||
private PileMsgRecordService pileMsgRecordService;
|
||||
@@ -1057,28 +1058,15 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
|
||||
*/
|
||||
@Override
|
||||
public BusinessConnectorInfoVO getConnectorListByStationAndStatus(QueryConnectorInfoDTO dto) {
|
||||
// String stationId = dto.getStationId();
|
||||
String merchantId = dto.getMerchantId();
|
||||
// List<String> stationIds = dto.getStationIds();
|
||||
// 获取登录账号信息
|
||||
Long deptId = SecurityUtils.getDeptId();
|
||||
List<String> stationIds = pileMerchantInfoService.queryByMerchantDeptIds(Lists.newArrayList(String.valueOf(deptId)));
|
||||
String connectorStatus = dto.getConnectorStatus();
|
||||
int pageNum = dto.getPageNum();
|
||||
int pageSize = dto.getPageSize();
|
||||
BusinessConnectorInfoVO vo = new BusinessConnectorInfoVO();
|
||||
// 通过merchantId查询站点ids
|
||||
List<PileStationInfo> pileStationInfos = pileStationInfoService.selectStationListByMerchantIdWithAuth(Long.parseLong(merchantId));
|
||||
// 收集站点ids
|
||||
List<Long> longStationIds = pileStationInfos.stream()
|
||||
.map(PileStationInfo::getId)
|
||||
.collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(longStationIds)) {
|
||||
return vo;
|
||||
}
|
||||
List<String> StationIds = longStationIds.stream()
|
||||
.map(String::valueOf) // 或 s -> Long.parseLong(s)
|
||||
.collect(Collectors.toList());
|
||||
// 根据站点ids查询枪口列表(有缓存)
|
||||
// List<ConnectorInfoVO> uniAppConnectorList = getUniAppConnectorList(Long.parseLong(stationId));
|
||||
List<ConnectorInfoVO> connectorInfoVOS = batchSelectConnectorList(StationIds);
|
||||
List<ConnectorInfoVO> connectorInfoVOS = batchSelectConnectorList(stationIds);
|
||||
// 筛选出枪口编号
|
||||
List<String> pileConnectorCodeList = connectorInfoVOS.stream()
|
||||
.map(ConnectorInfoVO::getPileConnectorCode)
|
||||
@@ -1098,6 +1086,10 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
|
||||
vo.setChargingConnectorNum(chargingNum);
|
||||
vo.setFaultConnectorNum(faultNum);
|
||||
|
||||
List<Long> longStationIds = stationIds.stream()
|
||||
.map(Long::parseLong) // 或 s -> Long.parseLong(s)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 根据站点id和枪口状态查询枪口列表
|
||||
QueryConnectorListDTO queryConnectorListDTO = QueryConnectorListDTO.builder()
|
||||
.pageNum(pageNum)
|
||||
|
||||
Reference in New Issue
Block a user