From 2f432f52c1cfb1567dadcf6e040c5d38b0a26a79 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期五, 28 十一月 2025 17:31:49 +0800
Subject: [PATCH] 数量检测配置页面
---
fzzy-igdss-view/src/main/java/com/fzzy/igds/QuantityConfPR.java | 68 +++
fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/QuantityConfRepository.java | 53 ++
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/QuantityService.java | 239 ++++++++++++
fzzy-igdss-view/src/main/java/com/fzzy/igds/QuantityConf.view.xml | 741 +++++++++++++++++++++++++++++++++++++++
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/QuantityConf.java | 4
5 files changed, 1,103 insertions(+), 2 deletions(-)
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/QuantityConf.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/QuantityConf.java
index b2225c6..e99f75f 100644
--- a/fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/QuantityConf.java
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/QuantityConf.java
@@ -14,8 +14,8 @@
*/
@Data
@Entity
-@Table(name = "d_quantity")
-@TableName("d_quantity")
+@Table(name = "d_quantity_conf")
+@TableName("d_quantity_conf")
@EqualsAndHashCode(callSuper = false)
public class QuantityConf extends BizBaseEntity implements Serializable {
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/QuantityConfRepository.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/QuantityConfRepository.java
new file mode 100644
index 0000000..3897304
--- /dev/null
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/QuantityConfRepository.java
@@ -0,0 +1,53 @@
+package com.fzzy.igds.repository;
+
+import com.fzzy.igds.domain.QuantityConf;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @Description
+ * @Author CZT
+ * @Date 2025/11/28 16:52
+ */
+@Service
+public interface QuantityConfRepository extends JpaRepository<QuantityConf, String> {
+
+
+ /**
+ * 鏍规嵁缁勭粐缂栫爜鍜屽簱鍖虹紪鐮佽幏鍙栦粨搴撹揣浣嶄俊鎭�
+ *
+ * @param companyId
+ * @param deptId
+ * @return
+ */
+ @Query("from QuantityConf where companyId =:companyId and deptId =:deptId order by depotId")
+ List<QuantityConf> listQuantityConf(@Param("companyId") String companyId, @Param("deptId") String deptId);
+
+ /**
+ * 鏍规嵁缁勭粐缂栫爜鑾峰彇浠撳簱璐т綅淇℃伅
+ *
+ * @param companyId
+ * @return
+ */
+ @Query("from QuantityConf where companyId =:companyId order by depotId")
+ List<QuantityConf> listQuantityConf(@Param("companyId") String companyId);
+
+
+ /**
+ * 鏇存柊閰嶇疆鐘舵��
+ * @param ip
+ * @param port
+ * @param status
+ * @param sn
+ */
+ @Transactional
+ @Modifying
+ @Query("update QuantityConf set ip =:ip,port =:port,status =:status where sn =:sn")
+ void updateConfStatus(@Param("ip") String ip, @Param("port") Integer port, @Param("status") String status, @Param("sn") String sn);
+}
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/QuantityService.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/QuantityService.java
new file mode 100644
index 0000000..b50bdb5
--- /dev/null
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/QuantityService.java
@@ -0,0 +1,239 @@
+package com.fzzy.igds.service;
+
+import com.fzzy.igds.constant.RedisConst;
+import com.fzzy.igds.domain.QuantityConf;
+import com.fzzy.igds.repository.QuantityConfRepository;
+import com.fzzy.igds.utils.ContextUtil;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.utils.StringUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description
+ * @Author CZT
+ * @Date 2025/11/28 16:55
+ */
+@Slf4j
+@Service
+public class QuantityService {
+
+ @Resource
+ private QuantityConfRepository quantityConfRepository;
+ @Resource
+ private RedisCache redisCache;
+
+ /**
+ * JPA - 鏌ヨ閰嶇疆淇℃伅锛屾牴鎹簱鍖虹紪鐮佽幏鍙�
+ *
+ * @param companyId
+ * @param deptId
+ * @return
+ */
+ public List<QuantityConf> getConfList(String companyId, String deptId) {
+ if (StringUtils.isEmpty(companyId)) {
+ companyId = ContextUtil.getCompanyId();
+ }
+
+ if (StringUtils.isEmpty(deptId)) {
+ deptId = ContextUtil.subDeptId(null);
+ }
+ return quantityConfRepository.listQuantityConf(companyId, deptId);
+ }
+
+ /**
+ * JPA - 鏌ヨ閰嶇疆淇℃伅锛屾牴鎹粍缁囩紪鐮佽幏鍙�
+ *
+ * @param companyId
+ * @return
+ */
+ public List<QuantityConf> getConfList(String companyId) {
+ if (StringUtils.isEmpty(companyId)) {
+ companyId = ContextUtil.getCompanyId();
+ }
+
+ return quantityConfRepository.listQuantityConf(companyId);
+ }
+
+ /**
+ * JPA - 鏇存柊淇濆瓨鏁版嵁
+ *
+ * @param conf
+ */
+ public void saveConf(QuantityConf conf) {
+ if (StringUtils.isEmpty(conf.getDepotId())) {
+ return;
+ }
+ if (StringUtils.isEmpty(conf.getCompanyId())) {
+ conf.setCompanyId(ContextUtil.getCompanyId());
+ }
+ if (StringUtils.isEmpty(conf.getDeptId())) {
+ conf.setDeptId(ContextUtil.subDeptId(null));
+ conf.setCreateBy(ContextUtil.getLoginUserName());
+ conf.setCreateTime(new Date());
+ }
+ conf.setUpdateBy(ContextUtil.getLoginUserName());
+ conf.setUpdateTime(new Date());
+ quantityConfRepository.save(conf);
+ //鍒锋柊缂撳瓨
+ setCacheQuantityConf(conf);
+ }
+
+ /**
+ * JPA- 鏇存柊閰嶇疆鍜嬫贩涓お
+ *
+ * @param conf
+ */
+ public void updateQuantityConfBySn(QuantityConf conf) {
+ //鏇存柊鐘舵��
+ quantityConfRepository.updateConfStatus(conf.getIp(), conf.getPort(), conf.getStatus(), conf.getSn());
+
+ setCacheQuantityConf(conf);
+ }
+
+ /**
+ * JPA - 鍒犻櫎鏁版嵁
+ *
+ * @param conf
+ * @return
+ */
+ public String delQuantityConf(QuantityConf conf) {
+ quantityConfRepository.delete(conf);
+ //鍒犻櫎閰嶇疆淇℃伅
+
+ flushConfCache(conf.getCompanyId(), conf.getDeptId());
+ return null;
+ }
+
+ /**
+ * 鍒锋柊缂撳瓨
+ *
+ * @param companyId
+ * @param deptId
+ */
+ public void flushConfCache(String companyId, String deptId) {
+ if (StringUtils.isEmpty(companyId)) {
+ companyId = ContextUtil.getCompanyId();
+ }
+ if (StringUtils.isEmpty(deptId)) {
+ deptId = ContextUtil.subDeptId(null);
+ }
+ List<QuantityConf> list = this.getConfList(companyId, deptId);
+
+ this.setCacheQuantityConf(list);
+ }
+
+ /**
+ * 璁剧疆缂撳瓨
+ *
+ * @param list
+ */
+ public void setCacheQuantityConf(List<QuantityConf> list) {
+ if (null == list || list.isEmpty()) {
+ return;
+ }
+ String key;
+ for (QuantityConf conf : list) {
+ if (StringUtils.isEmpty(conf.getSn())) {
+ conf.setSn(conf.getYtIp());
+ }
+ key = RedisConst.buildKeyByPrefix(RedisConst.KEY_QUANTITY_CONF, conf.getSn());
+ redisCache.setCacheObject(key, conf);
+ }
+ }
+
+ /**
+ * 璁剧疆缂撳瓨
+ *
+ * @param conf
+ */
+ public void setCacheQuantityConf(QuantityConf conf) {
+ if (StringUtils.isEmpty(conf.getSn())) {
+ conf.setSn(conf.getYtIp());
+ }
+ String key = RedisConst.buildKeyByPrefix(RedisConst.KEY_QUANTITY_CONF, conf.getSn());
+ redisCache.setCacheObject(key, conf);
+ }
+
+ /**
+ * 鑾峰彇鎵�鏈夐厤缃紦瀛�
+ *
+ * @return
+ */
+ public List<QuantityConf> getCacheConfList(String companyId) {
+
+ String pattern = RedisConst.buildKeyByPrefix(RedisConst.KEY_QUANTITY_CONF, null) + "*";
+ Collection<String> keys = redisCache.keys(pattern);
+ if (null == keys || keys.isEmpty()) {
+ return null;
+ }
+ List<QuantityConf> list = new ArrayList<>();
+ QuantityConf conf;
+ for (String key : keys) {
+ conf = (QuantityConf) redisCache.getCacheObject(key);
+ if (null == conf) {
+ continue;
+ }
+ list.add(conf);
+ }
+ if (list.isEmpty()) {
+ if (StringUtils.isEmpty(companyId)) {
+ companyId = ContextUtil.getCompanyId();
+ }
+ list = this.getConfList(companyId);
+ this.setCacheQuantityConf(list);
+ }
+ return list;
+ }
+
+ /**
+ * 鏍规嵁浠撳簱缂栫爜鑾峰彇鑾峰彇缂撳瓨
+ *
+ * @param companyId
+ * @param depotId
+ * @return
+ */
+ public QuantityConf getCacheQuantityConf(String companyId, String depotId) {
+ if (StringUtils.isEmpty(depotId)) {
+ return null;
+ }
+ List<QuantityConf> list = getCacheConfList(companyId);
+ if (null == list || list.isEmpty()) {
+ return null;
+ }
+ for (QuantityConf conf : list) {
+ if (conf.getCompanyId().equals(companyId) && conf.getDepotId().equals(depotId)) {
+ return conf;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * 鏍规嵁SN鑾峰彇閰嶇疆淇℃伅
+ *
+ * @param sn
+ * @return
+ */
+ public QuantityConf getCacheQuantityConfBySn(String sn) {
+ if (StringUtils.isEmpty(sn)) {
+ return null;
+ }
+ List<QuantityConf> list = getCacheConfList(null);
+ if (null == list || list.isEmpty()) {
+ return null;
+ }
+ for (QuantityConf conf : list) {
+ if (conf.getSn().equals(sn)) {
+ return conf;
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/QuantityConf.view.xml b/fzzy-igdss-view/src/main/java/com/fzzy/igds/QuantityConf.view.xml
new file mode 100644
index 0000000..4ee057f
--- /dev/null
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/QuantityConf.view.xml
@@ -0,0 +1,741 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ViewConfig>
+ <Arguments/>
+ <Context/>
+ <Model>
+ <DataType name="dtQuantityConf">
+ <Property name="creationType">com.fzzy.igds.domain.QuantityConf</Property>
+ <PropertyDef name="companyId">
+ <Property></Property>
+ <Property name="label">缁勭粐缂栫爜</Property>
+ </PropertyDef>
+ <PropertyDef name="depotId">
+ <Property></Property>
+ <Property name="label">鎵�灞炰粨搴�</Property>
+ <Property name="mapping">
+ <Property name="mapValues">${dorado.getDataProvider("depotPR#getAllCache").getResult()}</Property>
+ <Property name="keyProperty">id</Property>
+ <Property name="valueProperty">name</Property>
+ </Property>
+ </PropertyDef>
+ <PropertyDef name="deptId">
+ <Property></Property>
+ <Property name="label">鎵�灞炲垎搴�</Property>
+ <Property name="mapping">
+ <Property name="mapValues">${dorado.getDataProvider("deptPR#getAllData").getResult()}</Property>
+ <Property name="keyProperty">id</Property>
+ <Property name="valueProperty">kqmc</Property>
+ </Property>
+ </PropertyDef>
+ <PropertyDef name="name">
+ <Property></Property>
+ <Property name="label">璁惧鍚嶇О</Property>
+ </PropertyDef>
+ <PropertyDef name="sn">
+ <Property></Property>
+ <Property name="label">璁惧搴忓垪鍙�</Property>
+ </PropertyDef>
+ <PropertyDef name="ip">
+ <Property></Property>
+ <Property name="label">閫氳IP</Property>
+ </PropertyDef>
+ <PropertyDef name="port">
+ <Property></Property>
+ <Property name="label">閫氳绔彛</Property>
+ <Property name="dataType">Integer</Property>
+ </PropertyDef>
+ <PropertyDef name="loginId">
+ <Property></Property>
+ <Property name="label">鐧诲綍璐﹀彿</Property>
+ </PropertyDef>
+ <PropertyDef name="pwd">
+ <Property></Property>
+ <Property name="label">鐧诲綍瀵嗙爜</Property>
+ </PropertyDef>
+ <PropertyDef name="status">
+ <Property></Property>
+ <Property name="label">鏄惁鍦ㄧ嚎</Property>
+ <Property name="mapping">
+ <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("sys_yes_no")}</Property>
+ <Property name="keyProperty">dictValue</Property>
+ <Property name="valueProperty">dictLabel</Property>
+ </Property>
+ </PropertyDef>
+ <PropertyDef name="protocol">
+ <Property></Property>
+ <Property name="label">閫氳鍗忚</Property>
+ <Property name="mapping">
+ <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("PROTOCOL")}</Property>
+ <Property name="keyProperty">dictValue</Property>
+ <Property name="valueProperty">dictLabel</Property>
+ </Property>
+ </PropertyDef>
+ <PropertyDef name="length1">
+ <Property name="dataType">Double</Property>
+ <Property name="label">璺濈1</Property>
+ </PropertyDef>
+ <PropertyDef name="length2">
+ <Property name="dataType">Double</Property>
+ <Property name="label">璺濈2</Property>
+ </PropertyDef>
+ <PropertyDef name="length3">
+ <Property name="dataType">Double</Property>
+ <Property name="label">璺濈3</Property>
+ </PropertyDef>
+ <PropertyDef name="length4">
+ <Property name="dataType">Double</Property>
+ <Property name="label">璺濈4</Property>
+ </PropertyDef>
+ <PropertyDef name="width">
+ <Property name="dataType">Double</Property>
+ <Property name="label">浠撴埧瀹�</Property>
+ </PropertyDef>
+ <PropertyDef name="height">
+ <Property name="dataType">Double</Property>
+ <Property name="label">鎺㈠ご楂�</Property>
+ </PropertyDef>
+ <PropertyDef name="lineHeight">
+ <Property name="dataType">Double</Property>
+ <Property name="label">鍫嗙伯绾块珮</Property>
+ </PropertyDef>
+ <PropertyDef name="ytIp">
+ <Property></Property>
+ <Property name="label">鐩戞帶ip</Property>
+ </PropertyDef>
+ <PropertyDef name="cameraSn">
+ <Property></Property>
+ <Property name="label">鐩戞帶SN</Property>
+ </PropertyDef>
+ <PropertyDef name="portCtrl">
+ <Property></Property>
+ <Property name="label">鎺у埗绔彛</Property>
+ <Property name="dataType">Integer</Property>
+ </PropertyDef>
+ <PropertyDef name="portWeb">
+ <Property></Property>
+ <Property name="label">web绔彛</Property>
+ <Property name="dataType">Integer</Property>
+ </PropertyDef>
+ <PropertyDef name="playType">
+ <Property></Property>
+ <Property name="label">鎾斁鏂瑰紡</Property>
+ <Property name="mapping">
+ <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerPlayType").getResult()}</Property>
+ <Property name="keyProperty">dictValue</Property>
+ <Property name="valueProperty">dictLabel</Property>
+ </Property>
+ <Property name="required">true</Property>
+ </PropertyDef>
+ <PropertyDef name="snapType">
+ <Property></Property>
+ <Property name="label">鎶撴媿鏂瑰紡</Property>
+ <Property name="mapping">
+ <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerSnapType").getResult()}</Property>
+ <Property name="keyProperty">dictValue</Property>
+ <Property name="valueProperty">dictLabel</Property>
+ </Property>
+ </PropertyDef>
+ <PropertyDef name="urlIn">
+ <Property></Property>
+ <Property name="label">鍐呯綉鍦板潃</Property>
+ </PropertyDef>
+ <PropertyDef name="urlOut">
+ <Property></Property>
+ <Property name="label">澶栫綉鍦板潃</Property>
+ </PropertyDef>
+ <PropertyDef name="mediaAddr">
+ <Property></Property>
+ <Property name="label">RTSP鍦板潃</Property>
+ </PropertyDef>
+ <PropertyDef name="remark">
+ <Property></Property>
+ <Property name="label">澶囨敞</Property>
+ </PropertyDef>
+ <PropertyDef name="chanNum">
+ <Property></Property>
+ <Property name="label">閫氶亾鍙�</Property>
+ <Property name="dataType">Integer</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>
+ <View layout="padding:10">
+ <Property name="packages">font-awesome,css-common</Property>
+ <DataSet id="dsMain">
+ <Property name="dataProvider">quantityConfPR#getConfList</Property>
+ <Property name="dataType">[dtQuantityConf]</Property>
+ </DataSet>
+ <Container>
+ <Property name="className">c-param</Property>
+ <ToolBar>
+ <ToolBarButton>
+ <ClientEvent name="onClick">view.get("#dsMain").insert();
+ view.get("#depotId").set("readOnly",false);
+ view.get("#dgMain").show();</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">
+ var select = view.get("#dataGridMain").get("selection");
+ if(select){
+ view.get("#depotId").set("readOnly",true)
+ view.get("#dgMain").show();
+ }else{
+ $notify("璇烽�夋嫨闇�瑕佷慨鏀圭殑鏁版嵁鈥︹��");
+ }</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("#dataGridMain").get("selection");
+ if(select){
+ view.get("#ajaxDel").set("parameter",select).execute(function(result){
+ select.remove();
+ });
+ }else{
+ $notify("璇烽�夋嫨闇�瑕佸垹闄ょ殑浠撳簱鈥︹��");
+ }</ClientEvent>
+ <Property name="caption">鍒犻櫎</Property>
+ <Property name="exClassName">btn3</Property>
+ <Property name="width">100</Property>
+ <Property name="iconClass">fa fa-times</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("#dataGridMain").set("selection",arg.data);</ClientEvent>
+ <Property name="dataSet">dsMain</Property>
+ <Property name="readOnly">true</Property>
+ <Property name="selectionMode">singleRow</Property>
+ <RowSelectorColumn/>
+ <RowNumColumn/>
+ <DataColumn>
+ <Property name="property">name</Property>
+ <Property name="align">center</Property>
+ <Property name="name">name</Property>
+ <Property name="width">150</Property>
+ </DataColumn>
+ <DataColumn name="depotId">
+ <Property name="property">depotId</Property>
+ <Property name="align">center</Property>
+ <Property name="width">150</Property>
+ </DataColumn>
+ <DataColumn>
+ <Property name="property">ip</Property>
+ <Property name="align">center</Property>
+ <Property name="name">ip</Property>
+ <Property name="width">120</Property>
+ </DataColumn>
+ <DataColumn>
+ <Property name="property">port</Property>
+ <Property name="align">center</Property>
+ <Property name="name">port</Property>
+ <Property name="width">80</Property>
+ </DataColumn>
+ <DataColumn>
+ <Property name="property">status</Property>
+ <Property name="align">center</Property>
+ <Property name="name">status</Property>
+ <Property name="width">80</Property>
+ </DataColumn>
+ <DataColumn>
+ <Property name="property">protocol</Property>
+ <Property name="align">center</Property>
+ <Property name="name">protocol</Property>
+ <Property name="width">180</Property>
+ </DataColumn>
+ <DataColumn>
+ <Property name="property">playType</Property>
+ <Property name="align">center</Property>
+ <Property name="name">playType</Property>
+ <Property name="width">180</Property>
+ </DataColumn>
+ <DataColumn>
+ <Property name="property">ytIp</Property>
+ <Property name="align">center</Property>
+ <Property name="name">ytIp</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>
+ </DataColumn>
+ </DataGrid>
+ </Container>
+ <UpdateAction id="uaMain">
+ <Property name="dataResolver">quantityConfPR#saveConf</Property>
+ <UpdateItem>
+ <Property name="dataSet">dsMain</Property>
+ <Property name="dataPath">[#current]</Property>
+ </UpdateItem>
+ </UpdateAction>
+ <AjaxAction id="ajaxRefreshCache">
+ <Property name="service">quantityConfPR#flushConfCache</Property>
+ <Property name="successMessage">鍒锋柊鎴愬姛锛�</Property>
+ <Property name="confirmMessage">纭畾瑕佸埛鏂扮紦瀛樹箞锛�</Property>
+ </AjaxAction>
+ <Dialog id="dgMain" layout="regionPadding:8">
+ <ClientEvent name="onShow">//鏍规嵁浠撳簱绫诲瀷涓嶅悓锛屾樉绀轰笉鍚岀殑閰嶇疆淇℃伅</ClientEvent>
+ <Property name="iconClass">fa fa-tasks</Property>
+ <Property name="caption">鏁伴噺妫�娴嬪弬鏁�</Property>
+ <Property name="width">1100</Property>
+ <Property name="closeable">false</Property>
+ <Buttons>
+ <Button>
+ <ClientEvent name="onClick">view.get("#uaMain").execute(function(){
+ view.get("#dgMain").hide();
+});</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">view.get("#dsMain.data:#").cancel();
+view.get("#dgMain").hide();</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>
+ <GroupBox layoutConstraint="padding:5">
+ <Property name="caption">鍩烘湰淇℃伅</Property>
+ <Buttons/>
+ <Children>
+ <AutoForm>
+ <Property name="dataSet">dsMain</Property>
+ <Property name="cols">*,*,*</Property>
+ <Property name="labelSeparator">锛�</Property>
+ <Property name="labelAlign">right</Property>
+ <Property name="labelWidth">110</Property>
+ <AutoFormElement>
+ <Property name="name">name</Property>
+ <Property name="property">name</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">sn</Property>
+ <Property name="property">sn</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement id="depotId">
+ <Property name="name">depotId</Property>
+ <Property name="property">depotId</Property>
+ <Property name="readOnly">false</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>
+ <Property name="name">protocol</Property>
+ <Property name="property">protocol</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">status</Property>
+ <Property name="property">status</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement layoutConstraint="colSpan:2">
+ <Property name="name">remark</Property>
+ <Property name="property">remark</Property>
+ <Editor/>
+ </AutoFormElement>
+ </AutoForm>
+ </Children>
+ </GroupBox>
+ <GroupBox layoutConstraint="padding:5">
+ <Property name="caption">鎽勫儚澶撮厤缃�</Property>
+ <Buttons/>
+ <Children>
+ <AutoForm>
+ <Property name="dataSet">dsMain</Property>
+ <Property name="cols">*,*,*</Property>
+ <Property name="labelSeparator">锛�</Property>
+ <Property name="labelAlign">right</Property>
+ <Property name="labelWidth">110</Property>
+ <AutoFormElement>
+ <Property name="name">ytIp</Property>
+ <Property name="property">ytIp</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">portCtrl</Property>
+ <Property name="property">portCtrl</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">portWeb</Property>
+ <Property name="property">portWeb</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">loginId</Property>
+ <Property name="property">loginId</Property>
+ <Property name="readOnly">false</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">pwd</Property>
+ <Property name="property">pwd</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">chanNum</Property>
+ <Property name="property">chanNum</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">playType</Property>
+ <Property name="property">playType</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement layoutConstraint="colSpan:2">
+ <Property name="name">urlIn</Property>
+ <Property name="property">urlIn</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">snapType</Property>
+ <Property name="property">snapType</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement layoutConstraint="colSpan:2">
+ <Property name="name">urlOut</Property>
+ <Property name="property">urlOut</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">cameraSn</Property>
+ <Property name="property">cameraSn</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement layoutConstraint="colSpan:2">
+ <Property name="name">mediaAddr</Property>
+ <Property name="property">mediaAddr</Property>
+ <Property name="trigger">triggerMedia</Property>
+ <Editor>
+ <TextEditor id="mediaAddr">
+ <Property name="blankText"> -- 鐐瑰嚮鍙充晶閫夋嫨锛屾垨鑰呮墜鍔ㄥ~鍐� --</Property>
+ </TextEditor>
+ </Editor>
+ </AutoFormElement>
+ </AutoForm>
+ </Children>
+ </GroupBox>
+ <GroupBox layoutConstraint="padding:5">
+ <Property name="caption">鏁伴噺妫�娴嬪弬鏁�</Property>
+ <Buttons/>
+ <Children>
+ <AutoForm>
+ <Property name="dataSet">dsMain</Property>
+ <Property name="cols">*,*,*,*</Property>
+ <Property name="labelSeparator">锛�</Property>
+ <Property name="labelAlign">right</Property>
+ <Property name="labelWidth">110</Property>
+ <AutoFormElement>
+ <Property name="name">length1</Property>
+ <Property name="property">length1</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">length2</Property>
+ <Property name="property">length2</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">length3</Property>
+ <Property name="property">length3</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">length4</Property>
+ <Property name="property">length4</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">width</Property>
+ <Property name="property">width</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">height</Property>
+ <Property name="property">height</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">lineHeight</Property>
+ <Property name="property">lineHeight</Property>
+ <Editor/>
+ </AutoFormElement>
+ </AutoForm>
+ </Children>
+ </GroupBox>
+ </Children>
+ <Tools/>
+ </Dialog>
+ <AjaxAction id="ajaxDel">
+ <Property name="successMessage">鍒犻櫎鎴愬姛</Property>
+ <Property name="service">quantityConfPR#delQuantityConf</Property>
+ <Property name="executingMessage">姝e湪鍒犻櫎</Property>
+ <Property name="confirmMessage">纭畾瑕佸垹闄や箞锛�</Property>
+ </AjaxAction>
+ <Trigger id="triggerMedia">
+ <ClientEvent name="onExecute">view.get("#dialogMeidaSelect").show();
+</ClientEvent>
+ </Trigger>
+ <Dialog id="dialogMeidaSelect" layout="vbox padding:10">
+ <Property name="width">650</Property>
+ <Property name="caption">娴佸獟浣撳湴鍧�閫夋嫨</Property>
+ <Buttons/>
+ <Children>
+ <Container>
+ <Label>
+ <Property name="text">娴峰悍RTSP锛堟棫鐗�-涓荤爜娴侊級</Property>
+ <Property name="style">
+ <Property name="font-weight">bold</Property>
+ </Property>
+ </Label>
+ <Label id="text1">
+ <Property name="text">rtsp://{0}:{1}@{2}:{3}/h264/ch{4}/main/av_stream</Property>
+ </Label>
+ <Button layoutConstraint="right">
+ <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text1.text"));
+view.get("#dialogMeidaSelect").hide();
+</ClientEvent>
+ <Property name="caption">閫夋嫨</Property>
+ <Property name="iconClass">fa fa-check</Property>
+ </Button>
+ </Container>
+ <Container>
+ <Label>
+ <Property name="text">娴峰悍RTSP锛堟棫鐗�-瀛愮爜娴侊級</Property>
+ <Property name="style">
+ <Property name="font-weight">bold</Property>
+ </Property>
+ </Label>
+ <Label id="text2">
+ <Property name="text">rtsp://{0}:{1}@{2}:{3}/mpeg4/ch{4}/sub/av_stream</Property>
+ </Label>
+ <Button layoutConstraint="right">
+ <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text2.text"));
+view.get("#dialogMeidaSelect").hide();
+</ClientEvent>
+ <Property name="caption">閫夋嫨</Property>
+ <Property name="iconClass">fa fa-check</Property>
+ </Button>
+ </Container>
+ <Container>
+ <Label>
+ <Property name="text">娴峰悍RTSP锛堟柊鐗�-涓荤爜娴侊級</Property>
+ <Property name="style">
+ <Property name="font-weight">bold</Property>
+ </Property>
+ </Label>
+ <Label id="text3">
+ <Property name="text">rtsp://{0}:{1}@{2}:{3}/Streaming/Channels/{4}01</Property>
+ </Label>
+ <Button layoutConstraint="right">
+ <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text3.text"));
+view.get("#dialogMeidaSelect").hide();
+</ClientEvent>
+ <Property name="caption">閫夋嫨</Property>
+ <Property name="iconClass">fa fa-check</Property>
+ </Button>
+ </Container>
+ <Container>
+ <Label>
+ <Property name="text">娴峰悍RTSP锛堟柊鐗�-瀛愮爜娴侊級</Property>
+ <Property name="style">
+ <Property name="font-weight">bold</Property>
+ </Property>
+ </Label>
+ <Label id="text4">
+ <Property name="text">rtsp://{0}:{1}@{2}:{3}/Streaming/Channels/{4}02</Property>
+ </Label>
+ <Button layoutConstraint="right">
+ <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text4.text"));
+view.get("#dialogMeidaSelect").hide();
+</ClientEvent>
+ <Property name="caption">閫夋嫨</Property>
+ <Property name="iconClass">fa fa-check</Property>
+ </Button>
+ </Container>
+ <Container>
+ <Label>
+ <Property name="text">澶у崕RTSP锛堜富鐮佹祦锛�</Property>
+ <Property name="style">
+ <Property name="font-weight">bold</Property>
+ </Property>
+ </Label>
+ <Label id="text5">
+ <Property name="text">rtsp://{0}:{1}@{2}:{3}/cam/realmonitor?channel={4}&subtype=0</Property>
+ </Label>
+ <Button layoutConstraint="right">
+ <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text5.text"));
+view.get("#dialogMeidaSelect").hide();
+</ClientEvent>
+ <Property name="caption">閫夋嫨</Property>
+ <Property name="iconClass">fa fa-check</Property>
+ </Button>
+ </Container>
+ <Container>
+ <Label>
+ <Property name="text">澶у崕RTSP锛堣緟鐮佹祦锛�</Property>
+ <Property name="style">
+ <Property name="font-weight">bold</Property>
+ </Property>
+ </Label>
+ <Label id="text6">
+ <Property name="text">rtsp://{0}:{1}@{2}:{3}/cam/realmonitor?channel={4}&subtype=1</Property>
+ </Label>
+ <Button layoutConstraint="right">
+ <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text6.text"));
+view.get("#dialogMeidaSelect").hide();
+</ClientEvent>
+ <Property name="caption">閫夋嫨</Property>
+ <Property name="iconClass">fa fa-check</Property>
+ </Button>
+ </Container>
+ <Container>
+ <Label>
+ <Property name="text">闆勮繄RTSP锛堜富鐮佹祦锛�</Property>
+ <Property name="style">
+ <Property name="font-weight">bold</Property>
+ </Property>
+ </Label>
+ <Label id="text7">
+ <Property name="text">rtsp://{2}:{3}/user={0}&password={1}&channel={4}&stream=0.sdp?real_stream</Property>
+ </Label>
+ <Button layoutConstraint="right">
+ <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text7.text"));
+view.get("#dialogMeidaSelect").hide();
+</ClientEvent>
+ <Property name="caption">閫夋嫨</Property>
+ <Property name="iconClass">fa fa-check</Property>
+ </Button>
+ </Container>
+ <Container>
+ <Label>
+ <Property name="text">闆勮繄RTSP锛堟鐮佹祦锛�</Property>
+ <Property name="style">
+ <Property name="font-weight">bold</Property>
+ </Property>
+ </Label>
+ <Label id="text8">
+ <Property name="text">rtsp://{2}:{3}/user={0}&password={1}&channel={4}&stream=1.sdp?real_stream</Property>
+ </Label>
+ <Button layoutConstraint="right">
+ <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text8.text"));
+view.get("#dialogMeidaSelect").hide();
+</ClientEvent>
+ <Property name="caption">閫夋嫨</Property>
+ <Property name="iconClass">fa fa-check</Property>
+ </Button>
+ </Container>
+ <Container>
+ <Label>
+ <Property name="text">涓夋槦RTSP锛堥珮鐮佺巼锛�</Property>
+ <Property name="style">
+ <Property name="font-weight">bold</Property>
+ </Property>
+ </Label>
+ <Label id="text9">
+ <Property name="text">rtsp://{0}:{1}@{2}:{3}/onvif/profile2/media.smp</Property>
+ </Label>
+ <Button layoutConstraint="right">
+ <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text9.text"));
+view.get("#dialogMeidaSelect").hide();
+</ClientEvent>
+ <Property name="caption">閫夋嫨</Property>
+ <Property name="iconClass">fa fa-check</Property>
+ </Button>
+ </Container>
+ <Container>
+ <Label>
+ <Property name="text">涓夋槦RTSP锛堜綆鐮佺巼锛�</Property>
+ <Property name="style">
+ <Property name="font-weight">bold</Property>
+ </Property>
+ </Label>
+ <Label id="text10">
+ <Property name="text">rtsp://{0}:{1}@{2}:{3}/onvif/profile3/media.smp</Property>
+ </Label>
+ <Button layoutConstraint="right">
+ <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text10.text"));
+view.get("#dialogMeidaSelect").hide();
+</ClientEvent>
+ <Property name="caption">閫夋嫨</Property>
+ <Property name="iconClass">fa fa-check</Property>
+ </Button>
+ </Container>
+ <Container>
+ <Label>
+ <Property name="text">瀹囪RTSP</Property>
+ <Property name="style">
+ <Property name="font-weight">bold</Property>
+ </Property>
+ </Label>
+ <Label id="text11">
+ <Property name="text">rtsp://{0}:{1}@{2}/media/video1/multicast</Property>
+ </Label>
+ <Button layoutConstraint="right">
+ <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text11.text"));
+view.get("#dialogMeidaSelect").hide();
+</ClientEvent>
+ <Property name="caption">閫夋嫨</Property>
+ <Property name="iconClass">fa fa-check</Property>
+ </Button>
+ </Container>
+ </Children>
+ <Tools/>
+ </Dialog>
+ <AjaxAction id="ajaxRemoteConf">
+ <Property name="service">quantityConfPR#remoteConf</Property>
+ </AjaxAction>
+ </View>
+</ViewConfig>
diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/QuantityConfPR.java b/fzzy-igdss-view/src/main/java/com/fzzy/igds/QuantityConfPR.java
new file mode 100644
index 0000000..1c4df70
--- /dev/null
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/QuantityConfPR.java
@@ -0,0 +1,68 @@
+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.QuantityConf;
+import com.fzzy.igds.service.DepotService;
+import com.fzzy.igds.service.QuantityService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Component;
+import javax.annotation.Resource;
+import java.util.List;
+/**
+ * @Description
+ * @Author CZT
+ * @Date 2025/11/28 16:58
+ */
+@Component
+public class QuantityConfPR {
+
+ @Resource
+ private QuantityService quantityService;
+ @Resource
+ private DepotService depotService;
+
+ /**
+ * 鍙傛暟閰嶇疆鍒楄〃 quantityConfPR#getConfList
+ *
+ * @return
+ */
+ @DataProvider
+ public List<QuantityConf> getConfList() {
+ return quantityService.getConfList(null, null);
+ }
+
+ /**
+ * quantityConfPR#saveConf 鍙傛暟閰嶇疆鏇存柊锛屽寘鎷柊澧炲拰淇敼
+ *
+ * @param conf
+ */
+ @DataResolver
+ public void saveConf(QuantityConf conf) {
+ QuantityConf quantityConf = new QuantityConf();
+ BeanUtils.copyProperties(conf, quantityConf);
+ quantityService.saveConf(quantityConf);
+ }
+
+ /**
+ * quantityConfPR#delQuantityConf
+ *
+ * @return
+ */
+ @Expose
+ public String delQuantityConf(QuantityConf conf) {
+ QuantityConf quantityConf = new QuantityConf();
+ BeanUtils.copyProperties(conf, quantityConf);
+ return quantityService.delQuantityConf(quantityConf);
+ }
+
+ /**
+ * quantityConfPR#flushConfCache 鍒锋柊閰嶇疆缂撳瓨
+ */
+ @Expose
+ public void flushConfCache() {
+ quantityService.flushConfCache(null, null);
+ }
+
+}
--
Gitblit v1.9.3