From 3e18d4bfbf2c657b08b21512c2d884cc9d59df7b Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期一, 14 十月 2024 16:29:49 +0800 Subject: [PATCH] 模型运行 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/service/impl/ChannelOPCUADeviceServiceImpl.java | 62 +++++++------------------------ 1 files changed, 14 insertions(+), 48 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/service/impl/ChannelOPCUADeviceServiceImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/service/impl/ChannelOPCUADeviceServiceImpl.java index 52651bf..142b3ac 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/service/impl/ChannelOPCUADeviceServiceImpl.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/service/impl/ChannelOPCUADeviceServiceImpl.java @@ -4,7 +4,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.module.data.channel.opcda.entity.ChannelOPCDADeviceEntity; +import com.iailab.module.data.channel.opcda.vo.OpcDaDevicePageReqVO; +import com.iailab.module.data.channel.opcua.vo.OpcUaDevicePageReqVO; import com.iailab.module.data.common.utils.PageUtils; import com.iailab.module.data.common.utils.Query; import com.iailab.module.data.channel.opcua.dao.ChannelOPCUADeviceDao; @@ -19,9 +23,9 @@ import java.util.Map; /** - * @author DongYukun + * @author lirm * @Description - * @createTime 2023年05月08日 15:04:00 + * @createTime 2024年08月26日 */ @Service public class ChannelOPCUADeviceServiceImpl extends ServiceImpl<ChannelOPCUADeviceDao, ChannelOPCUADeviceEntity> implements ChannelOPCUADeviceService { @@ -30,70 +34,27 @@ @Resource private ChannelOPCUATagService channelOPCUATagService; - /** - * 分页查询opc ua配置 - * - * @param params - */ - @Override - public PageUtils queryPage(Map<String, Object> params) { - String serverName = (String) params.get("serverName"); - IPage<ChannelOPCUADeviceEntity> page = this.page( - new Query<ChannelOPCUADeviceEntity>().getPage(params), - new QueryWrapper<ChannelOPCUADeviceEntity>() - .like(StringUtils.isNotBlank(serverName), "server_name", serverName) - .orderByDesc("create_time") - ); - return new PageUtils(page); + @Override + public PageResult<ChannelOPCUADeviceEntity> queryPage(OpcUaDevicePageReqVO reqVO) { + return channelOPCUADeviceDao.selectPage(reqVO); } - /** - * 查询opc ua配置详情 - * - * @param id - */ @Override public ChannelOPCUADeviceEntity info(String id) { return channelOPCUADeviceDao.selectById(id); } - /** - * 列表 - * - * @param params - * @return - */ - @Override - public List<ChannelOPCUADeviceEntity> list(Map<String, Object> params) { - return channelOPCUADeviceDao.selectList(new QueryWrapper<ChannelOPCUADeviceEntity>().orderByAsc("server_name")); - } - - /** - * 添加opc ua配置 - * - * @param channelOPCUADeviceEntity - */ @Override public void add(ChannelOPCUADeviceEntity channelOPCUADeviceEntity) { channelOPCUADeviceDao.insert(channelOPCUADeviceEntity); } - /** - * 修改opc ua配置 - * - * @param channelOPCUADeviceEntity - */ @Override public void update(ChannelOPCUADeviceEntity channelOPCUADeviceEntity) { channelOPCUADeviceDao.updateById(channelOPCUADeviceEntity); } - /** - * 删除opc ua配置 - * - * @param id - */ @Override public void delete(String id) { @@ -111,4 +72,9 @@ ); return ConvertUtils.sourceToTarget(entityList, ChannelOPCUADeviceDTO.class); } + + @Override + public List<ChannelOPCUADeviceEntity> list(Map<String, Object> params) { + return channelOPCUADeviceDao.selectList(new QueryWrapper<ChannelOPCUADeviceEntity>().orderByAsc("server_name")); + } } -- Gitblit v1.9.3