From 730d1944e3a13c517c77df2b0712df05645a38dd Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期一, 06 一月 2025 16:00:58 +0800 Subject: [PATCH] chartParamList api --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/service/impl/ChannelOPCDADeviceServiceImpl.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/opcda/service/impl/ChannelOPCDADeviceServiceImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/service/impl/ChannelOPCDADeviceServiceImpl.java index 2c79766..a6b7588 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/service/impl/ChannelOPCDADeviceServiceImpl.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/service/impl/ChannelOPCDADeviceServiceImpl.java @@ -4,12 +4,14 @@ 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.dao.ChannelOPCDADeviceDao; import com.iailab.module.data.channel.opcda.dto.ChannelOPCDADeviceDTO; import com.iailab.module.data.channel.opcda.entity.ChannelOPCDADeviceEntity; import com.iailab.module.data.channel.opcda.service.ChannelOPCDADeviceService; import com.iailab.module.data.channel.opcda.service.ChannelOPCDATagService; +import com.iailab.module.data.channel.opcda.vo.OpcDaDevicePageReqVO; import com.iailab.module.data.common.utils.PageUtils; import com.iailab.module.data.common.utils.Query; import org.springframework.beans.factory.annotation.Autowired; @@ -20,9 +22,9 @@ import java.util.Map; /** - * @author DongYukun + * @author lirm * @Description - * @createTime 2023年05月08日 15:04:00 + * @createTime 2024年08月26日 */ @Service public class ChannelOPCDADeviceServiceImpl extends ServiceImpl<ChannelOPCDADeviceDao, ChannelOPCDADeviceEntity> implements ChannelOPCDADeviceService { @@ -31,70 +33,34 @@ @Autowired private ChannelOPCDATagService channelOPCDATagService; - /** - * 分页查询opc ua配置 - * - * @param params - */ - @Override - public PageUtils queryPage(Map<String, Object> params) { - String serverName = (String) params.get("serverName"); - IPage<ChannelOPCDADeviceEntity> page = this.page( - new Query<ChannelOPCDADeviceEntity>().getPage(params), - new QueryWrapper<ChannelOPCDADeviceEntity>() - .like(StringUtils.isNotBlank(serverName), "server_name", serverName) - .orderByDesc("create_time") - ); - return new PageUtils(page); + @Override + public PageResult<ChannelOPCDADeviceEntity> queryPage(OpcDaDevicePageReqVO reqVO) { + return channelOPCDADeviceDao.selectPage(reqVO); } - /** - * 查询opc ua配置详情 - * - * @param id - */ + @Override + public List<ChannelOPCDADeviceEntity> list(Map<String, Object> params) { + QueryWrapper<ChannelOPCDADeviceEntity> queryWrapper = new QueryWrapper<>(); + queryWrapper.orderByDesc("create_time"); + return channelOPCDADeviceDao.selectList(queryWrapper); + } + @Override public ChannelOPCDADeviceEntity info(String id) { return channelOPCDADeviceDao.selectById(id); } - /** - * 列表 - * - * @param params - * @return - */ - @Override - public List<ChannelOPCDADeviceEntity> list(Map<String, Object> params) { - return channelOPCDADeviceDao.selectList(new QueryWrapper<ChannelOPCDADeviceEntity>().orderByAsc("server_name")); - } - - /** - * 添加opc ua配置 - * - * @param channelOPCDADeviceEntity - */ @Override public void add(ChannelOPCDADeviceEntity channelOPCDADeviceEntity) { channelOPCDADeviceDao.insert(channelOPCDADeviceEntity); } - /** - * 修改opc ua配置 - * - * @param channelOPCDADeviceEntity - */ @Override public void update(ChannelOPCDADeviceEntity channelOPCDADeviceEntity) { channelOPCDADeviceDao.updateById(channelOPCDADeviceEntity); } - /** - * 删除opc ua配置 - * - * @param id - */ @Override public void delete(String id) { -- Gitblit v1.9.3