潘志宝
2024-09-18 a477ef0bdb41b5caaf9bf624ac264e55cc60e28b
data tag 配置
已添加1个文件
已重命名2个文件
已修改8个文件
97 ■■■■ 文件已修改
iailab-module-data/iailab-module-data-biz/pom.xml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/controller/admin/ChannelKioDeviceController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/controller/admin/ChannelKioTagController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/modbus/controller/admin/ChannelModbusDeviceController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/modbus/controller/admin/ChannelModbusTagController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/controller/admin/ChannelOPCDADeviceController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/controller/admin/ChannelOPCDATagController.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/controller/package-info.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/controller/admin/ChannelOPCUADeviceController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/controller/admin/ChannelOPCUATagController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/entity/ChannelOPCUATagEntity.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/pom.xml
@@ -202,9 +202,16 @@
        <plugins>
            <!-- 打包 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring.boot.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/controller/admin/ChannelKioDeviceController.java
@@ -10,6 +10,7 @@
import com.iailab.module.data.channel.kio.vo.KioDeviceRespVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -32,12 +33,14 @@
    @Resource
    private ChannelKioDeviceService channelKioDeviceService;
    @PreAuthorize("@ss.hasPermission('data:channel-kio:query')")
    @GetMapping("page")
    public CommonResult<PageResult<KioDeviceRespVO>> list(@Valid KioDevicePageReqVO reqVO) {
        PageResult<ChannelKioDeviceEntity> page = channelKioDeviceService.queryPage(reqVO);
        return success(BeanUtils.toBean(page, KioDeviceRespVO.class));
    }
    @PreAuthorize("@ss.hasPermission('data:channel-kio:query')")
    @GetMapping("/info/{id}")
    @Operation(summary = "信息")
    public CommonResult<ChannelKioDeviceEntity> info(@PathVariable("id") String id) {
@@ -45,8 +48,9 @@
        return success(info);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-kio:create')")
    @PostMapping("/add")
    public CommonResult<Boolean> add(@RequestBody ChannelKioDeviceEntity channelKioDeviceEntity) {
    public CommonResult<Boolean> create(@RequestBody ChannelKioDeviceEntity channelKioDeviceEntity) {
        String id = UUID.randomUUID().toString();
        channelKioDeviceEntity.setId(id);
        channelKioDeviceEntity.setCreateTime(new Date());
@@ -54,6 +58,7 @@
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-kio:update')")
    @PutMapping("/update")
    public CommonResult<Boolean> update(@RequestBody ChannelKioDeviceEntity channelKioDeviceEntity) {
        channelKioDeviceEntity.setUpdateTime(new Date());
@@ -61,6 +66,7 @@
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-kio:delete')")
    @DeleteMapping("/delete")
    public CommonResult<Boolean> delete(@RequestParam("id") String id) {
        channelKioDeviceService.delete(id);
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/controller/admin/ChannelKioTagController.java
@@ -8,6 +8,7 @@
import com.iailab.module.data.channel.kio.vo.KioTagPageReqVO;
import com.iailab.module.data.channel.kio.vo.KioTagRespVO;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -29,12 +30,14 @@
    /**
     * 分页查询tag
     * */
    @PreAuthorize("@ss.hasPermission('data:channel-kio:query')")
    @GetMapping("page")
    public CommonResult<PageResult<KioTagRespVO>> page(@Valid KioTagPageReqVO reqVO){
        PageResult<ChannelKioTagEntity> page = channelKioTagService.queryPage(reqVO);
        return success(BeanUtils.toBean(page, KioTagRespVO.class));
    }
    @PreAuthorize("@ss.hasPermission('data:channel-kio:query')")
    @GetMapping("/info/{id}")
    @Operation(summary = "信息")
    public CommonResult<ChannelKioTagEntity> info(@PathVariable("id") String id) {
@@ -42,8 +45,9 @@
        return success(info);
    }
    @PostMapping("/add")
    public CommonResult<Boolean> add(@RequestBody ChannelKioTagEntity channelKioTagEntity) {
    @PreAuthorize("@ss.hasPermission('data:channel-kio:create')")
    @PostMapping("/create")
    public CommonResult<Boolean> create(@RequestBody ChannelKioTagEntity channelKioTagEntity) {
        String id = UUID.randomUUID().toString();
        channelKioTagEntity.setId(id);
        channelKioTagEntity.setCreateTime(new Date());
@@ -51,6 +55,7 @@
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-kio:update')")
    @PutMapping("/update")
    public CommonResult<Boolean> update(@RequestBody ChannelKioTagEntity channelKioTagEntity) {
        channelKioTagEntity.setUpdateTime(new Date());
@@ -58,6 +63,7 @@
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-kio:delete')")
    @DeleteMapping("/delete")
    public CommonResult<Boolean> delete(@RequestParam("id") String id) {
        channelKioTagService.delete(id);
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/modbus/controller/admin/ChannelModbusDeviceController.java
@@ -10,6 +10,7 @@
import javax.annotation.Resource;
import com.iailab.module.data.channel.modbus.vo.ModBusDeviceRespVO;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -34,6 +35,7 @@
     *
     * @param reqVO
     */
    @PreAuthorize("@ss.hasPermission('data:channel-modbus:query')")
    @GetMapping("/page")
    public CommonResult<PageResult<ModBusDeviceRespVO>> list(@Validated ModBusDevicePageReqVO reqVO) {
        PageResult<ChannelModBusDeviceEntity> page = channelModbusDeviceService.queryPage(reqVO);
@@ -46,6 +48,7 @@
     *
     * @param id
     */
    @PreAuthorize("@ss.hasPermission('data:channel-modbus:query')")
    @GetMapping("/info/{id}")
    public CommonResult<ChannelModBusDeviceEntity> info(@PathVariable("id") String id) {
        ChannelModBusDeviceEntity info = channelModbusDeviceService.info(id);
@@ -57,8 +60,9 @@
     *
     * @param channelModBusDeviceEntity
     */
    @PostMapping("/add")
    public CommonResult<Boolean> add(@RequestBody ChannelModBusDeviceEntity channelModBusDeviceEntity) {
    @PreAuthorize("@ss.hasPermission('data:channel-modbus:create')")
    @PostMapping("/create")
    public CommonResult<Boolean> create(@RequestBody ChannelModBusDeviceEntity channelModBusDeviceEntity) {
        String id = UUID.randomUUID().toString();
        channelModBusDeviceEntity.setId(id);
        channelModbusDeviceService.add(channelModBusDeviceEntity);
@@ -70,6 +74,7 @@
     *
     * @param channelModBusDeviceEntity
     */
    @PreAuthorize("@ss.hasPermission('data:channel-modbus:update')")
    @PutMapping("/update")
    public CommonResult<Boolean> update(@RequestBody ChannelModBusDeviceEntity channelModBusDeviceEntity) {
        channelModbusDeviceService.update(channelModBusDeviceEntity);
@@ -81,6 +86,7 @@
     *
     * @param id
     */
    @PreAuthorize("@ss.hasPermission('data:channel-modbus:delete')")
    @DeleteMapping("/delete")
    public CommonResult<Boolean> delete(@RequestParam("id") String id) {
        channelModbusDeviceService.delete(id);
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/modbus/controller/admin/ChannelModbusTagController.java
@@ -51,8 +51,8 @@
     *
     * @param channelModBusTagEntity
     */
    @PostMapping("/add")
    public CommonResult<Boolean> add(@RequestBody ChannelModBusTagEntity channelModBusTagEntity) {
    @PostMapping("/create")
    public CommonResult<Boolean> create(@RequestBody ChannelModBusTagEntity channelModBusTagEntity) {
        String id = UUID.randomUUID().toString();
        channelModBusTagEntity.setId(id);
        channelModBusTagEntity.setCreateTime(new Date());
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/controller/admin/ChannelOPCDADeviceController.java
文件名从 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/controller/ChannelOPCDADeviceController.java 修改
@@ -1,4 +1,4 @@
package com.iailab.module.data.channel.opcda.controller;
package com.iailab.module.data.channel.opcda.controller.admin;
import com.iailab.framework.common.pojo.CommonResult;
import com.iailab.framework.common.pojo.PageResult;
@@ -8,6 +8,7 @@
import com.iailab.module.data.channel.opcda.vo.OpcDaDevicePageReqVO;
import com.iailab.module.data.channel.opcda.vo.OpcDaDeviceRespVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@@ -28,20 +29,23 @@
    @Autowired
    private ChannelOPCDADeviceService channelOPCDADeviceService;
    @PreAuthorize("@ss.hasPermission('data:channel-opcda:query')")
    @GetMapping("page")
    public CommonResult<PageResult<OpcDaDeviceRespVO>> list(@Valid OpcDaDevicePageReqVO reqVO) {
        PageResult<ChannelOPCDADeviceEntity> page = channelOPCDADeviceService.queryPage(reqVO);
        return success(BeanUtils.toBean(page, OpcDaDeviceRespVO.class));
    }
    @PreAuthorize("@ss.hasPermission('data:channel-opcda:query')")
    @GetMapping("/info/{id}")
    public CommonResult<ChannelOPCDADeviceEntity> info(@PathVariable("id") String id) {
        ChannelOPCDADeviceEntity info = channelOPCDADeviceService.info(id);
        return success(info);
    }
    @PostMapping("/add")
    public CommonResult<Boolean> add(@RequestBody ChannelOPCDADeviceEntity channelOPCDADeviceEntity) {
    @PreAuthorize("@ss.hasPermission('data:channel-opcda:create')")
    @PostMapping("/create")
    public CommonResult<Boolean> create(@RequestBody ChannelOPCDADeviceEntity channelOPCDADeviceEntity) {
        String id = UUID.randomUUID().toString();
        channelOPCDADeviceEntity.setId(id);
        channelOPCDADeviceEntity.setCreateTime(new Date());
@@ -49,6 +53,7 @@
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-opcda:update')")
    @PutMapping("/update")
    public CommonResult<Boolean> update(@RequestBody ChannelOPCDADeviceEntity channelOPCDADeviceEntity) {
        channelOPCDADeviceEntity.setUpdateTime(new Date());
@@ -56,6 +61,7 @@
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-opcda:delete')")
    @DeleteMapping("/delete")
    public CommonResult<Boolean> delete(@RequestParam("id") String id) {
        channelOPCDADeviceService.delete(id);
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/controller/admin/ChannelOPCDATagController.java
文件名从 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/controller/ChannelOPCDATagController.java 修改
@@ -1,4 +1,4 @@
package com.iailab.module.data.channel.opcda.controller;
package com.iailab.module.data.channel.opcda.controller.admin;
import com.iailab.framework.common.pojo.CommonResult;
import com.iailab.framework.common.pojo.PageResult;
@@ -9,6 +9,7 @@
import com.iailab.module.data.channel.opcda.vo.OpcDaTagRespVO;
import com.iailab.module.data.common.exception.RRException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -29,21 +30,24 @@
public class ChannelOPCDATagController {
    @Autowired
    private ChannelOPCDATagService channelOPCDATagService;
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:query')")
    @GetMapping("page")
    public CommonResult<PageResult<OpcDaTagRespVO>> list(@Valid OpcDaTagPageReqVO reqVO) {
        PageResult<ChannelOPCDATagEntity> page = channelOPCDATagService.queryPage(reqVO);
        return success(BeanUtils.toBean(page, OpcDaTagRespVO.class));
    }
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:query')")
    @GetMapping("/info/{id}")
    public CommonResult<ChannelOPCDATagEntity> info(@PathVariable("id") String id) {
        ChannelOPCDATagEntity info = channelOPCDATagService.info(id);
        return success(info);
    }
    @PostMapping("/add")
    public CommonResult<Boolean> add(@RequestBody ChannelOPCDATagEntity channelOPCDATagEntity) {
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:create')")
    @PostMapping("/create")
    public CommonResult<Boolean> create(@RequestBody ChannelOPCDATagEntity channelOPCDATagEntity) {
        String id = UUID.randomUUID().toString();
        channelOPCDATagEntity.setId(id);
        channelOPCDATagEntity.setCreateTime(new Date());
@@ -51,6 +55,7 @@
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:update')")
    @PutMapping("/update")
    public CommonResult<Boolean> update(@RequestBody ChannelOPCDATagEntity channelOPCDATagEntity) {
        channelOPCDATagEntity.setUpdateTime(new Date());
@@ -58,11 +63,13 @@
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:delete')")
    @DeleteMapping("/delete")
    public CommonResult<Boolean> delete(@RequestParam("id") String id) {
        channelOPCDATagService.delete(id);
        return success(true);
    }
    @PostMapping("/import/{serverId}")
    public CommonResult<String> importTag(@PathVariable("serverId") String serverId, @RequestParam("file") MultipartFile file) {
        try {
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/controller/package-info.java
对比新文件
@@ -0,0 +1 @@
package com.iailab.module.data.channel.opcda.controller;
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/controller/admin/ChannelOPCUADeviceController.java
@@ -7,6 +7,7 @@
import com.iailab.module.data.channel.opcua.service.ChannelOPCUADeviceService;
import com.iailab.module.data.channel.opcua.vo.OpcUaDevicePageReqVO;
import com.iailab.module.data.channel.opcua.vo.OpcUaDeviceRespVO;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -27,32 +28,37 @@
    @Resource
    private ChannelOPCUADeviceService channelOPCUADeviceService;
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:query')")
    @GetMapping("page")
    public CommonResult<PageResult<OpcUaDeviceRespVO>> list(@Valid OpcUaDevicePageReqVO reqVO) {
        PageResult<ChannelOPCUADeviceEntity> page = channelOPCUADeviceService.queryPage(reqVO);
        return success(BeanUtils.toBean(page, OpcUaDeviceRespVO.class));
    }
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:query')")
    @GetMapping("/info/{id}")
    public CommonResult<ChannelOPCUADeviceEntity> info(@PathVariable("id") String id) {
        ChannelOPCUADeviceEntity info = channelOPCUADeviceService.info(id);
        return success(info);
    }
    @PostMapping("/add")
    public CommonResult<Boolean> add(@RequestBody ChannelOPCUADeviceEntity channelOPCUADeviceEntity) {
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:create')")
    @PostMapping("/create")
    public CommonResult<Boolean> create(@RequestBody ChannelOPCUADeviceEntity channelOPCUADeviceEntity) {
        String id = UUID.randomUUID().toString();
        channelOPCUADeviceEntity.setId(id);
        channelOPCUADeviceService.add(channelOPCUADeviceEntity);
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:update')")
    @PutMapping("/update")
    public CommonResult<Boolean> update(@RequestBody ChannelOPCUADeviceEntity channelOPCUADeviceEntity) {
        channelOPCUADeviceService.update(channelOPCUADeviceEntity);
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:delete')")
    @DeleteMapping("/delete")
    public CommonResult<Boolean> delete(@RequestParam("id") String id) {
        channelOPCUADeviceService.delete(id);
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/controller/admin/ChannelOPCUATagController.java
@@ -7,6 +7,7 @@
import com.iailab.module.data.channel.opcua.service.ChannelOPCUATagService;
import com.iailab.module.data.channel.opcua.vo.OpcUaTagPageReqVO;
import com.iailab.module.data.channel.opcua.vo.OpcUaTagRespVO;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -28,20 +29,23 @@
    @Resource
    private ChannelOPCUATagService channelOpcuaTagService;
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:query')")
    @GetMapping("page")
    public CommonResult<PageResult<OpcUaTagRespVO>> list(@Valid OpcUaTagPageReqVO reqVO) {
        PageResult<ChannelOPCUATagEntity> page = channelOpcuaTagService.queryPage(reqVO);
        return success(BeanUtils.toBean(page, OpcUaTagRespVO.class));
    }
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:query')")
    @GetMapping("/info/{id}")
    public CommonResult<ChannelOPCUATagEntity> info(@PathVariable("id") String id) {
        ChannelOPCUATagEntity info = channelOpcuaTagService.info(id);
        return success(info);
    }
    @PostMapping("/add")
    public CommonResult<Boolean> add(@RequestBody ChannelOPCUATagEntity channelOPCUATagEntity) {
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:create')")
    @PostMapping("/create")
    public CommonResult<Boolean> create(@RequestBody ChannelOPCUATagEntity channelOPCUATagEntity) {
        String id = UUID.randomUUID().toString();
        channelOPCUATagEntity.setId(id);
        channelOPCUATagEntity.setCreateTime(new Date());
@@ -49,6 +53,7 @@
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:update')")
    @PutMapping("/update")
    public CommonResult<Boolean> update(@RequestBody ChannelOPCUATagEntity channelOPCUATagEntity) {
        channelOPCUATagEntity.setUpdateTime(new Date());
@@ -56,6 +61,7 @@
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-opcua:delete')")
    @DeleteMapping("/delete")
    public CommonResult<Boolean> delete(@RequestParam("id") String id) {
        channelOpcuaTagService.delete(id);
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/entity/ChannelOPCUATagEntity.java
@@ -16,7 +16,7 @@
 * @createTime 2023年05月8日 15:01:00
 */
@Data
@TableName("t_channel_opcda_tag")
@TableName("t_channel_opcua_tag")
public class ChannelOPCUATagEntity implements Serializable {
    private static final long serialVersionUID = 1L;
@@ -46,7 +46,7 @@
    private String device;
    /**
     * Modbus地址 00001 ~49999
     * 地址
     */
    private String address;