diff --git a/das/src/main/java/com/das/modules/equipment/mapper/SysEquipmentMapper.java b/das/src/main/java/com/das/modules/equipment/mapper/SysEquipmentMapper.java index 42464691..2f5372b4 100644 --- a/das/src/main/java/com/das/modules/equipment/mapper/SysEquipmentMapper.java +++ b/das/src/main/java/com/das/modules/equipment/mapper/SysEquipmentMapper.java @@ -5,10 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.das.modules.auth.mapper.BaseMapperPlus; import com.das.modules.equipment.domain.dto.SysEquipmentDto; import com.das.modules.equipment.domain.excel.SysEquipmentExcel; -import com.das.modules.equipment.domain.vo.BaseImptabmappingVo; import com.das.modules.equipment.domain.vo.SysEquipmentVo; import com.das.modules.equipment.entity.SysEquipment; -import com.das.modules.page.domian.WindTurbinesPageVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -16,8 +14,13 @@ import java.util.List; @Mapper public interface SysEquipmentMapper extends BaseMapperPlus { - - IPage querySysEquipmentList(IPage page, @Param("info") SysEquipmentDto sysEquipmentDto); + /** + * 分页查询设备列表 + * @param page 分页信息 + * @param sysEquipmentDto 查询条件 + * @return 返回值 + */ + IPage queryEquipmentListInPage(IPage page, @Param("info") SysEquipmentDto sysEquipmentDto); /** * 查询根设备列表 @@ -25,7 +28,12 @@ public interface SysEquipmentMapper extends BaseMapperPlus queryRootEquipments(); - List queryInfoById (@Param("info") SysEquipmentDto sysEquipmentDto); + /** + * 导出设备信息 + * @param sysEquipmentDto 查询条件 + * @return SysEquipmentExcel 列表 + */ + List queryExportExcelInfo(@Param("info") SysEquipmentDto sysEquipmentDto); Long queryChildEquipmentCount(@Param("id")Long id); @@ -35,11 +43,16 @@ public interface SysEquipmentMapper extends BaseMapperPlus queryBelongLines(@Param("objectType") Long objectType); + List queryBelongLines(@Param("objectType") Integer objectType); - List querySysEquipmentList(@Param("info") SysEquipmentDto sysEquipmentDto); + List queryEquipmentListInPage(@Param("info") SysEquipmentDto sysEquipmentDto); - SysEquipmentVo queryWindFarm(@Param("info") SysEquipmentDto sysEquipmentDto); + /** + * 查询设备列表 + * @param sysEquipmentDto 查询条件 + * @return + */ + List queryEquipmentList(@Param("info") SysEquipmentDto sysEquipmentDto); } diff --git a/das/src/main/java/com/das/modules/equipment/service/impl/SysEquipmentServiceImpl.java b/das/src/main/java/com/das/modules/equipment/service/impl/SysEquipmentServiceImpl.java index 6a659f3c..83aec758 100644 --- a/das/src/main/java/com/das/modules/equipment/service/impl/SysEquipmentServiceImpl.java +++ b/das/src/main/java/com/das/modules/equipment/service/impl/SysEquipmentServiceImpl.java @@ -117,7 +117,7 @@ public class SysEquipmentServiceImpl implements SysEquipmentService { PageQuery pageQuery = new PageQuery(); pageQuery.setPageNum(sysEquipmentDto.getPageNum()); pageQuery.setPageSize(sysEquipmentDto.getPageSize()); - IPage iPage = sysEquipmentMapper.querySysEquipmentList(pageQuery.build(), sysEquipmentDto); + IPage iPage = sysEquipmentMapper.queryEquipmentListInPage(pageQuery.build(), sysEquipmentDto); return PageDataInfo.build(iPage.getRecords(), iPage.getTotal()); } @@ -145,9 +145,15 @@ public class SysEquipmentServiceImpl implements SysEquipmentService { return equipList; } + /** + * 设备台账导出Excel + * @param sysEquipmentDto 查询参数 + * @param request HttpServletRequest + * @param response HttpServletResponse + */ @Override public void exportSysEquipment(SysEquipmentDto sysEquipmentDto, HttpServletRequest request, HttpServletResponse response) { - List sysEquipmentList = sysEquipmentMapper.queryInfoById(sysEquipmentDto); + List sysEquipmentList = sysEquipmentMapper.queryExportExcelInfo(sysEquipmentDto); //自定义别名 别名的key和实体类中的名称要对应上!! LinkedHashMap map = new LinkedHashMap<>(); map.put("tag", "*标识(I:新增,U:修改,D:删除)"); diff --git a/das/src/main/java/com/das/modules/node/service/TDEngineService.java b/das/src/main/java/com/das/modules/node/service/TDEngineService.java index 0e656c62..2f805a8a 100644 --- a/das/src/main/java/com/das/modules/node/service/TDEngineService.java +++ b/das/src/main/java/com/das/modules/node/service/TDEngineService.java @@ -80,7 +80,7 @@ public class TDEngineService { } sb.append(") TAGS (`deviceid` BIGINT);"); try { - System.out.println(sb.toString()); + log.info(sb.toString()); pstmt.executeUpdate(sb.toString()); } catch (Exception e) { log.error("创建超级表失败,失败原因{}", e); @@ -353,6 +353,9 @@ public class TDEngineService { } Map>> result = new HashMap<>(); Map> valueMap = new HashMap<>(); + for (String item : fieldList){ + valueMap.put(item,null); + } StringBuffer sb = new StringBuffer(2048); if (StrUtil.isNotBlank(interval)) { String startTimeStr = SIMPLE_DATE_FORMAT.format(startTime); @@ -392,7 +395,7 @@ public class TDEngineService { List timeList = new ArrayList<>(); timeList.add(rs.getTimestamp(1).getTime()); List valueList = new ArrayList<>(); - valueList.add(rs.getObject(fieldList.get(i))); + valueList.add(rs.getObject(fieldList.get(i).toLowerCase())); map.put("times",timeList); map.put("values",valueList); valueMap.put(fieldList.get(i),map); @@ -401,7 +404,7 @@ public class TDEngineService { List times = (List) map.get("times"); List values = (List) map.get("values"); times.add(rs.getTimestamp(1).getTime()); - values.add(rs.getObject(fieldList.get(i))); + values.add(rs.getObject(fieldList.get(i).toLowerCase())); } } } @@ -423,6 +426,9 @@ public class TDEngineService { } Map>> result = new HashMap<>(); Map> valueMap = new HashMap<>(); + for (String item : fieldList){ + valueMap.put(item,null); + } StringBuffer sb = new StringBuffer(2048); if (StrUtil.isNotBlank(interval)) { String startTimeStr = SIMPLE_DATE_FORMAT.format(startTime); diff --git a/das/src/main/java/com/das/modules/node/service/impl/DataServiceImpl.java b/das/src/main/java/com/das/modules/node/service/impl/DataServiceImpl.java index c19fae7c..bfde1ccb 100644 --- a/das/src/main/java/com/das/modules/node/service/impl/DataServiceImpl.java +++ b/das/src/main/java/com/das/modules/node/service/impl/DataServiceImpl.java @@ -196,6 +196,7 @@ public class DataServiceImpl implements DataService { configUpdateVo.setVersion(1); configUpdateVo.setLinks(links); configUpdateVo.setEquipments(equipments); + log.info("下发配置为{}",configUpdateVo); JsonNode jsonNode = JSON_MAPPER.valueToTree(configUpdateVo); long time = System.currentTimeMillis(); diff --git a/das/src/main/java/com/das/modules/node/service/impl/SysNodeServiceImpl.java b/das/src/main/java/com/das/modules/node/service/impl/SysNodeServiceImpl.java index 32d8de26..cb92a34d 100644 --- a/das/src/main/java/com/das/modules/node/service/impl/SysNodeServiceImpl.java +++ b/das/src/main/java/com/das/modules/node/service/impl/SysNodeServiceImpl.java @@ -237,6 +237,7 @@ public class SysNodeServiceImpl implements SysNodeService { List addList = new ArrayList<>(); + List updateList = new ArrayList<>(); //过滤已经存在的记录 Set PassedMappingIds = new HashSet<>(); @@ -264,6 +265,13 @@ public class SysNodeServiceImpl implements SysNodeService { if(mappingVoMap.containsKey(key)){ SysTabMappingVo item = mappingVoMap.get(key); PassedMappingIds.add(item.getId()); + + SysTabMapping mapping = sysImptabmappingMapper.selectById(item.getId()); + mapping.setMeasPointName(iotModelVo.getAttributeName()); + mapping.setHighSpeed(iotModelVo.getHighSpeed()); + mapping.setPorder(iotModelVo.getPorder()); + updateList.add(mapping); + }else{ SysTabMapping mapping = new SysTabMapping(); mapping.setId(SequenceUtils.generateId()); @@ -297,6 +305,11 @@ public class SysNodeServiceImpl implements SysNodeService { if(mappingVoMap.containsKey(key)){ SysTabMappingVo item = mappingVoMap.get(key); PassedMappingIds.add(item.getId()); + + SysTabMapping mapping = sysImptabmappingMapper.selectById(item.getId()); + mapping.setMeasPointName(iotServiceVo.getServiceName()); + mapping.setPorder(iotServiceVo.getPorder()); + updateList.add(mapping); }else{ SysTabMapping mapping = new SysTabMapping(); mapping.setId(SequenceUtils.generateId()); @@ -317,6 +330,9 @@ public class SysNodeServiceImpl implements SysNodeService { if (!CollectionUtils.isEmpty(addList)) { sysImptabmappingMapper.insertOrUpdateBatch(addList); } + if (!CollectionUtils.isEmpty(updateList)) { + sysImptabmappingMapper.insertOrUpdateBatch(updateList); + } //删除为匹配的历史配置 for(SysTabMappingVo item : mappingVoMap.values()){ diff --git a/das/src/main/java/com/das/modules/page/service/WindTurbinesPageService.java b/das/src/main/java/com/das/modules/page/service/WindTurbinesPageService.java index 26d14989..c5c4d4ff 100644 --- a/das/src/main/java/com/das/modules/page/service/WindTurbinesPageService.java +++ b/das/src/main/java/com/das/modules/page/service/WindTurbinesPageService.java @@ -1,5 +1,6 @@ package com.das.modules.page.service; +import com.das.common.constant.EquipmentTypeIds; import com.das.common.exceptions.ServiceException; import com.das.modules.data.domain.SnapshotValueQueryParam; import com.das.modules.data.service.DataService; @@ -24,7 +25,6 @@ import java.util.concurrent.TimeUnit; @Service @Slf4j public class WindTurbinesPageService { - private static final Integer OBJECT_TYPE = 10002; @Autowired SysEquipmentMapper sysEquipmentMapper; @@ -41,7 +41,7 @@ public class WindTurbinesPageService { * @return 返回字符串数组 */ public List queryBelongLines() { - return sysEquipmentMapper.queryBelongLines(Long.valueOf(OBJECT_TYPE)); + return sysEquipmentMapper.queryBelongLines(EquipmentTypeIds.EQUIPMENT_TYPE_STATION_WTG); } @@ -54,8 +54,8 @@ public class WindTurbinesPageService { StopWatch stopWatch = new StopWatch(); stopWatch.start("获取风机页面数据"); SysEquipmentDto sysEquipmentDto = new SysEquipmentDto(); - sysEquipmentDto.setObjectType(OBJECT_TYPE); - List sysEquipmentVos = sysEquipmentMapper.querySysEquipmentList(sysEquipmentDto); + sysEquipmentDto.setObjectType(EquipmentTypeIds.EQUIPMENT_TYPE_STATION_WTG); + List sysEquipmentVos = sysEquipmentMapper.queryEquipmentListInPage(sysEquipmentDto); //风机返回数据列表 List windTurbinesPageVos = new ArrayList<>(); List paramList = new ArrayList<>(); diff --git a/das/src/main/java/com/das/modules/page/service/impl/HomeServiceImpl.java b/das/src/main/java/com/das/modules/page/service/impl/HomeServiceImpl.java index 993082c8..e8709a91 100644 --- a/das/src/main/java/com/das/modules/page/service/impl/HomeServiceImpl.java +++ b/das/src/main/java/com/das/modules/page/service/impl/HomeServiceImpl.java @@ -27,6 +27,9 @@ public class HomeServiceImpl implements HomeService { @Autowired private DataService dataService; + //缺省风电场对象 + private long defaultWindFarmId = 0; + /** * 接口1: 首页风机矩阵数据 @@ -38,7 +41,7 @@ public class HomeServiceImpl implements HomeService { SysEquipmentDto sysEquipmentDto = new SysEquipmentDto(); sysEquipmentDto.setObjectType(EquipmentTypeIds.EQUIPMENT_TYPE_STATION_WTG); //获取所有风机设备 - List sysEquipmentVos = sysEquipmentMapper.querySysEquipmentList(sysEquipmentDto); + List sysEquipmentVos = sysEquipmentMapper.queryEquipmentListInPage(sysEquipmentDto); //风机返回数据列表 List homeWindRealTimeVoList = new ArrayList<>(); List paramList = new ArrayList<>(); @@ -98,10 +101,20 @@ public class HomeServiceImpl implements HomeService { Long windFarmId = windFarmRealDataDto.getWindFarmId(); //查询数据库中风电场设备,取第一个风电场 if (windFarmId == null) { - SysEquipmentDto sysEquipmentDto = new SysEquipmentDto(); - sysEquipmentDto.setObjectType(EquipmentTypeIds.EQUIPMENT_TYPE_WIND_FARM); - SysEquipmentVo sysEquipmentVo1 = sysEquipmentMapper.queryWindFarm(sysEquipmentDto); - windFarmId = sysEquipmentVo1.getId(); + if(defaultWindFarmId ==0){ + SysEquipmentDto sysEquipmentDto = new SysEquipmentDto(); + sysEquipmentDto.setObjectType(EquipmentTypeIds.EQUIPMENT_TYPE_WIND_FARM); + List list = sysEquipmentMapper.queryEquipmentList(sysEquipmentDto); + if(!list.isEmpty()){ + defaultWindFarmId = list.get(0).getId(); + } + } + + if(defaultWindFarmId==0){ + throw new RuntimeException("系统中没有风电场台账信息"); + } + + windFarmId = defaultWindFarmId; } List paramList = new ArrayList<>(); //构建需要查询的物模型属 性 diff --git a/das/src/main/resources/mapper/SysEquipmentMapper.xml b/das/src/main/resources/mapper/SysEquipmentMapper.xml index b035b922..364fa5ca 100644 --- a/das/src/main/resources/mapper/SysEquipmentMapper.xml +++ b/das/src/main/resources/mapper/SysEquipmentMapper.xml @@ -64,7 +64,7 @@ - select t.* from sys_equipment t @@ -99,7 +99,7 @@ - select t.*,se."name" as parentEquipmentName,sim.iot_model_name as iotModelName, sim.iot_model_code, so."name" as orgName, so.mrid,se.code as parentEquipmentCode from sys_equipment t @@ -135,13 +135,13 @@ select * from sys_equipment where code = #{code} - select t.* from sys_equipment t @@ -167,7 +167,6 @@ order by t.name - limit 1 diff --git a/database/风场采集.pdma.json b/database/风场采集.pdma.json index ddeb7c0a..7188e12b 100644 --- a/database/风场采集.pdma.json +++ b/database/风场采集.pdma.json @@ -4,7 +4,7 @@ "avatar": "", "version": "4.9.2", "createdTime": "2024-5-29 17:03:05", - "updatedTime": "2024-10-24 09:39:04", + "updatedTime": "2024-10-30 11:19:40", "dbConns": [], "profile": { "default": { @@ -1590,7 +1590,24 @@ "indexes": [], "defName": "设备基础属性表", "notes": {}, - "correlations": [] + "correlations": [ + { + "myField": "in2", + "refEntity": "3B7828B3-38C2-4A5B-9B5A-84E81DAB3A03", + "refField": "out2", + "myRows": "1", + "refRows": "n", + "innerType": "" + }, + { + "myField": "out2", + "refEntity": "A1C3D378-5246-4F80-9E47-ADF91DFB7EBF", + "refField": "in2", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "3B7828B3-38C2-4A5B-9B5A-84E81DAB3A03", @@ -2312,7 +2329,16 @@ "defName": "物模型_属性定义", "indexes": [], "notes": {}, - "correlations": [] + "correlations": [ + { + "myField": "bottom2", + "refEntity": "3B7828B3-38C2-4A5B-9B5A-84E81DAB3A03", + "refField": "top", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "6CCDA6D5-AABD-4DCA-A3C6-868F4F23AFFB", @@ -2654,7 +2680,16 @@ "type": "P", "defName": "物模型_方法定义", "notes": {}, - "correlations": [] + "correlations": [ + { + "myField": "bottom2", + "refEntity": "3B7828B3-38C2-4A5B-9B5A-84E81DAB3A03", + "refField": "top3", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "F146908D-A604-440F-9524-8C28E6A31564", @@ -2960,7 +2995,16 @@ "type": "P", "defName": "系统节点(服务器)", "notes": {}, - "correlations": [], + "correlations": [ + { + "myField": "bottom2", + "refEntity": "A1C3D378-5246-4F80-9E47-ADF91DFB7EBF", + "refField": "top2", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ], "indexes": [] }, { @@ -3285,7 +3329,16 @@ "type": "P", "defName": "通讯链路", "notes": {}, - "correlations": [] + "correlations": [ + { + "myField": "in2", + "refEntity": "F146908D-A604-440F-9524-8C28E6A31564", + "refField": "out2", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "85CB25D9-D1CC-4C15-A0BE-611DCF579620", @@ -3645,7 +3698,16 @@ "type": "P", "defName": "链路映射表", "notes": {}, - "correlations": [] + "correlations": [ + { + "myField": "top2", + "refEntity": "C1EBE30B-0D85-4C7A-B992-FF70A793ED1D", + "refField": "bottom2", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "61D89BFE-FE50-42F5-BDCF-CC7378570C56", @@ -4041,7 +4103,16 @@ "type": "P", "defName": "职业&账号表", "notes": {}, - "correlations": [] + "correlations": [ + { + "myField": "top2", + "refEntity": "A1C3D378-5246-4F80-9E47-ADF91DFB7EBF", + "refField": "bottom2", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "9C865E82-EAC5-441E-A6E1-49B95EB0EFA9", @@ -4905,7 +4976,24 @@ "type": "P", "defName": "职员与角色关系表", "notes": {}, - "correlations": [] + "correlations": [ + { + "myField": "in2", + "refEntity": "61D89BFE-FE50-42F5-BDCF-CC7378570C56", + "refField": "bottom2", + "myRows": "1", + "refRows": "n", + "innerType": "" + }, + { + "myField": "out2", + "refEntity": "9C865E82-EAC5-441E-A6E1-49B95EB0EFA9", + "refField": "bottom2", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "AE06892E-BC15-4A74-9374-81B89277E005", @@ -5193,7 +5281,24 @@ "type": "P", "defName": "角色与权限关系表", "notes": {}, - "correlations": [] + "correlations": [ + { + "myField": "in2", + "refEntity": "9C865E82-EAC5-441E-A6E1-49B95EB0EFA9", + "refField": "bottom3", + "myRows": "1", + "refRows": "n", + "innerType": "" + }, + { + "myField": "out2", + "refEntity": "F68E1B95-2D0C-4F14-B395-10AB5F8910D7", + "refField": "bottom3", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "172B2FD1-14C3-499B-A87B-758F8BF87C58", @@ -5589,7 +5694,16 @@ "type": "P", "defName": "系统菜单", "notes": {}, - "correlations": [] + "correlations": [ + { + "myField": "in2", + "refEntity": "F68E1B95-2D0C-4F14-B395-10AB5F8910D7", + "refField": "out2", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "C6F277B3-10D0-41E9-B401-C4A5EE8E6457", @@ -6219,6 +6333,304 @@ "type": "P", "defName": "枚举值表", "notes": {}, + "correlations": [ + { + "myField": "in2", + "refEntity": "C6F277B3-10D0-41E9-B401-C4A5EE8E6457", + "refField": "out2", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] + }, + { + "id": "18957523-E336-46C8-8FF8-07D2915DAD55", + "defKey": "sys_manual_status", + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "id", + "defName": "设备ID", + "comment": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "baseType": "58BC5143-46F3-4541-B5A3-A4218DD071EC", + "extProps": {}, + "domain": "", + "id": "86EB462F-B711-4CFD-B38A-338A588A0D79" + }, + { + "defKey": "attribute_code", + "defName": "属性编码", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "DA955EE7-AD3C-4994-BFA5-B72391073F88" + }, + { + "defKey": "status", + "defName": "状态值", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "baseType": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", + "extProps": {}, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "id": "39FD01EE-45E9-4316-8302-652FE06B901A" + }, + { + "defKey": "revision", + "defName": "乐观锁", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "213394FF-C168-4677-98B0-7C4D3FD7724F", + "baseType": "1D764C4A-6F9F-421E-B11A-6F3E23B51811" + }, + { + "defKey": "created_by", + "defName": "创建人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "6EF4E8BE-3517-43B0-AED1-C8C5D291AA24", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64" + }, + { + "defKey": "created_time", + "defName": "创建时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "66343A2B-3D21-4858-AEAF-7959A487481F", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098" + }, + { + "defKey": "updated_by", + "defName": "更新人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "8F19AC30-088D-47B8-ADD4-2FDDA1BCD76F", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64" + }, + { + "defKey": "updated_time", + "defName": "更新时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "A82C5C29-CF89-49F4-878A-1AEF254440DC", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098" + } + ], + "properties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" + }, + "type": "P", + "defName": "人工置位表", + "indexes": [], + "notes": {}, "correlations": [] } ], @@ -6881,145 +7293,6 @@ "relationType": "entity", "canvasData": { "cells": [ - { - "id": "1a42f2a5-52d2-4f20-9ea7-6f3bd8f3441e", - "shape": "table", - "position": { - "x": -1060.5, - "y": -990 - }, - "count": 0, - "originKey": "6CCDA6D5-AABD-4DCA-A3C6-868F4F23AFFB", - "type": "P", - "size": { - "width": 386, - "height": 284 - }, - "autoSize": true, - "ports": { - "groups": { - "in": { - "attrs": { - "circle": { - "r": 4, - "magnet": true, - "stroke": "#1890FF", - "fill": "#FFF", - "strokeWidth": 1, - "style": { - "visibility": "hidden" - } - } - }, - "zIndex": 3, - "position": { - "name": "left" - } - }, - "out": { - "attrs": { - "circle": { - "r": 4, - "magnet": true, - "stroke": "#1890FF", - "fill": "#FFF", - "strokeWidth": 1, - "style": { - "visibility": "hidden" - } - } - }, - "position": { - "name": "right" - } - }, - "top": { - "attrs": { - "circle": { - "r": 4, - "magnet": true, - "stroke": "#1890FF", - "fill": "#FFF", - "strokeWidth": 1, - "style": { - "visibility": "hidden" - } - } - }, - "position": { - "name": "top" - } - }, - "bottom": { - "attrs": { - "circle": { - "r": 4, - "magnet": true, - "stroke": "#1890FF", - "fill": "#FFF", - "strokeWidth": 1, - "style": { - "visibility": "hidden" - } - } - }, - "position": { - "name": "bottom" - } - } - }, - "items": [ - { - "group": "in", - "id": "in" - }, - { - "group": "in", - "id": "in2" - }, - { - "group": "in", - "id": "in3" - }, - { - "group": "out", - "id": "out" - }, - { - "group": "out", - "id": "out2" - }, - { - "group": "out", - "id": "out3" - }, - { - "group": "top", - "id": "top" - }, - { - "group": "top", - "id": "top2" - }, - { - "group": "top", - "id": "top3" - }, - { - "group": "bottom", - "id": "bottom" - }, - { - "group": "bottom", - "id": "bottom2" - }, - { - "group": "bottom", - "id": "bottom3" - } - ] - } - }, { "id": "b1e0450d-2b6b-444d-8c78-77dfb71f09be", "shape": "table", @@ -7716,18 +7989,18 @@ } }, { - "id": "a4493502-571d-4863-a467-39b891145b94", + "id": "8be908ab-85b6-4230-b708-1ddf2da33830", "shape": "table", "position": { - "x": -620, - "y": -768 + "x": 290, + "y": 150 }, "count": 0, - "originKey": "E88BA7F6-22EB-4733-B322-BDB382D57C62", + "originKey": "80203FEF-6CCA-4E85-8EE8-EB117AAEE55C", "type": "P", "size": { - "width": 436, - "height": 514 + "width": 348, + "height": 215 }, "autoSize": true, "ports": { @@ -7855,18 +8128,18 @@ } }, { - "id": "7ac8a5d4-1b88-4286-af3e-bf143e4511ca", + "id": "192f839e-8983-466e-9df7-818c17430f45", "shape": "table", "position": { - "x": 960, - "y": -240 + "x": -754, + "y": -234.5 }, "count": 0, - "originKey": "F68E1B95-2D0C-4F14-B395-10AB5F8910D7", + "originKey": "693514C4-32C9-4FF9-9842-5E08581C905F", "type": "P", "size": { - "width": 358, - "height": 215 + "width": 433, + "height": 284 }, "autoSize": true, "ports": { @@ -8565,6 +8838,145 @@ ] } }, + { + "id": "7ac8a5d4-1b88-4286-af3e-bf143e4511ca", + "shape": "table", + "position": { + "x": 960, + "y": -240 + }, + "count": 0, + "originKey": "F68E1B95-2D0C-4F14-B395-10AB5F8910D7", + "type": "P", + "size": { + "width": 358, + "height": 215 + }, + "autoSize": true, + "ports": { + "groups": { + "in": { + "attrs": { + "circle": { + "r": 4, + "magnet": true, + "stroke": "#1890FF", + "fill": "#FFF", + "strokeWidth": 1, + "style": { + "visibility": "hidden" + } + } + }, + "zIndex": 3, + "position": { + "name": "left" + } + }, + "out": { + "attrs": { + "circle": { + "r": 4, + "magnet": true, + "stroke": "#1890FF", + "fill": "#FFF", + "strokeWidth": 1, + "style": { + "visibility": "hidden" + } + } + }, + "position": { + "name": "right" + } + }, + "top": { + "attrs": { + "circle": { + "r": 4, + "magnet": true, + "stroke": "#1890FF", + "fill": "#FFF", + "strokeWidth": 1, + "style": { + "visibility": "hidden" + } + } + }, + "position": { + "name": "top" + } + }, + "bottom": { + "attrs": { + "circle": { + "r": 4, + "magnet": true, + "stroke": "#1890FF", + "fill": "#FFF", + "strokeWidth": 1, + "style": { + "visibility": "hidden" + } + } + }, + "position": { + "name": "bottom" + } + } + }, + "items": [ + { + "group": "in", + "id": "in" + }, + { + "group": "in", + "id": "in2" + }, + { + "group": "in", + "id": "in3" + }, + { + "group": "out", + "id": "out" + }, + { + "group": "out", + "id": "out2" + }, + { + "group": "out", + "id": "out3" + }, + { + "group": "top", + "id": "top" + }, + { + "group": "top", + "id": "top2" + }, + { + "group": "top", + "id": "top3" + }, + { + "group": "bottom", + "id": "bottom" + }, + { + "group": "bottom", + "id": "bottom2" + }, + { + "group": "bottom", + "id": "bottom3" + } + ] + } + }, { "id": "4e9a7a00-d60a-43d2-8600-f83922c37647", "shape": "table", @@ -8844,18 +9256,157 @@ } }, { - "id": "8be908ab-85b6-4230-b708-1ddf2da33830", + "id": "1a42f2a5-52d2-4f20-9ea7-6f3bd8f3441e", "shape": "table", "position": { - "x": 290, - "y": 150 + "x": -1060.5, + "y": -990 }, "count": 0, - "originKey": "80203FEF-6CCA-4E85-8EE8-EB117AAEE55C", + "originKey": "6CCDA6D5-AABD-4DCA-A3C6-868F4F23AFFB", "type": "P", "size": { - "width": 348, - "height": 215 + "width": 386, + "height": 284 + }, + "autoSize": true, + "ports": { + "groups": { + "in": { + "attrs": { + "circle": { + "r": 4, + "magnet": true, + "stroke": "#1890FF", + "fill": "#FFF", + "strokeWidth": 1, + "style": { + "visibility": "hidden" + } + } + }, + "zIndex": 3, + "position": { + "name": "left" + } + }, + "out": { + "attrs": { + "circle": { + "r": 4, + "magnet": true, + "stroke": "#1890FF", + "fill": "#FFF", + "strokeWidth": 1, + "style": { + "visibility": "hidden" + } + } + }, + "position": { + "name": "right" + } + }, + "top": { + "attrs": { + "circle": { + "r": 4, + "magnet": true, + "stroke": "#1890FF", + "fill": "#FFF", + "strokeWidth": 1, + "style": { + "visibility": "hidden" + } + } + }, + "position": { + "name": "top" + } + }, + "bottom": { + "attrs": { + "circle": { + "r": 4, + "magnet": true, + "stroke": "#1890FF", + "fill": "#FFF", + "strokeWidth": 1, + "style": { + "visibility": "hidden" + } + } + }, + "position": { + "name": "bottom" + } + } + }, + "items": [ + { + "group": "in", + "id": "in" + }, + { + "group": "in", + "id": "in2" + }, + { + "group": "in", + "id": "in3" + }, + { + "group": "out", + "id": "out" + }, + { + "group": "out", + "id": "out2" + }, + { + "group": "out", + "id": "out3" + }, + { + "group": "top", + "id": "top" + }, + { + "group": "top", + "id": "top2" + }, + { + "group": "top", + "id": "top3" + }, + { + "group": "bottom", + "id": "bottom" + }, + { + "group": "bottom", + "id": "bottom2" + }, + { + "group": "bottom", + "id": "bottom3" + } + ] + } + }, + { + "id": "a4493502-571d-4863-a467-39b891145b94", + "shape": "table", + "position": { + "x": -620, + "y": -768 + }, + "count": 0, + "originKey": "E88BA7F6-22EB-4733-B322-BDB382D57C62", + "type": "P", + "size": { + "width": 436, + "height": 514 }, "autoSize": true, "ports": { @@ -9121,145 +9672,6 @@ ] } }, - { - "id": "192f839e-8983-466e-9df7-818c17430f45", - "shape": "table", - "position": { - "x": -754, - "y": -234.5 - }, - "count": 0, - "originKey": "693514C4-32C9-4FF9-9842-5E08581C905F", - "type": "P", - "size": { - "width": 433, - "height": 284 - }, - "autoSize": true, - "ports": { - "groups": { - "in": { - "attrs": { - "circle": { - "r": 4, - "magnet": true, - "stroke": "#1890FF", - "fill": "#FFF", - "strokeWidth": 1, - "style": { - "visibility": "hidden" - } - } - }, - "zIndex": 3, - "position": { - "name": "left" - } - }, - "out": { - "attrs": { - "circle": { - "r": 4, - "magnet": true, - "stroke": "#1890FF", - "fill": "#FFF", - "strokeWidth": 1, - "style": { - "visibility": "hidden" - } - } - }, - "position": { - "name": "right" - } - }, - "top": { - "attrs": { - "circle": { - "r": 4, - "magnet": true, - "stroke": "#1890FF", - "fill": "#FFF", - "strokeWidth": 1, - "style": { - "visibility": "hidden" - } - } - }, - "position": { - "name": "top" - } - }, - "bottom": { - "attrs": { - "circle": { - "r": 4, - "magnet": true, - "stroke": "#1890FF", - "fill": "#FFF", - "strokeWidth": 1, - "style": { - "visibility": "hidden" - } - } - }, - "position": { - "name": "bottom" - } - } - }, - "items": [ - { - "group": "in", - "id": "in" - }, - { - "group": "in", - "id": "in2" - }, - { - "group": "in", - "id": "in3" - }, - { - "group": "out", - "id": "out" - }, - { - "group": "out", - "id": "out2" - }, - { - "group": "out", - "id": "out3" - }, - { - "group": "top", - "id": "top" - }, - { - "group": "top", - "id": "top2" - }, - { - "group": "top", - "id": "top3" - }, - { - "group": "bottom", - "id": "bottom" - }, - { - "group": "bottom", - "id": "bottom2" - }, - { - "group": "bottom", - "id": "bottom3" - } - ] - } - }, { "id": "1d3dd585-bacc-4259-9521-98795230b154", "shape": "table", @@ -9412,7 +9824,146 @@ "type": "P", "size": { "width": 393, - "height": 353 + "height": 376 + }, + "autoSize": true, + "ports": { + "groups": { + "in": { + "attrs": { + "circle": { + "r": 4, + "magnet": true, + "stroke": "#1890FF", + "fill": "#FFF", + "strokeWidth": 1, + "style": { + "visibility": "hidden" + } + } + }, + "zIndex": 3, + "position": { + "name": "left" + } + }, + "out": { + "attrs": { + "circle": { + "r": 4, + "magnet": true, + "stroke": "#1890FF", + "fill": "#FFF", + "strokeWidth": 1, + "style": { + "visibility": "hidden" + } + } + }, + "position": { + "name": "right" + } + }, + "top": { + "attrs": { + "circle": { + "r": 4, + "magnet": true, + "stroke": "#1890FF", + "fill": "#FFF", + "strokeWidth": 1, + "style": { + "visibility": "hidden" + } + } + }, + "position": { + "name": "top" + } + }, + "bottom": { + "attrs": { + "circle": { + "r": 4, + "magnet": true, + "stroke": "#1890FF", + "fill": "#FFF", + "strokeWidth": 1, + "style": { + "visibility": "hidden" + } + } + }, + "position": { + "name": "bottom" + } + } + }, + "items": [ + { + "group": "in", + "id": "in" + }, + { + "group": "in", + "id": "in2" + }, + { + "group": "in", + "id": "in3" + }, + { + "group": "out", + "id": "out" + }, + { + "group": "out", + "id": "out2" + }, + { + "group": "out", + "id": "out3" + }, + { + "group": "top", + "id": "top" + }, + { + "group": "top", + "id": "top2" + }, + { + "group": "top", + "id": "top3" + }, + { + "group": "bottom", + "id": "bottom" + }, + { + "group": "bottom", + "id": "bottom2" + }, + { + "group": "bottom", + "id": "bottom3" + } + ] + } + }, + { + "id": "289d4d31-5848-4f0f-9f39-62b5be3be9bf", + "shape": "table", + "position": { + "x": -1847, + "y": -317 + }, + "count": 0, + "originKey": "18957523-E336-46C8-8FF8-07D2915DAD55", + "type": "P", + "size": { + "width": 354, + "height": 100 }, "autoSize": true, "ports": { diff --git a/ui/dasadmin/src/views/backend/realData/index.vue b/ui/dasadmin/src/views/backend/realData/index.vue index a6692899..47fe0f60 100644 --- a/ui/dasadmin/src/views/backend/realData/index.vue +++ b/ui/dasadmin/src/views/backend/realData/index.vue @@ -18,7 +18,8 @@ :data="modalTbleData" @selectionChange="selectTable" :row-key="getRowKey"> - + + @@ -54,6 +55,7 @@
+
@@ -110,7 +112,7 @@ diff --git a/ui/dasadmin/src/views/backend/statAnalysis/analysisAttributes.vue b/ui/dasadmin/src/views/backend/statAnalysis/analysisAttributes.vue index a6e93be6..38ba5261 100644 --- a/ui/dasadmin/src/views/backend/statAnalysis/analysisAttributes.vue +++ b/ui/dasadmin/src/views/backend/statAnalysis/analysisAttributes.vue @@ -11,11 +11,7 @@ :sortable="item.sortable" > @@ -94,12 +90,11 @@ const tableColumn = [ ] const tableData = ref([]) const emit = defineEmits(['handleRadioChange']) -const handleRadioChange = (index, row) => { +const handleRadioChange = (row) => { + selectedIndex.value = row.id emit('handleRadioChange', row) - console.log(row) } const getAttributeList = () => { - console.log(props) const requestData: GetModelAttributeType = { iotModelId: props.iotModelId, pageNum: pageSetting.current, @@ -108,8 +103,6 @@ const getAttributeList = () => { orderColumn: sortData.orderColumn, orderType: sortData.orderType, } - console.log('🚀 ~ getAttributeList ~ requestData:', requestData) - console.log(requestData) return new Promise((resolve) => { getModelAttributeListReq(requestData) .then((res) => { @@ -161,8 +154,6 @@ const getCompleteData = () => { return getRealValueList({ deviceId: props.deviceId, attributes: codeList }, data) }) .then((realData: any) => { - console.log(realData) - const data = realData.list.map((item: any) => { const realValItem = realData.realVal[props.deviceId]?.[item.attributeCode?.toLowerCase()] return { diff --git a/ui/dasadmin/src/views/backend/statAnalysis/index.vue b/ui/dasadmin/src/views/backend/statAnalysis/index.vue index ed17c73a..d640f319 100644 --- a/ui/dasadmin/src/views/backend/statAnalysis/index.vue +++ b/ui/dasadmin/src/views/backend/statAnalysis/index.vue @@ -3,414 +3,24 @@ {{ item }} -
- -
-
- {{ t('statAnalysis.deviceId') }} - - - -
-
- {{ t('statAnalysis.attributes') }} - -
-
- {{ t('statAnalysis.interval') }} - - - -
-
-
- {{ t('statAnalysis.search') }} - {{ t('statAnalysis.import') }} - {{ t('statAnalysis.export') }} -
-
-
-
-
-
- {{ customName }} - {{ t('statAnalysis.time') }} - -
-
-
- -
-
- -
-
- {{ t('statAnalysis.max') }} - 11 -
-
- {{ t('statAnalysis.min') }} - 22 -
-
- {{ t('statAnalysis.average') }} - 33 -
-
-
-
-
-
- -
-
- - -
- -
- -
-
+ + diff --git a/ui/dasadmin/src/views/backend/statAnalysis/trendAnalysis.vue b/ui/dasadmin/src/views/backend/statAnalysis/trendAnalysis.vue new file mode 100644 index 00000000..bfbe6f56 --- /dev/null +++ b/ui/dasadmin/src/views/backend/statAnalysis/trendAnalysis.vue @@ -0,0 +1,493 @@ + + +