czt
3 天以前 0f2fc0872069f0a5099cc535e6ff885b13937153
网关配置页面
已重命名1个文件
已修改3个文件
已添加4个文件
752 ■■■■■ 文件已修改
fzzy-igdss-core/src/main/java/com/fzzy/igds/constant/RedisConst.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/GatewaySer.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/GatewaySerMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/GatewaySerService.java 248 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/GatewaySer.view.xml 283 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/GatewaySerPR.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/models/core.model.xml 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/security/SecurityController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/constant/RedisConst.java
@@ -85,6 +85,11 @@
    public static final String KEY_DEVICE_SER_LIST = "SER_LIST";
    /**
     * ç½‘å…³KEY
     */
    public static final String KEY_GATEWAY_SER_LIST = "GATEWAY_LIST";
    /**
     * è®¾å¤‡åˆ—表
     */
    public static final String KEY_DEVICE_LIST = "DEVICE_LIST";
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/GatewaySer.java
ÎļþÃû´Ó fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/SnapSer.java ÐÞ¸Ä
@@ -12,16 +12,16 @@
import java.io.Serializable;
/**
 * @Description æŠ“拍服务
 * @Description ç½‘关配置
 * @Author CZT
 * @Date 2025/11/25 19:43
 * @Date 2025/12/10 15:25
 */
