7b7a08e33a029cb0df2bf48d7c4d524c18d051f0..8320634e04682a8077e1695c2a53998675523b6b
2025-12-04 sgj
Merge remote-tracking branch 'origin/master'
832063 对比 | 目录
2025-12-04 sgj
添加第一版智能抓拍、抓拍配置
91a8e4 对比 | 目录
已修改2个文件
已添加8个文件
771 ■■■■■ 文件已修改
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/SnapRecord.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/SnapConfMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/SnapRecordMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapConfService.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapRecordService.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConf.view.xml 192 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConfPR.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecord.view.xml 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecordPR.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/models/core.model.xml 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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() {
    }
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> {
}
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>{
}
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("删除失败");
    }
}
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("删除失败");
    }
}
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>
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();
    }
}
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>
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();
    }
}
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>