Merge branch 'main' of https://git.jsspisoft.com/ry-das
This commit is contained in:
commit
bea0be8bb2
@ -53,12 +53,12 @@ public class DataService {
|
||||
//为空查全部
|
||||
List<String> sysIotModelFields = sysIotModelFieldMapper.queryAllFiledNames(Long.valueOf(snapshotValueQueryParam.getDeviceId()));
|
||||
for (String item : sysIotModelFields) {
|
||||
String key = String.format("RT:%s:%s", snapshotValueQueryParam.getDeviceId(), item);
|
||||
String key = String.format("RT:%s:%s", snapshotValueQueryParam.getDeviceId(), item.toLowerCase());
|
||||
keyList.add(key);
|
||||
}
|
||||
} else {
|
||||
for (String item : attributes) {
|
||||
String key = String.format("RT:%s:%s", snapshotValueQueryParam.getDeviceId(), item);
|
||||
String key = String.format("RT:%s:%s", snapshotValueQueryParam.getDeviceId(), item.toLowerCase());
|
||||
keyList.add(key);
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ public class SysEnumController {
|
||||
* 删除枚举值
|
||||
* */
|
||||
@PostMapping("/deleteEnumValues")
|
||||
public R<List<SysEnumValuesVo>> deleteEnumValues(@RequestBody SysEnumValuesDto sysEnumValuesDto) {
|
||||
public R<Void> deleteEnumValues(@RequestBody SysEnumValuesDto sysEnumValuesDto) {
|
||||
//判断是否有权限
|
||||
boolean hasPermission = StpUtil.hasPermission(SysAuthorityIds.SYS_AUTHORITY_ID_DEVICE_MGR.toString());
|
||||
if(!hasPermission){
|
||||
@ -123,6 +123,36 @@ public class SysEnumController {
|
||||
sysEnumService.deleteEnumValues(sysEnumValuesDto);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/** 修改枚举类型 */
|
||||
@PostMapping("/updateEnumTypes")
|
||||
public R<SysEnumTypesVo> updateEnumTypes(@RequestBody SysEnumTypesDto sysEnumTypesDto) {
|
||||
//判断是否有权限
|
||||
boolean hasPermission = StpUtil.hasPermission(SysAuthorityIds.SYS_AUTHORITY_ID_DEVICE_MGR.toString());
|
||||
if(!hasPermission){
|
||||
return R.fail("没有设备管理权限");
|
||||
}
|
||||
if (sysEnumTypesDto.getId() ==null) {
|
||||
throw new ServiceException("参数缺失");
|
||||
}
|
||||
SysEnumTypesVo sysEnumTypesVo = sysEnumService.updateEnumTypes(sysEnumTypesDto);
|
||||
return R.success(sysEnumTypesVo);
|
||||
}
|
||||
|
||||
/** 删除枚举类型 */
|
||||
@PostMapping("/deleteEnumTypes")
|
||||
public R<Void> deleteEnumTypes(@RequestBody SysEnumTypesDto sysEnumTypesDto) {
|
||||
//判断是否有权限
|
||||
boolean hasPermission = StpUtil.hasPermission(SysAuthorityIds.SYS_AUTHORITY_ID_DEVICE_MGR.toString());
|
||||
if(!hasPermission){
|
||||
return R.fail("没有设备管理权限");
|
||||
}
|
||||
if (sysEnumTypesDto.getId() ==null) {
|
||||
throw new ServiceException("参数缺失");
|
||||
}
|
||||
sysEnumService.deleteEnumTypes(sysEnumTypesDto);
|
||||
return R.success();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -8,6 +8,7 @@ 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;
|
||||
|
||||
@ -40,4 +41,7 @@ public interface SysEquipmentMapper extends BaseMapperPlus<SysEquipment, SysEqui
|
||||
|
||||
SysEquipmentVo queryEquipmentInfoByCode(@Param("code")String code);
|
||||
|
||||
List<String> queryBelongLines(@Param("objectType") Long objectType);
|
||||
|
||||
List<WindTurbinesPageVo> queryAllWindList(@Param("objectType") Long objectType);
|
||||
}
|
||||
|
@ -12,6 +12,10 @@ public interface SysEnumService {
|
||||
|
||||
SysEnumTypesVo addEnumTypes(SysEnumTypesDto sysEnumTypesDto);
|
||||
|
||||
SysEnumTypesVo updateEnumTypes(SysEnumTypesDto sysEnumTypesDto);
|
||||
|
||||
void deleteEnumTypes(SysEnumTypesDto sysEnumTypesDto);
|
||||
|
||||
SysEnumValuesVo addEnumValues(SysEnumValuesDto sysEnumValuesDto);
|
||||
|
||||
SysEnumValuesVo updateEnumValues(SysEnumValuesDto sysEnumValuesDto);
|
||||
|
@ -56,6 +56,42 @@ public class SysEnumServiceImpl implements SysEnumService {
|
||||
return sysEnumTypesVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改枚举类型
|
||||
* @param sysEnumTypesDto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SysEnumTypesVo updateEnumTypes(SysEnumTypesDto sysEnumTypesDto) {
|
||||
SysEnumTypes sysEnumTypes = new SysEnumTypes();
|
||||
BeanCopyUtils.copy(sysEnumTypesDto, sysEnumTypes);
|
||||
SysUserVo sysUserVo = (SysUserVo) StpUtil.getTokenSession().get(SessionUtil.SESSION_USER_KEY);
|
||||
sysEnumTypes.setUpdatedBy(sysUserVo.getAccount());
|
||||
sysEnumTypes.setUpdatedTime(new Date());
|
||||
sysEnumTypesMapper.updateById(sysEnumTypes);
|
||||
SysEnumTypesVo sysEnumTypesVo = new SysEnumTypesVo();
|
||||
BeanCopyUtils.copy(sysEnumTypes, sysEnumTypesVo);
|
||||
return sysEnumTypesVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除枚举类型
|
||||
* @param sysEnumTypesDto
|
||||
*/
|
||||
@Override
|
||||
public void deleteEnumTypes(SysEnumTypesDto sysEnumTypesDto) {
|
||||
SysEnumTypes sysEnumTypes = new SysEnumTypes();
|
||||
BeanCopyUtils.copy(sysEnumTypesDto, sysEnumTypes);
|
||||
QueryWrapper<SysEnumValues> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("enum_type_id",sysEnumTypesDto.getId());
|
||||
queryWrapper.eq("is_active",1);
|
||||
Long count = sysEnumValuesMapper.selectCount(queryWrapper);
|
||||
if (count >0){
|
||||
throw new ServiceException("该枚举类型下,存在枚举值,不可删除!");
|
||||
}
|
||||
sysEnumTypesMapper.deleteById(sysEnumTypesDto.getId());
|
||||
}
|
||||
|
||||
/** 新增枚举值 */
|
||||
@Override
|
||||
public SysEnumValuesVo addEnumValues(SysEnumValuesDto sysEnumValuesDto) {
|
||||
@ -84,13 +120,6 @@ public class SysEnumServiceImpl implements SysEnumService {
|
||||
public SysEnumValuesVo updateEnumValues(SysEnumValuesDto sysEnumValuesDto) {
|
||||
SysEnumValues sysEnumValues = new SysEnumValues();
|
||||
BeanCopyUtils.copy(sysEnumValuesDto,sysEnumValues);
|
||||
QueryWrapper<SysEnumValues> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("enum_type_id",sysEnumValuesDto.getEnumTypeId());
|
||||
queryWrapper.eq("description",sysEnumValuesDto.getDescription());
|
||||
Long count = sysEnumValuesMapper.selectCount(queryWrapper);
|
||||
if (count >0){
|
||||
throw new ServiceException("枚举值描述,不可重复!");
|
||||
}
|
||||
SysUserVo sysUserVo = (SysUserVo) StpUtil.getTokenSession().get(SessionUtil.SESSION_USER_KEY);
|
||||
sysEnumValues.setUpdatedBy(sysUserVo.getAccount());
|
||||
sysEnumValues.setUpdatedTime(new Date());
|
||||
@ -117,7 +146,7 @@ public class SysEnumServiceImpl implements SysEnumService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询枚举类型列表
|
||||
* 查询枚举值列表
|
||||
* @param sysEnumValuesDto
|
||||
* @return
|
||||
*/
|
||||
|
@ -418,33 +418,33 @@ public class SysIotModelServiceImpl implements SysIotModelService {
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(sysIotModelFieldList)) {
|
||||
sysIotModelFieldMapper.insertBatch(sysIotModelFieldList);
|
||||
ListUtil.page(sysIotModelFieldList, COMMIT_COUNT, create -> {
|
||||
for (SysIotModelField item : create){
|
||||
createTdStableOrColumn(item);
|
||||
}
|
||||
});
|
||||
// ListUtil.page(sysIotModelFieldList, COMMIT_COUNT, create -> {
|
||||
// for (SysIotModelField item : create){
|
||||
// createTdStableOrColumn(item);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(updateSysIotModelFieldList)) {
|
||||
ListUtil.page(updateSysIotModelFieldList, COMMIT_COUNT, update -> {
|
||||
for (SysIotModelField item : update){
|
||||
SysIotModelField oldSysIotField = sysIotModelFieldMapper.selectById(item.getId());
|
||||
if (oldSysIotField != null){
|
||||
if (!oldSysIotField.getAttributeCode().equals(item.getAttributeCode()) && oldSysIotField.getDataType().equals(item.getDataType()) && Objects.equals(oldSysIotField.getHighSpeed(), item.getHighSpeed())){
|
||||
//更新td表结构
|
||||
updateTDStableOrColumn(item,oldSysIotField);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
// ListUtil.page(updateSysIotModelFieldList, COMMIT_COUNT, update -> {
|
||||
// for (SysIotModelField item : update){
|
||||
// SysIotModelField oldSysIotField = sysIotModelFieldMapper.selectById(item.getId());
|
||||
// if (oldSysIotField != null){
|
||||
// if (!oldSysIotField.getAttributeCode().equals(item.getAttributeCode()) && oldSysIotField.getDataType().equals(item.getDataType()) && Objects.equals(oldSysIotField.getHighSpeed(), item.getHighSpeed())){
|
||||
// //更新td表结构
|
||||
// updateTDStableOrColumn(item,oldSysIotField);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
sysIotModelFieldMapper.updateBatchById(updateSysIotModelFieldList);
|
||||
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(delSysIotModelFieldList)) {
|
||||
ListUtil.page(updateSysIotModelFieldList, COMMIT_COUNT, delete -> {
|
||||
for (SysIotModelField item : delete){
|
||||
deleteTDStableOrColumn(item);
|
||||
}
|
||||
});
|
||||
// ListUtil.page(updateSysIotModelFieldList, COMMIT_COUNT, delete -> {
|
||||
// for (SysIotModelField item : delete){
|
||||
// deleteTDStableOrColumn(item);
|
||||
// }
|
||||
// });
|
||||
sysIotModelFieldMapper.deleteBatchIds(delSysIotModelFieldList);
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ public class DataServiceImpl implements DataService {
|
||||
Iterator<String> keysHigh = values.fieldNames();
|
||||
while (keysHigh.hasNext()) {
|
||||
String fieldName = keysHigh.next();
|
||||
String key = String.format("RT:%s:%s", deviceId, fieldName);
|
||||
String key = String.format("RT:%s:%s", deviceId, fieldName.toLowerCase());
|
||||
keyValueMap.put(key,values.get(fieldName));
|
||||
}
|
||||
adminRedisTemplate.mSet(keyValueMap);
|
||||
|
@ -77,6 +77,7 @@ public class SysNodeServiceImpl implements SysNodeService {
|
||||
@Autowired
|
||||
TerminalMessageEventHandler terminalMessageEventHandler;
|
||||
|
||||
|
||||
@Override
|
||||
public List<SysNodeVo> querySysNodeList() {
|
||||
List<SysNodeVo> sysNodeVoList = sysNodeMapper.querySysNodeList();
|
||||
@ -398,17 +399,19 @@ public class SysNodeServiceImpl implements SysNodeService {
|
||||
|
||||
}
|
||||
|
||||
private long currentActiveNodeId = 0;
|
||||
/**
|
||||
* 获得当前激活的节点id
|
||||
* @return 节点id
|
||||
*/
|
||||
private long getActiveNodeId(){
|
||||
List<SysNodeVo> list = sysNodeMapper.querySysNodeList();
|
||||
if(list.isEmpty()){
|
||||
return 0;
|
||||
}else{
|
||||
return list.get(0).getId();
|
||||
if(currentActiveNodeId==0){
|
||||
List<SysNodeVo> list = sysNodeMapper.querySysNodeList();
|
||||
if(!list.isEmpty()){
|
||||
currentActiveNodeId= list.get(0).getId();
|
||||
}
|
||||
}
|
||||
return currentActiveNodeId;
|
||||
}
|
||||
|
||||
// 绑定设备的测点信息,不是绑定设备到映射表
|
||||
|
@ -1,10 +1,12 @@
|
||||
package com.das.modules.page.controller;
|
||||
|
||||
import com.das.common.result.R;
|
||||
import com.das.modules.node.domain.dto.DeviceCommandDto;
|
||||
import com.das.modules.page.domian.WindTurbinesPageVo;
|
||||
import com.das.modules.page.service.WindTurbinesPageService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -17,13 +19,37 @@ import java.util.List;
|
||||
@RequestMapping("/api/page/turbines")
|
||||
@RestController
|
||||
public class WindTurbinesPageController {
|
||||
@Autowired
|
||||
private WindTurbinesPageService windTurbinesPageService;
|
||||
/**
|
||||
* 获取风机机组所属线路列表
|
||||
* @return 返回字符串数组
|
||||
*/
|
||||
@PostMapping("/lines")
|
||||
@GetMapping("/lines")
|
||||
public R<List<String>> queryBelongLines() {
|
||||
//TODO: 查询sql: select distinct belong_line as name from sys_equipment t where t.object_type = 10002 and belong_line !='';
|
||||
List<String> lines = windTurbinesPageService.queryBelongLines();
|
||||
return R.success(lines);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取风机页面数据
|
||||
* @return 返回风机页面数据
|
||||
*/
|
||||
@GetMapping ("/queryWindTurbinesPages")
|
||||
public R<List<WindTurbinesPageVo>> queryWindTurbinesPages(){
|
||||
List<WindTurbinesPageVo> windTurbinesPageVos = windTurbinesPageService.queryAllWindTurbinesPages();
|
||||
return R.success(windTurbinesPageVos);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param controlList 遥控List
|
||||
* @return 成功或者失败
|
||||
*/
|
||||
@PostMapping ("/windTurbinesControl")
|
||||
public R<Void> windTurbinesControl(@RequestBody List<DeviceCommandDto> controlList){
|
||||
windTurbinesPageService.windTurbinesControl(controlList);
|
||||
return R.success();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.das.modules.page.domian;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class WindTurbinesPageVo {
|
||||
|
||||
private Long irn;
|
||||
|
||||
private String name;
|
||||
|
||||
private String model;
|
||||
|
||||
private String belongLine;
|
||||
|
||||
private Map<String,Object> attributeMap;
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package com.das.modules.page.service;
|
||||
|
||||
import com.das.modules.data.domain.SnapshotValueQueryParam;
|
||||
import com.das.modules.data.service.DataService;
|
||||
import com.das.modules.equipment.mapper.SysEquipmentMapper;
|
||||
import com.das.modules.node.domain.dto.DeviceCommandDto;
|
||||
import com.das.modules.node.service.SysNodeService;
|
||||
import com.das.modules.page.domian.WindTurbinesPageVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Service
|
||||
@Slf4j
|
||||
public class WindTurbinesPageService {
|
||||
private static final Long OBJECT_TYPE = 10002L;
|
||||
|
||||
@Autowired
|
||||
SysEquipmentMapper sysEquipmentMapper;
|
||||
|
||||
@Autowired
|
||||
private DataService dataService;
|
||||
|
||||
@Autowired
|
||||
SysNodeService sysNodeService;
|
||||
|
||||
/**
|
||||
* 获取风机机组所属线路列表
|
||||
* @return 返回字符串数组
|
||||
*/
|
||||
public List<String> queryBelongLines(){
|
||||
return sysEquipmentMapper.queryBelongLines(OBJECT_TYPE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取风机页面数据
|
||||
* @return 返回风机页面数据
|
||||
*/
|
||||
public List<WindTurbinesPageVo> queryAllWindTurbinesPages(){
|
||||
List<WindTurbinesPageVo> windTurbinesPageVos = sysEquipmentMapper.queryAllWindList(OBJECT_TYPE);
|
||||
List<SnapshotValueQueryParam> paramList = new ArrayList<>();
|
||||
List<String> attributesList = new ArrayList<>();
|
||||
attributesList.add("iwindspeed");
|
||||
attributesList.add("iturbineoperationmode");
|
||||
attributesList.add("igenpower");
|
||||
attributesList.add("ikwhthisday");
|
||||
attributesList.add("ikwhoverall");
|
||||
attributesList.add("ivanedirection");
|
||||
attributesList.add("irotorspeed");
|
||||
attributesList.add("igenspeed");
|
||||
attributesList.add("itempnacelle_1sec");
|
||||
attributesList.add("ihydrpress");
|
||||
attributesList.add("ipitchangle1");
|
||||
attributesList.add("ipitchangle2");
|
||||
attributesList.add("ipitchangle3");
|
||||
attributesList.add("iyplevel");
|
||||
attributesList.add("gridlostdetected");
|
||||
for (WindTurbinesPageVo item : windTurbinesPageVos){
|
||||
SnapshotValueQueryParam snapshotValueQueryParam = new SnapshotValueQueryParam();
|
||||
snapshotValueQueryParam.setAttributes(attributesList);
|
||||
snapshotValueQueryParam.setDeviceId(item.getIrn().toString());
|
||||
paramList.add(snapshotValueQueryParam);
|
||||
}
|
||||
Map<String, Map<String, Object>> map = dataService.querySnapshotValues(paramList);
|
||||
for (WindTurbinesPageVo item : windTurbinesPageVos){
|
||||
item.setAttributeMap(map.get(item.getIrn().toString()));
|
||||
}
|
||||
return windTurbinesPageVos;
|
||||
}
|
||||
|
||||
public void windTurbinesControl(List<DeviceCommandDto> controlList){
|
||||
for (DeviceCommandDto item : controlList){
|
||||
sysNodeService.deviceCommand(item);
|
||||
}
|
||||
}
|
||||
}
|
@ -162,5 +162,12 @@
|
||||
<select id="queryEquipmentInfoByCode" resultMap="SysEquipmentMap">
|
||||
select * from sys_equipment where code = #{code}
|
||||
</select>
|
||||
<select id="queryBelongLines" resultType="java.lang.String">
|
||||
select distinct belong_line as name from sys_equipment t where t.object_type = 10002 and belong_line !='';
|
||||
</select>
|
||||
<select id="queryAllWindList" resultType="com.das.modules.page.domian.WindTurbinesPageVo">
|
||||
select se.id as irn,se.name,se.model,se.belong_line as belongLine from sys_equipment se where se.object_type = #{objectType}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@ -4,6 +4,8 @@
|
||||
- [设备管理接口](api/equipment.md)
|
||||
- [节点管理接口](api/node.md)
|
||||
- [数据访问接口](api/data.md)
|
||||
- [页面访问接口](api/pages/)
|
||||
- [首页](api/pages/home.md)
|
||||
- [数据采集](datacollect/)
|
||||
- [系统部署](deploy/)
|
||||
- [Linux系统部署](deploy/linux.md)
|
||||
|
390
docs/api/enumPage.md
Normal file
390
docs/api/enumPage.md
Normal file
@ -0,0 +1,390 @@
|
||||
# 枚举类型配置模块
|
||||
|
||||
## API接口一览表
|
||||
|
||||
| 接口分类 | 接口描述 | API接口 | 权限 |
|
||||
|-----------|---------------| ------------------------------------- | --------------------------- |
|
||||
| 2.1枚举类型配置 | 2.1.1新增枚举类型 | /api/enum/addEnumTypes | SYS_AUTHORITY_ID_DEVICE_MGR|
|
||||
| | 2.1.2新增枚举值 | /api/enum/addEnumValues | SYS_AUTHORITY_ID_DEVICE_MGR |
|
||||
| | 2.1.3枚举值修改 | /api/enum/updateEnumValues | SYS_AUTHORITY_ID_DEVICE_MGR |
|
||||
| | 2.1.4获取枚举类型列表 | /api/enum/queryEnumTypesList | |
|
||||
| | 2.1.5获取枚举值列表 | /api/enum/queryEnumValuesList | |
|
||||
| | 2.1.6删除枚举值 | /api/enum/deleteEnumValues | SYS_AUTHORITY_ID_DEVICE_MGR |
|
||||
| | 2.1.7修改枚举类型 | /api/enum/updateEnumTypes | SYS_AUTHORITY_ID_DEVICE_MGR |
|
||||
| | 2.1.8删除枚举类型 | /api/enum/deleteEnumTypes | SYS_AUTHORITY_ID_DEVICE_MGR |
|
||||
|
||||
|
||||
### 2.1 枚举类型配置相关接口
|
||||
|
||||
#### 2.1.1 新增枚举类型
|
||||
|
||||
POST 请求接口
|
||||
|
||||
> /api/enum/addEnumTypes
|
||||
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "testEnum",
|
||||
"description": "测试枚举类型"
|
||||
}
|
||||
```
|
||||
入参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
| ------------ | -------- |----|--------|
|
||||
| name | String | NO | 枚举类型名称 |
|
||||
| description | String | NO | 枚举描述 |
|
||||
|
||||
|
||||
返回报文
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"success": true,
|
||||
"data": {
|
||||
"id": "1849346211333619713",
|
||||
"name": "testEnum",
|
||||
"description": "测试枚举类型"
|
||||
},
|
||||
"msg": "操作成功"
|
||||
}
|
||||
```
|
||||
返参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
| ------------- |---------| ---- |--------|
|
||||
| id | String | 否 | id |
|
||||
| name | String | 否 | 枚举类型名称 |
|
||||
| description | String | 否 | 枚举描述 |
|
||||
|
||||
#### 2.1.2 新增枚举值
|
||||
|
||||
POST 请求接口
|
||||
|
||||
> /api/enum/addEnumValues
|
||||
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
"enumTypeId": 1849346211333619713,
|
||||
"value": "testenum1",
|
||||
"description": "测试枚举值1",
|
||||
"isActive": 1,
|
||||
"orderNumber": 1
|
||||
}
|
||||
```
|
||||
入参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
| ------------ |---------|----|----------------|
|
||||
| enumTypeId | Long | NO | 枚举类型id |
|
||||
| value | String | NO | 枚举值内容 |
|
||||
| description | String | NO | 枚举值描述 |
|
||||
| isActive | Integer | NO | 是否有效(0:无效,1:有效) |
|
||||
| orderNumber | Integer | NO | 排序 |
|
||||
|
||||
|
||||
返回报文
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"success": true,
|
||||
"data": {
|
||||
"id": "1849347701024608258",
|
||||
"enumTypeId": 1849346211333619713,
|
||||
"value": "testenum1",
|
||||
"description": "测试枚举值1",
|
||||
"orderNumber": 1,
|
||||
"isActive": 1
|
||||
},
|
||||
"msg": "操作成功"
|
||||
}
|
||||
```
|
||||
返参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
|---------------|---------| ---- |-----------------|
|
||||
| id | String | 否 | id |
|
||||
| enumTypeId | Long | 否 | 枚举类型id |
|
||||
| value | String | 否 | 枚举值内容 |
|
||||
| description | String | 否 | 枚举值描述 |
|
||||
| isActive | Integer | 否 | 是否有效(0:无效,1:有效) |
|
||||
| orderNumber | Integer | 否 | 排序 |
|
||||
|
||||
#### 2.1.3 枚举值修改
|
||||
|
||||
POST 请求接口
|
||||
|
||||
> /api/enum/updateEnumValues
|
||||
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1849347701024608258,
|
||||
"enumTypeId": 1849346211333619713,
|
||||
"value": "testenum2",
|
||||
"description": "测试枚举值2",
|
||||
"isActive": 1,
|
||||
"orderNumber": 1
|
||||
}
|
||||
```
|
||||
入参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
|-------------|---------|-----|-----------------|
|
||||
| id | Long | NO | 枚举值id |
|
||||
| enumTypeId | Long | NO | 枚举类型id |
|
||||
| value | String | YES | 枚举值内容 |
|
||||
| description | String | YES | 枚举值描述 |
|
||||
| isActive | Integer | YES | 是否有效(0:无效,1:有效) |
|
||||
| orderNumber | Integer | YES | 排序 |
|
||||
|
||||
|
||||
返回报文
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"success": true,
|
||||
"data": {
|
||||
"id": "1849347701024608258",
|
||||
"enumTypeId": 1849346211333619713,
|
||||
"value": "testenum2",
|
||||
"description": "测试枚举值2",
|
||||
"orderNumber": 1,
|
||||
"isActive": 1
|
||||
},
|
||||
"msg": "操作成功"
|
||||
}
|
||||
```
|
||||
返参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
|---------------|---------| ---- |-----------------|
|
||||
| id | String | 否 | id |
|
||||
| enumTypeId | Long | 否 | 枚举类型id |
|
||||
| value | String | 否 | 枚举值内容 |
|
||||
| description | String | 否 | 枚举值描述 |
|
||||
| isActive | Integer | 否 | 是否有效(0:无效,1:有效) |
|
||||
| orderNumber | Integer | 否 | 排序 |
|
||||
|
||||
#### 2.1.4 获取枚举类型列表
|
||||
|
||||
POST 请求接口
|
||||
|
||||
> /api/enum/queryEnumTypesList
|
||||
|
||||
|
||||
请求参数
|
||||
无
|
||||
|
||||
返回报文
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"success": true,
|
||||
"data": [
|
||||
{
|
||||
"id": "1",
|
||||
"name": "iTurbineOperationMode",
|
||||
"description": "运行模式"
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"name": "iBPLevel",
|
||||
"description": "刹车等级"
|
||||
}
|
||||
],
|
||||
"msg": "操作成功"
|
||||
}
|
||||
```
|
||||
返参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
|---------------|---------| ---- |--------|
|
||||
| id | String | 否 | id |
|
||||
| name | String | 否 | 枚举类型名称 |
|
||||
| description | String | 否 | 枚举值描述 |
|
||||
|
||||
#### 2.1.5 获取枚举值列表
|
||||
|
||||
POST 请求接口
|
||||
|
||||
> /api/enum/queryEnumValuesList
|
||||
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
"pageNum":1,
|
||||
"pageSize":20,
|
||||
"description": "通讯断开",
|
||||
"enumTypeId": "1"
|
||||
}
|
||||
```
|
||||
入参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
|-------------|---------|-----|---------|
|
||||
| pageNum | Integer | NO | 当前页 |
|
||||
| pageSize | Integer | NO | 每页显示大小 |
|
||||
| description | String | YES | 枚举值描述 |
|
||||
| enumTypeId | String | NO | 枚举值类型id |
|
||||
|
||||
|
||||
返回报文
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"success": true,
|
||||
"data": {
|
||||
"total": 1,
|
||||
"rows": [
|
||||
{
|
||||
"id": "1000",
|
||||
"enumTypeId": 1,
|
||||
"enumTypeIdStr": "1",
|
||||
"value": "0",
|
||||
"description": "通讯断开",
|
||||
"orderNumber": 1,
|
||||
"isActive": 1
|
||||
}
|
||||
],
|
||||
"code": 200,
|
||||
"msg": "查询成功"
|
||||
},
|
||||
"msg": "操作成功"
|
||||
}
|
||||
```
|
||||
返参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
|---------------|---------| ---- |-----------------|
|
||||
| id | String | 否 | id |
|
||||
| enumTypeId | Long | 否 | 枚举类型id |
|
||||
| enumTypeIdStr | String | 否 | 枚举类型id(字符串类型) |
|
||||
| value | String | 否 | 枚举值内容 |
|
||||
| description | String | 否 | 枚举值描述 |
|
||||
| isActive | Integer | 否 | 是否有效(0:无效,1:有效) |
|
||||
| orderNumber | Integer | 否 | 排序 |
|
||||
|
||||
|
||||
#### 2.1.6 删除枚举值
|
||||
|
||||
POST 请求接口
|
||||
|
||||
> /api/enum/deleteEnumValues
|
||||
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
"id":"1849347701024608258"
|
||||
}
|
||||
```
|
||||
入参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
|-------------|---------|----|---------|
|
||||
| id | String | NO | 枚举值id |
|
||||
|
||||
|
||||
返回报文
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"success": true,
|
||||
"msg": "操作成功"
|
||||
}
|
||||
```
|
||||
#### 2.1.7 修改枚举类型
|
||||
|
||||
POST 请求接口
|
||||
|
||||
> /api/enum/updateEnumTypes
|
||||
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
"id":1849361189939826689,
|
||||
"name": "testEnum3",
|
||||
"description": "测试枚举类型3"
|
||||
}
|
||||
```
|
||||
入参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
|-------------|---------|-----|--------|
|
||||
| id | Long | NO | 枚举类型id |
|
||||
| name | String | YES | 枚举类型名称 |
|
||||
| description | String | YES | 枚举类型描述 |
|
||||
|
||||
|
||||
返回报文
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"success": true,
|
||||
"data": {
|
||||
"id": "1849361189939826689",
|
||||
"name": "testEnum3",
|
||||
"description": "测试枚举类型3"
|
||||
},
|
||||
"msg": "操作成功"
|
||||
}
|
||||
```
|
||||
返参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
|-------------|---------|-----|--------|
|
||||
| id | Long | 否 | 枚举类型id |
|
||||
| name | String | 否 | 枚举类型名称 |
|
||||
| description | String | 否 | 枚举类型描述 |
|
||||
|
||||
#### 2.1.8 删除枚举类型
|
||||
|
||||
POST 请求接口
|
||||
|
||||
> /api/enum/deleteEnumTypes
|
||||
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
"id":1849361189939826689
|
||||
}
|
||||
```
|
||||
入参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
|-------------|------|----|--------|
|
||||
| id | Long | NO | 枚举类型id |
|
||||
|
||||
|
||||
返回报文
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"success": true,
|
||||
"msg": "操作成功"
|
||||
}
|
||||
```
|
@ -19,6 +19,8 @@
|
||||
| | 1.2.8导出映射表信息 | /api/node/link/exportMappingList | SYS_AUTHORITY_ID_ADMIN |
|
||||
| | 1.2.9获取绑定设备树信息 | /api/node/link/getBindDeviceTree | SYS_AUTHORITY_ID_ADMIN |
|
||||
| | 1.2.10保存测点信息 | /api/node/link/saveMappingList | SYS_AUTHORITY_ID_ADMIN |
|
||||
| | 1.2.11设备遥控操作 | /api/node/link/command | SYS_AUTHORITY_ID_TURBINE_CTRL |
|
||||
| | 1.2.12设备遥调操作 | /api/node/link/setPoint | SYS_AUTHORITY_ID_TURBINE_CTRL |
|
||||
|
||||
## 1.1 节点相关接口
|
||||
|
||||
@ -478,4 +480,12 @@ POST 请求接口
|
||||
"success": true,
|
||||
"msg": "操作成功"
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
### 1.2.11设备遥控操作
|
||||
|
||||
|
||||
|
||||
|
||||
### 1.2.12设备遥调操作
|
||||
|
||||
|
1
docs/api/pages/_sidebar.md
Normal file
1
docs/api/pages/_sidebar.md
Normal file
@ -0,0 +1 @@
|
||||
* [返回首页](/)
|
@ -14,9 +14,9 @@
|
||||
| | 2.1.8实时告警确认 | 告警记录ID | /api/home/realTimeAlertConfirm | |
|
||||
|
||||
|
||||
### 2.1 首页相关接口
|
||||
## 2.1 首页相关接口
|
||||
|
||||
#### 2.1.1 风场概况
|
||||
### 2.1.1 风场概况
|
||||
|
||||
POST 请求接口
|
||||
|
||||
@ -56,7 +56,7 @@ POST 请求接口
|
||||
|
||||
|
||||
|
||||
#### 2.1.2 今日运行状态
|
||||
### 2.1.2 今日运行状态
|
||||
|
||||
POST 请求接口
|
||||
|
||||
@ -106,7 +106,7 @@ POST 请求接口
|
||||
| offlineNum | Integer | 否 | 离线台数 |
|
||||
|
||||
|
||||
#### 2.1.3 功率趋势
|
||||
### 2.1.3 功率趋势
|
||||
|
||||
POST 请求接口
|
||||
|
||||
@ -148,7 +148,7 @@ POST 请求接口
|
||||
| windSpeed | Double | 否 | 风速 |
|
||||
| dataTime | String | 否 | 数据时间 |
|
||||
|
||||
#### 2.1.4 风机矩阵
|
||||
### 2.1.4 风机矩阵
|
||||
|
||||
POST 请求接口
|
||||
|
||||
@ -199,7 +199,7 @@ POST 请求接口
|
||||
| standard | Integer | 否 | 是否为标杆机组 |
|
||||
| windTurbine | String | 否 | 风机编码 |
|
||||
|
||||
#### 2.1.5 发电量概况
|
||||
### 2.1.5 发电量概况
|
||||
|
||||
POST 请求接口
|
||||
|
||||
@ -251,7 +251,7 @@ POST 请求接口
|
||||
| yearGeneration | Double | 否 | 年发电量 |
|
||||
| totalGeneration | Double | 否 | 总发电量 |
|
||||
|
||||
#### 2.1.6 发电量趋势
|
||||
### 2.1.6 发电量趋势
|
||||
|
||||
POST 请求接口
|
||||
|
||||
@ -305,7 +305,7 @@ POST 请求接口
|
||||
| samePeriod | Double | 否 | 同期 |
|
||||
| generationTime | Double | 否 | 发电量时间 |
|
||||
|
||||
#### 2.1.7 实时告警
|
||||
### 2.1.7 实时告警
|
||||
|
||||
POST 请求接口
|
||||
|
||||
@ -353,7 +353,7 @@ POST 请求接口
|
||||
| alertId | Long | 否 | 告警id |
|
||||
| confirmStatus | Integer | 否 | 确认状态 |
|
||||
|
||||
#### 2.1.8 实时告警-确认
|
||||
### 2.1.8 实时告警-确认
|
||||
|
||||
POST 请求接口
|
||||
|
Loading…
Reference in New Issue
Block a user