Compare commits
2 Commits
530c96e094
...
dfd9ae0c62
Author | SHA1 | Date |
---|---|---|
|
dfd9ae0c62 | |
|
8bafba890b |
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询视频配置列表
|
||||
export function listVideoConfig(query) {
|
||||
return request({
|
||||
url: '/project/videoConfig/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询视频配置详细
|
||||
export function getVideoConfig(id) {
|
||||
return request({
|
||||
url: '/project/videoConfig/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增视频配置
|
||||
export function addVideoConfig(data) {
|
||||
return request({
|
||||
url: '/project/videoConfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改视频配置
|
||||
export function updateVideoConfig(data) {
|
||||
return request({
|
||||
url: '/project/videoConfig',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除视频配置
|
||||
export function delVideoConfig(id) {
|
||||
return request({
|
||||
url: '/project/videoConfig/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -38,6 +38,20 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量内容" prop="measureInfo">
|
||||
<el-select
|
||||
v-model="queryParams.measureInfo"
|
||||
placeholder="请选择测量类型"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.project_measure_info_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量结果" prop="measureResult">
|
||||
<el-select
|
||||
v-model="queryParams.measureResult"
|
||||
|
@ -192,6 +206,14 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="测量内容" align="center" prop="measureInfo">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.project_measure_info_type"
|
||||
:value="scope.row.measureInfo"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="测量部位"
|
||||
align="center"
|
||||
|
@ -199,13 +221,6 @@
|
|||
width="140"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="测量内容"
|
||||
align="center"
|
||||
prop="measureInfo"
|
||||
width="150"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="测量时间" align="center" prop="measureTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.measureTime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
||||
|
@ -335,12 +350,23 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量内容" prop="measureInfo">
|
||||
<el-select
|
||||
v-model="form.measureInfo"
|
||||
placeholder="请选择测量内容"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.project_measure_info_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量部位" prop="measurePosition">
|
||||
<el-input v-model="form.measurePosition" placeholder="请输入测量部位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测量内容" prop="measureInfo">
|
||||
<el-input v-model="form.measureInfo" placeholder="请输入测量内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测量点位" prop="measurePointPosition">
|
||||
<el-input v-model="form.measurePointPosition" placeholder="请输入测量点位" />
|
||||
</el-form-item>
|
||||
|
@ -441,7 +467,12 @@ export default {
|
|||
components: {
|
||||
ElImageViewer,
|
||||
},
|
||||
dicts: ["project_measure_type", "project_checking_result", "sys_common_isdel"],
|
||||
dicts: [
|
||||
"project_measure_type",
|
||||
"project_measure_info_type",
|
||||
"project_checking_result",
|
||||
"sys_common_isdel",
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
showViewer: false,
|
||||
|
@ -493,10 +524,7 @@ export default {
|
|||
{ required: true, message: "请输入测量部位", trigger: "blur" },
|
||||
{ max: 100, message: "测量部位最多100字符", trigger: "blur" },
|
||||
],
|
||||
measureInfo: [
|
||||
{ required: true, message: "请输入测量内容", trigger: "blur" },
|
||||
{ max: 100, message: "测量内容最多100字符", trigger: "blur" },
|
||||
],
|
||||
measureInfo: [{ required: true, message: "请选择测量内容", trigger: "blur" }],
|
||||
measurePointPosition: [
|
||||
{ required: true, message: "请输入测量点位", trigger: "blur" },
|
||||
{ max: 100, message: "测量点位最多100字符", trigger: "blur" },
|
||||
|
|
|
@ -91,18 +91,19 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="测量内容" align="center" prop="measureInfo">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.project_measure_info_type"
|
||||
:value="scope.row.measureInfo"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="测量部位"
|
||||
align="center"
|
||||
prop="measurePosition"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="测量内容"
|
||||
align="center"
|
||||
prop="measureInfo"
|
||||
width="140"
|
||||
width="150"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="测量时间" align="center" prop="measureTime" width="160">
|
||||
|
@ -226,12 +227,23 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量内容" prop="measureInfo">
|
||||
<el-select
|
||||
v-model="form.measureInfo"
|
||||
placeholder="请选择测量内容"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.project_measure_info_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量部位" prop="measurePosition">
|
||||
<el-input v-model="form.measurePosition" placeholder="请输入测量部位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测量内容" prop="measureInfo">
|
||||
<el-input v-model="form.measureInfo" placeholder="请输入测量内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测量点位" prop="measurePointPosition">
|
||||
<el-input v-model="form.measurePointPosition" placeholder="请输入测量点位" />
|
||||
</el-form-item>
|
||||
|
@ -339,7 +351,7 @@ export default {
|
|||
components: {
|
||||
ElImageViewer,
|
||||
},
|
||||
dicts: ["project_measure_type", "project_checking_result"],
|
||||
dicts: ["project_measure_type", "project_checking_result", "project_measure_info_type"],
|
||||
data() {
|
||||
return {
|
||||
showViewer: false,
|
||||
|
@ -357,10 +369,7 @@ export default {
|
|||
{ required: true, message: "请输入测量部位", trigger: "blur" },
|
||||
{ max: 100, message: "测量部位最多100字符", trigger: "blur" },
|
||||
],
|
||||
measureInfo: [
|
||||
{ required: true, message: "请输入测量内容", trigger: "blur" },
|
||||
{ max: 100, message: "测量内容最多100字符", trigger: "blur" },
|
||||
],
|
||||
measureInfo: [{ required: true, message: "请选择测量内容", trigger: "blur" }],
|
||||
measurePointPosition: [
|
||||
{ required: true, message: "请输入测量点位", trigger: "blur" },
|
||||
{ max: 100, message: "测量点位最多100字符", trigger: "blur" },
|
||||
|
|
|
@ -128,6 +128,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="项目人员" prop="userIds">
|
||||
<el-select
|
||||
ref="user"
|
||||
v-model="form.userIds"
|
||||
filterable
|
||||
multiple
|
||||
|
@ -301,6 +302,14 @@ export default {
|
|||
this.userIds = [];
|
||||
this.userOptions = [];
|
||||
this.form.userIds = [];
|
||||
if (note.id == 100) {
|
||||
this.$message.error("请选择下级节点数据,当前数据节点未查询到相关人员!");
|
||||
return false;
|
||||
}
|
||||
if (note.children.length > 10) {
|
||||
this.$message.error("请选择下级节点数据,当前数据节点未查询到相关人员!");
|
||||
return false;
|
||||
}
|
||||
if (note && note.id) {
|
||||
this.form.deptId = note.id;
|
||||
this.getUserList(note.id);
|
||||
|
|
|
@ -0,0 +1,431 @@
|
|||
<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="projectName">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目主键"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="视频编号" prop="videoDvrNumber">
|
||||
<el-input
|
||||
v-model="queryParams.videoDvrNumber"
|
||||
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:videoConfig: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:videoConfig: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:videoConfig: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:videoConfig:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="videoConfigList"
|
||||
@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="projectName"
|
||||
width="250"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="视频类型" align="center" prop="videoOnlyType" />
|
||||
<el-table-column label="视频编号" align="center" prop="videoDvrNumber" />
|
||||
<el-table-column label="视频信令" align="center" prop="videoDvrSecurity" />
|
||||
<el-table-column label="通道数量" align="center" prop="videoPassageCount" />
|
||||
<el-table-column label="通信类型" align="center" prop="signalType" />
|
||||
<el-table-column label="通信状态" align="center" prop="signalState" />
|
||||
<el-table-column label="通信密码" align="center" prop="signalCode" />
|
||||
<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="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:videoConfig:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:videoConfig: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="680px" 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.projectName" placeholder="请输入项目主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="视频编号" prop="videoDvrNumber">
|
||||
<el-input v-model="form.videoDvrNumber" placeholder="请输入视频编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="视频信令" prop="videoDvrSecurity">
|
||||
<el-input v-model="form.videoDvrSecurity" placeholder="请输入视频信令" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通道数量" prop="videoPassageCount">
|
||||
<el-input v-model="form.videoPassageCount" placeholder="请输入通道数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通信状态" prop="signalState">
|
||||
<el-input v-model="form.signalState" placeholder="请输入通信状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通信密码" prop="signalCode">
|
||||
<el-input v-model="form.signalCode" 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="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-divider content-position="center">视频通道信息</el-divider>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAddSurProjectVideoPassage"
|
||||
>添加</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleDeleteSurProjectVideoPassage"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="surProjectVideoPassageList"
|
||||
:row-class-name="rowSurProjectVideoPassageIndex"
|
||||
@selection-change="handleSurProjectVideoPassageSelectionChange"
|
||||
ref="surProjectVideoPassage"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="index" width="50" />
|
||||
<el-table-column label="通道名称" prop="passageName" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.passageName" placeholder="请输入通道名称" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="视频通道" prop="passageValue" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.passageValue" placeholder="请输入视频通道" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</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 {
|
||||
listVideoConfig,
|
||||
getVideoConfig,
|
||||
delVideoConfig,
|
||||
addVideoConfig,
|
||||
updateVideoConfig,
|
||||
} from "@/api/project/videoConfig";
|
||||
|
||||
export default {
|
||||
name: "VideoConfig",
|
||||
dicts: ["sys_common_isdel"],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 子表选中数据
|
||||
checkedSurProjectVideoPassage: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 视频配置表格数据
|
||||
videoConfigList: [],
|
||||
// 视频通道表格数据
|
||||
surProjectVideoPassageList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: null,
|
||||
videoOnlyType: null,
|
||||
videoDvrNumber: null,
|
||||
videoDvrSecurity: null,
|
||||
videoPassageCount: null,
|
||||
signalType: null,
|
||||
signalState: null,
|
||||
signalCode: null,
|
||||
isDel: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询视频配置列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listVideoConfig(this.queryParams).then((response) => {
|
||||
this.videoConfigList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
videoOnlyType: null,
|
||||
videoDvrNumber: null,
|
||||
videoDvrSecurity: null,
|
||||
videoPassageCount: null,
|
||||
signalType: null,
|
||||
signalState: null,
|
||||
signalCode: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null,
|
||||
};
|
||||
this.surProjectVideoPassageList = [];
|
||||
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;
|
||||
getVideoConfig(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.surProjectVideoPassageList = response.data.surProjectVideoPassageList;
|
||||
this.open = true;
|
||||
this.title = "修改视频配置";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.surProjectVideoPassageList = this.surProjectVideoPassageList;
|
||||
if (this.form.id != null) {
|
||||
updateVideoConfig(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addVideoConfig(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 delVideoConfig(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 视频通道序号 */
|
||||
rowSurProjectVideoPassageIndex({ row, rowIndex }) {
|
||||
row.index = rowIndex + 1;
|
||||
},
|
||||
/** 视频通道添加按钮操作 */
|
||||
handleAddSurProjectVideoPassage() {
|
||||
let obj = {};
|
||||
obj.videoDvrNumber = "";
|
||||
obj.passageName = "";
|
||||
obj.passageValue = "";
|
||||
this.surProjectVideoPassageList.push(obj);
|
||||
},
|
||||
/** 视频通道删除按钮操作 */
|
||||
handleDeleteSurProjectVideoPassage() {
|
||||
if (this.checkedSurProjectVideoPassage.length == 0) {
|
||||
this.$modal.msgError("请先选择要删除的视频通道数据");
|
||||
} else {
|
||||
const surProjectVideoPassageList = this.surProjectVideoPassageList;
|
||||
const checkedSurProjectVideoPassage = this.checkedSurProjectVideoPassage;
|
||||
this.surProjectVideoPassageList = surProjectVideoPassageList.filter(function (
|
||||
item
|
||||
) {
|
||||
return checkedSurProjectVideoPassage.indexOf(item.index) == -1;
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 复选框选中数据 */
|
||||
handleSurProjectVideoPassageSelectionChange(selection) {
|
||||
this.checkedSurProjectVideoPassage = selection.map((item) => item.index);
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"project/videoConfig/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`videoConfig_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,465 @@
|
|||
<template>
|
||||
<div class="projectect-attendance-drawer">
|
||||
<el-drawer
|
||||
v-if="isOpen"
|
||||
:visible.sync="isOpen"
|
||||
direction="rtl"
|
||||
size="65%"
|
||||
style="padding-left: 20px"
|
||||
>
|
||||
<template slot="title">
|
||||
<div>{{ drawerTitle + " 【视频配置】" }}</div>
|
||||
</template>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
class="mb8"
|
||||
style="margin-left: 20px; margin-top: 10px; margin-right: 20px"
|
||||
>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['project:videoConfig: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:videoConfig: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:videoConfig: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:videoConfig:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="videoConfigList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="projectName"
|
||||
width="250"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="视频类型" align="center" prop="videoOnlyType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.project_video_type"
|
||||
:value="scope.row.videoOnlyType"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="视频编号"
|
||||
align="center"
|
||||
prop="videoDvrNumber"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="通道数量" align="center" prop="videoPassageCount" />
|
||||
<el-table-column label="通信状态" align="center" prop="signalState">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.project_video_signal_state"
|
||||
:value="scope.row.signalState"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="视频信令" align="center" prop="videoDvrSecurity" />
|
||||
<el-table-column label="接入时间" align="center" prop="createTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="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:videoConfig:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:videoConfig: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="680px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input
|
||||
v-model="form.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="视频编号" prop="videoDvrNumber">
|
||||
<el-input v-model="form.videoDvrNumber" placeholder="请输入视频编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="视频信令" prop="videoDvrSecurity">
|
||||
<el-input v-model="form.videoDvrSecurity" placeholder="请输入视频信令" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通信密码" prop="signalCode">
|
||||
<el-input v-model="form.signalCode" placeholder="请输入通信密码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-divider content-position="center">视频通道信息</el-divider>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAddSurProjectVideoPassage"
|
||||
>添加</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleDeleteSurProjectVideoPassage"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="surProjectVideoPassageList"
|
||||
:row-class-name="rowSurProjectVideoPassageIndex"
|
||||
@selection-change="handleSurProjectVideoPassageSelectionChange"
|
||||
ref="surProjectVideoPassage"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="index" width="50" />
|
||||
<el-table-column label="通道名称" prop="passageName" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.passageName" placeholder="请输入通道名称" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="视频通道" prop="passageValue" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
size="small"
|
||||
v-model="scope.row.passageValue"
|
||||
placeholder="请输入视频通道"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</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>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listVideoConfig,
|
||||
getVideoConfig,
|
||||
delVideoConfig,
|
||||
addVideoConfig,
|
||||
updateVideoConfig,
|
||||
} from "@/api/project/videoConfig";
|
||||
|
||||
export default {
|
||||
name: "VideoConfig",
|
||||
dicts: ["project_video_type", "project_video_signal_state", "sys_common_isdel"],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 子表选中数据
|
||||
checkedSurProjectVideoPassage: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 视频配置表格数据
|
||||
videoConfigList: [],
|
||||
// 视频通道表格数据
|
||||
surProjectVideoPassageList: [],
|
||||
//抽屉标题
|
||||
drawerTitle: "",
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
project: null,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: null,
|
||||
projectName: null,
|
||||
videoOnlyType: null,
|
||||
videoDvrNumber: null,
|
||||
videoDvrSecurity: null,
|
||||
videoPassageCount: null,
|
||||
signalType: null,
|
||||
signalState: null,
|
||||
signalCode: null,
|
||||
isDel: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
videoDvrNumber: [
|
||||
{ required: true, message: "请输入视频编号", trigger: "blur" },
|
||||
{ maxlength: 10, message: "视频编号最多10字符", trigger: "blur" },
|
||||
],
|
||||
videoDvrSecurity: [
|
||||
{ required: false, message: "请输入通讯信令", trigger: "blur" },
|
||||
{ maxlength: 200, message: "通讯信令最多200字符", trigger: "blur" },
|
||||
],
|
||||
signalCode: [
|
||||
{ required: false, message: "请输入通讯密码", trigger: "blur" },
|
||||
{ maxlength: 200, message: "通讯密码最多200字符", trigger: "blur" },
|
||||
],
|
||||
remark: [
|
||||
{ required: true, message: "请输入备注", trigger: "blur" },
|
||||
{ maxlength: 200, message: "备注最多200字符", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
isOpen: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
show(project) {
|
||||
this.project = project;
|
||||
this.drawerTitle = project.projectName;
|
||||
this.isOpen = true;
|
||||
this.queryParams.projectId = project.id;
|
||||
this.getList();
|
||||
},
|
||||
/** 查询视频配置列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listVideoConfig(this.queryParams).then((response) => {
|
||||
this.videoConfigList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
videoOnlyType: null,
|
||||
videoDvrNumber: null,
|
||||
videoDvrSecurity: null,
|
||||
videoPassageCount: null,
|
||||
signalType: null,
|
||||
signalState: null,
|
||||
signalCode: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null,
|
||||
};
|
||||
this.surProjectVideoPassageList = [];
|
||||
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;
|
||||
getVideoConfig(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.surProjectVideoPassageList = response.data.surProjectVideoPassageList;
|
||||
this.open = true;
|
||||
this.title = "修改视频配置";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.surProjectVideoPassageList = this.surProjectVideoPassageList;
|
||||
if (this.form.id != null) {
|
||||
updateVideoConfig(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
this.form.videoOnlyType = "1";
|
||||
addVideoConfig(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 delVideoConfig(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 视频通道序号 */
|
||||
rowSurProjectVideoPassageIndex({ row, rowIndex }) {
|
||||
row.index = rowIndex + 1;
|
||||
},
|
||||
/** 视频通道添加按钮操作 */
|
||||
handleAddSurProjectVideoPassage() {
|
||||
let obj = {};
|
||||
obj.videoDvrNumber = "";
|
||||
obj.passageName = "";
|
||||
obj.passageValue = "";
|
||||
this.surProjectVideoPassageList.push(obj);
|
||||
},
|
||||
/** 视频通道删除按钮操作 */
|
||||
handleDeleteSurProjectVideoPassage() {
|
||||
if (this.checkedSurProjectVideoPassage.length == 0) {
|
||||
this.$modal.msgError("请先选择要删除的视频通道数据");
|
||||
} else {
|
||||
const surProjectVideoPassageList = this.surProjectVideoPassageList;
|
||||
const checkedSurProjectVideoPassage = this.checkedSurProjectVideoPassage;
|
||||
this.surProjectVideoPassageList = surProjectVideoPassageList.filter(function (
|
||||
item
|
||||
) {
|
||||
return checkedSurProjectVideoPassage.indexOf(item.index) == -1;
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 复选框选中数据 */
|
||||
handleSurProjectVideoPassageSelectionChange(selection) {
|
||||
this.checkedSurProjectVideoPassage = selection.map((item) => item.index);
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"project/videoConfig/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`videoConfig_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -7,7 +7,6 @@ import com.ruoyi.common.enums.BusinessType;
|
|||
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
||||
import com.yanzhu.jh.project.service.ISurProjectCheckingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
|
|
|
@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!--查询角色相关菜单-->
|
||||
<select id="selectRoleMenuList" parameterType="String" resultType="map">
|
||||
SELECT
|
||||
smc.id,
|
||||
DISTINCT smc.id,
|
||||
smc.menu_name,
|
||||
smc.menu_identi,
|
||||
smc.menu_img,
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
package com.yanzhu.jh.project.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
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.SurProjectVideoConfig;
|
||||
import com.yanzhu.jh.project.service.ISurProjectVideoConfigService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 视频配置Controller
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/project/videoConfig")
|
||||
public class SurProjectVideoConfigController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysDeptService sysDeptService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectVideoConfigService surProjectVideoConfigService;
|
||||
|
||||
/**
|
||||
* 查询视频配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:videoConfig:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SurProjectVideoConfig surProjectVideoConfig)
|
||||
{
|
||||
startPage();
|
||||
surProjectVideoConfig.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectVideoConfig.getNowRole())){
|
||||
surProjectVideoConfig.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectVideoConfig.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectVideoConfig.setNowUser(Convert.toStr(getUserId()));
|
||||
List<SurProjectVideoConfig> list = surProjectVideoConfigService.selectSurProjectVideoConfigList(surProjectVideoConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出视频配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:videoConfig:export')")
|
||||
@Log(title = "视频配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SurProjectVideoConfig surProjectVideoConfig)
|
||||
{
|
||||
surProjectVideoConfig.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectVideoConfig.getNowRole())){
|
||||
surProjectVideoConfig.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectVideoConfig.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectVideoConfig.setNowUser(Convert.toStr(getUserId()));
|
||||
List<SurProjectVideoConfig> list = surProjectVideoConfigService.selectSurProjectVideoConfigList(surProjectVideoConfig);
|
||||
ExcelUtil<SurProjectVideoConfig> util = new ExcelUtil<SurProjectVideoConfig>(SurProjectVideoConfig.class);
|
||||
util.exportExcel(response, list, "视频配置数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取视频配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:videoConfig:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(surProjectVideoConfigService.selectSurProjectVideoConfigById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增视频配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:videoConfig:add')")
|
||||
@Log(title = "视频配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SurProjectVideoConfig surProjectVideoConfig)
|
||||
{
|
||||
return toAjax(surProjectVideoConfigService.insertSurProjectVideoConfig(surProjectVideoConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改视频配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:videoConfig:edit')")
|
||||
@Log(title = "视频配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SurProjectVideoConfig surProjectVideoConfig)
|
||||
{
|
||||
return toAjax(surProjectVideoConfigService.updateSurProjectVideoConfig(surProjectVideoConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除视频配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:videoConfig:remove')")
|
||||
@Log(title = "视频配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(surProjectVideoConfigService.deleteSurProjectVideoConfigByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,193 @@
|
|||
package com.yanzhu.jh.project.domain;
|
||||
|
||||
import java.util.List;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 视频配置对象 sur_project_video_config
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-25
|
||||
*/
|
||||
public class SurProjectVideoConfig extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 项目主键 */
|
||||
@Excel(name = "项目主键")
|
||||
private Long projectId;
|
||||
|
||||
/** 视频类型 */
|
||||
@Excel(name = "视频类型")
|
||||
private String videoOnlyType;
|
||||
|
||||
/** 视频编号 */
|
||||
@Excel(name = "视频编号")
|
||||
private String videoDvrNumber;
|
||||
|
||||
/** 视频信令 */
|
||||
@Excel(name = "视频信令")
|
||||
private String videoDvrSecurity;
|
||||
|
||||
/** 通道数量 */
|
||||
@Excel(name = "通道数量")
|
||||
private Long videoPassageCount;
|
||||
|
||||
/** 通信类型 */
|
||||
@Excel(name = "通信类型")
|
||||
private String signalType;
|
||||
|
||||
/** 通信状态 */
|
||||
@Excel(name = "通信状态")
|
||||
private String signalState;
|
||||
|
||||
/** 通信密码 */
|
||||
@Excel(name = "通信密码")
|
||||
private String signalCode;
|
||||
|
||||
/** 数据状态 */
|
||||
@Excel(name = "数据状态")
|
||||
private String isDel;
|
||||
|
||||
private String projectName;
|
||||
|
||||
/** 视频通道信息 */
|
||||
private List<SurProjectVideoPassage> surProjectVideoPassageList;
|
||||
|
||||
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 setVideoOnlyType(String videoOnlyType)
|
||||
{
|
||||
this.videoOnlyType = videoOnlyType;
|
||||
}
|
||||
|
||||
public String getVideoOnlyType()
|
||||
{
|
||||
return videoOnlyType;
|
||||
}
|
||||
public void setVideoDvrNumber(String videoDvrNumber)
|
||||
{
|
||||
this.videoDvrNumber = videoDvrNumber;
|
||||
}
|
||||
|
||||
public String getVideoDvrNumber()
|
||||
{
|
||||
return videoDvrNumber;
|
||||
}
|
||||
public void setVideoDvrSecurity(String videoDvrSecurity)
|
||||
{
|
||||
this.videoDvrSecurity = videoDvrSecurity;
|
||||
}
|
||||
|
||||
public String getVideoDvrSecurity()
|
||||
{
|
||||
return videoDvrSecurity;
|
||||
}
|
||||
public void setVideoPassageCount(Long videoPassageCount)
|
||||
{
|
||||
this.videoPassageCount = videoPassageCount;
|
||||
}
|
||||
|
||||
public Long getVideoPassageCount()
|
||||
{
|
||||
return videoPassageCount;
|
||||
}
|
||||
public void setSignalType(String signalType)
|
||||
{
|
||||
this.signalType = signalType;
|
||||
}
|
||||
|
||||
public String getSignalType()
|
||||
{
|
||||
return signalType;
|
||||
}
|
||||
public void setSignalState(String signalState)
|
||||
{
|
||||
this.signalState = signalState;
|
||||
}
|
||||
|
||||
public String getSignalState()
|
||||
{
|
||||
return signalState;
|
||||
}
|
||||
public void setSignalCode(String signalCode)
|
||||
{
|
||||
this.signalCode = signalCode;
|
||||
}
|
||||
|
||||
public String getSignalCode()
|
||||
{
|
||||
return signalCode;
|
||||
}
|
||||
public void setIsDel(String isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public List<SurProjectVideoPassage> getSurProjectVideoPassageList()
|
||||
{
|
||||
return surProjectVideoPassageList;
|
||||
}
|
||||
|
||||
public void setSurProjectVideoPassageList(List<SurProjectVideoPassage> surProjectVideoPassageList)
|
||||
{
|
||||
this.surProjectVideoPassageList = surProjectVideoPassageList;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("videoOnlyType", getVideoOnlyType())
|
||||
.append("videoDvrNumber", getVideoDvrNumber())
|
||||
.append("videoDvrSecurity", getVideoDvrSecurity())
|
||||
.append("videoPassageCount", getVideoPassageCount())
|
||||
.append("signalType", getSignalType())
|
||||
.append("signalState", getSignalState())
|
||||
.append("signalCode", getSignalCode())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("surProjectVideoPassageList", getSurProjectVideoPassageList())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* 视频通道对象 sur_project_video_passage
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-25
|
||||
*/
|
||||
public class SurProjectVideoPassage extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 视频主键 */
|
||||
@Excel(name = "视频主键")
|
||||
private Long videoId;
|
||||
|
||||
/** 视频编号 */
|
||||
@Excel(name = "视频编号")
|
||||
private String videoDvrNumber;
|
||||
|
||||
/** 通道名称 */
|
||||
@Excel(name = "通道名称")
|
||||
private String passageName;
|
||||
|
||||
/** 视频通道 */
|
||||
@Excel(name = "视频通道")
|
||||
private Long passageValue;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setVideoId(Long videoId)
|
||||
{
|
||||
this.videoId = videoId;
|
||||
}
|
||||
|
||||
public Long getVideoId()
|
||||
{
|
||||
return videoId;
|
||||
}
|
||||
public void setVideoDvrNumber(String videoDvrNumber)
|
||||
{
|
||||
this.videoDvrNumber = videoDvrNumber;
|
||||
}
|
||||
|
||||
public String getVideoDvrNumber()
|
||||
{
|
||||
return videoDvrNumber;
|
||||
}
|
||||
public void setPassageName(String passageName)
|
||||
{
|
||||
this.passageName = passageName;
|
||||
}
|
||||
|
||||
public String getPassageName()
|
||||
{
|
||||
return passageName;
|
||||
}
|
||||
public void setPassageValue(Long passageValue)
|
||||
{
|
||||
this.passageValue = passageValue;
|
||||
}
|
||||
|
||||
public Long getPassageValue()
|
||||
{
|
||||
return passageValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("videoId", getVideoId())
|
||||
.append("videoDvrNumber", getVideoDvrNumber())
|
||||
.append("passageName", getPassageName())
|
||||
.append("passageValue", getPassageValue())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
package com.yanzhu.jh.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.jh.project.domain.SurProjectVideoConfig;
|
||||
import com.yanzhu.jh.project.domain.SurProjectVideoPassage;
|
||||
|
||||
/**
|
||||
* 视频配置Mapper接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-25
|
||||
*/
|
||||
public interface SurProjectVideoConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询视频配置
|
||||
*
|
||||
* @param id 视频配置主键
|
||||
* @return 视频配置
|
||||
*/
|
||||
public SurProjectVideoConfig selectSurProjectVideoConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询视频配置列表
|
||||
*
|
||||
* @param surProjectVideoConfig 视频配置
|
||||
* @return 视频配置集合
|
||||
*/
|
||||
public List<SurProjectVideoConfig> selectSurProjectVideoConfigList(SurProjectVideoConfig surProjectVideoConfig);
|
||||
|
||||
/**
|
||||
* 新增视频配置
|
||||
*
|
||||
* @param surProjectVideoConfig 视频配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectVideoConfig(SurProjectVideoConfig surProjectVideoConfig);
|
||||
|
||||
/**
|
||||
* 修改视频配置
|
||||
*
|
||||
* @param surProjectVideoConfig 视频配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectVideoConfig(SurProjectVideoConfig surProjectVideoConfig);
|
||||
|
||||
/**
|
||||
* 删除视频配置
|
||||
*
|
||||
* @param id 视频配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectVideoConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除视频配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectVideoConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除视频通道
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectVideoPassageByVideoIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增视频通道
|
||||
*
|
||||
* @param surProjectVideoPassageList 视频通道列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchSurProjectVideoPassage(List<SurProjectVideoPassage> surProjectVideoPassageList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过视频配置主键删除视频通道信息
|
||||
*
|
||||
* @param id 视频配置ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectVideoPassageByVideoId(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.jh.project.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.jh.project.domain.SurProjectVideoConfig;
|
||||
|
||||
/**
|
||||
* 视频配置Service接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-25
|
||||
*/
|
||||
public interface ISurProjectVideoConfigService
|
||||
{
|
||||
/**
|
||||
* 查询视频配置
|
||||
*
|
||||
* @param id 视频配置主键
|
||||
* @return 视频配置
|
||||
*/
|
||||
public SurProjectVideoConfig selectSurProjectVideoConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询视频配置列表
|
||||
*
|
||||
* @param surProjectVideoConfig 视频配置
|
||||
* @return 视频配置集合
|
||||
*/
|
||||
public List<SurProjectVideoConfig> selectSurProjectVideoConfigList(SurProjectVideoConfig surProjectVideoConfig);
|
||||
|
||||
/**
|
||||
* 新增视频配置
|
||||
*
|
||||
* @param surProjectVideoConfig 视频配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectVideoConfig(SurProjectVideoConfig surProjectVideoConfig);
|
||||
|
||||
/**
|
||||
* 修改视频配置
|
||||
*
|
||||
* @param surProjectVideoConfig 视频配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectVideoConfig(SurProjectVideoConfig surProjectVideoConfig);
|
||||
|
||||
/**
|
||||
* 批量删除视频配置
|
||||
*
|
||||
* @param ids 需要删除的视频配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectVideoConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除视频配置信息
|
||||
*
|
||||
* @param id 视频配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectVideoConfigById(Long id);
|
||||
}
|
|
@ -181,10 +181,14 @@ public class SurProjectUserinfoServiceImpl implements ISurProjectUserinfoService
|
|||
public int insertSurProjectUserinfo(SurProjectUserinfo surProjectUserinfo)
|
||||
{
|
||||
int res = 0;
|
||||
/****
|
||||
* 遗留BUg
|
||||
* 选人时直接选到主菜单,选出来的单位有问题
|
||||
*/
|
||||
surProjectUserinfo.setCreateTime(DateUtils.getNowDate());
|
||||
SysDept sysDept = deptMapper.selectDeptById(surProjectUserinfo.getDeptId());
|
||||
//如果时城建公司的人&&当前选的单位非子公司,这里自己查询项目的所属单位
|
||||
if(DeptTypeEnum.ZGS.getCode().equals(sysDept.getTypeFlag())){
|
||||
if(DeptTypeEnum.ZGS.getCode().equals(sysDept.getTypeFlag()) || DeptTypeEnum.JTGS.getCode().equals(sysDept.getTypeFlag())){
|
||||
SurProject surProject = surProjectMapper.selectSurProjectById(surProjectUserinfo.getProjectId());
|
||||
//选择人员职务是甲方经理时,同步到项目负责人
|
||||
if(PublicStateEnum.USERTYPE_JFJL.getCode().equals(surProjectUserinfo.getJobType())){
|
||||
|
@ -194,9 +198,12 @@ public class SurProjectUserinfoServiceImpl implements ISurProjectUserinfoService
|
|||
surProjectMapper.updateSurProject(surProject);
|
||||
}
|
||||
sysDept = deptMapper.selectDeptById(surProject.getDeptId());
|
||||
//集团人进入项目也是责任主体
|
||||
surProjectUserinfo.setDeptType(DeptTypeEnum.ZGS.getCode());
|
||||
}else{
|
||||
surProjectUserinfo.setDeptType(sysDept.getTypeFlag());
|
||||
}
|
||||
surProjectUserinfo.setDeptName(sysDept.getDeptName());
|
||||
surProjectUserinfo.setDeptType(DeptTypeEnum.ZGS.getCode().equals(sysDept.getTypeFlag())?DeptTypeEnum.JTGS.getCode():sysDept.getTypeFlag());
|
||||
surProjectUserinfo.setIsDel(Convert.toLong(PublicStateEnum.OK.getCode()));
|
||||
for(Long userId:surProjectUserinfo.getUserIds()){
|
||||
surProjectUserinfo.setUserId(userId);
|
||||
|
|
|
@ -0,0 +1,136 @@
|
|||
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 java.util.ArrayList;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.yanzhu.jh.project.domain.SurProjectVideoPassage;
|
||||
import com.yanzhu.jh.project.mapper.SurProjectVideoConfigMapper;
|
||||
import com.yanzhu.jh.project.domain.SurProjectVideoConfig;
|
||||
import com.yanzhu.jh.project.service.ISurProjectVideoConfigService;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
/**
|
||||
* 视频配置Service业务层处理
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-25
|
||||
*/
|
||||
@Service
|
||||
public class SurProjectVideoConfigServiceImpl implements ISurProjectVideoConfigService
|
||||
{
|
||||
@Autowired
|
||||
private SurProjectVideoConfigMapper surProjectVideoConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询视频配置
|
||||
*
|
||||
* @param id 视频配置主键
|
||||
* @return 视频配置
|
||||
*/
|
||||
@Override
|
||||
public SurProjectVideoConfig selectSurProjectVideoConfigById(Long id)
|
||||
{
|
||||
return surProjectVideoConfigMapper.selectSurProjectVideoConfigById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询视频配置列表
|
||||
*
|
||||
* @param surProjectVideoConfig 视频配置
|
||||
* @return 视频配置
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectVideoConfig> selectSurProjectVideoConfigList(SurProjectVideoConfig surProjectVideoConfig)
|
||||
{
|
||||
return surProjectVideoConfigMapper.selectSurProjectVideoConfigList(surProjectVideoConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增视频配置
|
||||
*
|
||||
* @param surProjectVideoConfig 视频配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertSurProjectVideoConfig(SurProjectVideoConfig surProjectVideoConfig)
|
||||
{
|
||||
surProjectVideoConfig.setCreateBy(SecurityUtils.getUsername());
|
||||
surProjectVideoConfig.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = surProjectVideoConfigMapper.insertSurProjectVideoConfig(surProjectVideoConfig);
|
||||
insertSurProjectVideoPassage(surProjectVideoConfig);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改视频配置
|
||||
*
|
||||
* @param surProjectVideoConfig 视频配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateSurProjectVideoConfig(SurProjectVideoConfig surProjectVideoConfig)
|
||||
{
|
||||
surProjectVideoConfig.setUpdateBy(SecurityUtils.getUsername());
|
||||
surProjectVideoConfig.setUpdateTime(DateUtils.getNowDate());
|
||||
surProjectVideoConfigMapper.deleteSurProjectVideoPassageByVideoId(surProjectVideoConfig.getId());
|
||||
insertSurProjectVideoPassage(surProjectVideoConfig);
|
||||
return surProjectVideoConfigMapper.updateSurProjectVideoConfig(surProjectVideoConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除视频配置
|
||||
*
|
||||
* @param ids 需要删除的视频配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteSurProjectVideoConfigByIds(Long[] ids)
|
||||
{
|
||||
surProjectVideoConfigMapper.deleteSurProjectVideoPassageByVideoIds(ids);
|
||||
return surProjectVideoConfigMapper.deleteSurProjectVideoConfigByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除视频配置信息
|
||||
*
|
||||
* @param id 视频配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteSurProjectVideoConfigById(Long id)
|
||||
{
|
||||
surProjectVideoConfigMapper.deleteSurProjectVideoPassageByVideoId(id);
|
||||
return surProjectVideoConfigMapper.deleteSurProjectVideoConfigById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增视频通道信息
|
||||
*
|
||||
* @param surProjectVideoConfig 视频配置对象
|
||||
*/
|
||||
public void insertSurProjectVideoPassage(SurProjectVideoConfig surProjectVideoConfig)
|
||||
{
|
||||
List<SurProjectVideoPassage> surProjectVideoPassageList = surProjectVideoConfig.getSurProjectVideoPassageList();
|
||||
Long id = surProjectVideoConfig.getId();
|
||||
if (StringUtils.isNotNull(surProjectVideoPassageList))
|
||||
{
|
||||
List<SurProjectVideoPassage> list = new ArrayList<SurProjectVideoPassage>();
|
||||
for (SurProjectVideoPassage surProjectVideoPassage : surProjectVideoPassageList)
|
||||
{
|
||||
surProjectVideoPassage.setVideoId(id);
|
||||
list.add(surProjectVideoPassage);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
{
|
||||
surProjectVideoConfigMapper.batchSurProjectVideoPassage(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,161 @@
|
|||
<?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.SurProjectVideoConfigMapper">
|
||||
|
||||
<resultMap type="SurProjectVideoConfig" id="SurProjectVideoConfigResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="projectName" column="projectName" />
|
||||
<result property="videoOnlyType" column="video_only_type" />
|
||||
<result property="videoDvrNumber" column="video_dvr_number" />
|
||||
<result property="videoDvrSecurity" column="video_dvr_security" />
|
||||
<result property="videoPassageCount" column="video_passage_count" />
|
||||
<result property="signalType" column="signal_type" />
|
||||
<result property="signalState" column="signal_state" />
|
||||
<result property="signalCode" column="signal_code" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<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>
|
||||
|
||||
<resultMap id="SurProjectVideoConfigSurProjectVideoPassageResult" type="SurProjectVideoConfig" extends="SurProjectVideoConfigResult">
|
||||
<collection property="surProjectVideoPassageList" notNullColumn="sub_id" javaType="java.util.List" resultMap="SurProjectVideoPassageResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="SurProjectVideoPassage" id="SurProjectVideoPassageResult">
|
||||
<result property="id" column="sub_id" />
|
||||
<result property="videoId" column="sub_video_id" />
|
||||
<result property="videoDvrNumber" column="sub_video_dvr_number" />
|
||||
<result property="passageName" column="sub_passage_name" />
|
||||
<result property="passageValue" column="sub_passage_value" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSurProjectVideoConfigVo">
|
||||
select spvc.id, spvc.project_id, spvc.video_only_type, spvc.video_dvr_number, spvc.video_dvr_security, spvc.video_passage_count, spvc.signal_type, spvc.signal_state, spvc.signal_code, spvc.is_del, spvc.create_by, spvc.create_time, spvc.update_by, spvc.update_time, spvc.remark, sp.projectName from sur_project_video_config spvc
|
||||
left join sur_project sp on sp.id=spvc.project_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectVideoConfigList" parameterType="SurProjectVideoConfig" resultMap="SurProjectVideoConfigResult">
|
||||
<include refid="selectSurProjectVideoConfigVo"/>
|
||||
<where>
|
||||
and spvc.is_del='0'
|
||||
<if test="projectId != null "> and spvc.project_id = #{projectId}</if>
|
||||
<if test="projectName != null "> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
||||
<if test="videoOnlyType != null and videoOnlyType != ''"> and spvc.video_only_type = #{videoOnlyType}</if>
|
||||
<if test="videoDvrNumber != null and videoDvrNumber != ''"> and spvc.video_dvr_number like concat('%', #{videoDvrNumber}, '%')</if>
|
||||
<if test="videoDvrSecurity != null and videoDvrSecurity != ''"> and spvc.video_dvr_security = #{videoDvrSecurity}</if>
|
||||
<if test="videoPassageCount != null "> and spvc.video_passage_count = #{videoPassageCount}</if>
|
||||
<if test="signalType != null and signalType != ''"> and spvc.signal_type = #{signalType}</if>
|
||||
<if test="signalState != null and signalState != ''"> and spvc.signal_state = #{signalState}</if>
|
||||
<if test="signalCode != null and signalCode != ''"> and spvc.signal_code = #{signalCode}</if>
|
||||
<if test="isDel != null and isDel != ''"> and spvc.is_del = #{isDel}</if>
|
||||
<!-- 查询条件-项目部门 -->
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<!--子部门数据-->
|
||||
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select DISTINCT spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
|
||||
<if test='nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectVideoConfigById" parameterType="Long" resultMap="SurProjectVideoConfigSurProjectVideoPassageResult">
|
||||
select a.id, a.project_id, a.video_only_type, a.video_dvr_number, a.video_dvr_security, a.video_passage_count, a.signal_type, a.signal_state, a.signal_code, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, p.projectName,
|
||||
b.id as sub_id, b.video_id as sub_video_id, b.video_dvr_number as sub_video_dvr_number, b.passage_name as sub_passage_name, b.passage_value as sub_passage_value
|
||||
from sur_project_video_config a
|
||||
left join sur_project p on a.project_id=p.id
|
||||
left join sur_project_video_passage b on b.video_id = a.id
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSurProjectVideoConfig" parameterType="SurProjectVideoConfig" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sur_project_video_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="videoOnlyType != null">video_only_type,</if>
|
||||
<if test="videoDvrNumber != null">video_dvr_number,</if>
|
||||
<if test="videoDvrSecurity != null">video_dvr_security,</if>
|
||||
<if test="videoPassageCount != null">video_passage_count,</if>
|
||||
<if test="signalType != null">signal_type,</if>
|
||||
<if test="signalState != null">signal_state,</if>
|
||||
<if test="signalCode != null">signal_code,</if>
|
||||
<if test="isDel != null">is_del,</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="videoOnlyType != null">#{videoOnlyType},</if>
|
||||
<if test="videoDvrNumber != null">#{videoDvrNumber},</if>
|
||||
<if test="videoDvrSecurity != null">#{videoDvrSecurity},</if>
|
||||
<if test="videoPassageCount != null">#{videoPassageCount},</if>
|
||||
<if test="signalType != null">#{signalType},</if>
|
||||
<if test="signalState != null">#{signalState},</if>
|
||||
<if test="signalCode != null">#{signalCode},</if>
|
||||
<if test="isDel != null">#{isDel},</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="updateSurProjectVideoConfig" parameterType="SurProjectVideoConfig">
|
||||
update sur_project_video_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="videoOnlyType != null">video_only_type = #{videoOnlyType},</if>
|
||||
<if test="videoDvrNumber != null">video_dvr_number = #{videoDvrNumber},</if>
|
||||
<if test="videoDvrSecurity != null">video_dvr_security = #{videoDvrSecurity},</if>
|
||||
<if test="videoPassageCount != null">video_passage_count = #{videoPassageCount},</if>
|
||||
<if test="signalType != null">signal_type = #{signalType},</if>
|
||||
<if test="signalState != null">signal_state = #{signalState},</if>
|
||||
<if test="signalCode != null">signal_code = #{signalCode},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</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="deleteSurProjectVideoConfigById" parameterType="Long">
|
||||
delete from sur_project_video_config where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectVideoConfigByIds" parameterType="String">
|
||||
delete from sur_project_video_config where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectVideoPassageByVideoIds" parameterType="String">
|
||||
delete from sur_project_video_passage where video_id in
|
||||
<foreach item="videoId" collection="array" open="(" separator="," close=")">
|
||||
#{videoId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectVideoPassageByVideoId" parameterType="Long">
|
||||
delete from sur_project_video_passage where video_id = #{videoId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchSurProjectVideoPassage">
|
||||
insert into sur_project_video_passage( id, video_id, video_dvr_number, passage_name, passage_value) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.videoId}, #{item.videoDvrNumber}, #{item.passageName}, #{item.passageValue})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
Loading…
Reference in New Issue