From 91a8e4a9bc039f0e32c389e4f0880820c7a2e1eb Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期四, 04 十二月 2025 10:00:19 +0800
Subject: [PATCH] 添加第一版智能抓拍、抓拍配置

---
 fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConf.view.xml              |  192 ++++++++++++++
 fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConfPR.java                |   61 ++++
 fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecordPR.java              |   63 ++++
 fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/SnapConfMapper.java     |   10 
 fzzy-igdss-view/src/main/java/models/core.model.xml                        |  122 +++++++++
 fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapRecordService.java |   56 ++++
 fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/SnapRecordMapper.java   |   10 
 fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecord.view.xml            |  200 +++++++++++++++
 fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/SnapRecord.java         |    1 
 fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapConfService.java   |   56 ++++
 10 files changed, 771 insertions(+), 0 deletions(-)

diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/SnapRecord.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/SnapRecord.java
index cfbc037..75098cc 100644
--- a/fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/SnapRecord.java
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/SnapRecord.java
@@ -58,6 +58,7 @@
 
     //宸℃洿鐓х墖鍏ㄨ矾寰�
     @Transient
+    @TableField(exist = false)
     private String imgPath;
     public SnapRecord() {
     }
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/SnapConfMapper.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/SnapConfMapper.java
new file mode 100644
index 0000000..b983ba6
--- /dev/null
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/SnapConfMapper.java
@@ -0,0 +1,10 @@
+package com.fzzy.igds.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fzzy.igds.domain.SnapConf;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface SnapConfMapper extends BaseMapper<SnapConf> {
+
+}
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/SnapRecordMapper.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/SnapRecordMapper.java
new file mode 100644
index 0000000..124342e
--- /dev/null
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/SnapRecordMapper.java
@@ -0,0 +1,10 @@
+package com.fzzy.igds.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fzzy.igds.domain.SnapRecord;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface SnapRecordMapper extends BaseMapper<SnapRecord>{
+
+}
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapConfService.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapConfService.java
new file mode 100644
index 0000000..741aae1
--- /dev/null
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapConfService.java
@@ -0,0 +1,56 @@
+package com.fzzy.igds.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.fzzy.igds.data.BaseResp;
+import com.fzzy.igds.data.IgdsBaseParam;
+import com.fzzy.igds.domain.SnapConf;
+import com.fzzy.igds.mapper.SnapConfMapper;
+import com.fzzy.igds.utils.ContextUtil;
+import com.ruoyi.common.utils.StringUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+@Slf4j
+@Service
+public class SnapConfService {
+
+    @Resource
+    private SnapConfMapper snapConfMapper;
+
+    public List<SnapConf> listAll(IgdsBaseParam param) {
+
+        if (null == param)
+            return snapConfMapper.selectList(null);
+
+        QueryWrapper<SnapConf> queryWrapper = new QueryWrapper<>();
+        if (StringUtils.isNotEmpty(param.getName())) {
+            queryWrapper.like("name", param.getName());
+        }
+        return snapConfMapper.selectList(queryWrapper);
+    }
+
+    public BaseResp addData(SnapConf snapConf) {
+        snapConf.setId(ContextUtil.generateId());
+        snapConf.setCompanyId(ContextUtil.getCompanyId());
+        snapConf.setUpdateBy(ContextUtil.getLoginUserName());
+        snapConf.setUpdateTime(new Date());
+        snapConf.setCreateBy(ContextUtil.getLoginUserName());
+        snapConf.setCreateTime(new Date());
+        return snapConfMapper.insert(snapConf) > 0 ? BaseResp.success() : BaseResp.error("娣诲姞澶辫触");
+    }
+
+    public BaseResp updateData(SnapConf snapConf) {
+        snapConf.setUpdateBy(ContextUtil.getLoginUserName());
+        snapConf.setUpdateTime(new Date());
+        return snapConfMapper.updateById(snapConf) > 0 ? BaseResp.success() : BaseResp.error("鏇存柊澶辫触");
+    }
+
+    public BaseResp deleteData(SnapConf snapConf) {
+        return snapConfMapper.deleteById(snapConf) > 0 ? BaseResp.success() : BaseResp.error("鍒犻櫎澶辫触");
+    }
+
+}
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapRecordService.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapRecordService.java
new file mode 100644
index 0000000..06f71df
--- /dev/null
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapRecordService.java
@@ -0,0 +1,56 @@
+package com.fzzy.igds.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.fzzy.igds.data.BaseResp;
+import com.fzzy.igds.data.IgdsBaseParam;
+import com.fzzy.igds.domain.SnapRecord;
+import com.fzzy.igds.mapper.SnapRecordMapper;
+import com.fzzy.igds.utils.ContextUtil;
+import com.ruoyi.common.utils.StringUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+@Slf4j
+@Service
+public class SnapRecordService {
+
+    @Resource
+    private SnapRecordMapper snapRecordMapper;
+
+    public List<SnapRecord> listAll(IgdsBaseParam param) {
+
+        if (null == param)
+            return snapRecordMapper.selectList(null);
+
+        QueryWrapper<SnapRecord> queryWrapper = new QueryWrapper<>();
+        if (StringUtils.isNotEmpty(param.getName())) {
+            queryWrapper.like("name", param.getName());
+        }
+        return snapRecordMapper.selectList(queryWrapper);
+    }
+
+    public BaseResp addData(SnapRecord snapRecord) {
+        snapRecord.setId(ContextUtil.generateId());
+        snapRecord.setCompanyId(ContextUtil.getCompanyId());
+        snapRecord.setUpdateBy(ContextUtil.getLoginUserName());
+        snapRecord.setUpdateTime(new Date());
+        snapRecord.setCreateBy(ContextUtil.getLoginUserName());
+        snapRecord.setCreateTime(new Date());
+        return snapRecordMapper.insert(snapRecord) > 0 ? BaseResp.success() : BaseResp.error("娣诲姞澶辫触");
+    }
+
+    public BaseResp updateData(SnapRecord snapRecord) {
+        snapRecord.setUpdateBy(ContextUtil.getLoginUserName());
+        snapRecord.setUpdateTime(new Date());
+        return snapRecordMapper.updateById(snapRecord) > 0 ? BaseResp.success() : BaseResp.error("鏇存柊澶辫触");
+    }
+
+    public BaseResp deleteData(SnapRecord snapRecord) {
+        return snapRecordMapper.deleteById(snapRecord) > 0 ? BaseResp.success() : BaseResp.error("鍒犻櫎澶辫触");
+    }
+
+}
diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConf.view.xml b/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConf.view.xml
new file mode 100644
index 0000000..d1182db
--- /dev/null
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConf.view.xml
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ViewConfig>
+  <Arguments/>
+  <Context/>
+  <Model/>
+  <View layout="padding:10">
+    <ClientEvent name="onClick">&#xD;
+/**&#xD;
+* 鏌ヨ&#xD;
+*/&#xD;
+query = function(){&#xD;
+    view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
+}&#xD;</ClientEvent>
+    <Property name="packages">font-awesome,css-common</Property>
+    <DataSet id="dsMain">
+      <Property name="loadMode">lazy</Property>
+      <Property name="dataType">[dtSnapConf]</Property>
+      <Property name="dataProvider">snapConfPR#listAll</Property>
+    </DataSet>
+    <DataSet id="dsParam">
+      <ClientEvent name="onReady">self.insert({});</ClientEvent>
+      <Property name="dataType">dtBaseParam</Property>
+    </DataSet>
+    <Container>
+      <Property name="className">c-param</Property>
+      <AutoForm>
+        <Property name="cols">*,90,90,*,*</Property>
+        <Property name="dataSet">dsParam</Property>
+        <Property name="labelAlign">right</Property>
+        <Property name="labelWidth">100</Property>
+        <AutoFormElement>
+          <Property name="name">deptId</Property>
+          <Property name="property">deptId</Property>
+          <Editor/>
+        </AutoFormElement>
+        <Button>
+          <ClientEvent name="onClick">var param = view.get(&quot;#dsParam.data&quot;);&#xD;
+console.log(&quot;param&quot;,param);&#xD;
+view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,param).flushAsync();&#xD;
+</ClientEvent>
+          <Property name="caption">鎼滅储</Property>
+          <Property name="iconClass">fa fa-search</Property>
+          <Property name="exClassName">btn-q1</Property>
+        </Button>
+        <Button>
+          <ClientEvent name="onClick">view.get(&quot;#dsParam&quot;).set(&quot;data&quot;,{});</ClientEvent>
+          <Property name="caption">閲嶇疆</Property>
+          <Property name="exClassName">btn-q2</Property>
+          <Property name="iconClass">fa fa-refresh</Property>
+        </Button>
+      </AutoForm>
+    </Container>
+    <Container>
+      <Property name="className">c-data</Property>
+      <ToolBar>
+        <ToolBarButton>
+          <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).insert({});&#xD;
+view.get(&quot;#dialogMain&quot;).show();&#xD;
+</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 data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);
+view.get(&quot;#dialogMain&quot;).show();
+        </ClientEvent>
+          <Property name="id">btnUpdate</Property>
+          <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 data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;)
+if(!data){
+	$alert(&quot;璇烽�夋嫨鏁版嵁&quot;);
+	}else{
+	view.get(&quot;#ajaxDelData&quot;).set(&quot;parameter&quot;, data).execute(function(result){
+		if(&quot;200&quot;!=result.code){
+			$alert(&quot;寮傚父淇℃伅锛�&quot;+result.message);
+		}else{
+			$notify(&quot;鎵ц鎴愬姛&quot;);
+            query();&#xD;
+		}
+	})
+}</ClientEvent>
+          <Property name="caption">鍒犻櫎</Property>
+          <Property name="exClassName">btn3</Property>
+          <Property name="width">100</Property>
+          <Property name="iconClass">fa fa-times</Property>
+        </ToolBarButton>
+      </ToolBar>
+      <DataGrid id="dgMain" layoutConstraint="padding:8" selectionMode="singleRow">
+        <ClientEvent name="onDataRowClick">self.set(&quot;selection&quot;, arg.data)</ClientEvent>
+        <Property name="dataSet">dsMain</Property>
+        <Property name="readOnly">true</Property>
+        <RowSelectorColumn/>
+        <RowNumColumn/>
+        <DataColumn name="deptId">
+          <Property name="property">deptId</Property>
+        </DataColumn>
+        <DataColumn name="cameraId">
+          <Property name="property">cameraId</Property>
+        </DataColumn>
+        <DataColumn name="actHour1">
+          <Property name="property">actHour1</Property>
+        </DataColumn>
+        <DataColumn name="actHour2">
+          <Property name="property">actHour2</Property>
+        </DataColumn>
+        <DataColumn name="actHour3">
+          <Property name="property">actHour3</Property>
+        </DataColumn>
+      </DataGrid>
+    </Container>
+    <Dialog id="dialogMain" layout="regionPadding:8">
+      <Property name="closeable">false</Property>
+      <Property name="caption">鎶撴媿閰嶇疆</Property>
+      <Property name="width">1200</Property>
+      <Property name="iconClass">fa fa-tasks</Property>
+      <Buttons>
+        <Button id="btnOk">
+          <ClientEvent name="onClick">view.get(&quot;#saveAction&quot;).execute(function(){&#xD;
+	self.get(&quot;parent&quot;).hide();&#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">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
+            self.get(&quot;parent&quot;).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>
+        <Container>
+          <AutoForm>
+            <Property name="dataSet">dsMain</Property>
+            <Property name="cols">*,*,*</Property>
+            <Property name="labelAlign">right</Property>
+            <Property name="labelSeparator">锛�</Property>
+            <Property name="labelWidth">120</Property>
+            <AutoFormElement>
+              <Property name="name">deptId</Property>
+              <Property name="property">deptId</Property>
+              <Editor/>
+            </AutoFormElement>
+            <AutoFormElement>
+              <Property name="name">cameraId</Property>
+              <Property name="property">cameraId</Property>
+              <Editor/>
+            </AutoFormElement>
+            <AutoFormElement>
+              <Property name="name">actHour1</Property>
+              <Property name="property">actHour1</Property>
+              <Editor/>
+            </AutoFormElement>
+            <AutoFormElement>
+              <Property name="name">actHour2</Property>
+              <Property name="property">actHour2</Property>
+              <Editor/>
+            </AutoFormElement>
+            <AutoFormElement>
+              <Property name="name">actHour3</Property>
+              <Property name="property">actHour3</Property>
+              <Editor/>
+            </AutoFormElement>
+          </AutoForm>
+        </Container>
+      </Children>
+      <Tools/>
+    </Dialog>
+    <UpdateAction id="saveAction">
+      <Property name="dataResolver">snapConfPR#saveUpdate</Property>
+      <UpdateItem>
+        <Property name="dataSet">dsMain</Property>
+        <Property name="dataPath">[#current]</Property>
+      </UpdateItem>
+    </UpdateAction>
+    <AjaxAction id="ajaxDelData">
+      <Property name="confirmMessage">纭畾瑕佸垹闄ゆ暟鎹箞锛�</Property>
+      <Property name="service">snapConfPR#delete</Property>
+    </AjaxAction>
+  </View>
+</ViewConfig>
diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConfPR.java b/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConfPR.java
new file mode 100644
index 0000000..d534350
--- /dev/null
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConfPR.java
@@ -0,0 +1,61 @@
+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.data.BaseResp;
+import com.fzzy.igds.data.IgdsBaseParam;
+import com.fzzy.igds.domain.SnapConf;
+import com.fzzy.igds.service.SnapConfService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Component
+public class SnapConfPR {
+
+    @Resource
+    private SnapConfService snapConfService;
+
+
+    /**
+     * snapConfPR#listAll
+     * 璐ㄦ娂鍒楄〃
+     */
+    @DataProvider
+    public List<SnapConf> listAll(IgdsBaseParam param) {
+        return snapConfService.listAll(param);
+    }
+
+    /**
+     * 淇濆瓨/鏇存柊
+     *
+     * @param snapConf
+     * @return
+     */
+    @Transactional
+    @DataResolver
+    public BaseResp saveUpdate(SnapConf snapConf) {
+        if (null == snapConf.getCreateTime()) {
+            return snapConfService.addData(snapConf);
+        } else {
+            return snapConfService.updateData(snapConf);
+        }
+    }
+
+
+    /**
+     * 鍒犻櫎
+     *
+     * @param snapConf
+     * @return
+     */
+    @Expose
+    public BaseResp delete(SnapConf snapConf) {
+        if (StringUtils.isNotEmpty(snapConf.getId())) return snapConfService.deleteData(snapConf);
+        return BaseResp.success();
+    }
+}
diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecord.view.xml b/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecord.view.xml
new file mode 100644
index 0000000..b1b0854
--- /dev/null
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecord.view.xml
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ViewConfig>
+  <Arguments/>
+  <Context/>
+  <Model/>
+  <View layout="padding:10">
+    <ClientEvent name="onClick">&#xD;
+/**&#xD;
+* 鏌ヨ&#xD;
+*/&#xD;
+query = function(){&#xD;
+    view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
+}&#xD;</ClientEvent>
+    <Property name="packages">font-awesome,css-common</Property>
+    <DataSet id="dsMain">
+      <Property name="loadMode">lazy</Property>
+      <Property name="dataType">[dtSnapRecord]</Property>
+      <Property name="dataProvider">snapRecordPR#listAll</Property>
+    </DataSet>
+    <DataSet id="dsParam">
+      <ClientEvent name="onReady">self.insert({});</ClientEvent>
+      <Property name="dataType">dtBaseParam</Property>
+    </DataSet>
+    <Container>
+      <Property name="className">c-param</Property>
+      <AutoForm>
+        <Property name="cols">*,90,90,*,*</Property>
+        <Property name="dataSet">dsParam</Property>
+        <Property name="labelAlign">right</Property>
+        <Property name="labelWidth">100</Property>
+        <AutoFormElement>
+          <Property name="name">deptId</Property>
+          <Property name="property">deptId</Property>
+          <Editor/>
+        </AutoFormElement>
+        <Button>
+          <ClientEvent name="onClick">var param = view.get(&quot;#dsParam.data&quot;);&#xD;
+console.log(&quot;param&quot;,param);&#xD;
+view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,param).flushAsync();&#xD;
+</ClientEvent>
+          <Property name="caption">鎼滅储</Property>
+          <Property name="iconClass">fa fa-search</Property>
+          <Property name="exClassName">btn-q1</Property>
+        </Button>
+        <Button>
+          <ClientEvent name="onClick">view.get(&quot;#dsParam&quot;).set(&quot;data&quot;,{});</ClientEvent>
+          <Property name="caption">閲嶇疆</Property>
+          <Property name="exClassName">btn-q2</Property>
+          <Property name="iconClass">fa fa-refresh</Property>
+        </Button>
+      </AutoForm>
+    </Container>
+    <Container>
+      <Property name="className">c-data</Property>
+      <ToolBar>
+        <ToolBarButton>
+          <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).insert({});&#xD;
+view.get(&quot;#dialogMain&quot;).show();&#xD;
+</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 data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);
+view.get(&quot;#dialogMain&quot;).show();
+        </ClientEvent>
+          <Property name="id">btnUpdate</Property>
+          <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 data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;)
+if(!data){
+	$alert(&quot;璇烽�夋嫨鏁版嵁&quot;);
+	}else{
+	view.get(&quot;#ajaxDelData&quot;).set(&quot;parameter&quot;, data).execute(function(result){
+		if(&quot;200&quot;!=result.code){
+			$alert(&quot;寮傚父淇℃伅锛�&quot;+result.message);
+		}else{
+			$notify(&quot;鎵ц鎴愬姛&quot;);
+            query();&#xD;
+		}
+	})
+}</ClientEvent>
+          <Property name="caption">鍒犻櫎</Property>
+          <Property name="exClassName">btn3</Property>
+          <Property name="width">100</Property>
+          <Property name="iconClass">fa fa-times</Property>
+        </ToolBarButton>
+      </ToolBar>
+      <DataGrid id="dgMain" layoutConstraint="padding:8" selectionMode="singleRow">
+        <ClientEvent name="onDataRowClick">self.set(&quot;selection&quot;, arg.data)</ClientEvent>
+        <Property name="dataSet">dsMain</Property>
+        <Property name="readOnly">true</Property>
+        <RowSelectorColumn/>
+        <RowNumColumn/>
+        <DataColumn name="deptId">
+          <Property name="property">deptId</Property>
+        </DataColumn>
+        <DataColumn name="cameraId">
+          <Property name="property">cameraId</Property>
+        </DataColumn>
+        <DataColumn name="result">
+          <Property name="property">result</Property>
+        </DataColumn>
+        <DataColumn name="snapTime">
+          <Property name="property">snapTime</Property>
+        </DataColumn>
+        <DataColumn name="imgName">
+          <Property name="property">imgName</Property>
+        </DataColumn>
+        <DataColumn name="imgPath">
+          <Property name="property">imgPath</Property>
+        </DataColumn>
+      </DataGrid>
+    </Container>
+    <Dialog id="dialogMain" layout="regionPadding:8">
+      <Property name="closeable">false</Property>
+      <Property name="caption">鏅鸿兘鎶撴媿</Property>
+      <Property name="width">1200</Property>
+      <Property name="iconClass">fa fa-tasks</Property>
+      <Buttons>
+        <Button id="btnOk">
+          <ClientEvent name="onClick">view.get(&quot;#saveAction&quot;).execute(function(){&#xD;
+	self.get(&quot;parent&quot;).hide();&#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">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
+            self.get(&quot;parent&quot;).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>
+        <Container>
+          <AutoForm>
+            <Property name="dataSet">dsMain</Property>
+            <Property name="cols">*,*,*</Property>
+            <Property name="labelAlign">right</Property>
+            <Property name="labelSeparator">锛�</Property>
+            <Property name="labelWidth">120</Property>
+            <AutoFormElement>
+              <Property name="name">deptId</Property>
+              <Property name="property">deptId</Property>
+              <Editor/>
+            </AutoFormElement>
+            <AutoFormElement>
+              <Property name="name">cameraId</Property>
+              <Property name="property">cameraId</Property>
+              <Editor/>
+            </AutoFormElement>
+            <AutoFormElement>
+              <Property name="name">result</Property>
+              <Property name="property">result</Property>
+              <Editor/>
+            </AutoFormElement>
+            <AutoFormElement>
+              <Property name="name">snapTime</Property>
+              <Property name="property">snapTime</Property>
+              <Editor/>
+            </AutoFormElement>
+            <AutoFormElement>
+              <Property name="name">imgName</Property>
+              <Property name="property">imgName</Property>
+              <Editor/>
+            </AutoFormElement>
+            <AutoFormElement>
+              <Property name="name">imgPath</Property>
+              <Property name="property">imgPath</Property>
+              <Editor/>
+            </AutoFormElement>
+          </AutoForm>
+        </Container>
+      </Children>
+      <Tools/>
+    </Dialog>
+    <UpdateAction id="saveAction">
+      <Property name="dataResolver">snapRecordPR#saveUpdate</Property>
+      <UpdateItem>
+        <Property name="dataSet">dsMain</Property>
+        <Property name="dataPath">[#current]</Property>
+      </UpdateItem>
+    </UpdateAction>
+    <AjaxAction id="ajaxDelData">
+      <Property name="confirmMessage">纭畾瑕佸垹闄ゆ暟鎹箞锛�</Property>
+      <Property name="service">snapRecordPR#delete</Property>
+    </AjaxAction>
+  </View>
+</ViewConfig>
diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecordPR.java b/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecordPR.java
new file mode 100644
index 0000000..5d6cb0c
--- /dev/null
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecordPR.java
@@ -0,0 +1,63 @@
+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.data.BaseResp;
+import com.fzzy.igds.data.IgdsBaseParam;
+import com.fzzy.igds.domain.SnapRecord;
+import com.fzzy.igds.service.SnapRecordService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Component
+public class SnapRecordPR {
+
+    @Resource
+    private SnapRecordService snapRecordService;
+
+
+
+
+    /**
+     * snapRecordPR#listAll
+     * 璐ㄦ娂鍒楄〃
+     */
+    @DataProvider
+    public List<SnapRecord> listAll(IgdsBaseParam param) {
+        return snapRecordService.listAll(param);
+    }
+
+    /**
+     * 淇濆瓨/鏇存柊
+     *
+     * @param snapRecord
+     * @return
+     */
+    @Transactional
+    @DataResolver
+    public BaseResp saveUpdate(SnapRecord snapRecord) {
+        if (null == snapRecord.getCreateTime()) {
+            return snapRecordService.addData(snapRecord);
+        } else {
+            return snapRecordService.updateData(snapRecord);
+        }
+    }
+
+
+    /**
+     * 鍒犻櫎
+     *
+     * @param snapRecord
+     * @return
+     */
+    @Expose
+    public BaseResp delete(SnapRecord snapRecord) {
+        if (StringUtils.isNotEmpty(snapRecord.getId())) return snapRecordService.deleteData(snapRecord);
+        return BaseResp.success();
+    }
+}
diff --git a/fzzy-igdss-view/src/main/java/models/core.model.xml b/fzzy-igdss-view/src/main/java/models/core.model.xml
index ea12e79..feb4ca7 100644
--- a/fzzy-igdss-view/src/main/java/models/core.model.xml
+++ b/fzzy-igdss-view/src/main/java/models/core.model.xml
@@ -64,6 +64,22 @@
       <Property name="dataType">DateTime</Property>
       <Property name="label">鎴鏃堕棿</Property>
     </PropertyDef>
+    <PropertyDef name="companyId">
+      <Property></Property>
+      <Property name="label">缁勭粐缂栫爜</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>
+    </PropertyDef>
+    <PropertyDef name="depotId">
+      <Property></Property>
+    </PropertyDef>
   </DataType>
   <DataType name="dtArea">
     <Property name="creationType">com.fzzy.igds.domain.DicArea</Property>
@@ -1087,4 +1103,110 @@
       <Property name="label">鏇存柊鏃堕棿</Property>
     </PropertyDef>
   </DataType>
+  <DataType name="dtSnapRecord">
+    <Property name="creationType">com.fzzy.igds.domain.SnapRecord</Property>
+    <PropertyDef name="companyId">
+      <Property></Property>
+      <Property name="label">缁勭粐缂栫爜</Property>
+    </PropertyDef>
+    <PropertyDef name="createBy">
+      <Property></Property>
+      <Property name="label">鍒涘缓浜�</Property>
+    </PropertyDef>
+    <PropertyDef name="createTime">
+      <Property name="dataType">Date</Property>
+      <Property name="label">鍒涘缓鏃堕棿</Property>
+    </PropertyDef>
+    <PropertyDef name="updateBy">
+      <Property></Property>
+      <Property name="label">鏇存柊浜�</Property>
+    </PropertyDef>
+    <PropertyDef name="updateTime">
+      <Property name="dataType">Date</Property>
+      <Property name="label">鏇存柊鏃堕棿</Property>
+    </PropertyDef>
+    <PropertyDef name="id">
+      <Property></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>
+    </PropertyDef>
+    <PropertyDef name="cameraId">
+      <Property></Property>
+      <Property name="label">鎶撴媿鐩戞帶</Property>
+    </PropertyDef>
+    <PropertyDef name="result">
+      <Property></Property>
+      <Property name="label">鎶撴媿缁撴灉</Property>
+    </PropertyDef>
+    <PropertyDef name="snapTime">
+      <Property name="dataType">Date</Property>
+      <Property name="label">鎶撴媿鏃堕棿</Property>
+    </PropertyDef>
+    <PropertyDef name="imgName">
+      <Property></Property>
+      <Property name="label">鎶撴媿鐓х墖</Property>
+    </PropertyDef>
+    <PropertyDef name="imgPath">
+      <Property></Property>
+      <Property name="label">鐓х墖璺緞</Property>
+    </PropertyDef>
+  </DataType>
+  <DataType name="dtSnapConf">
+    <Property name="creationType">com.fzzy.igds.domain.SnapConf</Property>
+    <PropertyDef name="companyId">
+      <Property></Property>
+      <Property name="label">缁勭粐缂栫爜</Property>
+    </PropertyDef>
+    <PropertyDef name="createBy">
+      <Property></Property>
+      <Property name="label">鍒涘缓浜�</Property>
+    </PropertyDef>
+    <PropertyDef name="createTime">
+      <Property name="dataType">Date</Property>
+      <Property name="label">鍒涘缓鏃堕棿</Property>
+    </PropertyDef>
+    <PropertyDef name="updateBy">
+      <Property></Property>
+      <Property name="label">鏇存柊浜�</Property>
+    </PropertyDef>
+    <PropertyDef name="updateTime">
+      <Property name="dataType">Date</Property>
+      <Property name="label">鏇存柊鏃堕棿</Property>
+    </PropertyDef>
+    <PropertyDef name="id">
+      <Property></Property>
+    </PropertyDef>
+    <PropertyDef name="deptId">
+      <Property></Property>
+      <Property name="label">鎵�灞炲簱鍖�</Property>
+      <Property name="mapping">
+        <Property name="valueProperty">kqmc</Property>
+        <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#getAllData&quot;).getResult()}</Property>
+        <Property name="keyProperty">id</Property>
+      </Property>
+    </PropertyDef>
+    <PropertyDef name="cameraId">
+      <Property></Property>
+      <Property name="label">鎶撴媿鐩戞帶</Property>
+    </PropertyDef>
+    <PropertyDef name="actHour1">
+      <Property name="dataType">int</Property>
+      <Property name="label">鎵ц鏃堕棿1</Property>
+    </PropertyDef>
+    <PropertyDef name="actHour2">
+      <Property name="dataType">int</Property>
+      <Property name="label">鎵ц鏃堕棿2</Property>
+    </PropertyDef>
+    <PropertyDef name="actHour3">
+      <Property name="dataType">int</Property>
+      <Property name="label">鎵ц鏃堕棿3</Property>
+    </PropertyDef>
+  </DataType>
 </Model>

--
Gitblit v1.9.3