网关参数相关功能更新
This commit is contained in:
parent
6a19cccaef
commit
cb9f7bae8b
@ -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 {
|
||||||
|
@ -168,7 +168,7 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="openCardForm(scope.row.cardId,scope.row)"
|
@click="openCardForm(scope.row.cardId,scope.row)"
|
||||||
v-hasPermi="['imt:gateway-info:create']"
|
v-hasPermi="['imt:gateway-info:create']"
|
||||||
>修改</el-button>
|
>采集卡信息修改</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
Loading…
Reference in New Issue
Block a user