Parcourir la source

生成并调整视频融合相关界面

wukai il y a 6 mois
Parent
commit
f54cc1d0bf

+ 113 - 0
jjt-admin/src/main/java/com/jjt/biz/controller/DeviceChannelsController.java

@@ -0,0 +1,113 @@
+package com.jjt.biz.controller;
+
+import java.util.List;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.jjt.common.annotation.Log;
+import com.jjt.common.core.controller.BaseController;
+import com.jjt.common.core.domain.AjaxResult;
+import com.jjt.common.enums.BusinessType;
+import com.jjt.biz.domain.DeviceChannels;
+import com.jjt.biz.service.IDeviceChannelsService;
+import com.jjt.common.utils.poi.ExcelUtil;
+import com.jjt.common.core.page.TableDataInfo;
+
+/**
+ * 视频通道Controller
+ *
+ * @author wukai
+ * @date 2025-10-14
+ */
+@Api(tags="视频通道")
+@RestController
+@RequestMapping("/biz/dc")
+public class DeviceChannelsController extends BaseController{
+    @Resource
+    private IDeviceChannelsService deviceChannelsService;
+
+    /**
+     * 查询视频通道列表
+     */
+    @ApiOperation("查询视频通道列表")
+    //@PreAuthorize("@ss.hasPermi('biz:dc:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(DeviceChannels deviceChannels)
+    {
+        startPage();
+        List<DeviceChannels> list = deviceChannelsService.selectDeviceChannelsList(deviceChannels);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出视频通道列表
+     */
+    @ApiOperation("导出视频通道列表")
+    //@PreAuthorize("@ss.hasPermi('biz:dc:export')")
+    @Log(title = "视频通道", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, DeviceChannels deviceChannels)
+    {
+        List<DeviceChannels> list = deviceChannelsService.selectDeviceChannelsList(deviceChannels);
+        ExcelUtil<DeviceChannels> util = new ExcelUtil<DeviceChannels>(DeviceChannels.class);
+        util.exportExcel(response, list, "视频通道数据");
+    }
+
+    /**
+     * 获取视频通道详细信息
+     */
+    @ApiOperation("获取视频通道详细信息")
+    //@PreAuthorize("@ss.hasPermi('biz:dc:query')")
+    @GetMapping(value = "/{channelId}")
+    public AjaxResult getInfo(@PathVariable("channelId") String channelId)
+    {
+        return success(deviceChannelsService.selectDeviceChannelsByChannelId(channelId));
+    }
+
+    /**
+     * 新增视频通道
+     */
+    @ApiOperation("新增视频通道")
+    //@PreAuthorize("@ss.hasPermi('biz:dc:add')")
+    @Log(title = "视频通道", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody DeviceChannels deviceChannels)
+    {
+        return toAjax(deviceChannelsService.insertDeviceChannels(deviceChannels));
+    }
+
+    /**
+     * 修改视频通道
+     */
+    @ApiOperation("修改视频通道")
+    //@PreAuthorize("@ss.hasPermi('biz:dc:edit')")
+    @Log(title = "视频通道", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody DeviceChannels deviceChannels)
+    {
+        return toAjax(deviceChannelsService.updateDeviceChannels(deviceChannels));
+    }
+
+    /**
+     * 删除视频通道
+     */
+    @ApiOperation("删除视频通道")
+    //@PreAuthorize("@ss.hasPermi('biz:dc:remove')")
+    @Log(title = "视频通道", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{channelIds}")
+    public AjaxResult remove(@PathVariable String[] channelIds)
+    {
+        return toAjax(deviceChannelsService.deleteDeviceChannelsByChannelIds(channelIds));
+    }
+}

+ 110 - 0
jjt-admin/src/main/java/com/jjt/biz/controller/DeviceConfigController.java

@@ -0,0 +1,110 @@
+package com.jjt.biz.controller;
+
+import com.jjt.biz.domain.DeviceConfig;
+import com.jjt.biz.service.IDeviceConfigService;
+import com.jjt.common.annotation.Log;
+import com.jjt.common.core.controller.BaseController;
+import com.jjt.common.core.domain.AjaxResult;
+import com.jjt.common.core.page.TableDataInfo;
+import com.jjt.common.enums.BusinessType;
+import com.jjt.common.utils.poi.ExcelUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 视频融合配置Controller
+ *
+ * @author wukai
+ * @date 2025-10-14
+ */
+@Api(tags = "视频融合配置")
+@RestController
+@RequestMapping("/biz/db")
+public class DeviceConfigController extends BaseController {
+    @Resource
+    private IDeviceConfigService deviceConfigService;
+
+    /**
+     * 查询视频融合配置列表
+     */
+    @ApiOperation("查询视频融合配置列表")
+    //@PreAuthorize("@ss.hasPermi('biz:db:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(DeviceConfig deviceConfig) {
+        startPage();
+        List<DeviceConfig> list = deviceConfigService.selectDeviceConfigList(deviceConfig);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出视频融合配置列表
+     */
+    @ApiOperation("导出视频融合配置列表")
+    //@PreAuthorize("@ss.hasPermi('biz:db:export')")
+    @Log(title = "视频融合配置", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, DeviceConfig deviceConfig) {
+        List<DeviceConfig> list = deviceConfigService.selectDeviceConfigList(deviceConfig);
+        ExcelUtil<DeviceConfig> util = new ExcelUtil<DeviceConfig>(DeviceConfig.class);
+        util.exportExcel(response, list, "视频融合配置数据");
+    }
+
+    /**
+     * 获取视频融合配置详细信息
+     */
+    @ApiOperation("获取视频融合配置详细信息")
+    //@PreAuthorize("@ss.hasPermi('biz:db:query')")
+    @GetMapping(value = "/{autoId}")
+    public AjaxResult getInfo(@PathVariable("autoId") Long autoId) {
+        return success(deviceConfigService.selectDeviceConfigByAutoId(autoId));
+    }
+
+    /**
+     * 同步设备信息
+     */
+    @ApiOperation("获取视频融合配置详细信息")
+    //@PreAuthorize("@ss.hasPermi('biz:db:query')")
+    @GetMapping(value = "/sync/{autoId}")
+    public AjaxResult sync(@PathVariable("autoId") Long autoId) {
+        return success(deviceConfigService.sync(autoId));
+    }
+
+
+    /**
+     * 新增视频融合配置
+     */
+    @ApiOperation("新增视频融合配置")
+    //@PreAuthorize("@ss.hasPermi('biz:db:add')")
+    @Log(title = "视频融合配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody DeviceConfig deviceConfig) {
+        return toAjax(deviceConfigService.insertDeviceConfig(deviceConfig));
+    }
+
+    /**
+     * 修改视频融合配置
+     */
+    @ApiOperation("修改视频融合配置")
+    //@PreAuthorize("@ss.hasPermi('biz:db:edit')")
+    @Log(title = "视频融合配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody DeviceConfig deviceConfig) {
+        return toAjax(deviceConfigService.updateDeviceConfig(deviceConfig));
+    }
+
+    /**
+     * 删除视频融合配置
+     */
+    @ApiOperation("删除视频融合配置")
+    //@PreAuthorize("@ss.hasPermi('biz:db:remove')")
+    @Log(title = "视频融合配置", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{autoIds}")
+    public AjaxResult remove(@PathVariable Long[] autoIds) {
+        return toAjax(deviceConfigService.deleteDeviceConfigByAutoIds(autoIds));
+    }
+}

+ 167 - 0
jjt-admin/src/main/java/com/jjt/biz/domain/DeviceChannels.java

@@ -0,0 +1,167 @@
+package com.jjt.biz.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.jjt.common.annotation.Excel;
+import com.jjt.common.core.domain.BaseEntity;
+
+/**
+ * 视频通道对象 device_channels
+ *
+ * @author wukai
+ * @date 2025-10-14
+ */
+@ApiModel(value = "DeviceChannels", description = "视频通道")
+public class DeviceChannels extends BaseEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** 通道ID */
+    @ApiModelProperty("通道ID")
+    @TableId
+    private String channelId;
+
+    /** 通道名称 */
+    @ApiModelProperty("通道名称")
+    @Excel(name = "通道名称")
+    private String channelName;
+
+    /** 仓库名称 */
+    @ApiModelProperty("仓库名称")
+    @Excel(name = "仓库名称")
+    private String houseName;
+
+    /** 仓库编码 */
+    @ApiModelProperty("仓库编码")
+    @Excel(name = "仓库编码")
+    private String houseCode;
+
+    /** 设备名称 */
+    @ApiModelProperty("设备名称")
+    @Excel(name = "设备名称")
+    private String deviceName;
+
+    /** 设备编号 */
+    @ApiModelProperty("设备编号")
+    @Excel(name = "设备编号")
+    private String deviceCode;
+
+    /** 厂商 */
+    @ApiModelProperty("厂商")
+    @Excel(name = "厂商")
+    private String manufacturer;
+
+    /** 型号 */
+    @ApiModelProperty("型号")
+    @Excel(name = "型号")
+    private String model;
+
+    /** 状态 */
+    @ApiModelProperty("状态")
+    @Excel(name = "状态")
+    private String status;
+
+    public void setChannelId(String channelId)
+    {
+        this.channelId = channelId;
+    }
+
+    public String getChannelId()
+    {
+        return channelId;
+    }
+    public void setChannelName(String channelName)
+    {
+        this.channelName = channelName;
+    }
+
+    public String getChannelName()
+    {
+        return channelName;
+    }
+    public void setHouseName(String houseName)
+    {
+        this.houseName = houseName;
+    }
+
+    public String getHouseName()
+    {
+        return houseName;
+    }
+    public void setHouseCode(String houseCode)
+    {
+        this.houseCode = houseCode;
+    }
+
+    public String getHouseCode()
+    {
+        return houseCode;
+    }
+    public void setDeviceName(String deviceName)
+    {
+        this.deviceName = deviceName;
+    }
+
+    public String getDeviceName()
+    {
+        return deviceName;
+    }
+    public void setDeviceCode(String deviceCode)
+    {
+        this.deviceCode = deviceCode;
+    }
+
+    public String getDeviceCode()
+    {
+        return deviceCode;
+    }
+    public void setManufacturer(String manufacturer)
+    {
+        this.manufacturer = manufacturer;
+    }
+
+    public String getManufacturer()
+    {
+        return manufacturer;
+    }
+    public void setModel(String model)
+    {
+        this.model = model;
+    }
+
+    public String getModel()
+    {
+        return model;
+    }
+    public void setStatus(String status)
+    {
+        this.status = status;
+    }
+
+    public String getStatus()
+    {
+        return status;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("channelId", getChannelId())
+            .append("channelName", getChannelName())
+            .append("houseName", getHouseName())
+            .append("houseCode", getHouseCode())
+            .append("deviceName", getDeviceName())
+            .append("deviceCode", getDeviceCode())
+            .append("manufacturer", getManufacturer())
+            .append("model", getModel())
+            .append("status", getStatus())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 167 - 0
jjt-admin/src/main/java/com/jjt/biz/domain/DeviceConfig.java

@@ -0,0 +1,167 @@
+package com.jjt.biz.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.jjt.common.annotation.Excel;
+import com.jjt.common.core.domain.BaseEntity;
+
+/**
+ * 视频融合配置对象 device_config
+ *
+ * @author wukai
+ * @date 2025-10-14
+ */
+@ApiModel(value = "DeviceConfig", description = "视频融合配置")
+public class DeviceConfig extends BaseEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** 设备ID */
+    @ApiModelProperty("设备ID")
+    @TableId
+    private Long autoId;
+
+    /** 仓库ID */
+    @ApiModelProperty("仓库ID")
+    @Excel(name = "仓库ID")
+    private Long houseId;
+
+    /** 仓库名称 */
+    @ApiModelProperty("仓库名称")
+    @Excel(name = "仓库名称")
+    private String houseName;
+
+    /** 仓库编码 */
+    @ApiModelProperty("仓库编码")
+    @Excel(name = "仓库编码")
+    private String houseCode;
+
+    /** 设备名称 */
+    @ApiModelProperty("设备名称")
+    @Excel(name = "设备名称")
+    private String deviceName;
+
+    /** 设备编码 */
+    @ApiModelProperty("设备编码")
+    @Excel(name = "设备编码")
+    private String deviceCode;
+
+    /** 厂商 */
+    @ApiModelProperty("厂商")
+    @Excel(name = "厂商")
+    private String manufacturer;
+
+    /** 型号 */
+    @ApiModelProperty("型号")
+    @Excel(name = "型号")
+    private String model;
+
+    /** 状态 */
+    @ApiModelProperty("状态")
+    @Excel(name = "状态")
+    private String status;
+
+    public void setAutoId(Long autoId)
+    {
+        this.autoId = autoId;
+    }
+
+    public Long getAutoId()
+    {
+        return autoId;
+    }
+    public void setHouseId(Long houseId)
+    {
+        this.houseId = houseId;
+    }
+
+    public Long getHouseId()
+    {
+        return houseId;
+    }
+    public void setHouseName(String houseName)
+    {
+        this.houseName = houseName;
+    }
+
+    public String getHouseName()
+    {
+        return houseName;
+    }
+    public void setHouseCode(String houseCode)
+    {
+        this.houseCode = houseCode;
+    }
+
+    public String getHouseCode()
+    {
+        return houseCode;
+    }
+    public void setDeviceName(String deviceName)
+    {
+        this.deviceName = deviceName;
+    }
+
+    public String getDeviceName()
+    {
+        return deviceName;
+    }
+    public void setDeviceCode(String deviceCode)
+    {
+        this.deviceCode = deviceCode;
+    }
+
+    public String getDeviceCode()
+    {
+        return deviceCode;
+    }
+    public void setManufacturer(String manufacturer)
+    {
+        this.manufacturer = manufacturer;
+    }
+
+    public String getManufacturer()
+    {
+        return manufacturer;
+    }
+    public void setModel(String model)
+    {
+        this.model = model;
+    }
+
+    public String getModel()
+    {
+        return model;
+    }
+    public void setStatus(String status)
+    {
+        this.status = status;
+    }
+
+    public String getStatus()
+    {
+        return status;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("autoId", getAutoId())
+            .append("houseId", getHouseId())
+            .append("houseName", getHouseName())
+            .append("houseCode", getHouseCode())
+            .append("deviceName", getDeviceName())
+            .append("deviceCode", getDeviceCode())
+            .append("manufacturer", getManufacturer())
+            .append("model", getModel())
+            .append("status", getStatus())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 67 - 0
jjt-admin/src/main/java/com/jjt/biz/mapper/DeviceChannelsMapper.java

@@ -0,0 +1,67 @@
+package com.jjt.biz.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jjt.biz.domain.DeviceChannels;
+
+/**
+ * 视频通道Mapper接口
+ *
+ * @author wukai
+ * @date 2025-10-14
+ */
+public interface DeviceChannelsMapper extends BaseMapper<DeviceChannels>
+{
+    /**
+     * 查询视频通道
+     *
+     * @param channelId 视频通道主键
+     * @return 视频通道
+     */
+    public DeviceChannels selectDeviceChannelsByChannelId(String channelId);
+
+    /**
+     * 查询视频通道列表
+     *
+     * @param deviceChannels 视频通道
+     * @return 视频通道集合
+     */
+    public List<DeviceChannels> selectDeviceChannelsList(DeviceChannels deviceChannels);
+
+    /**
+     * 新增视频通道
+     *
+     * @param deviceChannels 视频通道
+     * @return 结果
+     */
+    public int insertDeviceChannels(DeviceChannels deviceChannels);
+
+    /**
+     * 修改视频通道
+     *
+     * @param deviceChannels 视频通道
+     * @return 结果
+     */
+    public int updateDeviceChannels(DeviceChannels deviceChannels);
+
+    /**
+     * 删除视频通道
+     *
+     * @param channelId 视频通道主键
+     * @return 结果
+     */
+    public int deleteDeviceChannelsByChannelId(String channelId);
+
+    /**
+     * 批量删除视频通道
+     *
+     * @param channelIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteDeviceChannelsByChannelIds(String[] channelIds);
+    /**
+     * 根据设备编号删除设备通道
+     * @param deviceCode 设备编号
+     */
+    void deleteDeviceChannelsByDeviceCode(String deviceCode);
+}

+ 62 - 0
jjt-admin/src/main/java/com/jjt/biz/mapper/DeviceConfigMapper.java

@@ -0,0 +1,62 @@
+package com.jjt.biz.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jjt.biz.domain.DeviceConfig;
+
+/**
+ * 视频融合配置Mapper接口
+ * 
+ * @author wukai
+ * @date 2025-10-14
+ */
+public interface DeviceConfigMapper extends BaseMapper<DeviceConfig>
+{
+    /**
+     * 查询视频融合配置
+     * 
+     * @param autoId 视频融合配置主键
+     * @return 视频融合配置
+     */
+    public DeviceConfig selectDeviceConfigByAutoId(Long autoId);
+
+    /**
+     * 查询视频融合配置列表
+     * 
+     * @param deviceConfig 视频融合配置
+     * @return 视频融合配置集合
+     */
+    public List<DeviceConfig> selectDeviceConfigList(DeviceConfig deviceConfig);
+
+    /**
+     * 新增视频融合配置
+     * 
+     * @param deviceConfig 视频融合配置
+     * @return 结果
+     */
+    public int insertDeviceConfig(DeviceConfig deviceConfig);
+
+    /**
+     * 修改视频融合配置
+     * 
+     * @param deviceConfig 视频融合配置
+     * @return 结果
+     */
+    public int updateDeviceConfig(DeviceConfig deviceConfig);
+
+    /**
+     * 删除视频融合配置
+     * 
+     * @param autoId 视频融合配置主键
+     * @return 结果
+     */
+    public int deleteDeviceConfigByAutoId(Long autoId);
+
+    /**
+     * 批量删除视频融合配置
+     * 
+     * @param autoIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteDeviceConfigByAutoIds(Long[] autoIds);
+}

+ 77 - 0
jjt-admin/src/main/java/com/jjt/biz/service/IDeviceChannelsService.java

@@ -0,0 +1,77 @@
+package com.jjt.biz.service;
+
+import com.jjt.biz.domain.DeviceChannels;
+
+import java.util.List;
+
+/**
+ * 视频通道Service接口
+ *
+ * @author wukai
+ * @date 2025-10-14
+ */
+public interface IDeviceChannelsService {
+    /**
+     * 查询视频通道
+     *
+     * @param channelId 视频通道主键
+     * @return 视频通道
+     */
+    public DeviceChannels selectDeviceChannelsByChannelId(String channelId);
+
+    /**
+     * 查询视频通道列表
+     *
+     * @param deviceChannels 视频通道
+     * @return 视频通道集合
+     */
+    public List<DeviceChannels> selectDeviceChannelsList(DeviceChannels deviceChannels);
+
+    /**
+     * 新增视频通道
+     *
+     * @param deviceChannels 视频通道
+     * @return 结果
+     */
+    public int insertDeviceChannels(DeviceChannels deviceChannels);
+
+    /**
+     * 修改视频通道
+     *
+     * @param deviceChannels 视频通道
+     * @return 结果
+     */
+    public int updateDeviceChannels(DeviceChannels deviceChannels);
+
+    /**
+     * 批量删除视频通道
+     *
+     * @param channelIds 需要删除的视频通道主键集合
+     * @return 结果
+     */
+    public int deleteDeviceChannelsByChannelIds(String[] channelIds);
+
+    /**
+     * 删除视频通道信息
+     *
+     * @param channelId 视频通道主键
+     * @return 结果
+     */
+    public int deleteDeviceChannelsByChannelId(String channelId);
+
+    /**
+     * 同步通道数据
+     *
+     * @param deviceCode 设备编号
+     * @param list       通道数据
+     */
+    void sync(String deviceCode, List<DeviceChannels> list);
+
+    /**
+     * 根据设备编号查询通道数据
+     *
+     * @param deviceCode 设备编号
+     * @return 结果
+     */
+    List<DeviceChannels> findByCode(String deviceCode);
+}

+ 67 - 0
jjt-admin/src/main/java/com/jjt/biz/service/IDeviceConfigService.java

@@ -0,0 +1,67 @@
+package com.jjt.biz.service;
+
+import java.util.List;
+import com.jjt.biz.domain.DeviceConfig;
+
+/**
+ * 视频融合配置Service接口
+ *
+ * @author wukai
+ * @date 2025-10-14
+ */
+public interface IDeviceConfigService {
+    /**
+     * 查询视频融合配置
+     *
+     * @param autoId 视频融合配置主键
+     * @return 视频融合配置
+     */
+    public DeviceConfig selectDeviceConfigByAutoId(Long autoId);
+
+    /**
+     * 查询视频融合配置列表
+     *
+     * @param deviceConfig 视频融合配置
+     * @return 视频融合配置集合
+     */
+    public List<DeviceConfig> selectDeviceConfigList(DeviceConfig deviceConfig);
+
+    /**
+     * 新增视频融合配置
+     *
+     * @param deviceConfig 视频融合配置
+     * @return 结果
+     */
+    public int insertDeviceConfig(DeviceConfig deviceConfig);
+
+    /**
+     * 修改视频融合配置
+     *
+     * @param deviceConfig 视频融合配置
+     * @return 结果
+     */
+    public int updateDeviceConfig(DeviceConfig deviceConfig);
+
+    /**
+     * 批量删除视频融合配置
+     *
+     * @param autoIds 需要删除的视频融合配置主键集合
+     * @return 结果
+     */
+    public int deleteDeviceConfigByAutoIds(Long[] autoIds);
+
+    /**
+     * 删除视频融合配置信息
+     *
+     * @param autoId 视频融合配置主键
+     * @return 结果
+     */
+    public int deleteDeviceConfigByAutoId(Long autoId);
+
+    /**
+     * 同步设备信息
+     * @param autoId 设备ID
+     * @return 结果
+     */
+    int sync(Long autoId);
+}

+ 125 - 0
jjt-admin/src/main/java/com/jjt/biz/service/impl/DeviceChannelsServiceImpl.java

@@ -0,0 +1,125 @@
+package com.jjt.biz.service.impl;
+
+import com.jjt.biz.domain.DeviceChannels;
+import com.jjt.biz.mapper.DeviceChannelsMapper;
+import com.jjt.biz.service.IDeviceChannelsService;
+import com.jjt.common.utils.DateUtils;
+import org.apache.ibatis.session.ExecutorType;
+import org.apache.ibatis.session.SqlSession;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 视频通道Service业务层处理
+ *
+ * @author wukai
+ * @date 2025-10-14
+ */
+@Service
+public class DeviceChannelsServiceImpl implements IDeviceChannelsService {
+    @Resource
+    private DeviceChannelsMapper deviceChannelsMapper;
+    @Resource
+    private SqlSessionFactory factory;
+
+    /**
+     * 查询视频通道
+     *
+     * @param channelId 视频通道主键
+     * @return 视频通道
+     */
+    @Override
+    public DeviceChannels selectDeviceChannelsByChannelId(String channelId) {
+        return deviceChannelsMapper.selectDeviceChannelsByChannelId(channelId);
+    }
+
+    /**
+     * 查询视频通道列表
+     *
+     * @param deviceChannels 视频通道
+     * @return 视频通道
+     */
+    @Override
+    public List<DeviceChannels> selectDeviceChannelsList(DeviceChannels deviceChannels) {
+        return deviceChannelsMapper.selectDeviceChannelsList(deviceChannels);
+    }
+
+    /**
+     * 新增视频通道
+     *
+     * @param deviceChannels 视频通道
+     * @return 结果
+     */
+    @Override
+    public int insertDeviceChannels(DeviceChannels deviceChannels) {
+        deviceChannels.setCreateTime(DateUtils.getNowDate());
+        return deviceChannelsMapper.insertDeviceChannels(deviceChannels);
+    }
+
+    /**
+     * 修改视频通道
+     *
+     * @param deviceChannels 视频通道
+     * @return 结果
+     */
+    @Override
+    public int updateDeviceChannels(DeviceChannels deviceChannels) {
+        deviceChannels.setUpdateTime(DateUtils.getNowDate());
+        return deviceChannelsMapper.updateDeviceChannels(deviceChannels);
+    }
+
+    /**
+     * 批量删除视频通道
+     *
+     * @param channelIds 需要删除的视频通道主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDeviceChannelsByChannelIds(String[] channelIds) {
+        return deviceChannelsMapper.deleteDeviceChannelsByChannelIds(channelIds);
+    }
+
+    /**
+     * 删除视频通道信息
+     *
+     * @param channelId 视频通道主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDeviceChannelsByChannelId(String channelId) {
+        return deviceChannelsMapper.deleteDeviceChannelsByChannelId(channelId);
+    }
+
+    /**
+     * 同步通道数据
+     *
+     * @param deviceCode 设备编号
+     * @param list       通道数据
+     */
+    @Override
+    public void sync(String deviceCode, List<DeviceChannels> list) {
+        //先删除
+        deviceChannelsMapper.deleteDeviceChannelsByDeviceCode(deviceCode);
+        try (SqlSession sqlSession = factory.openSession(ExecutorType.BATCH, false)) {
+            if (list.size() > 0) {
+                DeviceChannelsMapper mapper = sqlSession.getMapper(DeviceChannelsMapper.class);
+                list.forEach(mapper::insertDeviceChannels);
+                sqlSession.commit();
+            }
+        }
+    }
+
+    /**
+     * 根据设备编号查询通道数据
+     *
+     * @param deviceCode 设备编号
+     * @return 结果
+     */
+    @Override
+    public List<DeviceChannels> findByCode(String deviceCode) {
+        return null;
+    }
+}

+ 149 - 0
jjt-admin/src/main/java/com/jjt/biz/service/impl/DeviceConfigServiceImpl.java

@@ -0,0 +1,149 @@
+package com.jjt.biz.service.impl;
+
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONObject;
+import com.jjt.biz.domain.DeviceChannels;
+import com.jjt.biz.domain.DeviceConfig;
+import com.jjt.biz.mapper.DeviceConfigMapper;
+import com.jjt.biz.service.IDeviceChannelsService;
+import com.jjt.biz.service.IDeviceConfigService;
+import com.jjt.biz.utils.DeviceUtils;
+import com.jjt.common.utils.DateUtils;
+import com.jjt.common.utils.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 视频融合配置Service业务层处理
+ *
+ * @author wukai
+ * @date 2025-10-14
+ */
+@Service
+public class DeviceConfigServiceImpl implements IDeviceConfigService {
+    @Resource
+    private DeviceConfigMapper deviceConfigMapper;
+    @Resource
+    private IDeviceChannelsService channelsService;
+
+    /**
+     * 查询视频融合配置
+     *
+     * @param autoId 视频融合配置主键
+     * @return 视频融合配置
+     */
+    @Override
+    public DeviceConfig selectDeviceConfigByAutoId(Long autoId) {
+        return deviceConfigMapper.selectDeviceConfigByAutoId(autoId);
+    }
+
+    /**
+     * 查询视频融合配置列表
+     *
+     * @param deviceConfig 视频融合配置
+     * @return 视频融合配置
+     */
+    @Override
+    public List<DeviceConfig> selectDeviceConfigList(DeviceConfig deviceConfig) {
+        return deviceConfigMapper.selectDeviceConfigList(deviceConfig);
+    }
+
+    /**
+     * 新增视频融合配置
+     *
+     * @param deviceConfig 视频融合配置
+     * @return 结果
+     */
+    @Override
+    public int insertDeviceConfig(DeviceConfig deviceConfig) {
+        int i = deviceConfigMapper.insertDeviceConfig(deviceConfig);
+        syncDeviceInfo(deviceConfig);
+        return i;
+    }
+
+    /**
+     * 修改视频融合配置
+     *
+     * @param deviceConfig 视频融合配置
+     * @return 结果
+     */
+    @Override
+    public int updateDeviceConfig(DeviceConfig deviceConfig) {
+        deviceConfig.setUpdateTime(DateUtils.getNowDate());
+        return deviceConfigMapper.updateDeviceConfig(deviceConfig);
+    }
+
+    /**
+     * 批量删除视频融合配置
+     *
+     * @param autoIds 需要删除的视频融合配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDeviceConfigByAutoIds(Long[] autoIds) {
+        return deviceConfigMapper.deleteDeviceConfigByAutoIds(autoIds);
+    }
+
+    /**
+     * 删除视频融合配置信息
+     *
+     * @param autoId 视频融合配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDeviceConfigByAutoId(Long autoId) {
+        return deviceConfigMapper.deleteDeviceConfigByAutoId(autoId);
+    }
+
+    /**
+     * 同步设备信息
+     *
+     * @param autoId 设备ID
+     * @return 结果
+     */
+    @Override
+    public int sync(Long autoId) {
+        DeviceConfig deviceConfig = deviceConfigMapper.selectDeviceConfigByAutoId(autoId);
+        syncDeviceInfo(deviceConfig);
+        return 1;
+    }
+
+    private void syncDeviceInfo(DeviceConfig deviceConfig) {
+        JSONObject jsonObject = DeviceUtils.searchDevice(deviceConfig.getDeviceCode());
+        JSONObject object = jsonObject.getJSONObject("data");
+        String status = object.getStr("status");
+        String name = object.getStr("name");
+        String manufacturer = object.getStr("manufacturer");
+        String model = object.getStr("model");
+        String registerTime = object.getStr("registerTime");
+        JSONArray channels = object.getJSONArray("channels");
+        deviceConfig.setDeviceName(name);
+        deviceConfig.setManufacturer(manufacturer);
+        deviceConfig.setModel(model);
+        deviceConfig.setStatus(status);
+        if (StringUtils.isNotEmpty(registerTime)) {
+            OffsetDateTime offsetDateTime = OffsetDateTime.parse(registerTime);
+            Date date = Date.from(offsetDateTime.toInstant());
+            deviceConfig.setCreateTime(date);
+        }
+        List<DeviceChannels> list = new ArrayList<>();
+        for (int i = 0; i < channels.size(); i++) {
+            JSONObject channel = channels.getJSONObject(i);
+            DeviceChannels deviceChannels = new DeviceChannels();
+            deviceChannels.setChannelId(channel.getStr("channelId"));
+            deviceChannels.setChannelName(channel.getStr("name"));
+            deviceChannels.setManufacturer(channel.getStr("manufacturer"));
+            deviceChannels.setModel(channel.getStr("model"));
+            deviceChannels.setStatus(channel.getStr("status"));
+            deviceChannels.setDeviceCode(deviceConfig.getDeviceCode());
+            list.add(deviceChannels);
+        }
+        channelsService.sync(deviceConfig.getDeviceCode(), list);
+        updateDeviceConfig(deviceConfig);
+    }
+}

+ 66 - 0
jjt-admin/src/main/java/com/jjt/biz/utils/DeviceUtils.java

@@ -0,0 +1,66 @@
+package com.jjt.biz.utils;
+
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
+import com.jjt.common.utils.DateUtils;
+
+import java.nio.charset.StandardCharsets;
+import java.time.OffsetDateTime;
+import java.util.Date;
+
+/**
+ * FlowsUtils$
+ *
+ * @author wukai
+ * @date 2025/10/12 11:40
+ */
+public class DeviceUtils {
+    private static final String BASE_URL = "http://47.108.159.150:8080";
+
+    public static void main(String[] args) {
+        // 将 ISO 8601 格式字符串转换为 Date 对象
+        String isoDateString = "2025-09-17T18:50:56.722+08:00";
+//        / 使用 OffsetDateTime 解析
+        OffsetDateTime offsetDateTime = OffsetDateTime.parse(isoDateString);
+        Date date = Date.from(offsetDateTime.toInstant());
+        System.out.println("转换后的日期: " + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, date));
+
+        Date start = DateUtils.parseDate("2025-01-01 10:00:00");
+        String code = "34020000001180000003";
+        JSONObject jsonObject = searchDevice(code);
+        JSONObject object = jsonObject.getJSONObject("data");
+        String status = object.getStr("status");
+        String name = object.getStr("name");
+        String manufacturer = object.getStr("manufacturer");
+        String model = object.getStr("model");
+        String registerTime = object.getStr("registerTime");
+        JSONArray channels = object.getJSONArray("channels");
+        System.err.println("设备编号: " + code + "\t设备名称:" + name + "\t设备厂商:" + manufacturer + "\t设备型号:" + model + "\t设备状态:" + status + "\t设备注册时间:" + registerTime + "\t设备通道:" + channels.size());
+        for (int i = 0; i < channels.size(); i++) {
+
+        }
+    }
+
+    public static JSONObject searchDevice(String code) {
+//        ,"641": "成都支撑中心"
+        String uri = BASE_URL + "/gb28181/api/devices/" + code;
+        HttpRequest request = HttpRequest.get(uri);
+        try (HttpResponse res = request.execute()) {
+            System.err.println("响应状态码: " + res.getStatus());
+            if (!res.isOk()) {
+                String errorMsg = new String(res.bodyBytes(), StandardCharsets.UTF_8);
+                System.err.println("错误响应内容: " + errorMsg);
+                throw new RuntimeException("请求失败,状态码: " + res.getStatus() + ",错误信息: " + errorMsg);
+            }
+            String result = new String(res.bodyBytes(), StandardCharsets.UTF_8);
+            return JSONUtil.parseObj(result, true);
+        } catch (Exception e) {
+            System.err.println("请求发生异常: " + e.getMessage());
+            e.printStackTrace();
+            return null;
+        }
+    }
+}

+ 142 - 0
jjt-admin/src/main/resources/mapper/biz/DeviceChannelsMapper.xml

@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jjt.biz.mapper.DeviceChannelsMapper">
+
+    <resultMap type="DeviceChannels" id="DeviceChannelsResult">
+        <result property="channelId" column="CHANNEL_ID"/>
+        <result property="channelName" column="CHANNEL_NAME"/>
+        <result property="houseName" column="HOUSE_NAME"/>
+        <result property="houseCode" column="HOUSE_CODE"/>
+        <result property="deviceName" column="DEVICE_NAME"/>
+        <result property="deviceCode" column="DEVICE_CODE"/>
+        <result property="manufacturer" column="MANUFACTURER"/>
+        <result property="model" column="MODEL"/>
+        <result property="status" column="STATUS"/>
+        <result property="createBy" column="CREATE_BY"/>
+        <result property="createTime" column="CREATE_TIME"/>
+        <result property="updateBy" column="UPDATE_BY"/>
+        <result property="updateTime" column="UPDATE_TIME"/>
+        <result property="remark" column="REMARK"/>
+    </resultMap>
+
+    <sql id="selectDeviceChannelsVo">
+        select CHANNEL_ID,
+               CHANNEL_NAME,
+               HOUSE_NAME,
+               HOUSE_CODE,
+               DEVICE_NAME,
+               DEVICE_CODE,
+               MANUFACTURER,
+               MODEL,
+               STATUS,
+               CREATE_BY,
+               CREATE_TIME,
+               UPDATE_BY,
+               UPDATE_TIME,
+               REMARK
+        from device_channels
+    </sql>
+
+    <select id="selectDeviceChannelsList" parameterType="DeviceChannels" resultMap="DeviceChannelsResult">
+        <include refid="selectDeviceChannelsVo"/>
+        <where>
+            <if test="channelName != null  and channelName != ''">and CHANNEL_NAME like concat('%', #{channelName},
+                '%')
+            </if>
+            <if test="houseName != null  and houseName != ''">and HOUSE_NAME like concat('%', #{houseName}, '%')</if>
+            <if test="houseCode != null  and houseCode != ''">and HOUSE_CODE = #{houseCode}</if>
+            <if test="deviceName != null  and deviceName != ''">and DEVICE_NAME like concat('%', #{deviceName}, '%')
+            </if>
+            <if test="deviceCode != null  and deviceCode != ''">and DEVICE_CODE = #{deviceCode}</if>
+            <if test="manufacturer != null  and manufacturer != ''">and MANUFACTURER = #{manufacturer}</if>
+            <if test="model != null  and model != ''">and MODEL = #{model}</if>
+            <if test="status != null  and status != ''">and STATUS = #{status}</if>
+            <if test="createBy != null  and createBy != ''">and CREATE_BY = #{createBy}</if>
+            <if test="createTime != null ">and CREATE_TIME = #{createTime}</if>
+            <if test="updateBy != null  and updateBy != ''">and UPDATE_BY = #{updateBy}</if>
+            <if test="updateTime != null ">and UPDATE_TIME = #{updateTime}</if>
+            <if test="remark != null  and remark != ''">and REMARK = #{remark}</if>
+        </where>
+    </select>
+
+    <select id="selectDeviceChannelsByChannelId" parameterType="String" resultMap="DeviceChannelsResult">
+        <include refid="selectDeviceChannelsVo"/>
+        where CHANNEL_ID = #{channelId}
+    </select>
+
+    <insert id="insertDeviceChannels" parameterType="DeviceChannels">
+        insert into device_channels
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="channelId != null">CHANNEL_ID,</if>
+            <if test="channelName != null">CHANNEL_NAME,</if>
+            <if test="houseName != null">HOUSE_NAME,</if>
+            <if test="houseCode != null">HOUSE_CODE,</if>
+            <if test="deviceName != null">DEVICE_NAME,</if>
+            <if test="deviceCode != null">DEVICE_CODE,</if>
+            <if test="manufacturer != null">MANUFACTURER,</if>
+            <if test="model != null">MODEL,</if>
+            <if test="status != null">STATUS,</if>
+            <if test="createBy != null">CREATE_BY,</if>
+            <if test="createTime != null">CREATE_TIME,</if>
+            <if test="updateBy != null">UPDATE_BY,</if>
+            <if test="updateTime != null">UPDATE_TIME,</if>
+            <if test="remark != null">REMARK,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="channelId != null">#{channelId},</if>
+            <if test="channelName != null">#{channelName},</if>
+            <if test="houseName != null">#{houseName},</if>
+            <if test="houseCode != null">#{houseCode},</if>
+            <if test="deviceName != null">#{deviceName},</if>
+            <if test="deviceCode != null">#{deviceCode},</if>
+            <if test="manufacturer != null">#{manufacturer},</if>
+            <if test="model != null">#{model},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+        </trim>
+    </insert>
+
+    <update id="updateDeviceChannels" parameterType="DeviceChannels">
+        update device_channels
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="channelName != null">CHANNEL_NAME = #{channelName},</if>
+            <if test="houseName != null">HOUSE_NAME = #{houseName},</if>
+            <if test="houseCode != null">HOUSE_CODE = #{houseCode},</if>
+            <if test="deviceName != null">DEVICE_NAME = #{deviceName},</if>
+            <if test="deviceCode != null">DEVICE_CODE = #{deviceCode},</if>
+            <if test="manufacturer != null">MANUFACTURER = #{manufacturer},</if>
+            <if test="model != null">MODEL = #{model},</if>
+            <if test="status != null">STATUS = #{status},</if>
+            <if test="createBy != null">CREATE_BY = #{createBy},</if>
+            <if test="createTime != null">CREATE_TIME = #{createTime},</if>
+            <if test="updateBy != null">UPDATE_BY = #{updateBy},</if>
+            <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
+            <if test="remark != null">REMARK = #{remark},</if>
+        </trim>
+        where CHANNEL_ID = #{channelId}
+    </update>
+
+    <delete id="deleteDeviceChannelsByChannelId" parameterType="String">
+        delete
+        from device_channels
+        where CHANNEL_ID = #{channelId}
+    </delete>
+
+    <delete id="deleteDeviceChannelsByChannelIds" parameterType="String">
+        delete from device_channels where CHANNEL_ID in
+        <foreach item="channelId" collection="array" open="(" separator="," close=")">
+            #{channelId}
+        </foreach>
+    </delete>
+    <delete id="deleteDeviceChannelsByDeviceCode">
+        delete
+        from device_channels
+        where DEVICE_CODE = #{deviceCode}
+    </delete>
+</mapper>

+ 113 - 0
jjt-admin/src/main/resources/mapper/biz/DeviceConfigMapper.xml

@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jjt.biz.mapper.DeviceConfigMapper">
+    
+    <resultMap type="DeviceConfig" id="DeviceConfigResult">
+        <result property="autoId"    column="AUTO_ID"    />
+        <result property="houseId"    column="HOUSE_ID"    />
+        <result property="houseName"    column="HOUSE_NAME"    />
+        <result property="houseCode"    column="HOUSE_CODE"    />
+        <result property="deviceName"    column="DEVICE_NAME"    />
+        <result property="deviceCode"    column="DEVICE_CODE"    />
+        <result property="manufacturer"    column="MANUFACTURER"    />
+        <result property="model"    column="MODEL"    />
+        <result property="status"    column="STATUS"    />
+        <result property="createBy"    column="CREATE_BY"    />
+        <result property="createTime"    column="CREATE_TIME"    />
+        <result property="updateBy"    column="UPDATE_BY"    />
+        <result property="updateTime"    column="UPDATE_TIME"    />
+        <result property="remark"    column="REMARK"    />
+    </resultMap>
+
+    <sql id="selectDeviceConfigVo">
+        select AUTO_ID, HOUSE_ID, HOUSE_NAME, HOUSE_CODE, DEVICE_NAME, DEVICE_CODE, MANUFACTURER, MODEL, STATUS, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK from device_config
+    </sql>
+
+    <select id="selectDeviceConfigList" parameterType="DeviceConfig" resultMap="DeviceConfigResult">
+        <include refid="selectDeviceConfigVo"/>
+        <where>  
+            <if test="houseId != null "> and HOUSE_ID = #{houseId}</if>
+            <if test="houseName != null  and houseName != ''"> and HOUSE_NAME like concat('%', #{houseName}, '%')</if>
+            <if test="houseCode != null  and houseCode != ''"> and HOUSE_CODE = #{houseCode}</if>
+            <if test="deviceName != null  and deviceName != ''"> and DEVICE_NAME like concat('%', #{deviceName}, '%')</if>
+            <if test="deviceCode != null  and deviceCode != ''"> and DEVICE_CODE = #{deviceCode}</if>
+            <if test="manufacturer != null  and manufacturer != ''"> and MANUFACTURER = #{manufacturer}</if>
+            <if test="model != null  and model != ''"> and MODEL = #{model}</if>
+            <if test="status != null  and status != ''"> and STATUS = #{status}</if>
+            <if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
+            <if test="updateBy != null  and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
+        </where>
+    </select>
+    
+    <select id="selectDeviceConfigByAutoId" parameterType="Long" resultMap="DeviceConfigResult">
+        <include refid="selectDeviceConfigVo"/>
+        where AUTO_ID = #{autoId}
+    </select>
+
+    <insert id="insertDeviceConfig" parameterType="DeviceConfig" useGeneratedKeys="true" keyProperty="autoId">
+        insert into device_config
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="houseId != null">HOUSE_ID,</if>
+            <if test="houseName != null and houseName != ''">HOUSE_NAME,</if>
+            <if test="houseCode != null">HOUSE_CODE,</if>
+            <if test="deviceName != null">DEVICE_NAME,</if>
+            <if test="deviceCode != null and deviceCode != ''">DEVICE_CODE,</if>
+            <if test="manufacturer != null">MANUFACTURER,</if>
+            <if test="model != null">MODEL,</if>
+            <if test="status != null">STATUS,</if>
+            <if test="createBy != null">CREATE_BY,</if>
+            <if test="createTime != null">CREATE_TIME,</if>
+            <if test="updateBy != null">UPDATE_BY,</if>
+            <if test="updateTime != null">UPDATE_TIME,</if>
+            <if test="remark != null">REMARK,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="houseId != null">#{houseId},</if>
+            <if test="houseName != null and houseName != ''">#{houseName},</if>
+            <if test="houseCode != null">#{houseCode},</if>
+            <if test="deviceName != null">#{deviceName},</if>
+            <if test="deviceCode != null and deviceCode != ''">#{deviceCode},</if>
+            <if test="manufacturer != null">#{manufacturer},</if>
+            <if test="model != null">#{model},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateDeviceConfig" parameterType="DeviceConfig">
+        update device_config
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="houseId != null">HOUSE_ID = #{houseId},</if>
+            <if test="houseName != null and houseName != ''">HOUSE_NAME = #{houseName},</if>
+            <if test="houseCode != null">HOUSE_CODE = #{houseCode},</if>
+            <if test="deviceName != null">DEVICE_NAME = #{deviceName},</if>
+            <if test="deviceCode != null and deviceCode != ''">DEVICE_CODE = #{deviceCode},</if>
+            <if test="manufacturer != null">MANUFACTURER = #{manufacturer},</if>
+            <if test="model != null">MODEL = #{model},</if>
+            <if test="status != null">STATUS = #{status},</if>
+            <if test="createBy != null">CREATE_BY = #{createBy},</if>
+            <if test="createTime != null">CREATE_TIME = #{createTime},</if>
+            <if test="updateBy != null">UPDATE_BY = #{updateBy},</if>
+            <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
+            <if test="remark != null">REMARK = #{remark},</if>
+        </trim>
+        where AUTO_ID = #{autoId}
+    </update>
+
+    <delete id="deleteDeviceConfigByAutoId" parameterType="Long">
+        delete from device_config where AUTO_ID = #{autoId}
+    </delete>
+
+    <delete id="deleteDeviceConfigByAutoIds" parameterType="String">
+        delete from device_config where AUTO_ID in 
+        <foreach item="autoId" collection="array" open="(" separator="," close=")">
+            #{autoId}
+        </foreach>
+    </delete>
+</mapper>