Merge branch 'zjw'
# Conflicts: # imt-ui/src/views/system/gatewayinfo/index.vue
This commit is contained in:
commit
7631ff402f
@ -210,6 +210,9 @@ public class MyMqttCallback implements MqttCallback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void process(String measurement,String equipId,Map<String,String> mapping,Map<String,Object> msg) {
|
private void process(String measurement,String equipId,Map<String,String> mapping,Map<String,Object> msg) {
|
||||||
|
if(mapping == null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
InfluxDBService influxDBService = SpringUtils.getBean(InfluxDBService.class);
|
InfluxDBService influxDBService = SpringUtils.getBean(InfluxDBService.class);
|
||||||
AlarmRulesApi alarmRulesApi = SpringUtils.getBean(AlarmRulesApi.class);
|
AlarmRulesApi alarmRulesApi = SpringUtils.getBean(AlarmRulesApi.class);
|
||||||
Map<String, Object> fields = new HashMap<>();
|
Map<String, Object> fields = new HashMap<>();
|
||||||
|
@ -90,6 +90,15 @@ public class GatewayCardParamsController {
|
|||||||
return success(BeanUtils.toBean(pageResult, GatewayCardParamsRespVO.class));
|
return success(BeanUtils.toBean(pageResult, GatewayCardParamsRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getByCardId")
|
||||||
|
@Operation(summary = "获得机床网关采集卡参数")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('imt:gateway-info:create')")
|
||||||
|
public CommonResult<List<GatewayCardParamsRespVO>> getGatewayCardParamsByCardId(@RequestParam("cardId") String cardId) {
|
||||||
|
List<GatewayCardParamsDO> gatewayCardParams = gatewayCardParamsService.getGatewayCardParamsByCardId(cardId);
|
||||||
|
return success(BeanUtils.toBean(gatewayCardParams, GatewayCardParamsRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出机床网关采集卡参数 Excel")
|
@Operation(summary = "导出机床网关采集卡参数 Excel")
|
||||||
@PreAuthorize("@ss.hasPermission('imt:gateway-info:create')")
|
@PreAuthorize("@ss.hasPermission('imt:gateway-info:create')")
|
||||||
|
@ -41,7 +41,7 @@ public class GatewayCardInfoServiceImpl implements GatewayCardInfoService {
|
|||||||
@Override
|
@Override
|
||||||
public void updateGatewayCardInfo(GatewayCardInfoSaveReqVO updateReqVO) {
|
public void updateGatewayCardInfo(GatewayCardInfoSaveReqVO updateReqVO) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateGatewayCardInfoExists(updateReqVO.getGatewayId());
|
validateGatewayCardInfoExists(updateReqVO.getCardId());
|
||||||
// 更新
|
// 更新
|
||||||
GatewayCardInfoDO updateObj = BeanUtils.toBean(updateReqVO, GatewayCardInfoDO.class);
|
GatewayCardInfoDO updateObj = BeanUtils.toBean(updateReqVO, GatewayCardInfoDO.class);
|
||||||
gatewayCardInfoMapper.updateById(updateObj);
|
gatewayCardInfoMapper.updateById(updateObj);
|
||||||
|
@ -62,4 +62,8 @@ public interface GatewayCardParamsService {
|
|||||||
*/
|
*/
|
||||||
PageResult<GatewayCardParamsDO> getGatewayCardParamsPage(GatewayCardParamsPageReqVO pageReqVO);
|
PageResult<GatewayCardParamsDO> getGatewayCardParamsPage(GatewayCardParamsPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据采集卡id查询参数列表
|
||||||
|
*/
|
||||||
|
List<GatewayCardParamsDO> getGatewayCardParamsByCardId(String cardId);
|
||||||
}
|
}
|
@ -94,4 +94,12 @@ public class GatewayCardParamsServiceImpl implements GatewayCardParamsService {
|
|||||||
return gatewayCardParamsMapper.selectPage(pageReqVO);
|
return gatewayCardParamsMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据采集卡id查询参数列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<GatewayCardParamsDO> getGatewayCardParamsByCardId(String cardId){
|
||||||
|
return gatewayCardParamsMapper.selectList("cardId",cardId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -43,6 +43,14 @@ export function getGatewayCardParams(id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获得机床网关采集卡参数
|
||||||
|
export function getGatewayCardParams(id) {
|
||||||
|
return request({
|
||||||
|
url: "/imt/gateway-card-params/get?id=" + id,
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 获得机床网关采集卡参数分页
|
// 获得机床网关采集卡参数分页
|
||||||
export function getGatewayCardParamsPage(params) {
|
export function getGatewayCardParamsPage(params) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -369,6 +369,7 @@ export default {
|
|||||||
this.formLoading = true;
|
this.formLoading = true;
|
||||||
try {
|
try {
|
||||||
const res = await GatewayCardInfoApi.getGatewayCardInfo(id);
|
const res = await GatewayCardInfoApi.getGatewayCardInfo(id);
|
||||||
|
// const paramsRes = await GatewayCardParamsApi.getGatewayCardParams();
|
||||||
this.formData = res.data;
|
this.formData = res.data;
|
||||||
this.dialogTitle = "修改机床网关采集卡信息";
|
this.dialogTitle = "修改机床网关采集卡信息";
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -101,8 +101,87 @@
|
|||||||
:data="list"
|
:data="list"
|
||||||
:stripe="true"
|
:stripe="true"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
|
@expand-change="tableExpandChange"
|
||||||
>
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="expand"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-card>
|
||||||
|
<!-- 操作工具栏 -->
|
||||||
|
<el-row
|
||||||
|
:gutter="10"
|
||||||
|
class="mb8"
|
||||||
|
>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<!-- <el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="addTableRow(scope.row)"
|
||||||
|
v-hasPermi="['imt:gateway-info:create']"
|
||||||
|
>新增采集卡及参数</el-button> -->
|
||||||
|
<span style="font-weight:700;font-size:18px">{{ scope.row.gatewayName + "采集卡信息" }}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="cardLoading"
|
||||||
|
:data="cardList"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
type="index"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="采集卡名称"
|
||||||
|
prop="cardName"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="采集卡型号"
|
||||||
|
prop="cardType"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="采集卡映射表名"
|
||||||
|
prop="cardTableMapping"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="消息类型"
|
||||||
|
prop="msgType"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
width="120"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="openCardForm(scope.row.cardId,scope.row)"
|
||||||
|
v-hasPermi="['imt:gateway-info:create']"
|
||||||
|
>修改</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
:hide-on-single-page="true"
|
||||||
|
:total="cardTotal"
|
||||||
|
:page.sync="cardQueryParams.pageNo"
|
||||||
|
:limit.sync="cardQueryParams.pageSize"
|
||||||
|
@pagination="getCardList(scope.row.gatewayId)"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="客户名"
|
label="客户名"
|
||||||
align="center"
|
align="center"
|
||||||
|
Loading…
Reference in New Issue
Block a user