Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
commit
8d5d3ce124
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询项目延时摄影列表
|
||||||
|
export function listPrjphotography(query) {
|
||||||
|
return request({
|
||||||
|
url: '/video/prjphotography/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询项目延时摄影详细
|
||||||
|
export function getPrjphotography(id) {
|
||||||
|
return request({
|
||||||
|
url: '/video/prjphotography/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增项目延时摄影
|
||||||
|
export function addPrjphotography(data) {
|
||||||
|
return request({
|
||||||
|
url: '/video/prjphotography',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改项目延时摄影
|
||||||
|
export function updatePrjphotography(data) {
|
||||||
|
return request({
|
||||||
|
url: '/video/prjphotography',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除项目延时摄影
|
||||||
|
export function delPrjphotography(id) {
|
||||||
|
return request({
|
||||||
|
url: '/video/prjphotography/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="upload-file">
|
<div class="upload-file" :class="'up-file-cnt-'+fileList.length">
|
||||||
<el-upload
|
<el-upload
|
||||||
multiple
|
multiple
|
||||||
:action="uploadFileUrl"
|
:action="uploadFileUrl"
|
||||||
|
|
|
@ -470,6 +470,12 @@
|
||||||
v-hasPermi="['video:aiBoxProjectConfig:list']"
|
v-hasPermi="['video:aiBoxProjectConfig:list']"
|
||||||
>AI视频配置</el-dropdown-item
|
>AI视频配置</el-dropdown-item
|
||||||
>
|
>
|
||||||
|
<el-dropdown-item
|
||||||
|
command="handlePrjPhotography"
|
||||||
|
icon="el-icon-camera"
|
||||||
|
v-hasPermi="['video:prjphotography:list']"
|
||||||
|
>延时摄影</el-dropdown-item
|
||||||
|
>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
command="handleCheckDetection"
|
command="handleCheckDetection"
|
||||||
icon="el-icon-c-scale-to-original"
|
icon="el-icon-c-scale-to-original"
|
||||||
|
@ -771,7 +777,8 @@
|
||||||
<checkDetectionDrawer ref="checkDetection"></checkDetectionDrawer>
|
<checkDetectionDrawer ref="checkDetection"></checkDetectionDrawer>
|
||||||
<standardDrawer ref="standard"></standardDrawer>
|
<standardDrawer ref="standard"></standardDrawer>
|
||||||
<attendanceDataDrawer ref="attendanceData"></attendanceDataDrawer>
|
<attendanceDataDrawer ref="attendanceData"></attendanceDataDrawer>
|
||||||
<aiBoxVideoConfigDrawer ref="aiBoxVideoConfigDrawer"></aiBoxVideoConfigDrawer>
|
<aiBoxVideoConfigDrawer ref="aiBoxVideoConfigDrawer"></aiBoxVideoConfigDrawer>
|
||||||
|
<prjPhotographyDrawer ref="prjPhotographyDrawer"></prjPhotographyDrawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -805,6 +812,7 @@ import checkDetectionDrawer from "../checkDetection/checkDetectionDrawer.vue";
|
||||||
import standardDrawer from '@/views/project/projectStandard/projectStandardDrawer.vue';
|
import standardDrawer from '@/views/project/projectStandard/projectStandardDrawer.vue';
|
||||||
import attendanceDataDrawer from '@/views/project/attendance/attendanceDrawer.vue';
|
import attendanceDataDrawer from '@/views/project/attendance/attendanceDrawer.vue';
|
||||||
import aiBoxVideoConfigDrawer from '@/views/video/aiBoxProjectConfig/aiBoxVideoConfigDrawer';
|
import aiBoxVideoConfigDrawer from '@/views/video/aiBoxProjectConfig/aiBoxVideoConfigDrawer';
|
||||||
|
import prjPhotographyDrawer from '@/views/video/prjphotography/prjPhotographyDrawer.vue'
|
||||||
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -829,7 +837,8 @@ export default {
|
||||||
checkDetectionDrawer,
|
checkDetectionDrawer,
|
||||||
standardDrawer,
|
standardDrawer,
|
||||||
attendanceDataDrawer,
|
attendanceDataDrawer,
|
||||||
aiBoxVideoConfigDrawer,
|
aiBoxVideoConfigDrawer,
|
||||||
|
prjPhotographyDrawer
|
||||||
},
|
},
|
||||||
dicts: [
|
dicts: [
|
||||||
"sur_project_xmjd",
|
"sur_project_xmjd",
|
||||||
|
@ -1091,6 +1100,9 @@ export default {
|
||||||
case "handleAiBoxVideoConfig":
|
case "handleAiBoxVideoConfig":
|
||||||
this.$refs.aiBoxVideoConfigDrawer.show(row);
|
this.$refs.aiBoxVideoConfigDrawer.show(row);
|
||||||
break;
|
break;
|
||||||
|
case "handlePrjPhotography":
|
||||||
|
this.$refs.prjPhotographyDrawer.show(row);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,341 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form v-if="1==2" :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="图片路径" prop="imageUrl">
|
||||||
|
<el-input v-model="queryParams.imageUrl" placeholder="请输入图片路径" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="视频路径" prop="videoUrl">
|
||||||
|
<el-input v-model="queryParams.videoUrl" placeholder="请输入视频路径" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="视频日期" prop="videoDate">
|
||||||
|
<el-date-picker clearable v-model="queryParams.videoDate" type="date" value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择视频日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="state">
|
||||||
|
<el-input v-model="queryParams.state" placeholder="请输入状态" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="${comment}" prop="isDel">
|
||||||
|
<el-input v-model="queryParams.isDel" placeholder="请输入${comment}" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="${comment}" prop="createDate">
|
||||||
|
<el-date-picker clearable v-model="queryParams.createDate" type="date" value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择${comment}">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="${comment}" prop="updateDate">
|
||||||
|
<el-date-picker clearable v-model="queryParams.updateDate" type="date" value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择${comment}">
|
||||||
|
</el-date-picker>
|
||||||
|
</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="['video:prjphotography: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="['video:prjphotography: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="['video:prjphotography:remove']">删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5" v-if="1==2">
|
||||||
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||||
|
v-hasPermi="['video:prjphotography:export']">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :search="false" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="prjphotographyList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="月份" align="center" prop="videoDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.videoDate, '{y}-{m}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="图片路径" align="center" prop="imageUrl" >
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-image ref="preview" style="height: 80px; " :preview-src-list="row.images"
|
||||||
|
:src="row.image + '.min.jpg'">
|
||||||
|
</el-image>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="视频路径" align="center" prop="videoUrl" >
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<video height="80" controls>
|
||||||
|
<source :src="row.videoUrl" type="video/mp4"/>
|
||||||
|
您的浏览器不支持Video标签。
|
||||||
|
</video>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<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="['video:prjphotography:edit']">修改</el-button>
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['video:prjphotography: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="720px" custom-class="prj-photography-drawer-dlg"
|
||||||
|
append-to-body :close-on-click-modal="false" :close-on-press-escape="false">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="视频" prop="videoUrl" required>
|
||||||
|
<file-upload ref="fu1" v-model="form.videoUrl" @input="clearForm" :limit="1" :fileSize="100" :fileType="['mp4']"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="视频月份" prop="videoDate" required>
|
||||||
|
<el-date-picker clearable v-model="form.videoDate" type="month" value-format="yyyy-MM-dd" placeholder="请选择视频月份">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="照片" prop="imageUrls" required>
|
||||||
|
<phontographyUpload :videoDate="form.videoDate" ref="phUp1" v-model="form.imageUrls" @input="clearForm" ></phontographyUpload>
|
||||||
|
</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 phontographyUpload from './phontographyUpload.vue'
|
||||||
|
import { listPrjphotography, getPrjphotography, delPrjphotography, addPrjphotography, updatePrjphotography } from "@/api/video/prjphotography";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components:{
|
||||||
|
phontographyUpload
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
let checkImages=this.checkImages;
|
||||||
|
let checkVideo=this.checkVideo;
|
||||||
|
return {
|
||||||
|
prj:null,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 项目延时摄影表格数据
|
||||||
|
prjphotographyList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
imageUrl: null,
|
||||||
|
imageUrls:[],
|
||||||
|
videoUrl: null,
|
||||||
|
videoDate: null,
|
||||||
|
state: null,
|
||||||
|
isDel: null,
|
||||||
|
createDate: null,
|
||||||
|
updateDate: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
videoUrl:[{ required: true, validator: checkVideo }],
|
||||||
|
videoDate:[{ required: true, message: '视频月份不能为空' }],
|
||||||
|
imageUrls:[{ required: true, validator: checkImages }],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
window.app99=this
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clearForm(){
|
||||||
|
this.$refs["form"].clearValidate();
|
||||||
|
},
|
||||||
|
checkVideo(rule, value, callback){
|
||||||
|
if(!value || value.length==0){
|
||||||
|
callback(new Error('视频不能为空'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
checkImages(rule, value, callback){
|
||||||
|
if(!value){
|
||||||
|
callback(new Error('照片不能为空'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(value.filter(d=>!d.date).length>0){
|
||||||
|
callback(new Error("照片日期不能为空"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(value.filter(d=>!d.url).length>0){
|
||||||
|
callback(new Error("照片不能为空"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
init(prj) {
|
||||||
|
this.prj=prj;
|
||||||
|
},
|
||||||
|
/** 查询项目延时摄影列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPrjphotography(this.queryParams).then(response => {
|
||||||
|
this.prjphotographyList = (response.rows||[]).map(it=>{
|
||||||
|
let tmps=it.imageUrl?this.$tryToJson(it.imageUrl,[]):[];
|
||||||
|
it.imageUrls=tmps;
|
||||||
|
it.images=tmps.map(item=>item.url);
|
||||||
|
it.image=it.images.length>0?it.images[0]:'';
|
||||||
|
return it;
|
||||||
|
});
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
imageUrl: null,
|
||||||
|
videoUrl: null,
|
||||||
|
videoDate: null,
|
||||||
|
state: null,
|
||||||
|
remark: null,
|
||||||
|
isDel: null,
|
||||||
|
createBy: null,
|
||||||
|
createDate: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateDate: 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
|
||||||
|
getPrjphotography(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.form.imageUrls=(this.$tryToJson(this.form.imageUrl,[]));
|
||||||
|
this.open = true;
|
||||||
|
this.title = "项目延时摄影 - 修改";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.form.imageUrls.forEach(it=>{
|
||||||
|
it.date=this.$dt(it.date).format("YYYY-MM-DD HH:mm:ss");
|
||||||
|
})
|
||||||
|
let postData={
|
||||||
|
imageUrl:JSON.stringify(this.form.imageUrls),
|
||||||
|
isDel:0,
|
||||||
|
remark:'',
|
||||||
|
projectId:this.prj.id,
|
||||||
|
id:this.form.id,
|
||||||
|
state:0,
|
||||||
|
videoDate:this.form.videoDate,
|
||||||
|
videoUrl:this.form.videoUrl[0].url
|
||||||
|
}
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updatePrjphotography(postData).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addPrjphotography(postData).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 delPrjphotography(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => { });
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('video/prjphotography/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `prjphotography_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.prj-photography-drawer-dlg{
|
||||||
|
.el-dialog__body{
|
||||||
|
padding:12px 20px;
|
||||||
|
.ele-upload-list__item-content-action{
|
||||||
|
min-width: 40px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.upload-file.up-file-cnt-1{
|
||||||
|
.upload-file-uploader{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,269 @@
|
||||||
|
<template>
|
||||||
|
<div class="phontography-upload-image">
|
||||||
|
<div class="el-upload__tip" slot="tip" v-if="showTip">
|
||||||
|
请上传
|
||||||
|
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
|
||||||
|
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
|
||||||
|
的文件
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-upload
|
||||||
|
:action="uploadImgUrl"
|
||||||
|
list-type="picture-card"
|
||||||
|
:on-success="handleUploadSuccess"
|
||||||
|
:before-upload="handleBeforeUpload"
|
||||||
|
:limit="limit"
|
||||||
|
:on-error="handleUploadError"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
ref="imageUpload"
|
||||||
|
:on-remove="handleDelete"
|
||||||
|
:show-file-list="true"
|
||||||
|
:headers="headers"
|
||||||
|
:file-list="fileList"
|
||||||
|
:on-preview="handlePictureCardPreview"
|
||||||
|
:class="{hide: this.fileList.length >= this.limit}"
|
||||||
|
>
|
||||||
|
<i class="el-icon-plus" slot="default"></i>
|
||||||
|
<div slot="file" slot-scope="{file}" class="file-item">
|
||||||
|
<el-image :src="file.url+'.min.jpg'" :preview-src-list="[file.url]" />
|
||||||
|
<el-date-picker clearable v-model="file.date" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择日期">
|
||||||
|
</el-date-picker>
|
||||||
|
<el-button style="margin-left: 12px;" @click="doDeleteItem(file)" type="success" size="mini" icon="el-icon-delete">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getToken } from "@/utils/auth";
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: [String, Object, Array],
|
||||||
|
// 图片数量限制
|
||||||
|
limit: {
|
||||||
|
type: Number,
|
||||||
|
default: 100,
|
||||||
|
},
|
||||||
|
// 大小限制(MB)
|
||||||
|
fileSize: {
|
||||||
|
type: Number,
|
||||||
|
default: 5,
|
||||||
|
},
|
||||||
|
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||||
|
fileType: {
|
||||||
|
type: Array,
|
||||||
|
default: () => ["png", "jpg", "jpeg"],
|
||||||
|
},
|
||||||
|
// 是否显示提示
|
||||||
|
isShowTip: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
videoDate:{
|
||||||
|
type:[Object,String],
|
||||||
|
default:()=>new Date()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
number: 0,
|
||||||
|
uploadList: [],
|
||||||
|
dialogImageUrl: "",
|
||||||
|
dialogVisible: false,
|
||||||
|
hideUpload: false,
|
||||||
|
baseUrl: process.env.VUE_APP_BASE_API,
|
||||||
|
uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
|
||||||
|
headers: {
|
||||||
|
Authorization: "Bearer " + getToken(),
|
||||||
|
},
|
||||||
|
fileList: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value: {
|
||||||
|
handler(val) {
|
||||||
|
if (val) {
|
||||||
|
if(Array.isArray(val)){
|
||||||
|
this.fileList=val;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 首先将值转为数组
|
||||||
|
const list = Array.isArray(val) ? val : this.value.split(',');
|
||||||
|
// 然后将数组转为对象数组
|
||||||
|
this.fileList = list.map(item => {
|
||||||
|
if (typeof item === "string") {
|
||||||
|
if (item.indexOf(this.baseUrl) === -1) {
|
||||||
|
item = { name: this.baseUrl + item, url: this.baseUrl + item };
|
||||||
|
} else {
|
||||||
|
item = { name: item, url: item };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.fileList = [];
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 是否显示提示
|
||||||
|
showTip() {
|
||||||
|
return this.isShowTip && (this.fileType || this.fileSize);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doDeleteItem(f){
|
||||||
|
this.$modal.confirm('是否确认删除此图片?').then(()=> {
|
||||||
|
this.handleDelete(f);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doInput(){
|
||||||
|
this.$emit("input", this.fileList);
|
||||||
|
},
|
||||||
|
// 上传前loading加载
|
||||||
|
handleBeforeUpload(file) {
|
||||||
|
let isImg = false;
|
||||||
|
if (this.fileType.length) {
|
||||||
|
let fileExtension = "";
|
||||||
|
if (file.name.lastIndexOf(".") > -1) {
|
||||||
|
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
|
||||||
|
}
|
||||||
|
isImg = this.fileType.some(type => {
|
||||||
|
if (file.type.indexOf(type) > -1) return true;
|
||||||
|
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
isImg = file.type.indexOf("image") > -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isImg) {
|
||||||
|
this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.fileSize) {
|
||||||
|
const isLt = file.size / 1024 / 1024 < this.fileSize;
|
||||||
|
if (!isLt) {
|
||||||
|
this.$modal.msgError(`上传头像图片大小不能超过 ${this.fileSize} MB!`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$modal.loading("正在上传图片,请稍候...");
|
||||||
|
this.number++;
|
||||||
|
},
|
||||||
|
// 文件个数超出
|
||||||
|
handleExceed() {
|
||||||
|
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
|
||||||
|
},
|
||||||
|
// 上传成功回调
|
||||||
|
handleUploadSuccess(res, file) {
|
||||||
|
if (res.code === 200) {
|
||||||
|
let dt=this.videoDate?this.$dt(this.videoDate+' '+this.$dt(new Date()).format("HH:mm:ss")).$d:null;
|
||||||
|
let it={ name: res.fileName, url: res.fileName,date:dt};
|
||||||
|
this.uploadList.push(it);
|
||||||
|
this.uploadedSuccessfully(it);
|
||||||
|
} else {
|
||||||
|
this.number--;
|
||||||
|
this.$modal.closeLoading();
|
||||||
|
this.$modal.msgError(res.msg);
|
||||||
|
this.$refs.imageUpload.handleRemove(file);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除图片
|
||||||
|
handleDelete(file) {
|
||||||
|
const findex = this.fileList.map(f => f.name).indexOf(file.name);
|
||||||
|
if(findex > -1) {
|
||||||
|
this.fileList.splice(findex, 1);
|
||||||
|
this.$emit("input", this.fileList);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 上传失败
|
||||||
|
handleUploadError() {
|
||||||
|
this.$modal.msgError("上传图片失败,请重试");
|
||||||
|
this.$modal.closeLoading();
|
||||||
|
},
|
||||||
|
// 上传结束处理
|
||||||
|
uploadedSuccessfully(it) {
|
||||||
|
if (it) {
|
||||||
|
this.fileList.push(it);
|
||||||
|
this.$emit("input", this.fileList);
|
||||||
|
this.$modal.closeLoading();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 预览
|
||||||
|
handlePictureCardPreview(file) {
|
||||||
|
this.dialogImageUrl = file.url;
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
// 对象转成指定字符串分隔
|
||||||
|
listToString(list, separator) {
|
||||||
|
let strs = "";
|
||||||
|
separator = separator || ",";
|
||||||
|
for (let i in list) {
|
||||||
|
if (list[i].url) {
|
||||||
|
strs += list[i].url.replace(this.baseUrl, "") + separator;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
// .el-upload--picture-card 控制加号部分
|
||||||
|
::v-deep.hide .el-upload--picture-card {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
// 去掉动画效果
|
||||||
|
::v-deep .el-list-enter-active,
|
||||||
|
::v-deep .el-list-leave-active {
|
||||||
|
transition: all 0s;
|
||||||
|
}
|
||||||
|
::v-deep .el-list-enter, .el-list-leave-active {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
.phontography-upload-image{
|
||||||
|
::v-deep .el-upload__tip{
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
::v-deep .el-upload--picture-card{
|
||||||
|
height: 60px;
|
||||||
|
width:60px;
|
||||||
|
line-height: 68px;
|
||||||
|
}
|
||||||
|
::v-deep .el-upload-list--picture-card{
|
||||||
|
display: block;
|
||||||
|
max-height: 40vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
.el-upload-list__item{
|
||||||
|
display: block;
|
||||||
|
width: unset;
|
||||||
|
height: unset;
|
||||||
|
border: none;
|
||||||
|
border-bottom: solid 1px #ccc;
|
||||||
|
border-radius: unset;
|
||||||
|
padding: 12px 0px 12px;
|
||||||
|
&:first-child{
|
||||||
|
border-top: solid 1px #ccc;
|
||||||
|
}
|
||||||
|
.file-item{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.el-image{
|
||||||
|
margin-right: 12px;
|
||||||
|
.el-image__inner{
|
||||||
|
width: 100px;
|
||||||
|
max-height: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
<template>
|
||||||
|
<div class="prj-photography-drawer" v-if="isOpen">
|
||||||
|
<el-drawer v-if="isOpen" :visible.sync="isOpen" direction="rtl" size="70%" style="padding-left: 20px">
|
||||||
|
<template slot="title">
|
||||||
|
<div>{{ title + " 【延时摄影】" }}</div>
|
||||||
|
</template>
|
||||||
|
<div>
|
||||||
|
<mainIndex ref="index"></mainIndex>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import mainIndex from './index.vue'
|
||||||
|
export default {
|
||||||
|
components:{
|
||||||
|
mainIndex
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
prj:{},
|
||||||
|
isOpen:false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
show(prj){
|
||||||
|
this.prj=prj;
|
||||||
|
this.isOpen=true;
|
||||||
|
this.title = prj.projectName||""
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.$refs.index.init(this.prj);
|
||||||
|
},400);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.prj-photography-drawer {
|
||||||
|
::v-deep .el-drawer__header {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-drawer__body {
|
||||||
|
padding: 12px 24px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
::v-deep .el-drawer{
|
||||||
|
min-width: 1200px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -41,8 +41,8 @@ module.exports = {
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
'/jhapi':{
|
'/jhapi':{
|
||||||
//target: `http://62.234.3.186/jhapi/`,
|
target: `http://62.234.3.186/jhapi/`,
|
||||||
target: `http://127.0.0.1:8090/jhapi/`,
|
//target: `http://127.0.0.1:8090/jhapi/`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/jhapi':'/'
|
'^/jhapi':'/'
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.yanzhu.jh.bigscreen.web.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.constant.Constants;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.yanzhu.jh.video.domain.SurProjectPhotography;
|
||||||
|
import com.yanzhu.jh.video.service.ISurProjectPhotographyService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/bgscreen/photography")
|
||||||
|
public class ProjectPhotographyController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ISurProjectPhotographyService photographyService;
|
||||||
|
@Autowired
|
||||||
|
private RedisCache redisCache;
|
||||||
|
public AjaxResult listPhotography(SurProjectPhotography where){
|
||||||
|
String key="bgscreen_photography_listPhotography_"+where.getProjectId();
|
||||||
|
Object obj=redisCache.getCacheObject(key);
|
||||||
|
if(obj!=null){
|
||||||
|
return AjaxResult.success(obj);
|
||||||
|
}
|
||||||
|
List<SurProjectPhotography> list=photographyService.selectSurProjectPhotographyList(where);
|
||||||
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,6 +30,19 @@ public class ProjectScheduleController extends BaseController {
|
||||||
return AjaxResult.success(surProjectSchedule);
|
return AjaxResult.success(surProjectSchedule);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/constructionProgressByDept")
|
||||||
|
public AjaxResult getConstructionProgressByDept(Long deptId){
|
||||||
|
SurProjectSchedule where=new SurProjectSchedule();
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
where.setDeptId(deptId);
|
||||||
|
}
|
||||||
|
List<SurProjectSchedule> list=isurProjectScheduleService.getConstructionProgressByDept(where);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 按项目类型查询形象进度数据
|
* 按项目类型查询形象进度数据
|
||||||
* @param type
|
* @param type
|
||||||
|
|
|
@ -89,6 +89,15 @@ public class SurProjectSchedule extends BaseEntity
|
||||||
//数据模板
|
//数据模板
|
||||||
private String dataTemplate;
|
private String dataTemplate;
|
||||||
|
|
||||||
|
public Long getDeptId() {
|
||||||
|
return DeptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptId(Long deptId) {
|
||||||
|
DeptId = deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Long DeptId;
|
||||||
public SurProject getSurProject() {
|
public SurProject getSurProject() {
|
||||||
return surProject;
|
return surProject;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.yanzhu.jh.project.domain.vo;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectSchedule;
|
import com.yanzhu.jh.project.domain.SurProjectSchedule;
|
||||||
|
|
||||||
public class SurProjectScheduleWhere extends SurProjectSchedule {
|
public class SurProjectScheduleWhere extends SurProjectSchedule {
|
||||||
private long deptId;
|
|
||||||
private long prjType;
|
private long prjType;
|
||||||
|
|
||||||
public long getPrjType() {
|
public long getPrjType() {
|
||||||
|
@ -14,13 +14,6 @@ public class SurProjectScheduleWhere extends SurProjectSchedule {
|
||||||
this.prjType = prjType;
|
this.prjType = prjType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDeptId() {
|
|
||||||
return deptId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeptId(long deptId) {
|
|
||||||
this.deptId = deptId;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,4 +68,6 @@ public interface SurProjectScheduleMapper
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<SurProjectSchedule> selectByProjectType(SurProjectScheduleWhere where);
|
public List<SurProjectSchedule> selectByProjectType(SurProjectScheduleWhere where);
|
||||||
|
|
||||||
|
public List<SurProjectSchedule> getConstructionProgressByDept(SurProjectSchedule where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,4 +67,6 @@ public interface ISurProjectScheduleService
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<SurProjectSchedule> selectByProjectType(SurProjectScheduleWhere where);
|
public List<SurProjectSchedule> selectByProjectType(SurProjectScheduleWhere where);
|
||||||
|
|
||||||
|
public List<SurProjectSchedule> getConstructionProgressByDept(com.yanzhu.jh.project.domain.SurProjectSchedule where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,4 +122,9 @@ public class SurProjectScheduleServiceImpl implements ISurProjectScheduleService
|
||||||
public List<SurProjectSchedule> selectByProjectType(SurProjectScheduleWhere where) {
|
public List<SurProjectSchedule> selectByProjectType(SurProjectScheduleWhere where) {
|
||||||
return surProjectScheduleMapper.selectByProjectType(where);
|
return surProjectScheduleMapper.selectByProjectType(where);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SurProjectSchedule> getConstructionProgressByDept(SurProjectSchedule where) {
|
||||||
|
return surProjectScheduleMapper.getConstructionProgressByDept(where);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,104 @@
|
||||||
|
package com.yanzhu.jh.video.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.video.domain.SurProjectPhotography;
|
||||||
|
import com.yanzhu.jh.video.service.ISurProjectPhotographyService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目延时摄影Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-15
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/video/prjphotography")
|
||||||
|
public class SurProjectPhotographyController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISurProjectPhotographyService surProjectPhotographyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目延时摄影列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('video:prjphotography:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SurProjectPhotography surProjectPhotography)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SurProjectPhotography> list = surProjectPhotographyService.selectSurProjectPhotographyList(surProjectPhotography);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出项目延时摄影列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('video:prjphotography:export')")
|
||||||
|
@Log(title = "项目延时摄影", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SurProjectPhotography surProjectPhotography)
|
||||||
|
{
|
||||||
|
List<SurProjectPhotography> list = surProjectPhotographyService.selectSurProjectPhotographyList(surProjectPhotography);
|
||||||
|
ExcelUtil<SurProjectPhotography> util = new ExcelUtil<SurProjectPhotography>(SurProjectPhotography.class);
|
||||||
|
util.exportExcel(response, list, "项目延时摄影数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目延时摄影详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('video:prjphotography:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(surProjectPhotographyService.selectSurProjectPhotographyById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增项目延时摄影
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('video:prjphotography:add')")
|
||||||
|
@Log(title = "项目延时摄影", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SurProjectPhotography surProjectPhotography)
|
||||||
|
{
|
||||||
|
return toAjax(surProjectPhotographyService.insertSurProjectPhotography(surProjectPhotography));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目延时摄影
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('video:prjphotography:edit')")
|
||||||
|
@Log(title = "项目延时摄影", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SurProjectPhotography surProjectPhotography)
|
||||||
|
{
|
||||||
|
return toAjax(surProjectPhotographyService.updateSurProjectPhotography(surProjectPhotography));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目延时摄影
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('video:prjphotography:remove')")
|
||||||
|
@Log(title = "项目延时摄影", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(surProjectPhotographyService.deleteSurProjectPhotographyByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,157 @@
|
||||||
|
package com.yanzhu.jh.video.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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目延时摄影对象 sur_project_photography
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-15
|
||||||
|
*/
|
||||||
|
public class SurProjectPhotography extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 项目ID */
|
||||||
|
@Excel(name = "项目ID")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/** 图片路径 */
|
||||||
|
@Excel(name = "图片路径")
|
||||||
|
private String imageUrl;
|
||||||
|
|
||||||
|
/** 视频路径 */
|
||||||
|
@Excel(name = "视频路径")
|
||||||
|
private String videoUrl;
|
||||||
|
|
||||||
|
/** 视频日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "视频日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date videoDate;
|
||||||
|
|
||||||
|
/** 状态 */
|
||||||
|
@Excel(name = "状态")
|
||||||
|
private Long state;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
@Excel(name = "")
|
||||||
|
private Long isDel;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date createDate;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date updateDate;
|
||||||
|
|
||||||
|
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 setImageUrl(String imageUrl)
|
||||||
|
{
|
||||||
|
this.imageUrl = imageUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImageUrl()
|
||||||
|
{
|
||||||
|
return imageUrl;
|
||||||
|
}
|
||||||
|
public void setVideoUrl(String videoUrl)
|
||||||
|
{
|
||||||
|
this.videoUrl = videoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVideoUrl()
|
||||||
|
{
|
||||||
|
return videoUrl;
|
||||||
|
}
|
||||||
|
public void setVideoDate(Date videoDate)
|
||||||
|
{
|
||||||
|
this.videoDate = videoDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getVideoDate()
|
||||||
|
{
|
||||||
|
return videoDate;
|
||||||
|
}
|
||||||
|
public void setState(Long state)
|
||||||
|
{
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getState()
|
||||||
|
{
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
public void setIsDel(Long isDel)
|
||||||
|
{
|
||||||
|
this.isDel = isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getIsDel()
|
||||||
|
{
|
||||||
|
return isDel;
|
||||||
|
}
|
||||||
|
public void setCreateDate(Date createDate)
|
||||||
|
{
|
||||||
|
this.createDate = createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateDate()
|
||||||
|
{
|
||||||
|
return createDate;
|
||||||
|
}
|
||||||
|
public void setUpdateDate(Date updateDate)
|
||||||
|
{
|
||||||
|
this.updateDate = updateDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateDate()
|
||||||
|
{
|
||||||
|
return updateDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("projectId", getProjectId())
|
||||||
|
.append("imageUrl", getImageUrl())
|
||||||
|
.append("videoUrl", getVideoUrl())
|
||||||
|
.append("videoDate", getVideoDate())
|
||||||
|
.append("state", getState())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("isDel", getIsDel())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createDate", getCreateDate())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateDate", getUpdateDate())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.yanzhu.jh.video.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.yanzhu.jh.video.domain.SurProjectPhotography;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目延时摄影Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-15
|
||||||
|
*/
|
||||||
|
public interface SurProjectPhotographyMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询项目延时摄影
|
||||||
|
*
|
||||||
|
* @param id 项目延时摄影主键
|
||||||
|
* @return 项目延时摄影
|
||||||
|
*/
|
||||||
|
public SurProjectPhotography selectSurProjectPhotographyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目延时摄影列表
|
||||||
|
*
|
||||||
|
* @param surProjectPhotography 项目延时摄影
|
||||||
|
* @return 项目延时摄影集合
|
||||||
|
*/
|
||||||
|
public List<SurProjectPhotography> selectSurProjectPhotographyList(SurProjectPhotography surProjectPhotography);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增项目延时摄影
|
||||||
|
*
|
||||||
|
* @param surProjectPhotography 项目延时摄影
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurProjectPhotography(SurProjectPhotography surProjectPhotography);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目延时摄影
|
||||||
|
*
|
||||||
|
* @param surProjectPhotography 项目延时摄影
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurProjectPhotography(SurProjectPhotography surProjectPhotography);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目延时摄影
|
||||||
|
*
|
||||||
|
* @param id 项目延时摄影主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectPhotographyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除项目延时摄影
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectPhotographyByIds(Long[] ids);
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.yanzhu.jh.video.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.yanzhu.jh.video.domain.SurProjectPhotography;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目延时摄影Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-15
|
||||||
|
*/
|
||||||
|
public interface ISurProjectPhotographyService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询项目延时摄影
|
||||||
|
*
|
||||||
|
* @param id 项目延时摄影主键
|
||||||
|
* @return 项目延时摄影
|
||||||
|
*/
|
||||||
|
public SurProjectPhotography selectSurProjectPhotographyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目延时摄影列表
|
||||||
|
*
|
||||||
|
* @param surProjectPhotography 项目延时摄影
|
||||||
|
* @return 项目延时摄影集合
|
||||||
|
*/
|
||||||
|
public List<SurProjectPhotography> selectSurProjectPhotographyList(SurProjectPhotography surProjectPhotography);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增项目延时摄影
|
||||||
|
*
|
||||||
|
* @param surProjectPhotography 项目延时摄影
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurProjectPhotography(SurProjectPhotography surProjectPhotography);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目延时摄影
|
||||||
|
*
|
||||||
|
* @param surProjectPhotography 项目延时摄影
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurProjectPhotography(SurProjectPhotography surProjectPhotography);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除项目延时摄影
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的项目延时摄影主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectPhotographyByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目延时摄影信息
|
||||||
|
*
|
||||||
|
* @param id 项目延时摄影主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectPhotographyById(Long id);
|
||||||
|
}
|
|
@ -0,0 +1,95 @@
|
||||||
|
package com.yanzhu.jh.video.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.yanzhu.jh.video.mapper.SurProjectPhotographyMapper;
|
||||||
|
import com.yanzhu.jh.video.domain.SurProjectPhotography;
|
||||||
|
import com.yanzhu.jh.video.service.ISurProjectPhotographyService;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
/**
|
||||||
|
* 项目延时摄影Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SurProjectPhotographyServiceImpl implements ISurProjectPhotographyService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SurProjectPhotographyMapper surProjectPhotographyMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目延时摄影
|
||||||
|
*
|
||||||
|
* @param id 项目延时摄影主键
|
||||||
|
* @return 项目延时摄影
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SurProjectPhotography selectSurProjectPhotographyById(Long id)
|
||||||
|
{
|
||||||
|
return surProjectPhotographyMapper.selectSurProjectPhotographyById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目延时摄影列表
|
||||||
|
*
|
||||||
|
* @param surProjectPhotography 项目延时摄影
|
||||||
|
* @return 项目延时摄影
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SurProjectPhotography> selectSurProjectPhotographyList(SurProjectPhotography surProjectPhotography)
|
||||||
|
{
|
||||||
|
return surProjectPhotographyMapper.selectSurProjectPhotographyList(surProjectPhotography);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增项目延时摄影
|
||||||
|
*
|
||||||
|
* @param surProjectPhotography 项目延时摄影
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSurProjectPhotography(SurProjectPhotography surProjectPhotography)
|
||||||
|
{
|
||||||
|
surProjectPhotography.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
return surProjectPhotographyMapper.insertSurProjectPhotography(surProjectPhotography);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目延时摄影
|
||||||
|
*
|
||||||
|
* @param surProjectPhotography 项目延时摄影
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSurProjectPhotography(SurProjectPhotography surProjectPhotography)
|
||||||
|
{
|
||||||
|
surProjectPhotography.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
return surProjectPhotographyMapper.updateSurProjectPhotography(surProjectPhotography);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除项目延时摄影
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的项目延时摄影主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectPhotographyByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return surProjectPhotographyMapper.deleteSurProjectPhotographyByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目延时摄影信息
|
||||||
|
*
|
||||||
|
* @param id 项目延时摄影主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectPhotographyById(Long id)
|
||||||
|
{
|
||||||
|
return surProjectPhotographyMapper.deleteSurProjectPhotographyById(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -193,4 +193,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
order by projectSort
|
order by projectSort
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getConstructionProgressByDept" parameterType="SurProjectScheduleWhere" resultMap="SurProjectScheduleResult">
|
||||||
|
select s.*,p.projectName from (
|
||||||
|
select * from sur_project_schedule where id in (
|
||||||
|
select max(id)
|
||||||
|
from sur_project_schedule where
|
||||||
|
IF(is_del IS NULL ,0,is_del)=0
|
||||||
|
<if test="deptId!=null and deptId>0">
|
||||||
|
and project_id in (SELECT id FROM sur_project WHERE deptid= #{deptId})
|
||||||
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
and ( (existing_problem is not null and existing_problem not like '暂无%' and existing_problem not like '无%' and length(trim(existing_problem))>0 )
|
||||||
|
or (problem_progress IS NOT NULL AND problem_progress NOT LIKE '暂无%' AND problem_progress NOT LIKE '无%' AND LENGTH(TRIM(problem_progress))>0 ))
|
||||||
|
group by project_id
|
||||||
|
)
|
||||||
|
) s LEFT JOIN sur_project AS p ON s.project_id=p.id order by p.projectSort
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -0,0 +1,104 @@
|
||||||
|
<?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.video.mapper.SurProjectPhotographyMapper">
|
||||||
|
|
||||||
|
<resultMap type="SurProjectPhotography" id="SurProjectPhotographyResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="projectId" column="project_id" />
|
||||||
|
<result property="imageUrl" column="image_url" />
|
||||||
|
<result property="videoUrl" column="video_url" />
|
||||||
|
<result property="videoDate" column="video_date" />
|
||||||
|
<result property="state" column="state" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="isDel" column="is_del" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createDate" column="create_date" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateDate" column="update_date" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSurProjectPhotographyVo">
|
||||||
|
select id, project_id, image_url, video_url, video_date, state, remark, is_del, create_by, create_date, update_by, update_date from sur_project_photography
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSurProjectPhotographyList" parameterType="SurProjectPhotography" resultMap="SurProjectPhotographyResult">
|
||||||
|
<include refid="selectSurProjectPhotographyVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||||
|
<if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>
|
||||||
|
<if test="videoUrl != null and videoUrl != ''"> and video_url = #{videoUrl}</if>
|
||||||
|
<if test="videoDate != null "> and video_date = #{videoDate}</if>
|
||||||
|
<if test="state != null "> and state = #{state}</if>
|
||||||
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||||
|
<if test="createDate != null "> and create_date = #{createDate}</if>
|
||||||
|
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||||
|
</where>
|
||||||
|
order by video_date
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSurProjectPhotographyById" parameterType="Long" resultMap="SurProjectPhotographyResult">
|
||||||
|
<include refid="selectSurProjectPhotographyVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSurProjectPhotography" parameterType="SurProjectPhotography" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sur_project_photography
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="projectId != null">project_id,</if>
|
||||||
|
<if test="imageUrl != null">image_url,</if>
|
||||||
|
<if test="videoUrl != null">video_url,</if>
|
||||||
|
<if test="videoDate != null">video_date,</if>
|
||||||
|
<if test="state != null">state,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="isDel != null">is_del,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createDate != null">create_date,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateDate != null">update_date,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="projectId != null">#{projectId},</if>
|
||||||
|
<if test="imageUrl != null">#{imageUrl},</if>
|
||||||
|
<if test="videoUrl != null">#{videoUrl},</if>
|
||||||
|
<if test="videoDate != null">#{videoDate},</if>
|
||||||
|
<if test="state != null">#{state},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="isDel != null">#{isDel},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createDate != null">#{createDate},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateDate != null">#{updateDate},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSurProjectPhotography" parameterType="SurProjectPhotography">
|
||||||
|
update sur_project_photography
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="projectId != null">project_id = #{projectId},</if>
|
||||||
|
<if test="imageUrl != null">image_url = #{imageUrl},</if>
|
||||||
|
<if test="videoUrl != null">video_url = #{videoUrl},</if>
|
||||||
|
<if test="videoDate != null">video_date = #{videoDate},</if>
|
||||||
|
<if test="state != null">state = #{state},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="isDel != null">is_del = #{isDel},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createDate != null">create_date = #{createDate},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateDate != null">update_date = #{updateDate},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSurProjectPhotographyById" parameterType="Long">
|
||||||
|
delete from sur_project_photography where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSurProjectPhotographyByIds" parameterType="String">
|
||||||
|
delete from sur_project_photography where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue