提交代码
parent
88d671d50b
commit
ac05a76efe
|
@ -29,6 +29,11 @@
|
|||
<artifactId>spring-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- spring security 安全认证 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package com.ruoyi.common.utils.file;
|
||||
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Base64;
|
||||
|
||||
/**
|
||||
* JiangYuQi
|
||||
*/
|
||||
public class MultipartFileUtils {
|
||||
|
||||
public static MultipartFile base64ToMultipartFile(String base64) throws IOException {
|
||||
String[] parts = base64.split(",");
|
||||
String contentType = parts[0].split(";")[0].split(":")[1];
|
||||
byte[] bytes = Base64.getDecoder().decode(parts[1]);
|
||||
return new MockMultipartFile("file", "file", contentType, bytes);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备配置列表
|
||||
export function listAiBoxProjectConfig(query) {
|
||||
return request({
|
||||
url: '/project/aiBoxProjectConfig/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备配置详细
|
||||
export function getAiBoxProjectConfig(id) {
|
||||
return request({
|
||||
url: '/project/aiBoxProjectConfig/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备配置
|
||||
export function addAiBoxProjectConfig(data) {
|
||||
return request({
|
||||
url: '/project/aiBoxProjectConfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备配置
|
||||
export function updateAiBoxProjectConfig(data) {
|
||||
return request({
|
||||
url: '/project/aiBoxProjectConfig',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备配置
|
||||
export function delAiBoxProjectConfig(id) {
|
||||
return request({
|
||||
url: '/project/aiBoxProjectConfig/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备数据列表
|
||||
export function listAiBoxProjectData(query) {
|
||||
return request({
|
||||
url: '/project/aiBoxProjectData/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备数据详细
|
||||
export function getAiBoxProjectData(id) {
|
||||
return request({
|
||||
url: '/project/aiBoxProjectData/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备数据
|
||||
export function addAiBoxProjectData(data) {
|
||||
return request({
|
||||
url: '/project/aiBoxProjectData',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备数据
|
||||
export function updateAiBoxProjectData(data) {
|
||||
return request({
|
||||
url: '/project/aiBoxProjectData',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备数据
|
||||
export function delAiBoxProjectData(id) {
|
||||
return request({
|
||||
url: '/project/aiBoxProjectData/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,407 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input
|
||||
v-model="queryParams.projectId"
|
||||
placeholder="请输入项目主键"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位主键" prop="deptId">
|
||||
<el-input
|
||||
v-model="queryParams.deptId"
|
||||
placeholder="请输入单位主键"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="通道号" prop="channelId">
|
||||
<el-input
|
||||
v-model="queryParams.channelId"
|
||||
placeholder="请输入通道号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="通道名称" prop="channelName">
|
||||
<el-input
|
||||
v-model="queryParams.channelName"
|
||||
placeholder="请输入通道名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="相机名称" prop="ipcName">
|
||||
<el-input
|
||||
v-model="queryParams.ipcName"
|
||||
placeholder="请输入相机名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input
|
||||
v-model="queryParams.deviceName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序列号" prop="serialNumber">
|
||||
<el-input
|
||||
v-model="queryParams.serialNumber"
|
||||
placeholder="请输入设备序列号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="厂商名称" prop="manufacturer">
|
||||
<el-input
|
||||
v-model="queryParams.manufacturer"
|
||||
placeholder="请输入厂商名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据状态" prop="isDel">
|
||||
<el-select v-model="queryParams.isDel" placeholder="请选择数据状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_common_isdel"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否重要" prop="isImportance">
|
||||
<el-select v-model="queryParams.isImportance" placeholder="请选择是否重要" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['project:aiBoxProjectConfig:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['project:aiBoxProjectConfig:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['project:aiBoxProjectConfig:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['project:aiBoxProjectConfig:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="aiBoxProjectConfigList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="项目主键" align="center" prop="projectId" />
|
||||
<el-table-column label="单位主键" align="center" prop="deptId" />
|
||||
<el-table-column label="通道号" align="center" prop="channelId" />
|
||||
<el-table-column label="通道名称" align="center" prop="channelName" />
|
||||
<el-table-column label="相机名称" align="center" prop="ipcName" />
|
||||
<el-table-column label="设备名称" align="center" prop="deviceName" />
|
||||
<el-table-column label="设备序列号" align="center" prop="serialNumber" />
|
||||
<el-table-column label="厂商名称" align="center" prop="manufacturer" />
|
||||
<el-table-column label="数据状态" align="center" prop="isDel">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否重要" align="center" prop="isImportance">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isImportance"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['project:aiBoxProjectConfig:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:aiBoxProjectConfig:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改设备配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位主键" prop="deptId">
|
||||
<el-input v-model="form.deptId" placeholder="请输入单位主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通道号" prop="channelId">
|
||||
<el-input v-model="form.channelId" placeholder="请输入通道号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通道名称" prop="channelName">
|
||||
<el-input v-model="form.channelName" placeholder="请输入通道名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="相机名称" prop="ipcName">
|
||||
<el-input v-model="form.ipcName" placeholder="请输入相机名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序列号" prop="serialNumber">
|
||||
<el-input v-model="form.serialNumber" placeholder="请输入设备序列号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂商名称" prop="manufacturer">
|
||||
<el-input v-model="form.manufacturer" placeholder="请输入厂商名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据状态" prop="isDel">
|
||||
<el-select v-model="form.isDel" placeholder="请选择数据状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_common_isdel"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否重要" prop="isImportance">
|
||||
<el-select v-model="form.isImportance" placeholder="请选择是否重要">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listAiBoxProjectConfig, getAiBoxProjectConfig, delAiBoxProjectConfig, addAiBoxProjectConfig, updateAiBoxProjectConfig } from "@/api/project/aiBoxProjectConfig";
|
||||
|
||||
export default {
|
||||
name: "AiBoxProjectConfig",
|
||||
dicts: ['sys_yes_no', 'sys_common_isdel'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备配置表格数据
|
||||
aiBoxProjectConfigList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
channelId: null,
|
||||
channelName: null,
|
||||
ipcName: null,
|
||||
deviceName: null,
|
||||
serialNumber: null,
|
||||
manufacturer: null,
|
||||
isDel: null,
|
||||
isImportance: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备配置列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listAiBoxProjectConfig(this.queryParams).then(response => {
|
||||
this.aiBoxProjectConfigList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
channelId: null,
|
||||
channelName: null,
|
||||
ipcName: null,
|
||||
deviceName: null,
|
||||
serialNumber: null,
|
||||
manufacturer: null,
|
||||
isDel: null,
|
||||
isImportance: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加设备配置";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getAiBoxProjectConfig(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改设备配置";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateAiBoxProjectConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addAiBoxProjectConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除设备配置编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delAiBoxProjectConfig(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('project/aiBoxProjectConfig/export', {
|
||||
...this.queryParams
|
||||
}, `aiBoxProjectConfig_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,417 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input
|
||||
v-model="queryParams.projectId"
|
||||
placeholder="请输入项目主键"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门主键" prop="deptId">
|
||||
<el-input
|
||||
v-model="queryParams.deptId"
|
||||
placeholder="请输入部门主键"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input
|
||||
v-model="queryParams.deviceName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="plateNo">
|
||||
<el-input
|
||||
v-model="queryParams.plateNo"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['project:aiBoxProjectData:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['project:aiBoxProjectData:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['project:aiBoxProjectData:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['project:aiBoxProjectData:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="aiBoxProjectDataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="项目主键" align="center" prop="projectId" />
|
||||
<el-table-column label="部门主键" align="center" prop="deptId" />
|
||||
<el-table-column label="设备ID" align="center" prop="deviceId" />
|
||||
<el-table-column label="设备名称" align="center" prop="deviceName" />
|
||||
<el-table-column label="设备网口 0 IP 地址" align="center" prop="deviceAddr0" />
|
||||
<el-table-column label="设备网口 1 IP 地址" align="center" prop="deviceAddr1" />
|
||||
<el-table-column label="设备的序列号" align="center" prop="serialNumber" />
|
||||
<el-table-column label="相机的序列号" align="center" prop="ipcSerialNum" />
|
||||
<el-table-column label="相机的 IP 地址" align="center" prop="ipcAddr" />
|
||||
<el-table-column label="行为分析图片地址" align="center" prop="imageUrl" />
|
||||
<el-table-column label="通道号,用来唯一标识任务 ID" align="center" prop="channelId" />
|
||||
<el-table-column label="通道名称" align="center" prop="channelName" />
|
||||
<el-table-column label="报警类型" align="center" prop="alarmType" />
|
||||
<el-table-column label="告警 ID" align="center" prop="alarmId" />
|
||||
<el-table-column label="上报间隔" align="center" prop="reportRate" />
|
||||
<el-table-column label="采集时间" align="center" prop="timestamp" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.timestamp, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="左上角 X 坐标" align="center" prop="leftTopX" />
|
||||
<el-table-column label="左上角 Y 坐标" align="center" prop="leftTopY" />
|
||||
<el-table-column label="右下角 X 坐标" align="center" prop="rightBtmX" />
|
||||
<el-table-column label="右下角 Y 坐标" align="center" prop="rightBtmY" />
|
||||
<el-table-column label="当前告警区域人数" align="center" prop="personNum" />
|
||||
<el-table-column label="绊线进入人数数量" align="center" prop="inNum" />
|
||||
<el-table-column label="绊线离开人数数量" align="center" prop="outNum" />
|
||||
<el-table-column label="车牌号" align="center" prop="plateNo" />
|
||||
<el-table-column label="ValueType 为 1 时,代表明火检测;ValueType 为 2 时,代表烟雾检测;" align="center" prop="valueType" />
|
||||
<el-table-column label="告警短视频的地址" align="center" prop="alarmVideourl" />
|
||||
<el-table-column label="告警短视频的名称" align="center" prop="alarmVideoName" />
|
||||
<el-table-column label="人脸比对结果" align="center" prop="compareResult" />
|
||||
<el-table-column label="数据状态" align="center" prop="isDel" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['project:aiBoxProjectData:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:aiBoxProjectData:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改设备数据对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门主键" prop="deptId">
|
||||
<el-input v-model="form.deptId" placeholder="请输入部门主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备ID" prop="deviceId">
|
||||
<el-input v-model="form.deviceId" placeholder="请输入设备ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备网口 0 IP 地址" prop="deviceAddr0">
|
||||
<el-input v-model="form.deviceAddr0" placeholder="请输入设备网口 0 IP 地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备网口 1 IP 地址" prop="deviceAddr1">
|
||||
<el-input v-model="form.deviceAddr1" placeholder="请输入设备网口 1 IP 地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备的序列号" prop="serialNumber">
|
||||
<el-input v-model="form.serialNumber" placeholder="请输入设备的序列号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="相机的序列号" prop="ipcSerialNum">
|
||||
<el-input v-model="form.ipcSerialNum" placeholder="请输入相机的序列号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="相机的 IP 地址" prop="ipcAddr">
|
||||
<el-input v-model="form.ipcAddr" placeholder="请输入相机的 IP 地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="行为分析图片地址" prop="imageUrl">
|
||||
<el-input v-model="form.imageUrl" placeholder="请输入行为分析图片地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通道号,用来唯一标识任务 ID" prop="channelId">
|
||||
<el-input v-model="form.channelId" placeholder="请输入通道号,用来唯一标识任务 ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通道名称" prop="channelName">
|
||||
<el-input v-model="form.channelName" placeholder="请输入通道名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="告警 ID" prop="alarmId">
|
||||
<el-input v-model="form.alarmId" placeholder="请输入告警 ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上报间隔" prop="reportRate">
|
||||
<el-input v-model="form.reportRate" placeholder="请输入上报间隔" />
|
||||
</el-form-item>
|
||||
<el-form-item label="采集时间" prop="timestamp">
|
||||
<el-date-picker clearable
|
||||
v-model="form.timestamp"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择采集时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="左上角 X 坐标" prop="leftTopX">
|
||||
<el-input v-model="form.leftTopX" placeholder="请输入左上角 X 坐标" />
|
||||
</el-form-item>
|
||||
<el-form-item label="左上角 Y 坐标" prop="leftTopY">
|
||||
<el-input v-model="form.leftTopY" placeholder="请输入左上角 Y 坐标" />
|
||||
</el-form-item>
|
||||
<el-form-item label="右下角 X 坐标" prop="rightBtmX">
|
||||
<el-input v-model="form.rightBtmX" placeholder="请输入右下角 X 坐标" />
|
||||
</el-form-item>
|
||||
<el-form-item label="右下角 Y 坐标" prop="rightBtmY">
|
||||
<el-input v-model="form.rightBtmY" placeholder="请输入右下角 Y 坐标" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前告警区域人数" prop="personNum">
|
||||
<el-input v-model="form.personNum" placeholder="请输入当前告警区域人数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="绊线进入人数数量" prop="inNum">
|
||||
<el-input v-model="form.inNum" placeholder="请输入绊线进入人数数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="绊线离开人数数量" prop="outNum">
|
||||
<el-input v-model="form.outNum" placeholder="请输入绊线离开人数数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="plateNo">
|
||||
<el-input v-model="form.plateNo" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="告警短视频的地址" prop="alarmVideourl">
|
||||
<el-input v-model="form.alarmVideourl" placeholder="请输入告警短视频的地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="告警短视频的名称" prop="alarmVideoName">
|
||||
<el-input v-model="form.alarmVideoName" placeholder="请输入告警短视频的名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="人脸比对结果" prop="compareResult">
|
||||
<el-input v-model="form.compareResult" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据状态" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入数据状态" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listAiBoxProjectData, getAiBoxProjectData, delAiBoxProjectData, addAiBoxProjectData, updateAiBoxProjectData } from "@/api/project/aiBoxProjectData";
|
||||
|
||||
export default {
|
||||
name: "AiBoxProjectData",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备数据表格数据
|
||||
aiBoxProjectDataList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
deviceName: null,
|
||||
alarmType: null,
|
||||
plateNo: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备数据列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listAiBoxProjectData(this.queryParams).then(response => {
|
||||
this.aiBoxProjectDataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
deviceId: null,
|
||||
deviceName: null,
|
||||
deviceAddr0: null,
|
||||
deviceAddr1: null,
|
||||
serialNumber: null,
|
||||
ipcSerialNum: null,
|
||||
ipcAddr: null,
|
||||
imageUrl: null,
|
||||
channelId: null,
|
||||
channelName: null,
|
||||
alarmType: null,
|
||||
alarmId: null,
|
||||
reportRate: null,
|
||||
timestamp: null,
|
||||
leftTopX: null,
|
||||
leftTopY: null,
|
||||
rightBtmX: null,
|
||||
rightBtmY: null,
|
||||
personNum: null,
|
||||
inNum: null,
|
||||
outNum: null,
|
||||
plateNo: null,
|
||||
valueType: null,
|
||||
alarmVideourl: null,
|
||||
alarmVideoName: null,
|
||||
compareResult: null,
|
||||
createTime: null,
|
||||
isDel: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加设备数据";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getAiBoxProjectData(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改设备数据";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateAiBoxProjectData(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addAiBoxProjectData(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除设备数据编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delAiBoxProjectData(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('project/aiBoxProjectData/export', {
|
||||
...this.queryParams
|
||||
}, `aiBoxProjectData_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,104 @@
|
|||
package com.yanzhu.jh.project.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.yanzhu.jh.project.domain.DevAiProjectConfig;
|
||||
import com.yanzhu.jh.project.service.IDevAiProjectConfigService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备配置Controller
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-09-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/project/aiBoxProjectConfig")
|
||||
public class DevAiProjectConfigController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDevAiProjectConfigService devAiProjectConfigService;
|
||||
|
||||
/**
|
||||
* 查询设备配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:aiBoxProjectConfig:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DevAiProjectConfig devAiProjectConfig)
|
||||
{
|
||||
startPage();
|
||||
List<DevAiProjectConfig> list = devAiProjectConfigService.selectDevAiProjectConfigList(devAiProjectConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:aiBoxProjectConfig:export')")
|
||||
@Log(title = "设备配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DevAiProjectConfig devAiProjectConfig)
|
||||
{
|
||||
List<DevAiProjectConfig> list = devAiProjectConfigService.selectDevAiProjectConfigList(devAiProjectConfig);
|
||||
ExcelUtil<DevAiProjectConfig> util = new ExcelUtil<DevAiProjectConfig>(DevAiProjectConfig.class);
|
||||
util.exportExcel(response, list, "设备配置数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:aiBoxProjectConfig:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(devAiProjectConfigService.selectDevAiProjectConfigById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:aiBoxProjectConfig:add')")
|
||||
@Log(title = "设备配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DevAiProjectConfig devAiProjectConfig)
|
||||
{
|
||||
return toAjax(devAiProjectConfigService.insertDevAiProjectConfig(devAiProjectConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:aiBoxProjectConfig:edit')")
|
||||
@Log(title = "设备配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DevAiProjectConfig devAiProjectConfig)
|
||||
{
|
||||
return toAjax(devAiProjectConfigService.updateDevAiProjectConfig(devAiProjectConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:aiBoxProjectConfig:remove')")
|
||||
@Log(title = "设备配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(devAiProjectConfigService.deleteDevAiProjectConfigByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
package com.yanzhu.jh.project.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.yanzhu.jh.project.domain.DevAiProjectData;
|
||||
import com.yanzhu.jh.project.service.IDevAiProjectDataService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备数据Controller
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-09-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/project/aiBoxProjectData")
|
||||
public class DevAiProjectDataController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDevAiProjectDataService devAiProjectDataService;
|
||||
|
||||
/**
|
||||
* 查询设备数据列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:aiBoxProjectData:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DevAiProjectData devAiProjectData)
|
||||
{
|
||||
startPage();
|
||||
List<DevAiProjectData> list = devAiProjectDataService.selectDevAiProjectDataList(devAiProjectData);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备数据列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:aiBoxProjectData:export')")
|
||||
@Log(title = "设备数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DevAiProjectData devAiProjectData)
|
||||
{
|
||||
List<DevAiProjectData> list = devAiProjectDataService.selectDevAiProjectDataList(devAiProjectData);
|
||||
ExcelUtil<DevAiProjectData> util = new ExcelUtil<DevAiProjectData>(DevAiProjectData.class);
|
||||
util.exportExcel(response, list, "设备数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备数据详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:aiBoxProjectData:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(devAiProjectDataService.selectDevAiProjectDataById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:aiBoxProjectData:add')")
|
||||
@Log(title = "设备数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DevAiProjectData devAiProjectData)
|
||||
{
|
||||
return toAjax(devAiProjectDataService.insertDevAiProjectData(devAiProjectData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:aiBoxProjectData:edit')")
|
||||
@Log(title = "设备数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DevAiProjectData devAiProjectData)
|
||||
{
|
||||
return toAjax(devAiProjectDataService.updateDevAiProjectData(devAiProjectData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:aiBoxProjectData:remove')")
|
||||
@Log(title = "设备数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(devAiProjectDataService.deleteDevAiProjectDataByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,182 @@
|
|||
package com.yanzhu.jh.project.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设备配置对象 dev_ai_project_config
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-09-27
|
||||
*/
|
||||
public class DevAiProjectConfig extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 项目主键 */
|
||||
@Excel(name = "项目主键")
|
||||
private Long projectId;
|
||||
|
||||
/** 单位主键 */
|
||||
@Excel(name = "单位主键")
|
||||
private Long deptId;
|
||||
|
||||
/** 通道号 */
|
||||
@Excel(name = "通道号")
|
||||
private Long channelId;
|
||||
|
||||
/** 通道名称 */
|
||||
@Excel(name = "通道名称")
|
||||
private String channelName;
|
||||
|
||||
/** 相机名称 */
|
||||
@Excel(name = "相机名称")
|
||||
private String ipcName;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 设备序列号 */
|
||||
@Excel(name = "设备序列号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 厂商名称 */
|
||||
@Excel(name = "厂商名称")
|
||||
private String manufacturer;
|
||||
|
||||
/** 数据状态 */
|
||||
@Excel(name = "数据状态")
|
||||
private String isDel;
|
||||
|
||||
/** 是否重要 */
|
||||
@Excel(name = "是否重要")
|
||||
private String isImportance;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
public void setDeptId(Long deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public Long getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
public void setChannelId(Long channelId)
|
||||
{
|
||||
this.channelId = channelId;
|
||||
}
|
||||
|
||||
public Long getChannelId()
|
||||
{
|
||||
return channelId;
|
||||
}
|
||||
public void setChannelName(String channelName)
|
||||
{
|
||||
this.channelName = channelName;
|
||||
}
|
||||
|
||||
public String getChannelName()
|
||||
{
|
||||
return channelName;
|
||||
}
|
||||
public void setIpcName(String ipcName)
|
||||
{
|
||||
this.ipcName = ipcName;
|
||||
}
|
||||
|
||||
public String getIpcName()
|
||||
{
|
||||
return ipcName;
|
||||
}
|
||||
public void setDeviceName(String deviceName)
|
||||
{
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceName()
|
||||
{
|
||||
return deviceName;
|
||||
}
|
||||
public void setSerialNumber(String serialNumber)
|
||||
{
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getSerialNumber()
|
||||
{
|
||||
return serialNumber;
|
||||
}
|
||||
public void setManufacturer(String manufacturer)
|
||||
{
|
||||
this.manufacturer = manufacturer;
|
||||
}
|
||||
|
||||
public String getManufacturer()
|
||||
{
|
||||
return manufacturer;
|
||||
}
|
||||
public void setIsDel(String isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
public void setIsImportance(String isImportance)
|
||||
{
|
||||
this.isImportance = isImportance;
|
||||
}
|
||||
|
||||
public String getIsImportance()
|
||||
{
|
||||
return isImportance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("channelId", getChannelId())
|
||||
.append("channelName", getChannelName())
|
||||
.append("ipcName", getIpcName())
|
||||
.append("deviceName", getDeviceName())
|
||||
.append("serialNumber", getSerialNumber())
|
||||
.append("manufacturer", getManufacturer())
|
||||
.append("isDel", getIsDel())
|
||||
.append("isImportance", getIsImportance())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,447 @@
|
|||
package com.yanzhu.jh.project.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设备数据对象 dev_ai_project_data
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-09-27
|
||||
*/
|
||||
public class DevAiProjectData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 项目主键 */
|
||||
@Excel(name = "项目主键")
|
||||
private Long projectId;
|
||||
|
||||
/** 部门主键 */
|
||||
@Excel(name = "部门主键")
|
||||
private Long deptId;
|
||||
|
||||
/** 设备ID */
|
||||
@Excel(name = "设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 设备网口 0 IP 地址 */
|
||||
@Excel(name = "设备网口 0 IP 地址")
|
||||
private String deviceAddr0;
|
||||
|
||||
/** 设备网口 1 IP 地址 */
|
||||
@Excel(name = "设备网口 1 IP 地址")
|
||||
private String deviceAddr1;
|
||||
|
||||
/** 设备的序列号 */
|
||||
@Excel(name = "设备的序列号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 相机的序列号 */
|
||||
@Excel(name = "相机的序列号")
|
||||
private String ipcSerialNum;
|
||||
|
||||
/** 相机的 IP 地址 */
|
||||
@Excel(name = "相机的 IP 地址")
|
||||
private String ipcAddr;
|
||||
|
||||
/** 行为分析图片地址 */
|
||||
@Excel(name = "行为分析图片地址")
|
||||
private String imageUrl;
|
||||
|
||||
/** 通道号,用来唯一标识任务 ID */
|
||||
@Excel(name = "通道号,用来唯一标识任务 ID")
|
||||
private Long channelId;
|
||||
|
||||
/** 通道名称 */
|
||||
@Excel(name = "通道名称")
|
||||
private String channelName;
|
||||
|
||||
/** 报警类型 */
|
||||
@Excel(name = "报警类型")
|
||||
private Long alarmType;
|
||||
|
||||
/** 告警 ID */
|
||||
@Excel(name = "告警 ID")
|
||||
private Long alarmId;
|
||||
|
||||
/** 上报间隔 */
|
||||
@Excel(name = "上报间隔")
|
||||
private String reportRate;
|
||||
|
||||
/** 采集时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date timestamp;
|
||||
|
||||
/** 左上角 X 坐标 */
|
||||
@Excel(name = "左上角 X 坐标")
|
||||
private String leftTopX;
|
||||
|
||||
/** 左上角 Y 坐标 */
|
||||
@Excel(name = "左上角 Y 坐标")
|
||||
private String leftTopY;
|
||||
|
||||
/** 右下角 X 坐标 */
|
||||
@Excel(name = "右下角 X 坐标")
|
||||
private String rightBtmX;
|
||||
|
||||
/** 右下角 Y 坐标 */
|
||||
@Excel(name = "右下角 Y 坐标")
|
||||
private String rightBtmY;
|
||||
|
||||
/** 当前告警区域人数 */
|
||||
@Excel(name = "当前告警区域人数")
|
||||
private Long personNum;
|
||||
|
||||
/** 绊线进入人数数量 */
|
||||
@Excel(name = "绊线进入人数数量")
|
||||
private Long inNum;
|
||||
|
||||
/** 绊线离开人数数量 */
|
||||
@Excel(name = "绊线离开人数数量")
|
||||
private Long outNum;
|
||||
|
||||
/** 车牌号 */
|
||||
@Excel(name = "车牌号")
|
||||
private Long plateNo;
|
||||
|
||||
/** ValueType 为 1 时,代表明火检测;ValueType 为 2 时,代表烟雾检测; */
|
||||
@Excel(name = "ValueType 为 1 时,代表明火检测;ValueType 为 2 时,代表烟雾检测;")
|
||||
private String valueType;
|
||||
|
||||
/** 告警短视频的地址 */
|
||||
@Excel(name = "告警短视频的地址")
|
||||
private String alarmVideourl;
|
||||
|
||||
/** 告警短视频的名称 */
|
||||
@Excel(name = "告警短视频的名称")
|
||||
private String alarmVideoName;
|
||||
|
||||
/** 人脸比对结果 */
|
||||
@Excel(name = "人脸比对结果")
|
||||
private String compareResult;
|
||||
|
||||
/** 数据状态 */
|
||||
@Excel(name = "数据状态")
|
||||
private String isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
public void setDeptId(Long deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public Long getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
public void setDeviceId(Long deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
public void setDeviceName(String deviceName)
|
||||
{
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceName()
|
||||
{
|
||||
return deviceName;
|
||||
}
|
||||
public void setDeviceAddr0(String deviceAddr0)
|
||||
{
|
||||
this.deviceAddr0 = deviceAddr0;
|
||||
}
|
||||
|
||||
public String getDeviceAddr0()
|
||||
{
|
||||
return deviceAddr0;
|
||||
}
|
||||
public void setDeviceAddr1(String deviceAddr1)
|
||||
{
|
||||
this.deviceAddr1 = deviceAddr1;
|
||||
}
|
||||
|
||||
public String getDeviceAddr1()
|
||||
{
|
||||
return deviceAddr1;
|
||||
}
|
||||
public void setSerialNumber(String serialNumber)
|
||||
{
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getSerialNumber()
|
||||
{
|
||||
return serialNumber;
|
||||
}
|
||||
public void setIpcSerialNum(String ipcSerialNum)
|
||||
{
|
||||
this.ipcSerialNum = ipcSerialNum;
|
||||
}
|
||||
|
||||
public String getIpcSerialNum()
|
||||
{
|
||||
return ipcSerialNum;
|
||||
}
|
||||
public void setIpcAddr(String ipcAddr)
|
||||
{
|
||||
this.ipcAddr = ipcAddr;
|
||||
}
|
||||
|
||||
public String getIpcAddr()
|
||||
{
|
||||
return ipcAddr;
|
||||
}
|
||||
public void setImageUrl(String imageUrl)
|
||||
{
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
public String getImageUrl()
|
||||
{
|
||||
return imageUrl;
|
||||
}
|
||||
public void setChannelId(Long channelId)
|
||||
{
|
||||
this.channelId = channelId;
|
||||
}
|
||||
|
||||
public Long getChannelId()
|
||||
{
|
||||
return channelId;
|
||||
}
|
||||
public void setChannelName(String channelName)
|
||||
{
|
||||
this.channelName = channelName;
|
||||
}
|
||||
|
||||
public String getChannelName()
|
||||
{
|
||||
return channelName;
|
||||
}
|
||||
public void setAlarmType(Long alarmType)
|
||||
{
|
||||
this.alarmType = alarmType;
|
||||
}
|
||||
|
||||
public Long getAlarmType()
|
||||
{
|
||||
return alarmType;
|
||||
}
|
||||
public void setAlarmId(Long alarmId)
|
||||
{
|
||||
this.alarmId = alarmId;
|
||||
}
|
||||
|
||||
public Long getAlarmId()
|
||||
{
|
||||
return alarmId;
|
||||
}
|
||||
public void setReportRate(String reportRate)
|
||||
{
|
||||
this.reportRate = reportRate;
|
||||
}
|
||||
|
||||
public String getReportRate()
|
||||
{
|
||||
return reportRate;
|
||||
}
|
||||
public void setTimestamp(Date timestamp)
|
||||
{
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
public Date getTimestamp()
|
||||
{
|
||||
return timestamp;
|
||||
}
|
||||
public void setLeftTopX(String leftTopX)
|
||||
{
|
||||
this.leftTopX = leftTopX;
|
||||
}
|
||||
|
||||
public String getLeftTopX()
|
||||
{
|
||||
return leftTopX;
|
||||
}
|
||||
public void setLeftTopY(String leftTopY)
|
||||
{
|
||||
this.leftTopY = leftTopY;
|
||||
}
|
||||
|
||||
public String getLeftTopY()
|
||||
{
|
||||
return leftTopY;
|
||||
}
|
||||
public void setRightBtmX(String rightBtmX)
|
||||
{
|
||||
this.rightBtmX = rightBtmX;
|
||||
}
|
||||
|
||||
public String getRightBtmX()
|
||||
{
|
||||
return rightBtmX;
|
||||
}
|
||||
public void setRightBtmY(String rightBtmY)
|
||||
{
|
||||
this.rightBtmY = rightBtmY;
|
||||
}
|
||||
|
||||
public String getRightBtmY()
|
||||
{
|
||||
return rightBtmY;
|
||||
}
|
||||
public void setPersonNum(Long personNum)
|
||||
{
|
||||
this.personNum = personNum;
|
||||
}
|
||||
|
||||
public Long getPersonNum()
|
||||
{
|
||||
return personNum;
|
||||
}
|
||||
public void setInNum(Long inNum)
|
||||
{
|
||||
this.inNum = inNum;
|
||||
}
|
||||
|
||||
public Long getInNum()
|
||||
{
|
||||
return inNum;
|
||||
}
|
||||
public void setOutNum(Long outNum)
|
||||
{
|
||||
this.outNum = outNum;
|
||||
}
|
||||
|
||||
public Long getOutNum()
|
||||
{
|
||||
return outNum;
|
||||
}
|
||||
public void setPlateNo(Long plateNo)
|
||||
{
|
||||
this.plateNo = plateNo;
|
||||
}
|
||||
|
||||
public Long getPlateNo()
|
||||
{
|
||||
return plateNo;
|
||||
}
|
||||
public void setValueType(String valueType)
|
||||
{
|
||||
this.valueType = valueType;
|
||||
}
|
||||
|
||||
public String getValueType()
|
||||
{
|
||||
return valueType;
|
||||
}
|
||||
public void setAlarmVideourl(String alarmVideourl)
|
||||
{
|
||||
this.alarmVideourl = alarmVideourl;
|
||||
}
|
||||
|
||||
public String getAlarmVideourl()
|
||||
{
|
||||
return alarmVideourl;
|
||||
}
|
||||
public void setAlarmVideoName(String alarmVideoName)
|
||||
{
|
||||
this.alarmVideoName = alarmVideoName;
|
||||
}
|
||||
|
||||
public String getAlarmVideoName()
|
||||
{
|
||||
return alarmVideoName;
|
||||
}
|
||||
public void setCompareResult(String compareResult)
|
||||
{
|
||||
this.compareResult = compareResult;
|
||||
}
|
||||
|
||||
public String getCompareResult()
|
||||
{
|
||||
return compareResult;
|
||||
}
|
||||
public void setIsDel(String isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("deviceName", getDeviceName())
|
||||
.append("deviceAddr0", getDeviceAddr0())
|
||||
.append("deviceAddr1", getDeviceAddr1())
|
||||
.append("serialNumber", getSerialNumber())
|
||||
.append("ipcSerialNum", getIpcSerialNum())
|
||||
.append("ipcAddr", getIpcAddr())
|
||||
.append("imageUrl", getImageUrl())
|
||||
.append("channelId", getChannelId())
|
||||
.append("channelName", getChannelName())
|
||||
.append("alarmType", getAlarmType())
|
||||
.append("alarmId", getAlarmId())
|
||||
.append("reportRate", getReportRate())
|
||||
.append("timestamp", getTimestamp())
|
||||
.append("leftTopX", getLeftTopX())
|
||||
.append("leftTopY", getLeftTopY())
|
||||
.append("rightBtmX", getRightBtmX())
|
||||
.append("rightBtmY", getRightBtmY())
|
||||
.append("personNum", getPersonNum())
|
||||
.append("inNum", getInNum())
|
||||
.append("outNum", getOutNum())
|
||||
.append("plateNo", getPlateNo())
|
||||
.append("valueType", getValueType())
|
||||
.append("alarmVideourl", getAlarmVideourl())
|
||||
.append("alarmVideoName", getAlarmVideoName())
|
||||
.append("compareResult", getCompareResult())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("isDel", getIsDel())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,295 @@
|
|||
package com.yanzhu.jh.project.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
public class DevAiProjectDataVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 设备ID */
|
||||
private Long DeviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
private String DeviceName;
|
||||
|
||||
/** 设备网口 0 IP 地址 */
|
||||
private String DeviceAddr0;
|
||||
|
||||
/** 设备网口 1 IP 地址 */
|
||||
private String DeviceAddr1;
|
||||
|
||||
/** 设备的序列号 */
|
||||
private String SerialNumber;
|
||||
|
||||
/** 相机的序列号 */
|
||||
private String IPCSerialNum;
|
||||
|
||||
/** 相机的 IP 地址 */
|
||||
private String IPCAddr;
|
||||
|
||||
/** 通道号,用来唯一标识任务 ID */
|
||||
private Long ChannelId;
|
||||
|
||||
/** 通道名称 */
|
||||
private String ChannelName;
|
||||
|
||||
/** 报警类型 */
|
||||
private Long AlarmType;
|
||||
|
||||
/** 告警 ID */
|
||||
private Long AlarmId;
|
||||
|
||||
/** 上报间隔 */
|
||||
private String ReportRate;
|
||||
|
||||
/** 采集时间 */
|
||||
private Long Timestamp;
|
||||
|
||||
/** 左上角 X 坐标 */
|
||||
private String LeftTopX;
|
||||
|
||||
/** 左上角 Y 坐标 */
|
||||
private String LeftTopY;
|
||||
|
||||
/** 右下角 X 坐标 */
|
||||
private String RightBtmX;
|
||||
|
||||
/** 右下角 Y 坐标 */
|
||||
private String RightBtmY;
|
||||
|
||||
/** 当前告警区域人数 */
|
||||
private Long PersonNum;
|
||||
|
||||
/** 绊线进入人数数量 */
|
||||
private Long InNum;
|
||||
|
||||
/** 绊线离开人数数量 */
|
||||
private Long OutNum;
|
||||
|
||||
/** 车牌号 */
|
||||
private Long PlateNo;
|
||||
|
||||
/** ValueType 为 1 时,代表明火检测;ValueType 为 2 时,代表烟雾检测; */
|
||||
private String ValueType;
|
||||
|
||||
/** 告警短视频的地址 */
|
||||
private String AlarmVideourl;
|
||||
|
||||
/** 告警短视频的名称 */
|
||||
private String AlarmVideoName;
|
||||
|
||||
/** 人脸比对结果 */
|
||||
private String CompareResult;
|
||||
|
||||
private Map<String, Object> BigImage;
|
||||
|
||||
public Long getDeviceId() {
|
||||
return DeviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId) {
|
||||
DeviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return DeviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
DeviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceAddr0() {
|
||||
return DeviceAddr0;
|
||||
}
|
||||
|
||||
public void setDeviceAddr0(String deviceAddr0) {
|
||||
DeviceAddr0 = deviceAddr0;
|
||||
}
|
||||
|
||||
public String getDeviceAddr1() {
|
||||
return DeviceAddr1;
|
||||
}
|
||||
|
||||
public void setDeviceAddr1(String deviceAddr1) {
|
||||
DeviceAddr1 = deviceAddr1;
|
||||
}
|
||||
|
||||
public String getSerialNumber() {
|
||||
return SerialNumber;
|
||||
}
|
||||
|
||||
public void setSerialNumber(String serialNumber) {
|
||||
SerialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getIPCSerialNum() {
|
||||
return IPCSerialNum;
|
||||
}
|
||||
|
||||
public void setIPCSerialNum(String IPCSerialNum) {
|
||||
this.IPCSerialNum = IPCSerialNum;
|
||||
}
|
||||
|
||||
public String getIPCAddr() {
|
||||
return IPCAddr;
|
||||
}
|
||||
|
||||
public void setIPCAddr(String IPCAddr) {
|
||||
this.IPCAddr = IPCAddr;
|
||||
}
|
||||
|
||||
public Long getChannelId() {
|
||||
return ChannelId;
|
||||
}
|
||||
|
||||
public void setChannelId(Long channelId) {
|
||||
ChannelId = channelId;
|
||||
}
|
||||
|
||||
public String getChannelName() {
|
||||
return ChannelName;
|
||||
}
|
||||
|
||||
public void setChannelName(String channelName) {
|
||||
ChannelName = channelName;
|
||||
}
|
||||
|
||||
public Long getAlarmType() {
|
||||
return AlarmType;
|
||||
}
|
||||
|
||||
public void setAlarmType(Long alarmType) {
|
||||
AlarmType = alarmType;
|
||||
}
|
||||
|
||||
public Long getAlarmId() {
|
||||
return AlarmId;
|
||||
}
|
||||
|
||||
public void setAlarmId(Long alarmId) {
|
||||
AlarmId = alarmId;
|
||||
}
|
||||
|
||||
public String getReportRate() {
|
||||
return ReportRate;
|
||||
}
|
||||
|
||||
public void setReportRate(String reportRate) {
|
||||
ReportRate = reportRate;
|
||||
}
|
||||
|
||||
public Long getTimestamp() {
|
||||
return Timestamp;
|
||||
}
|
||||
|
||||
public void setTimestamp(Long timestamp) {
|
||||
Timestamp = timestamp;
|
||||
}
|
||||
|
||||
public String getLeftTopX() {
|
||||
return LeftTopX;
|
||||
}
|
||||
|
||||
public void setLeftTopX(String leftTopX) {
|
||||
LeftTopX = leftTopX;
|
||||
}
|
||||
|
||||
public String getLeftTopY() {
|
||||
return LeftTopY;
|
||||
}
|
||||
|
||||
public void setLeftTopY(String leftTopY) {
|
||||
LeftTopY = leftTopY;
|
||||
}
|
||||
|
||||
public String getRightBtmX() {
|
||||
return RightBtmX;
|
||||
}
|
||||
|
||||
public void setRightBtmX(String rightBtmX) {
|
||||
RightBtmX = rightBtmX;
|
||||
}
|
||||
|
||||
public String getRightBtmY() {
|
||||
return RightBtmY;
|
||||
}
|
||||
|
||||
public void setRightBtmY(String rightBtmY) {
|
||||
RightBtmY = rightBtmY;
|
||||
}
|
||||
|
||||
public Long getPersonNum() {
|
||||
return PersonNum;
|
||||
}
|
||||
|
||||
public void setPersonNum(Long personNum) {
|
||||
PersonNum = personNum;
|
||||
}
|
||||
|
||||
public Long getInNum() {
|
||||
return InNum;
|
||||
}
|
||||
|
||||
public void setInNum(Long inNum) {
|
||||
InNum = inNum;
|
||||
}
|
||||
|
||||
public Long getOutNum() {
|
||||
return OutNum;
|
||||
}
|
||||
|
||||
public void setOutNum(Long outNum) {
|
||||
OutNum = outNum;
|
||||
}
|
||||
|
||||
public Long getPlateNo() {
|
||||
return PlateNo;
|
||||
}
|
||||
|
||||
public void setPlateNo(Long plateNo) {
|
||||
PlateNo = plateNo;
|
||||
}
|
||||
|
||||
public String getValueType() {
|
||||
return ValueType;
|
||||
}
|
||||
|
||||
public void setValueType(String valueType) {
|
||||
ValueType = valueType;
|
||||
}
|
||||
|
||||
public String getAlarmVideourl() {
|
||||
return AlarmVideourl;
|
||||
}
|
||||
|
||||
public void setAlarmVideourl(String alarmVideourl) {
|
||||
AlarmVideourl = alarmVideourl;
|
||||
}
|
||||
|
||||
public String getAlarmVideoName() {
|
||||
return AlarmVideoName;
|
||||
}
|
||||
|
||||
public void setAlarmVideoName(String alarmVideoName) {
|
||||
AlarmVideoName = alarmVideoName;
|
||||
}
|
||||
|
||||
public String getCompareResult() {
|
||||
return CompareResult;
|
||||
}
|
||||
|
||||
public void setCompareResult(String compareResult) {
|
||||
CompareResult = compareResult;
|
||||
}
|
||||
|
||||
public Map<String, Object> getBigImage() {
|
||||
return BigImage;
|
||||
}
|
||||
|
||||
public void setBigImage(Map<String, Object> bigImage) {
|
||||
BigImage = bigImage;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.jh.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.jh.project.domain.DevAiProjectConfig;
|
||||
|
||||
/**
|
||||
* 设备配置Mapper接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-09-27
|
||||
*/
|
||||
public interface DevAiProjectConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备配置
|
||||
*
|
||||
* @param id 设备配置主键
|
||||
* @return 设备配置
|
||||
*/
|
||||
public DevAiProjectConfig selectDevAiProjectConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询设备配置列表
|
||||
*
|
||||
* @param devAiProjectConfig 设备配置
|
||||
* @return 设备配置集合
|
||||
*/
|
||||
public List<DevAiProjectConfig> selectDevAiProjectConfigList(DevAiProjectConfig devAiProjectConfig);
|
||||
|
||||
/**
|
||||
* 新增设备配置
|
||||
*
|
||||
* @param devAiProjectConfig 设备配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevAiProjectConfig(DevAiProjectConfig devAiProjectConfig);
|
||||
|
||||
/**
|
||||
* 修改设备配置
|
||||
*
|
||||
* @param devAiProjectConfig 设备配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevAiProjectConfig(DevAiProjectConfig devAiProjectConfig);
|
||||
|
||||
/**
|
||||
* 删除设备配置
|
||||
*
|
||||
* @param id 设备配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevAiProjectConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除设备配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevAiProjectConfigByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.jh.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.jh.project.domain.DevAiProjectData;
|
||||
|
||||
/**
|
||||
* 设备数据Mapper接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-09-27
|
||||
*/
|
||||
public interface DevAiProjectDataMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备数据
|
||||
*
|
||||
* @param id 设备数据主键
|
||||
* @return 设备数据
|
||||
*/
|
||||
public DevAiProjectData selectDevAiProjectDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询设备数据列表
|
||||
*
|
||||
* @param devAiProjectData 设备数据
|
||||
* @return 设备数据集合
|
||||
*/
|
||||
public List<DevAiProjectData> selectDevAiProjectDataList(DevAiProjectData devAiProjectData);
|
||||
|
||||
/**
|
||||
* 新增设备数据
|
||||
*
|
||||
* @param devAiProjectData 设备数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevAiProjectData(DevAiProjectData devAiProjectData);
|
||||
|
||||
/**
|
||||
* 修改设备数据
|
||||
*
|
||||
* @param devAiProjectData 设备数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevAiProjectData(DevAiProjectData devAiProjectData);
|
||||
|
||||
/**
|
||||
* 删除设备数据
|
||||
*
|
||||
* @param id 设备数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevAiProjectDataById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除设备数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevAiProjectDataByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.jh.project.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.jh.project.domain.DevAiProjectConfig;
|
||||
|
||||
/**
|
||||
* 设备配置Service接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-09-27
|
||||
*/
|
||||
public interface IDevAiProjectConfigService
|
||||
{
|
||||
/**
|
||||
* 查询设备配置
|
||||
*
|
||||
* @param id 设备配置主键
|
||||
* @return 设备配置
|
||||
*/
|
||||
public DevAiProjectConfig selectDevAiProjectConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询设备配置列表
|
||||
*
|
||||
* @param devAiProjectConfig 设备配置
|
||||
* @return 设备配置集合
|
||||
*/
|
||||
public List<DevAiProjectConfig> selectDevAiProjectConfigList(DevAiProjectConfig devAiProjectConfig);
|
||||
|
||||
/**
|
||||
* 新增设备配置
|
||||
*
|
||||
* @param devAiProjectConfig 设备配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevAiProjectConfig(DevAiProjectConfig devAiProjectConfig);
|
||||
|
||||
/**
|
||||
* 修改设备配置
|
||||
*
|
||||
* @param devAiProjectConfig 设备配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevAiProjectConfig(DevAiProjectConfig devAiProjectConfig);
|
||||
|
||||
/**
|
||||
* 批量删除设备配置
|
||||
*
|
||||
* @param ids 需要删除的设备配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevAiProjectConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除设备配置信息
|
||||
*
|
||||
* @param id 设备配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevAiProjectConfigById(Long id);
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.yanzhu.jh.project.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.jh.project.domain.DevAiProjectData;
|
||||
import com.yanzhu.jh.project.domain.vo.DevAiProjectDataVO;
|
||||
|
||||
/**
|
||||
* 设备数据Service接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-09-27
|
||||
*/
|
||||
public interface IDevAiProjectDataService
|
||||
{
|
||||
/**
|
||||
* 查询设备数据
|
||||
*
|
||||
* @param id 设备数据主键
|
||||
* @return 设备数据
|
||||
*/
|
||||
public DevAiProjectData selectDevAiProjectDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询设备数据列表
|
||||
*
|
||||
* @param devAiProjectData 设备数据
|
||||
* @return 设备数据集合
|
||||
*/
|
||||
public List<DevAiProjectData> selectDevAiProjectDataList(DevAiProjectData devAiProjectData);
|
||||
|
||||
/**
|
||||
* 新增设备数据
|
||||
*
|
||||
* @param devAiProjectData 设备数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevAiProjectData(DevAiProjectData devAiProjectData);
|
||||
|
||||
/**
|
||||
* 新增设备数据
|
||||
*
|
||||
* @param devAiProjectDataVO 设备数据
|
||||
* @return 结果
|
||||
*/
|
||||
public void insertHttpDevAiProjectData(DevAiProjectDataVO devAiProjectDataVO);
|
||||
|
||||
/**
|
||||
* 修改设备数据
|
||||
*
|
||||
* @param devAiProjectData 设备数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevAiProjectData(DevAiProjectData devAiProjectData);
|
||||
|
||||
/**
|
||||
* 批量删除设备数据
|
||||
*
|
||||
* @param ids 需要删除的设备数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevAiProjectDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除设备数据信息
|
||||
*
|
||||
* @param id 设备数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevAiProjectDataById(Long id);
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.yanzhu.jh.project.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.jh.project.mapper.DevAiProjectConfigMapper;
|
||||
import com.yanzhu.jh.project.domain.DevAiProjectConfig;
|
||||
import com.yanzhu.jh.project.service.IDevAiProjectConfigService;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
/**
|
||||
* 设备配置Service业务层处理
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-09-27
|
||||
*/
|
||||
@Service
|
||||
public class DevAiProjectConfigServiceImpl implements IDevAiProjectConfigService
|
||||
{
|
||||
@Autowired
|
||||
private DevAiProjectConfigMapper devAiProjectConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询设备配置
|
||||
*
|
||||
* @param id 设备配置主键
|
||||
* @return 设备配置
|
||||
*/
|
||||
@Override
|
||||
public DevAiProjectConfig selectDevAiProjectConfigById(Long id)
|
||||
{
|
||||
return devAiProjectConfigMapper.selectDevAiProjectConfigById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备配置列表
|
||||
*
|
||||
* @param devAiProjectConfig 设备配置
|
||||
* @return 设备配置
|
||||
*/
|
||||
@Override
|
||||
public List<DevAiProjectConfig> selectDevAiProjectConfigList(DevAiProjectConfig devAiProjectConfig)
|
||||
{
|
||||
return devAiProjectConfigMapper.selectDevAiProjectConfigList(devAiProjectConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备配置
|
||||
*
|
||||
* @param devAiProjectConfig 设备配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDevAiProjectConfig(DevAiProjectConfig devAiProjectConfig)
|
||||
{
|
||||
devAiProjectConfig.setCreateBy(SecurityUtils.getUsername());
|
||||
devAiProjectConfig.setCreateTime(DateUtils.getNowDate());
|
||||
return devAiProjectConfigMapper.insertDevAiProjectConfig(devAiProjectConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备配置
|
||||
*
|
||||
* @param devAiProjectConfig 设备配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDevAiProjectConfig(DevAiProjectConfig devAiProjectConfig)
|
||||
{
|
||||
devAiProjectConfig.setUpdateBy(SecurityUtils.getUsername());
|
||||
devAiProjectConfig.setUpdateTime(DateUtils.getNowDate());
|
||||
return devAiProjectConfigMapper.updateDevAiProjectConfig(devAiProjectConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备配置
|
||||
*
|
||||
* @param ids 需要删除的设备配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDevAiProjectConfigByIds(Long[] ids)
|
||||
{
|
||||
return devAiProjectConfigMapper.deleteDevAiProjectConfigByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备配置信息
|
||||
*
|
||||
* @param id 设备配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDevAiProjectConfigById(Long id)
|
||||
{
|
||||
return devAiProjectConfigMapper.deleteDevAiProjectConfigById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,188 @@
|
|||
package com.yanzhu.jh.project.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.MultipartFileUtils;
|
||||
import com.yanzhu.jh.project.domain.vo.DevAiProjectDataVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.jh.project.mapper.DevAiProjectDataMapper;
|
||||
import com.yanzhu.jh.project.domain.DevAiProjectData;
|
||||
import com.yanzhu.jh.project.service.IDevAiProjectDataService;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 设备数据Service业务层处理
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-09-27
|
||||
*/
|
||||
@Service
|
||||
public class DevAiProjectDataServiceImpl implements IDevAiProjectDataService
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger("DevAiProjectDataServiceImpl");
|
||||
|
||||
@Autowired
|
||||
private DevAiProjectDataMapper devAiProjectDataMapper;
|
||||
|
||||
/**
|
||||
* 查询设备数据
|
||||
*
|
||||
* @param id 设备数据主键
|
||||
* @return 设备数据
|
||||
*/
|
||||
@Override
|
||||
public DevAiProjectData selectDevAiProjectDataById(Long id)
|
||||
{
|
||||
return devAiProjectDataMapper.selectDevAiProjectDataById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备数据列表
|
||||
*
|
||||
* @param devAiProjectData 设备数据
|
||||
* @return 设备数据
|
||||
*/
|
||||
@Override
|
||||
public List<DevAiProjectData> selectDevAiProjectDataList(DevAiProjectData devAiProjectData)
|
||||
{
|
||||
return devAiProjectDataMapper.selectDevAiProjectDataList(devAiProjectData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备数据
|
||||
*
|
||||
* @param devAiProjectData 设备数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDevAiProjectData(DevAiProjectData devAiProjectData)
|
||||
{
|
||||
devAiProjectData.setCreateTime(DateUtils.getNowDate());
|
||||
return devAiProjectDataMapper.insertDevAiProjectData(devAiProjectData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备数据
|
||||
*
|
||||
* @param devAiProjectDataVO 设备数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public void insertHttpDevAiProjectData(DevAiProjectDataVO devAiProjectDataVO)
|
||||
{
|
||||
logger.info("上报消息解析成功!!开始转换实体!!!");
|
||||
DevAiProjectData devAiProjectData = new DevAiProjectData();
|
||||
devAiProjectData.setDeviceId(devAiProjectDataVO.getDeviceId());
|
||||
/** 设备名称 */
|
||||
devAiProjectData.setDeviceName(devAiProjectDataVO.getDeviceName());
|
||||
/** 设备网口 0 IP 地址 */
|
||||
devAiProjectData.setDeviceAddr0(devAiProjectDataVO.getDeviceAddr0());
|
||||
/** 设备网口 1 IP 地址 */
|
||||
devAiProjectData.setDeviceAddr1(devAiProjectDataVO.getDeviceAddr1());
|
||||
/** 设备的序列号 */
|
||||
devAiProjectData.setSerialNumber(devAiProjectDataVO.getSerialNumber());
|
||||
/** 相机的序列号 */
|
||||
devAiProjectData.setIpcSerialNum(devAiProjectDataVO.getIPCSerialNum());
|
||||
/** 相机的 IP 地址 */
|
||||
devAiProjectData.setIpcAddr(devAiProjectDataVO.getIPCAddr());
|
||||
/** 通道号,用来唯一标识任务 ID */
|
||||
devAiProjectData.setChannelId(devAiProjectDataVO.getChannelId());
|
||||
/** 通道名称 */
|
||||
devAiProjectData.setChannelName(devAiProjectDataVO.getChannelName());
|
||||
/** 报警类型 */
|
||||
devAiProjectData.setAlarmType(devAiProjectDataVO.getAlarmType());
|
||||
/** 告警 ID */
|
||||
devAiProjectData.setAlarmId(devAiProjectDataVO.getAlarmId());
|
||||
/** 上报间隔 */
|
||||
devAiProjectData.setReportRate(devAiProjectDataVO.getReportRate());
|
||||
/** 采集时间 */
|
||||
devAiProjectData.setTimestamp(new Date(devAiProjectDataVO.getTimestamp()*1000));
|
||||
/** 左上角 X 坐标 */
|
||||
devAiProjectData.setLeftTopX(devAiProjectDataVO.getLeftTopX());
|
||||
/** 左上角 Y 坐标 */
|
||||
devAiProjectData.setLeftTopY(devAiProjectDataVO.getLeftTopY());
|
||||
/** 右下角 X 坐标 */
|
||||
devAiProjectData.setRightBtmX(devAiProjectDataVO.getRightBtmX());
|
||||
/** 右下角 Y 坐标 */
|
||||
devAiProjectData.setRightBtmY(devAiProjectDataVO.getRightBtmY());
|
||||
/** 当前告警区域人数 */
|
||||
devAiProjectData.setPersonNum(devAiProjectDataVO.getPersonNum());
|
||||
/** 绊线进入人数数量 */
|
||||
devAiProjectData.setInNum(devAiProjectDataVO.getInNum());
|
||||
/** 绊线离开人数数量 */
|
||||
devAiProjectData.setOutNum(devAiProjectDataVO.getOutNum());
|
||||
/** 车牌号 */
|
||||
devAiProjectData.setPlateNo(devAiProjectDataVO.getPlateNo());
|
||||
/** ValueType 为 1 时,代表明火检测;ValueType 为 2 时,代表烟雾检测; */
|
||||
devAiProjectData.setValueType(devAiProjectDataVO.getValueType());
|
||||
/** 告警短视频的地址 */
|
||||
devAiProjectData.setAlarmVideourl(devAiProjectDataVO.getAlarmVideourl());
|
||||
/** 告警短视频的名称 */
|
||||
devAiProjectData.setAlarmVideoName(devAiProjectDataVO.getAlarmVideoName());
|
||||
/** 人脸比对结果 */
|
||||
devAiProjectData.setCompareResult(devAiProjectDataVO.getCompareResult());
|
||||
logger.info("实体转换成功!!Base64开始转换图片!!!");
|
||||
String objImg64 = devAiProjectDataVO.getBigImage().get("Image").toString();
|
||||
try {
|
||||
MultipartFile file = MultipartFileUtils.base64ToMultipartFile(objImg64);
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String profileFile = FileUploadUtils.upload(filePath, file);
|
||||
devAiProjectData.setImageUrl(profileFile);
|
||||
logger.info("Base64上传图片成功!!!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
devAiProjectData.setCreateTime(DateUtils.getNowDate());
|
||||
devAiProjectData.setIsDel(PublicStateEnum.OK.getCode());
|
||||
logger.info("新增AI设备数据成功");
|
||||
devAiProjectDataMapper.insertDevAiProjectData(devAiProjectData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备数据
|
||||
*
|
||||
* @param devAiProjectData 设备数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDevAiProjectData(DevAiProjectData devAiProjectData)
|
||||
{
|
||||
return devAiProjectDataMapper.updateDevAiProjectData(devAiProjectData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备数据
|
||||
*
|
||||
* @param ids 需要删除的设备数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDevAiProjectDataByIds(Long[] ids)
|
||||
{
|
||||
return devAiProjectDataMapper.deleteDevAiProjectDataByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备数据信息
|
||||
*
|
||||
* @param id 设备数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDevAiProjectDataById(Long id)
|
||||
{
|
||||
return devAiProjectDataMapper.deleteDevAiProjectDataById(id);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package com.yanzhu.jh.publics;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.yanzhu.jh.project.domain.DevAiProjectData;
|
||||
import com.yanzhu.jh.project.domain.vo.DevAiProjectDataVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* AIBoxController
|
||||
* 智能盒子
|
||||
* @author JiangYuQi
|
||||
* @date 2023-07-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/publics/aiBox")
|
||||
public class AIBoxController extends BaseController {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger("AIBoxController");
|
||||
|
||||
/**
|
||||
* 获取部门列表
|
||||
*/
|
||||
@PostMapping("/v1/push")
|
||||
public void list(@RequestBody Map<String,Object> dataMap)
|
||||
{
|
||||
try{
|
||||
List<DevAiProjectDataVO> devAiProjectDataVOs = (List<DevAiProjectDataVO>)dataMap.get("BehaviorResults");
|
||||
if(devAiProjectDataVOs!=null && devAiProjectDataVOs.size()>0){
|
||||
DevAiProjectDataVO devAiProjectDataVO = devAiProjectDataVOs.get(0);
|
||||
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.info("AiBox解析参数失败!!!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.jh.project.mapper.DevAiProjectConfigMapper">
|
||||
|
||||
<resultMap type="DevAiProjectConfig" id="DevAiProjectConfigResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="channelId" column="channel_id" />
|
||||
<result property="channelName" column="channel_name" />
|
||||
<result property="ipcName" column="ipc_name" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="serialNumber" column="serial_number" />
|
||||
<result property="manufacturer" column="manufacturer" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="isImportance" column="is_importance" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevAiProjectConfigVo">
|
||||
select id, project_id, dept_id, channel_id, channel_name, ipc_name, device_name, serial_number, manufacturer, is_del, is_importance, create_by, create_time, update_by, update_time, remark from dev_ai_project_config
|
||||
</sql>
|
||||
|
||||
<select id="selectDevAiProjectConfigList" parameterType="DevAiProjectConfig" resultMap="DevAiProjectConfigResult">
|
||||
<include refid="selectDevAiProjectConfigVo"/>
|
||||
<where>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="channelId != null "> and channel_id = #{channelId}</if>
|
||||
<if test="channelName != null and channelName != ''"> and channel_name like concat('%', #{channelName}, '%')</if>
|
||||
<if test="ipcName != null and ipcName != ''"> and ipc_name like concat('%', #{ipcName}, '%')</if>
|
||||
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
|
||||
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
|
||||
<if test="manufacturer != null and manufacturer != ''"> and manufacturer like concat('%', #{manufacturer}, '%')</if>
|
||||
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
||||
<if test="isImportance != null and isImportance != ''"> and is_importance = #{isImportance}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDevAiProjectConfigById" parameterType="Long" resultMap="DevAiProjectConfigResult">
|
||||
<include refid="selectDevAiProjectConfigVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDevAiProjectConfig" parameterType="DevAiProjectConfig" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_ai_project_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="channelId != null">channel_id,</if>
|
||||
<if test="channelName != null">channel_name,</if>
|
||||
<if test="ipcName != null">ipc_name,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="serialNumber != null">serial_number,</if>
|
||||
<if test="manufacturer != null">manufacturer,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="isImportance != null">is_importance,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="channelId != null">#{channelId},</if>
|
||||
<if test="channelName != null">#{channelName},</if>
|
||||
<if test="ipcName != null">#{ipcName},</if>
|
||||
<if test="deviceName != null">#{deviceName},</if>
|
||||
<if test="serialNumber != null">#{serialNumber},</if>
|
||||
<if test="manufacturer != null">#{manufacturer},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="isImportance != null">#{isImportance},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevAiProjectConfig" parameterType="DevAiProjectConfig">
|
||||
update dev_ai_project_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="channelId != null">channel_id = #{channelId},</if>
|
||||
<if test="channelName != null">channel_name = #{channelName},</if>
|
||||
<if test="ipcName != null">ipc_name = #{ipcName},</if>
|
||||
<if test="deviceName != null">device_name = #{deviceName},</if>
|
||||
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
||||
<if test="manufacturer != null">manufacturer = #{manufacturer},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="isImportance != null">is_importance = #{isImportance},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDevAiProjectConfigById" parameterType="Long">
|
||||
delete from dev_ai_project_config where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDevAiProjectConfigByIds" parameterType="String">
|
||||
delete from dev_ai_project_config where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -0,0 +1,176 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.jh.project.mapper.DevAiProjectDataMapper">
|
||||
|
||||
<resultMap type="DevAiProjectData" id="DevAiProjectDataResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="deviceAddr0" column="device_addr0" />
|
||||
<result property="deviceAddr1" column="device_addr1" />
|
||||
<result property="serialNumber" column="serial_number" />
|
||||
<result property="ipcSerialNum" column="ipc_serial_num" />
|
||||
<result property="ipcAddr" column="ipc_addr" />
|
||||
<result property="imageUrl" column="image_url" />
|
||||
<result property="channelId" column="channel_id" />
|
||||
<result property="channelName" column="channel_name" />
|
||||
<result property="alarmType" column="alarm_type" />
|
||||
<result property="alarmId" column="alarm_id" />
|
||||
<result property="reportRate" column="report_rate" />
|
||||
<result property="timestamp" column="timestamp" />
|
||||
<result property="leftTopX" column="left_top_x" />
|
||||
<result property="leftTopY" column="left_top_y" />
|
||||
<result property="rightBtmX" column="right_btm_x" />
|
||||
<result property="rightBtmY" column="right_btm_y" />
|
||||
<result property="personNum" column="person_num" />
|
||||
<result property="inNum" column="in_num" />
|
||||
<result property="outNum" column="out_num" />
|
||||
<result property="plateNo" column="plate_no" />
|
||||
<result property="valueType" column="value_type" />
|
||||
<result property="alarmVideourl" column="alarm_videoURL" />
|
||||
<result property="alarmVideoName" column="alarm_video_name" />
|
||||
<result property="compareResult" column="compare_result" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="isDel" column="is_del" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevAiProjectDataVo">
|
||||
select id, project_id, dept_id, device_id, device_name, device_addr0, device_addr1, serial_number, ipc_serial_num, ipc_addr, image_url, channel_id, channel_name, alarm_type, alarm_id, report_rate, timestamp, left_top_x, left_top_y, right_btm_x, right_btm_y, person_num, in_num, out_num, plate_no, value_type, alarm_videoURL, alarm_video_name, compare_result, create_time, is_del from dev_ai_project_data
|
||||
</sql>
|
||||
|
||||
<select id="selectDevAiProjectDataList" parameterType="DevAiProjectData" resultMap="DevAiProjectDataResult">
|
||||
<include refid="selectDevAiProjectDataVo"/>
|
||||
<where>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
|
||||
<if test="alarmType != null "> and alarm_type = #{alarmType}</if>
|
||||
<if test="plateNo != null "> and plate_no = #{plateNo}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDevAiProjectDataById" parameterType="Long" resultMap="DevAiProjectDataResult">
|
||||
<include refid="selectDevAiProjectDataVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDevAiProjectData" parameterType="DevAiProjectData" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_ai_project_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="deviceAddr0 != null">device_addr0,</if>
|
||||
<if test="deviceAddr1 != null">device_addr1,</if>
|
||||
<if test="serialNumber != null">serial_number,</if>
|
||||
<if test="ipcSerialNum != null">ipc_serial_num,</if>
|
||||
<if test="ipcAddr != null">ipc_addr,</if>
|
||||
<if test="imageUrl != null">image_url,</if>
|
||||
<if test="channelId != null">channel_id,</if>
|
||||
<if test="channelName != null">channel_name,</if>
|
||||
<if test="alarmType != null">alarm_type,</if>
|
||||
<if test="alarmId != null">alarm_id,</if>
|
||||
<if test="reportRate != null">report_rate,</if>
|
||||
<if test="timestamp != null">timestamp,</if>
|
||||
<if test="leftTopX != null">left_top_x,</if>
|
||||
<if test="leftTopY != null">left_top_y,</if>
|
||||
<if test="rightBtmX != null">right_btm_x,</if>
|
||||
<if test="rightBtmY != null">right_btm_y,</if>
|
||||
<if test="personNum != null">person_num,</if>
|
||||
<if test="inNum != null">in_num,</if>
|
||||
<if test="outNum != null">out_num,</if>
|
||||
<if test="plateNo != null">plate_no,</if>
|
||||
<if test="valueType != null">value_type,</if>
|
||||
<if test="alarmVideourl != null">alarm_videoURL,</if>
|
||||
<if test="alarmVideoName != null">alarm_video_name,</if>
|
||||
<if test="compareResult != null">compare_result,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="deviceName != null">#{deviceName},</if>
|
||||
<if test="deviceAddr0 != null">#{deviceAddr0},</if>
|
||||
<if test="deviceAddr1 != null">#{deviceAddr1},</if>
|
||||
<if test="serialNumber != null">#{serialNumber},</if>
|
||||
<if test="ipcSerialNum != null">#{ipcSerialNum},</if>
|
||||
<if test="ipcAddr != null">#{ipcAddr},</if>
|
||||
<if test="imageUrl != null">#{imageUrl},</if>
|
||||
<if test="channelId != null">#{channelId},</if>
|
||||
<if test="channelName != null">#{channelName},</if>
|
||||
<if test="alarmType != null">#{alarmType},</if>
|
||||
<if test="alarmId != null">#{alarmId},</if>
|
||||
<if test="reportRate != null">#{reportRate},</if>
|
||||
<if test="timestamp != null">#{timestamp},</if>
|
||||
<if test="leftTopX != null">#{leftTopX},</if>
|
||||
<if test="leftTopY != null">#{leftTopY},</if>
|
||||
<if test="rightBtmX != null">#{rightBtmX},</if>
|
||||
<if test="rightBtmY != null">#{rightBtmY},</if>
|
||||
<if test="personNum != null">#{personNum},</if>
|
||||
<if test="inNum != null">#{inNum},</if>
|
||||
<if test="outNum != null">#{outNum},</if>
|
||||
<if test="plateNo != null">#{plateNo},</if>
|
||||
<if test="valueType != null">#{valueType},</if>
|
||||
<if test="alarmVideourl != null">#{alarmVideourl},</if>
|
||||
<if test="alarmVideoName != null">#{alarmVideoName},</if>
|
||||
<if test="compareResult != null">#{compareResult},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevAiProjectData" parameterType="DevAiProjectData">
|
||||
update dev_ai_project_data
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="deviceName != null">device_name = #{deviceName},</if>
|
||||
<if test="deviceAddr0 != null">device_addr0 = #{deviceAddr0},</if>
|
||||
<if test="deviceAddr1 != null">device_addr1 = #{deviceAddr1},</if>
|
||||
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
||||
<if test="ipcSerialNum != null">ipc_serial_num = #{ipcSerialNum},</if>
|
||||
<if test="ipcAddr != null">ipc_addr = #{ipcAddr},</if>
|
||||
<if test="imageUrl != null">image_url = #{imageUrl},</if>
|
||||
<if test="channelId != null">channel_id = #{channelId},</if>
|
||||
<if test="channelName != null">channel_name = #{channelName},</if>
|
||||
<if test="alarmType != null">alarm_type = #{alarmType},</if>
|
||||
<if test="alarmId != null">alarm_id = #{alarmId},</if>
|
||||
<if test="reportRate != null">report_rate = #{reportRate},</if>
|
||||
<if test="timestamp != null">timestamp = #{timestamp},</if>
|
||||
<if test="leftTopX != null">left_top_x = #{leftTopX},</if>
|
||||
<if test="leftTopY != null">left_top_y = #{leftTopY},</if>
|
||||
<if test="rightBtmX != null">right_btm_x = #{rightBtmX},</if>
|
||||
<if test="rightBtmY != null">right_btm_y = #{rightBtmY},</if>
|
||||
<if test="personNum != null">person_num = #{personNum},</if>
|
||||
<if test="inNum != null">in_num = #{inNum},</if>
|
||||
<if test="outNum != null">out_num = #{outNum},</if>
|
||||
<if test="plateNo != null">plate_no = #{plateNo},</if>
|
||||
<if test="valueType != null">value_type = #{valueType},</if>
|
||||
<if test="alarmVideourl != null">alarm_videoURL = #{alarmVideourl},</if>
|
||||
<if test="alarmVideoName != null">alarm_video_name = #{alarmVideoName},</if>
|
||||
<if test="compareResult != null">compare_result = #{compareResult},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDevAiProjectDataById" parameterType="Long">
|
||||
delete from dev_ai_project_data where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDevAiProjectDataByIds" parameterType="String">
|
||||
delete from dev_ai_project_data where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue