|
|
@@ -11,6 +11,7 @@ import com.kym.common.cache.PlatformCache;
|
|
|
import com.kym.common.exception.BusinessException;
|
|
|
import com.kym.common.utils.CommUtil;
|
|
|
import com.kym.common.utils.PlatformAesUtil;
|
|
|
+import com.kym.common.utils.PlatformConvertUtil;
|
|
|
import com.kym.entity.admin.*;
|
|
|
import com.kym.entity.admin.queryParams.StationQueryParam;
|
|
|
import com.kym.entity.admin.vo.LocalStationVo;
|
|
|
@@ -293,6 +294,7 @@ public class StationServiceImpl extends MyBaseServiceImpl<StationMapper, Station
|
|
|
// 默认状态设置为空闲
|
|
|
var connectorInfo = new ConnectorInfo().setStatus(EquipmentInfo.SERVICE_STATUS_空闲);
|
|
|
BeanUtils.copyProperties(connector, connectorInfo);
|
|
|
+ connectorInfo.setConnectorId(PlatformConvertUtil.parse2LocalConnectorId(connector.getConnectorId()));
|
|
|
connectorList.add(connectorInfo);
|
|
|
});
|
|
|
}
|
|
|
@@ -337,7 +339,7 @@ public class StationServiceImpl extends MyBaseServiceImpl<StationMapper, Station
|
|
|
@Transactional
|
|
|
public void importStation(JSONObject data) {
|
|
|
var fieldIndexes = data.getJSONArray("fieldIndexes");
|
|
|
- if (fieldIndexes.size() != 7) {
|
|
|
+ if (fieldIndexes.size() != 8) {
|
|
|
throw new BusinessException("导入数据格式错误,请正确匹配对应数据列");
|
|
|
}
|
|
|
|
|
|
@@ -374,6 +376,9 @@ public class StationServiceImpl extends MyBaseServiceImpl<StationMapper, Station
|
|
|
KymCache.INSTANCE.putConnectorId2ShortId(equipmentRelations.stream().collect(Collectors.toMap(EquipmentRelation::getConnectorId, EquipmentRelation::getShortId)));
|
|
|
KymCache.INSTANCE.putConnectorId2StationId(equipmentRelations.stream().collect(Collectors.toMap(EquipmentRelation::getConnectorId, EquipmentRelation::getStationId)));
|
|
|
KymCache.INSTANCE.putConnectorId2ParkingNo(equipmentRelations.stream().collect(Collectors.toMap(EquipmentRelation::getConnectorId, EquipmentRelation::getParkingNo)));
|
|
|
+ PlatformCache.INSTANCE.putConnectorId2PlatformName(equipmentRelations.stream().collect(Collectors.toMap(EquipmentRelation::getConnectorId, EquipmentRelation::getPlatformName)));
|
|
|
+ PlatformCache.INSTANCE.putStationId2PlatformName(equipmentRelations.stream().collect(Collectors.toMap(EquipmentRelation::getStationId, EquipmentRelation::getPlatformName)));
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|