@Data
@Entity
@Table(name = "d_snap_ser")
@TableName("d_snap_ser")
@Table(name = "d_gateway_ser")
@TableName("d_gateway_ser")
@EqualsAndHashCode(callSuper = false)
public class SnapSer extends BizBaseEntity implements Serializable {
public class GatewaySer extends BizBaseEntity implements Serializable {
    /**
     *
@@ -29,7 +29,7 @@
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "id", columnDefinition = "varchar(40) COMMENT '主键'")
    @Column(name = "id", columnDefinition = "varchar(40) COMMENT '网关ID'")
    @TableField("id")
    private String id;
@@ -37,30 +37,38 @@
    @TableField("dept_id")
    private String deptId;
    @Column(name = "sort", columnDefinition = "varchar(2) COMMENT '配套序号'")
    @TableField("sort")
    private String sort = "1";
    @Column(name = "sn", columnDefinition = "varchar(40) COMMENT '序列号'")
    @TableField("sn")
    private String sn;
    @Column(name = "name", columnDefinition = "varchar(40) COMMENT '设备名称'")
    @Column(name = "name", columnDefinition = "varchar(40) COMMENT '网关名称'")
    @TableField("name")
    private String name;
    @Column(name = "ip", columnDefinition = "varchar(20) COMMENT '设备IP'")
    @TableField("ip")
    private String ip;
    @Column(name = "port", columnDefinition = "int(5) COMMENT '端口'")
    @TableField("port")
    private Integer port;
    @Column(name = "status", columnDefinition = "varchar(2) COMMENT '是否在线'")
    @TableField("status")
    private String status = Constant.YN_N;
    @Column(name = "ip", columnDefinition = "varchar(20) COMMENT '网关IP'")
    @TableField("ip")
    private String ip;
    @Column(name = "port", columnDefinition = "int(5) COMMENT '网关端口'")
    @TableField("port")
    private Integer port;
    @Column(name = "snap_url", columnDefinition = "varchar(20) COMMENT '抓拍路径'")
    @TableField("snap_url")
    private String snapUrl;
    @Column(name = "ptz_url", columnDefinition = "varchar(20) COMMENT '云台路径'")
    @TableField("ptz_url")
    private String ptzUrl;
    @Column(name = "order_num", columnDefinition = "int(5) COMMENT '顺序号'")
    @TableField("order_num")
    private Integer orderNum = 1;
    @Column(name = "remark", columnDefinition = "varchar(100) COMMENT '备注说明'")
    @TableField("remark")
    private String remark;
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/GatewaySerMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
package com.fzzy.igds.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fzzy.igds.domain.GatewaySer;
import org.apache.ibatis.annotations.Mapper;
/**
 * @Description
 * @Author CZT
 * @Date 2025/12/10 16:48
 */
@Mapper
public interface GatewaySerMapper extends BaseMapper<GatewaySer> {
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/GatewaySerService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,248 @@
package com.fzzy.igds.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.constant.RedisConst;
import com.fzzy.igds.domain.GatewaySer;
import com.fzzy.igds.mapper.GatewaySerMapper;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.service.ISysDeptService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
/**
 * @Description
 * @Author CZT
 * @Date 2025/12/10 16:48
 */
@Slf4j
@Service
public class GatewaySerService {
    @Resource
    private GatewaySerMapper gatewaySerMapper;
    @Resource
    private ISysDeptService iSysDeptService;
    @Resource
    private RedisCache redisCache;
    /**
     * æ ¹æ®æ¡ä»¶æŸ¥è¯¢åˆ†æœºä¿¡æ¯
     *
     * @param companyId
     * @param deptId
     * @param parentId
     * @return
     */
    public List<GatewaySer> listDeviceSer(String companyId, String deptId, String parentId) {
        QueryWrapper<GatewaySer> queryWrapper = new QueryWrapper<>();
        if (StringUtils.isNotBlank(companyId)) {
            queryWrapper.eq("company_id", companyId);
        }
        if (StringUtils.isNotBlank(deptId)) {
            queryWrapper.eq("dept_id", deptId);
        }
        if (StringUtils.isNotBlank(parentId)) {
            queryWrapper.likeRight("dept_id", parentId);
        }
        return gatewaySerMapper.selectList(queryWrapper);
    }
    /**
     * æŸ¥è¯¢åˆ†æœºåˆ—表
     *
     * @return
     */
    public List<GatewaySer> getAllSer() {
        SysUser user = ContextUtil.getLoginUser();
        SysDept userDept = iSysDeptService.selectDeptById(user.getDeptId());
        if (Constant.DEPT_TYPE_20.equals(userDept.getType())) {
            return this.listDeviceSer(null, user.getDeptId() + "", null);
        } else {
            return this.listDeviceSer(null, null, user.getDeptId() + "");
        }
    }
    /**
     * æ ¹æ®æ¡ä»¶æŸ¥è¯¢åˆ†æœºä¿¡æ¯
     *
     * @param id
     * @return
     */
    public GatewaySer getById(String id) {
        if(StringUtils.isBlank( id)){
            return null;
        }
        return gatewaySerMapper.selectById(id);
    }
    /**
     * æ›´æ–°ä¿å­˜åˆ†æœº
     *
     * @param ser
     */
    public void saveSer(GatewaySer ser) {
        if (null == ser.getSn()) {
            ser.setSn(ser.getId());
        }
        if(null == ser.getOrderNum()){
            ser.setOrderNum(1);
        }
        if (StringUtils.isEmpty(ser.getCompanyId())) {
            ser.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(ser.getDeptId())) {
            ser.setDeptId(ContextUtil.subDeptId(null));
        }
        if (StringUtils.isBlank(ser.getUpdateBy())) {
            ser.setCreateBy(ContextUtil.getLoginUserName());
            ser.setCreateTime(new Date());
            ser.setUpdateBy(ContextUtil.getLoginUserName());
            ser.setUpdateTime(new Date());
            gatewaySerMapper.insert(ser);
        } else {
            ser.setUpdateBy(ContextUtil.getLoginUserName());
            ser.setUpdateTime(new Date());
            gatewaySerMapper.updateById(ser);
        }
        refreshCache(ser.getCompanyId());
    }
    /**
     * æ›´æ–°ä¿å­˜åˆ†æœº
     *
     * @param ser
     */
    public void delSer(GatewaySer ser) {
        gatewaySerMapper.deleteById(ser);
        //删除缓存
        delCache(ser);
    }
    /**
     * æ ¹æ®åˆ†æœºID获取分机信息
     *
     * @param companyId
     * @param deptId
     * @return
     */
    public List<GatewaySer> getCacheSerByDeptId(String companyId, String deptId) {
        if (StringUtils.isEmpty(deptId)) {
            return null;
        }
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        String patten = RedisConst.buildKey(companyId, RedisConst.KEY_DEVICE_SER_LIST, deptId) + "*";
        Collection<String> keys = redisCache.keys(patten);
        if (null == keys) {
            return null;
        }
        List<GatewaySer> list = new ArrayList<>();
        for (String key : keys) {
            list.add((GatewaySer) redisCache.getCacheObject(key));
        }
        return list;
    }
    /**
     * æ ¹æ®åˆ†æœºID获取分机信息
     *
     * @param companyId
     * @param id
     * @return
     */
    public GatewaySer getCacheSerById(String companyId, String id) {
        if (StringUtils.isEmpty(id)) {
            return null;
        }
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        String patten = RedisConst.buildKey(companyId, RedisConst.KEY_DEVICE_SER_LIST) + "*";
        Collection<String> keys = redisCache.keys(patten);
        if (null == keys) {
            return null;
        }
        List<GatewaySer> list = new ArrayList<>();
        GatewaySer ser = null;
        for (String key : keys) {
            ser = (GatewaySer) redisCache.getCacheObject(key);
            if(id.equals(ser.getId())){
                break;
            }
        }
        if(null == ser){
            ser = getById(id);
            this.setCacheSer(ser);
        }
        return ser;
    }
    /**
     * åˆ·æ–°ç¼“å­˜
     *
     * @param companyId
     */
    public void refreshCache(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        List<GatewaySer> list = this.listDeviceSer(companyId, null, null);
        this.setCacheSer(list);
    }
    /**
     * è®¾ç½®ç¼“å­˜
     * @param data
     */
    public void setCacheSer(GatewaySer data) {
        if (null == data) {
            return;
        }
        String key = RedisConst.buildKey(data.getCompanyId(), RedisConst.KEY_GATEWAY_SER_LIST, data.getDeptId(), data.getId());
        redisCache.setCacheObject(key, data);
    }
    /**
     * è®¾ç½®ç¼“å­˜
     * @param data
     */
    public void setCacheSer(List<GatewaySer> data) {
        if (null == data) {
            return;
        }
        for (GatewaySer ser : data) {
            this.setCacheSer( ser);
        }
    }
    /**
     * åˆ é™¤ç¼“存信息
     * @param ser
     */
    public void delCache(GatewaySer ser) {
        if (null == ser) {
            return;
        }
        String key = RedisConst.buildKey(ser.getCompanyId(), RedisConst.KEY_GATEWAY_SER_LIST, ser.getDeptId(), ser.getId());
        redisCache.deleteObject(key);
    }
}
fzzy-igdss-view/src/main/java/com/fzzy/igds/GatewaySer.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,283 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model/>
  <View layout="padding:10">
    <ClientEvent name="onReady">&#xD;
addData = function(){&#xD;
    view.get(&quot;#dsGatewaySer&quot;).insert();&#xD;
    view.get(&quot;#dialog1&quot;).set(&quot;caption&quot;,&quot;网关信息&quot;);&#xD;
&#xD;
    view.get(&quot;#dialog1&quot;).show();&#xD;
};&#xD;
&#xD;
delData = function(){&#xD;
    var cur = view.get(&quot;#dsGatewaySer.data:#&quot;);&#xD;
    if(!cur) return;&#xD;
    cur.setState(dorado.Entity.STATE_DELETED);&#xD;
    $confirm(&quot;确定要删除该数据么?&quot;,function(){&#xD;
        view.get(&quot;#uaSave&quot;).execute(function(){&#xD;
            cur.remove();&#xD;
        });&#xD;
    });&#xD;
};&#xD;
&#xD;
btnCancel = function(){&#xD;
    view.get(&quot;#dialog1&quot;).hide();&#xD;
};&#xD;
&#xD;
onDialogHide = function(){&#xD;
    var cur = view.get(&quot;#dsGatewaySer.data:#&quot;);&#xD;
    cur.cancel();&#xD;
};</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <Property name="cache">
      <Property name="mode">clientSide</Property>
    </Property>
    <DataSet id="dsGatewaySer">
      <Property name="parameter"></Property>
      <Property name="dataProvider">gatewaySerPR#getAllSer</Property>
      <Property name="dataType">[dtGatewaySer]</Property>
    </DataSet>
    <Container>
      <Property name="className">c-param</Property>
      <ToolBar>
        <ToolBarButton>
          <ClientEvent name="onClick">addData();</ClientEvent>
            <Property name="caption">新增</Property>
            <Property name="exClassName">btn1</Property>
            <Property name="width">100</Property>
            <Property name="iconClass">fa fa-plus</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">&#xD;
var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#dialog1&quot;).show();&#xD;
}else{&#xD;
    $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
}</ClientEvent>
          <Property name="caption">修改</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-pencil-square-o</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">
var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#ajaxActionDel&quot;).set(&quot;parameter&quot;,{&#xD;id: select.get(&quot;id&quot;)&#xD;
        }).execute(function(){&#xD;
        select.remove();&#xD;
    });&#xD;
}else{&#xD;
    $notify(&quot;请选择需要删除的数据……&quot;);&#xD;
}&#xD;</ClientEvent>
          <Property name="caption">删除</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-times</Property>
          <Property name="action">ajaxActionDel</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">view.get(&quot;#dsGatewaySer&quot;).flushAsync();&#xD;
          </ClientEvent>
          <Property name="caption">刷新数据</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-refresh</Property>
        </ToolBarButton>
        <ToolBarButton>
          <Property name="caption">刷新缓存</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-refresh</Property>
          <Property name="width">100</Property>
          <Property name="action">ajaxRefreshCache</Property>
        </ToolBarButton>
      </ToolBar>
      <DataGrid id="dataGridMain" layoutConstraint="padding:8">
        <ClientEvent name="onDataRowClick">view.get(&quot;#dataGridMain&quot;).set(&quot;selection&quot;,arg.data);</ClientEvent>
        <Property name="dataSet">dsGatewaySer</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <RowSelectorColumn/>
        <RowNumColumn/>
        <DataColumn name="id">
          <Property name="property">id</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="name">
          <Property name="property">name</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="deptId">
          <Property name="property">deptId</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="ip">
          <Property name="property">ip</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="port">
          <Property name="property">port</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="status">
          <ClientEvent name="onRenderCell">arg.dom.style.background = arg.data.get(&quot;status&quot;)== 'Y' ?&quot;&quot;:&quot;#FF5722&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">status</Property>
          <Property name="align">center</Property>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn name="updateBy">
          <Property name="property">updateBy</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="updateTime">
          <Property name="property">updateTime</Property>
          <Property name="align">center</Property>
          <Property name="width">180</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Dialog id="dialog1" layout="regionPadding:8">
      <ClientEvent name="onHide">onDialogHide();</ClientEvent>
      <Property name="iconClass">fa fa-tasks</Property>
      <Property name="width">1200</Property>
      <Property name="caption">网关信息</Property>
      <Property name="closeable">false</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">var cur = view.get(&quot;#dsGatewaySer.data:#&quot;);&#xD;
if(cur.validate() == 'ok'){&#xD;
    view.get(&quot;#updateAction&quot;).execute(function(){&#xD;
        view.get(&quot;#dialog1&quot;).close();&#xD;
    });&#xD;
}else{&#xD;
    $alert(&quot;数据校验失败!&quot;);&#xD;
}</ClientEvent>
          <Property name="caption">保存</Property>
          <Property name="iconClass">fa fa-check-circle</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">120</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">btnCancel();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-times-circle</Property>
          <Property name="width">120</Property>
        </Button>
      </Buttons>
      <Children>
        <FieldSet layout="padding:5">
          <Property name="caption">基本信息</Property>
          <Buttons/>
          <Children>
            <AutoForm>
              <Property name="dataSet">dsGatewaySer</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelAlign">right</Property>
              <Property name="labelWidth">100</Property>
              <AutoFormElement>
                <Property name="name">id</Property>
                <Property name="property">id</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">name</Property>
                <Property name="property">name</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">deptId</Property>
                <Property name="property">deptId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">sn</Property>
                <Property name="property">sn</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">ip</Property>
                <Property name="property">ip</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">port</Property>
                <Property name="property">port</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">snapUrl</Property>
                <Property name="property">snapUrl</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">status</Property>
                <Property name="property">status</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">ptzUrl</Property>
                <Property name="property">ptzUrl</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">orderNum</Property>
                <Property name="property">orderNum</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">remark</Property>
                <Property name="property">remark</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">createBy</Property>
                <Property name="property">createBy</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">createTime</Property>
                <Property name="property">createTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">updateBy</Property>
                <Property name="property">updateBy</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">updateTime</Property>
                <Property name="property">updateTime</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="updateAction">
      <Property name="dataResolver">gatewaySerPR#updateSer</Property>
      <UpdateItem>
        <Property name="dataSet">dsGatewaySer</Property>
        <Property name="dataPath">[#current]</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxActionDel">
      <Property name="service">gatewaySerPR#delSerById</Property>
      <Property name="confirmMessage">确定要删除么?</Property>
      <Property name="executingMessage">正在删除</Property>
      <Property name="successMessage">删除成功</Property>
    </AjaxAction>
    <AjaxAction id="ajaxRefreshCache">
      <Property name="service">gatewaySerPR#refreshCache</Property>
      <Property name="successMessage">刷新成功!</Property>
      <Property name="confirmMessage">确定要刷新缓存么?</Property>
    </AjaxAction>
  </View>
</ViewConfig>
fzzy-igdss-view/src/main/java/com/fzzy/igds/GatewaySerPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
package com.fzzy.igds;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.igds.domain.GatewaySer;
import com.fzzy.igds.service.GatewaySerService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2025/12/10 16:48
 */
@Component
public class GatewaySerPR {
    @Resource
    private GatewaySerService gatewaySerService;
    /**
     * gatewaySerPR#getAllSer
     *
     * @return
     */
    @DataProvider
    public List<GatewaySer> getAllSer() {
        return gatewaySerService.getAllSer();
    }
    /**
     * deviceSerPR#updateSer
     *
     * @param data
     */
    @DataResolver
    public void updateSer(GatewaySer data) {
        GatewaySer ser = new GatewaySer();
        BeanUtils.copyProperties(data, ser);
        gatewaySerService.saveSer(ser);
    }
    /**
     * æ ¹æ®åˆ†æœºid和名称删除分机
     */
    @Expose
    @Transactional
    public void delSerById(String id) {
        GatewaySer ser = gatewaySerService.getById(id);
        gatewaySerService.delSer(ser);
    }
    /**
     * deviceSerPR#refreshCache
     *
     * @throws
     * @Title: refreshCache
     * @Description: åˆ·æ–°ç¼“å­˜ void
     */
    @Expose
    public void refreshCache() {
        gatewaySerService.refreshCache(null);
    }
}
fzzy-igdss-view/src/main/java/models/core.model.xml
@@ -1325,4 +1325,88 @@
      <Property name="readOnly">true</Property>
    </PropertyDef>
  </DataType>
  <DataType name="dtGatewaySer">
    <Property name="creationType">com.fzzy.igds.domain.GatewaySer</Property>
    <PropertyDef name="id">
      <Property></Property>
      <Property name="label">网关ID</Property>
    </PropertyDef>
    <PropertyDef name="deptId">
      <Property></Property>
      <Property name="label">所属库区</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#getAllData&quot;).getResult()}</Property>
        <Property name="keyProperty">id</Property>
        <Property name="valueProperty">kqmc</Property>
      </Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="companyId">
      <Property></Property>
      <Property name="label">组织编码</Property>
    </PropertyDef>
    <PropertyDef name="sn">
      <Property></Property>
      <Property name="label">序列号</Property>
    </PropertyDef>
    <PropertyDef name="name">
      <Property></Property>
      <Property name="label">网关名称</Property>
    </PropertyDef>
    <PropertyDef name="ip">
      <Property></Property>
      <Property name="label">网关IP</Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="port">
      <Property name="dataType">Integer</Property>
      <Property name="label">网关端口</Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="status">
      <Property></Property>
      <Property name="label">是否在线</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;sys_yes_no&quot;)}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="orderNum">
      <Property name="dataType">Integer</Property>
      <Property name="label">顺序号</Property>
    </PropertyDef>
    <PropertyDef name="snapUrl">
      <Property></Property>
      <Property name="label">抓拍路径</Property>
    </PropertyDef>
    <PropertyDef name="ptzUrl">
      <Property></Property>
      <Property name="label">云台路径</Property>
    </PropertyDef>
    <PropertyDef name="remark">
      <Property></Property>
      <Property name="label">备注</Property>
    </PropertyDef>
    <PropertyDef name="createTime">
      <Property name="dataType">DateTime</Property>
      <Property name="label">创建时间</Property>
      <Property name="readOnly">true</Property>
    </PropertyDef>
    <PropertyDef name="createBy">
      <Property></Property>
      <Property name="label">创建人</Property>
      <Property name="readOnly">true</Property>
    </PropertyDef>
    <PropertyDef name="updateTime">
      <Property name="dataType">DateTime</Property>
      <Property name="label">更新时间</Property>
      <Property name="readOnly">true</Property>
    </PropertyDef>
    <PropertyDef name="updateBy">
      <Property></Property>
      <Property name="label">更新人</Property>
      <Property name="readOnly">true</Property>
    </PropertyDef>
  </DataType>
</Model>
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/security/SecurityController.java
@@ -104,7 +104,7 @@
        String viewUrl = prefix + "/video-webrtc";
        //WEB-RTC大华播放
        //WEB-RTC播放
        if (CameraPlayType.PLAY_TYPE_WEB_RTC.getCode().equals(playType)) {
            viewUrl = prefix + "/video-webrtc";
        }