Преглед изворни кода

设备列表增加互联平台字段

skyline пре 1 година
родитељ
комит
e39a680d63

+ 2 - 1
admin-web/src/views/admin/station/endpoint/index.vue

@@ -183,6 +183,7 @@ const state = reactive({
       {label: '站点编号', prop: 'stationNo', resizable: true, width: 100, fixed: 'left'},
       {label: '站点名称', prop: 'stationName', resizable: true, width: 200, fixed: 'left'},
       {label: '充电桩编号', prop: 'shortId', resizable: true, width: 110, fixed: 'left'},
+      {label: '互联平台', prop: 'platformName', resizable: true, width: 130, fixed: 'left'},
       {label: '车位编号', prop: 'parkingNo', resizable: true, width: 90, fixed: 'left'},
       {label: '充电桩序列号', prop: 'equipmentId', width: 180, resizable: true},
       {label: '充电桩接口编号', prop: 'connectorId', width: 180, resizable: true},
@@ -285,4 +286,4 @@ const handleUploadVisible = () => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 5 - 0
entity/src/main/java/com/kym/entity/admin/vo/ConnectorInfoVo.java

@@ -40,6 +40,11 @@ public class ConnectorInfoVo extends BaseEntity implements Serializable {
      */
     private String stationName;
 
+    /**
+     * 平台名称
+     */
+    private String platformName;
+
     /**
      * 充电桩接口短编号
      */

+ 2 - 0
service/src/main/java/com/kym/service/admin/impl/ConnectorInfoServiceImpl.java

@@ -4,6 +4,7 @@ import cn.dev33.satoken.stp.StpUtil;
 import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
 import com.github.pagehelper.PageHelper;
+import com.kym.common.cache.PlatformCache;
 import com.kym.common.utils.CommUtil;
 import com.kym.entity.admin.ConnectorInfo;
 import com.kym.entity.admin.EquipmentInfo;
@@ -64,6 +65,7 @@ public class ConnectorInfoServiceImpl extends MyBaseServiceImpl<ConnectorInfoMap
                 .map(item -> {
                             var vo = new ConnectorInfoVo();
                             BeanUtils.copyProperties(item, vo);
+                            vo.setPlatformName(PlatformCache.INSTANCE.getPlatformNameByConnectorId(vo.getConnectorId()));
                             return vo;
                         }
                 ).toList());