mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-16 03:58:13 +08:00
新增 联联平台获取站点信息接口
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.jsowell.pile.mapper;
|
package com.jsowell.pile.mapper;
|
||||||
|
|
||||||
import com.jsowell.pile.domain.MemberBasicInfo;
|
import com.jsowell.pile.domain.MemberBasicInfo;
|
||||||
|
import com.jsowell.pile.domain.PileBasicInfo;
|
||||||
import com.jsowell.pile.vo.uniapp.MemberVO;
|
import com.jsowell.pile.vo.uniapp.MemberVO;
|
||||||
import com.jsowell.pile.vo.uniapp.MemberWalletLogVO;
|
import com.jsowell.pile.vo.uniapp.MemberWalletLogVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|||||||
@@ -143,4 +143,11 @@ public interface PileBasicInfoMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<PersonalPileInfoVO> getPileInfoByMemberId(String memberId);
|
public List<PersonalPileInfoVO> getPileInfoByMemberId(String memberId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联联平台用,通过站点id查询桩列表信息
|
||||||
|
* @param stationId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PileBasicInfo> getPileListByStationId(@Param("stationId") String stationId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,4 +155,11 @@ public interface IPileBasicInfoService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PersonalPileInfoVO> getPileInfoByMemberId(String memberId);
|
List<PersonalPileInfoVO> getPileInfoByMemberId(String memberId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联联平台用,通过站点id查询桩列表信息
|
||||||
|
* @param stationId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PileBasicInfo> getPileListByStationId(String stationId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,5 +91,5 @@ public interface IPileStationInfoService {
|
|||||||
|
|
||||||
PileStationVO getStationInfoByPileSn(String pileSn);
|
PileStationVO getStationInfoByPileSn(String pileSn);
|
||||||
|
|
||||||
List<PileStationInfo> getStationInfoForLianLian(int pageNum, int pageSize);
|
List<PileStationInfo> getStationInfoForLianLian();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -601,4 +601,9 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
|||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PileBasicInfo> getPileListByStationId(String stationId) {
|
||||||
|
return pileBasicInfoMapper.getPileListByStationId(stationId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,8 +146,8 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PileStationInfo> getStationInfoForLianLian(int pageNum, int pageSize) {
|
public List<PileStationInfo> getStationInfoForLianLian() {
|
||||||
PageUtils.startPage(pageNum, pageSize);
|
// PageUtils.startPage(pageNum, pageSize);
|
||||||
return pileStationInfoMapper.getStationInfoForLianLian();
|
return pileStationInfoMapper.getStationInfoForLianLian();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -367,4 +367,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
t3.rated_voltage,
|
t3.rated_voltage,
|
||||||
t3.speed_type
|
t3.speed_type
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getPileListByStationId" resultType="com.jsowell.pile.domain.PileBasicInfo">
|
||||||
|
select <include refid="Base_Column_List"/>
|
||||||
|
from pile_basic_info
|
||||||
|
where station_id = #{stationId,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -15,45 +15,45 @@ import java.util.List;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
public class PileInfo {
|
public class EquipmentInfo {
|
||||||
/**
|
/**
|
||||||
* 设备编码 Y
|
* 设备编码 Y
|
||||||
* 设备唯一编码,对同一对接平台,保证唯一
|
* 设备唯一编码,对同一对接平台,保证唯一
|
||||||
*/
|
*/
|
||||||
private String pileSn;
|
private String EquipmentID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备生产商组织机构代码 Y
|
* 设备生产商组织机构代码 Y
|
||||||
*/
|
*/
|
||||||
private String organizationCode;
|
private String ManufacturerID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备型号 N
|
* 设备型号 N
|
||||||
* 由设备生厂商定义的设备型号
|
* 由设备生厂商定义的设备型号
|
||||||
*/
|
*/
|
||||||
private String pileModelName;
|
private String EquipmentModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备名称 N
|
* 设备名称 N
|
||||||
*/
|
*/
|
||||||
private String pileName;
|
private String EquipmentName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备生产日期 N
|
* 设备生产日期 N
|
||||||
* YYYY-MM-DD
|
* YYYY-MM-DD
|
||||||
*/
|
*/
|
||||||
private String productionDate;
|
private String ProductionDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 建设时间 Y
|
* 建设时间 Y
|
||||||
* YYYY-MM-DD
|
* YYYY-MM-DD
|
||||||
*/
|
*/
|
||||||
private String constructionTime;
|
private String ConstructionTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备类型(1-直流设备;2-交流设备;3-交直流一体设备) Y
|
* 设备类型(1-直流设备;2-交流设备;3-交直流一体设备) Y
|
||||||
*/
|
*/
|
||||||
private Integer pileType;
|
private Integer EquipmentType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备状态 Y
|
* 设备状态 Y
|
||||||
@@ -63,40 +63,40 @@ public class PileInfo {
|
|||||||
* 6:维护中
|
* 6:维护中
|
||||||
* 50:正常使用
|
* 50:正常使用
|
||||||
*/
|
*/
|
||||||
private Integer pileStatus;
|
private Integer EquipmentStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 额定功率(单位:kW) Y
|
* 额定功率(单位:kW) Y
|
||||||
*/
|
*/
|
||||||
private BigDecimal ratedPower;
|
private BigDecimal EquipmentPower;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新国标(0-否;1-是) Y
|
* 新国标(0-否;1-是) Y
|
||||||
* 是否新国标
|
* 是否新国标
|
||||||
*/
|
*/
|
||||||
private Integer newNationalStandard;
|
private Integer NewNationalStandard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充电设备接口列表 Y
|
* 充电设备接口列表 Y
|
||||||
* 该充电设备所有的充电设备接口的信息对象集合
|
* 该充电设备所有的充电设备接口的信息对象集合
|
||||||
*/
|
*/
|
||||||
private List<ConnectorInfo> connectorInfos;
|
private List<ConnectorInfo> ConnectorInfos;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充电设备经度 N
|
* 充电设备经度 N
|
||||||
* GCJ-02坐标系
|
* GCJ-02坐标系
|
||||||
*/
|
*/
|
||||||
private BigDecimal pileLng;
|
private BigDecimal EquipmentLng;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充电设备纬度 N
|
* 充电设备纬度 N
|
||||||
* GCJ-02坐标系
|
* GCJ-02坐标系
|
||||||
*/
|
*/
|
||||||
private BigDecimal pileLat;
|
private BigDecimal EquipmentLat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否支持VIN码识别(0-否;1-是) Y
|
* 是否支持VIN码识别(0-否;1-是) Y
|
||||||
*/
|
*/
|
||||||
private Integer supportVinIdentify;
|
private Integer VinFlag;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -264,7 +264,7 @@ public class StationInfo {
|
|||||||
* 充电设备信息列表 Y
|
* 充电设备信息列表 Y
|
||||||
* 该充电站所有充电设备信息对象集合
|
* 该充电站所有充电设备信息对象集合
|
||||||
*/
|
*/
|
||||||
private List<PileInfo> pileInfos;
|
private List<EquipmentInfo> equipmentInfos;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 停车收费类型 Y
|
* 停车收费类型 Y
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
package com.jsowell.thirdparty.service.impl;
|
package com.jsowell.thirdparty.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import com.jsowell.common.util.DateUtils;
|
||||||
|
import com.jsowell.common.util.PageUtils;
|
||||||
|
import com.jsowell.pile.domain.PileBasicInfo;
|
||||||
import com.jsowell.pile.domain.PileStationInfo;
|
import com.jsowell.pile.domain.PileStationInfo;
|
||||||
import com.jsowell.pile.service.IPileMerchantInfoService;
|
import com.jsowell.pile.service.*;
|
||||||
import com.jsowell.pile.service.IPileStationInfoService;
|
|
||||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||||
|
import com.jsowell.pile.vo.web.PileModelInfoVO;
|
||||||
|
import com.jsowell.thirdparty.domain.EquipmentInfo;
|
||||||
import com.jsowell.thirdparty.domain.OperatorInfo;
|
import com.jsowell.thirdparty.domain.OperatorInfo;
|
||||||
import com.jsowell.thirdparty.domain.StationInfo;
|
import com.jsowell.thirdparty.domain.StationInfo;
|
||||||
import com.jsowell.thirdparty.dto.QueryStationInfoDTO;
|
import com.jsowell.thirdparty.dto.QueryStationInfoDTO;
|
||||||
@@ -15,6 +21,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class LianLianServiceImpl implements LianLianService {
|
public class LianLianServiceImpl implements LianLianService {
|
||||||
@@ -25,6 +32,15 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IPileStationInfoService pileStationInfoService;
|
private IPileStationInfoService pileStationInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPileBasicInfoService pileBasicInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPileModelInfoService pileModelInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPileConnectorInfoService pileConnectorInfoService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void pushMerchantInfo(Long merchantId) {
|
public void pushMerchantInfo(Long merchantId) {
|
||||||
@@ -52,17 +68,18 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
int pageNo = dto.getPageNo() == 0 ? 1 : dto.getPageNo();
|
int pageNo = dto.getPageNo() == 0 ? 1 : dto.getPageNo();
|
||||||
int pageSize = dto.getPageSize() == 0 ? 10 : dto.getPageSize();
|
int pageSize = dto.getPageSize() == 0 ? 10 : dto.getPageSize();
|
||||||
|
|
||||||
List<PileStationInfo> stationInfos = pileStationInfoService.getStationInfoForLianLian(pageNo, pageSize);
|
PageUtils.startPage(pageNo, pageSize);
|
||||||
|
List<PileStationInfo> stationInfos = pileStationInfoService.getStationInfoForLianLian();
|
||||||
if (CollectionUtils.isEmpty(stationInfos)) {
|
if (CollectionUtils.isEmpty(stationInfos)) {
|
||||||
// 未查到数据
|
// 未查到数据
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
StationInfo stationInfo = null;
|
PageInfo<PileStationInfo> pageInfo = new PageInfo<>(stationInfos);
|
||||||
for (PileStationInfo pileStationInfo : stationInfos) {
|
for (PileStationInfo pileStationInfo : pageInfo.getList()) {
|
||||||
stationInfo = new StationInfo();
|
StationInfo stationInfo = new StationInfo();
|
||||||
stationInfo.setStationID(String.valueOf(pileStationInfo.getId()));
|
stationInfo.setStationID(String.valueOf(pileStationInfo.getId()));
|
||||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(String.valueOf(pileStationInfo.getMerchantId()));
|
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(String.valueOf(pileStationInfo.getMerchantId()));
|
||||||
stationInfo.setOperatorID(merchantInfo.getOrganizationCode()); // 组织结构代码
|
stationInfo.setOperatorID(merchantInfo.getOrganizationCode()); // 组织机构代码
|
||||||
stationInfo.setEquipmentOwnerID(String.valueOf(pileStationInfo.getMerchantId()));
|
stationInfo.setEquipmentOwnerID(String.valueOf(pileStationInfo.getMerchantId()));
|
||||||
stationInfo.setStationName(pileStationInfo.getStationName());
|
stationInfo.setStationName(pileStationInfo.getStationName());
|
||||||
stationInfo.setIsAloneApply(Integer.valueOf(pileStationInfo.getAloneApply()));
|
stationInfo.setIsAloneApply(Integer.valueOf(pileStationInfo.getAloneApply()));
|
||||||
@@ -83,7 +100,10 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
stationInfo.setParkFree(Integer.valueOf(pileStationInfo.getParkFree()));
|
stationInfo.setParkFree(Integer.valueOf(pileStationInfo.getParkFree()));
|
||||||
stationInfo.setPayment(pileStationInfo.getPayment());
|
stationInfo.setPayment(pileStationInfo.getPayment());
|
||||||
stationInfo.setSupportOrder(Integer.valueOf(pileStationInfo.getSupportOrder()));
|
stationInfo.setSupportOrder(Integer.valueOf(pileStationInfo.getSupportOrder()));
|
||||||
// stationInfo.setPileInfos(); // 充电设备信息列表
|
|
||||||
|
List<EquipmentInfo> pileList = getPileList(pileStationInfo);
|
||||||
|
stationInfo.setEquipmentInfos(pileList); // 充电设备信息列表
|
||||||
|
|
||||||
// stationInfo.setParkFeeType(pileStationInfo); // 停车收费类型
|
// stationInfo.setParkFeeType(pileStationInfo); // 停车收费类型
|
||||||
stationInfo.setToiletFlag(Integer.valueOf(pileStationInfo.getToiletFlag()));
|
stationInfo.setToiletFlag(Integer.valueOf(pileStationInfo.getToiletFlag()));
|
||||||
stationInfo.setStoreFlag(Integer.valueOf(pileStationInfo.getStoreFlag()));
|
stationInfo.setStoreFlag(Integer.valueOf(pileStationInfo.getStoreFlag()));
|
||||||
@@ -100,5 +120,37 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取桩列表信息
|
||||||
|
* @param pileStationInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private List<EquipmentInfo> getPileList(PileStationInfo pileStationInfo){
|
||||||
|
List<EquipmentInfo> resultList = new ArrayList<>();
|
||||||
|
// 通过站点id查询桩基本信息
|
||||||
|
List<PileBasicInfo> list = pileBasicInfoService.getPileListByStationId(String.valueOf(pileStationInfo.getId()));
|
||||||
|
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(String.valueOf(pileStationInfo.getMerchantId()));
|
||||||
|
// 封装成联联平台对象
|
||||||
|
for (PileBasicInfo pileBasicInfo : list) {
|
||||||
|
EquipmentInfo equipmentInfo = new EquipmentInfo();
|
||||||
|
String pileSn = pileBasicInfo.getSn();
|
||||||
|
|
||||||
|
equipmentInfo.setEquipmentID(pileSn);
|
||||||
|
equipmentInfo.setManufacturerID(merchantInfo.getOrganizationCode());
|
||||||
|
equipmentInfo.setConstructionTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, pileBasicInfo.getCreateTime()));
|
||||||
|
|
||||||
|
PileModelInfoVO modelInfo = pileModelInfoService.getPileModelInfoByPileSn(pileSn);
|
||||||
|
equipmentInfo.setEquipmentType(Integer.valueOf(modelInfo.getSpeedType()));
|
||||||
|
|
||||||
|
// Map<String, String> pileStatus = pileConnectorInfoService.getPileStatus(Lists.newArrayList(pileBasicInfo.getSn()));
|
||||||
|
equipmentInfo.setEquipmentStatus(50);
|
||||||
|
equipmentInfo.setEquipmentPower(new BigDecimal(modelInfo.getRatedPower()));
|
||||||
|
equipmentInfo.setNewNationalStandard(1);
|
||||||
|
// equipmentInfo.setConnectorInfos();
|
||||||
|
equipmentInfo.setVinFlag(1);
|
||||||
|
|
||||||
|
resultList.add(equipmentInfo);
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user