提交代码
parent
1957fcde25
commit
f4d4b24d63
|
@ -18,7 +18,8 @@ public enum MessageTypeEnum {
|
|||
YHZGCSGZ("90", "隐患整改超时通知"),
|
||||
YHFJCSGZ("100", "隐患复检超时通知"),
|
||||
LZYJSP("110", "劳资预警审批"),
|
||||
LZYJCSTZ("120", "劳资预警审批超时");
|
||||
LZYJCSTZ("120", "劳资预警审批超时"),
|
||||
GCGNJY("130", "工程功能检验审批");
|
||||
|
||||
//工作流审批由ProcDefKey组成
|
||||
private final String code;
|
||||
|
|
|
@ -23,6 +23,7 @@ public enum PublicStateEnum {
|
|||
AUDIT_TYPE_CLFY("4", "材料封样"),
|
||||
AUDIT_TYPE_JPYS("3", "举牌验收"),
|
||||
AUDIT_TYPE_SCSL("2", "实测实量"),
|
||||
AUDIT_TYPE_GCGNJY("5", "工程功能检验"),
|
||||
AUDITINFO_DSH("1", "待审核"),
|
||||
AUDITINFO_SHBH("3", "审核驳回"),
|
||||
AUDITINFO_SHTG("4", "审核通过"),
|
||||
|
|
|
@ -187,17 +187,6 @@ public class FileUploadUtils
|
|||
makeMiniImage(f.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
|
||||
List<File> list= FileUtil.loopFiles("D:/hahaprj/tmp");
|
||||
for(File f :list){
|
||||
System.out.println(f.getAbsolutePath());
|
||||
makeMiniImage(f.getAbsolutePath());
|
||||
}
|
||||
|
||||
//String f="D:\\hahaprj\\tmp\\2023\\07\\30\\840_20230730152314A005.jpg";
|
||||
//makeMiniImage(f);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编码文件名
|
||||
|
@ -205,7 +194,25 @@ public class FileUploadUtils
|
|||
public static final String extractFilename(MultipartFile file)
|
||||
{
|
||||
return StringUtils.format("{}/{}_{}.{}", DateUtils.datePath(),
|
||||
FilenameUtils.getBaseName(file.getOriginalFilename()), Seq.getId(Seq.uploadSeqType), getExtension(file));
|
||||
getYzFilename(FilenameUtils.getBaseName(file.getOriginalFilename())), Seq.getId(Seq.uploadSeqType), getExtension(file));
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤文件名中的特殊符号问题
|
||||
* @param fileName
|
||||
* @return
|
||||
*/
|
||||
public static final String getYzFilename(String fileName){
|
||||
// 定义正则表达式,匹配除了字母和数字以外的任何字符
|
||||
String regex = "[#%\\[\\]&',;=?$()]";
|
||||
// 使用指定的替换字符替换非法字符
|
||||
String replacedString = fileName.replaceAll(regex,"").replaceAll("__","");
|
||||
return replacedString;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String s = " 3#、6#楼塔吊单位及人员资质报审____________________[asd]20240621095052A847.pdf";
|
||||
System.out.println(getYzFilename(s));
|
||||
}
|
||||
|
||||
public static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询工程功能检验列表
|
||||
export function listProjectFunVerify(query) {
|
||||
return request({
|
||||
url: '/project/projectFunVerify/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 统计工程功能检验
|
||||
export function findGroupCountByApprove(query) {
|
||||
return request({
|
||||
url: '/project/projectFunVerify/findGroupCountByApprove',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询工程功能检验详细
|
||||
export function getProjectFunVerify(id) {
|
||||
return request({
|
||||
url: '/project/projectFunVerify/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增工程功能检验
|
||||
export function addProjectFunVerify(data) {
|
||||
return request({
|
||||
url: '/project/projectFunVerify',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改工程功能检验
|
||||
export function updateProjectFunVerify(data) {
|
||||
return request({
|
||||
url: '/project/projectFunVerify',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改工程功能检验
|
||||
export function updateProjectFunVerifyNoLog(data) {
|
||||
return request({
|
||||
url: '/project/projectFunVerify/editNoLog',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除工程功能检验
|
||||
export function delProjectFunVerify(id) {
|
||||
return request({
|
||||
url: '/project/projectFunVerify/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -27,7 +27,7 @@ export default {
|
|||
vnodes.push(<span slot='title'>{(title)}</span>)
|
||||
}
|
||||
let name=context?.parent?.item?.name;
|
||||
if(['Todo','Task','Approve','Project','CheckDetection','ProjectMeasure','MaterialSeal','ProjectChecking','Attendance','FlowLabourInfo','Trouble','PshProblemmodify','SspProblemmodify'].includes(name)){
|
||||
if(['Todo','Task','Approve','Project','CheckDetection','ProjectMeasure','MaterialSeal','ProjectChecking','Attendance','FlowLabourInfo','Trouble','PshProblemmodify','SspProblemmodify','ProjectFunVerify'].includes(name)){
|
||||
console.log(name);
|
||||
vnodes.push(h('span',{class:"todo_num_tips tips_"+name},1))
|
||||
}
|
||||
|
|
|
@ -24,7 +24,9 @@ const flowtask = {
|
|||
let projectMeasures = document.querySelectorAll(".tips_ProjectMeasure");
|
||||
let projectCheckings = document.querySelectorAll(".tips_ProjectChecking");
|
||||
let materialSeals = document.querySelectorAll(".tips_MaterialSeal");
|
||||
let projectFunVerify = document.querySelectorAll(".tips_ProjectFunVerify");
|
||||
let surProjects = document.querySelectorAll(".tips_Project");
|
||||
|
||||
//commit('SET_AWAIT_TASK',response.total)
|
||||
if (todos.length > 0) {
|
||||
todos.forEach(el => {
|
||||
|
@ -97,8 +99,18 @@ const flowtask = {
|
|||
}
|
||||
});
|
||||
}
|
||||
if (projectFunVerify.length > 0) {
|
||||
projectFunVerify.forEach(el => {
|
||||
el.innerHTML = response.data.approveGCGN;
|
||||
if (response.data.approveGCGN > 0) {
|
||||
el.style.display = "inline";
|
||||
} else {
|
||||
el.style.display = "none";
|
||||
}
|
||||
});
|
||||
}
|
||||
if (surProjects.length > 0) {
|
||||
let sum = parseInt(response.data.approveQYFS) + parseInt(response.data.approveSCSL) + parseInt(response.data.approveJPYS) + parseInt(response.data.approveCLFY);
|
||||
let sum = parseInt(response.data.approveQYFS) + parseInt(response.data.approveSCSL) + parseInt(response.data.approveJPYS) + parseInt(response.data.approveCLFY) + parseInt(response.data.approveGCGN);
|
||||
surProjects.forEach(el => {
|
||||
el.innerHTML = sum;
|
||||
if (sum > 0) {
|
||||
|
|
|
@ -388,9 +388,7 @@
|
|||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.sealDate"
|
||||
type="datetime"
|
||||
default-time="10:00:00"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="date"
|
||||
placeholder="请选择封样时间"
|
||||
style="width: 100%"
|
||||
>
|
||||
|
|
|
@ -145,8 +145,7 @@
|
|||
<el-input v-model="form.useBrand" placeholder="请输入拟用品牌" @change="onlyFile" />
|
||||
</el-form-item>
|
||||
<el-form-item label="封样时间" prop="sealDate">
|
||||
<el-date-picker clearable v-model="form.sealDate" type="datetime" default-time="10:00:00"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择封样时间" style="width: 100%">
|
||||
<el-date-picker clearable v-model="form.sealDate" type="date"placeholder="请选择封样时间" style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="监理专员" prop="witnessUser">
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<span>{{ dataInfo.laboratoryName }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="送检时间">
|
||||
<span>{{ parseTime(dataInfo.checkTime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
||||
<span>{{ parseTime(dataInfo.checkTime, "{y}-{m}-{d}") }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测报告" v-if="dataInfo.checkState == '2'">
|
||||
<el-button
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="验收时间">
|
||||
<span>{{ parseTime(dataInfo.checkingDate, "{y}-{m}-{d} {h}:{i}") }}</span>
|
||||
<span>{{ parseTime(dataInfo.checkingDate, "{y}-{m}-{d}") }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="验收结果" prop="checkResult">
|
||||
<el-radio
|
||||
|
|
|
@ -0,0 +1,226 @@
|
|||
<template>
|
||||
<div class="projectect-attendance-drawer">
|
||||
<el-drawer
|
||||
v-if="isOpen"
|
||||
:visible.sync="isOpen"
|
||||
ref="drawer"
|
||||
direction="rtl"
|
||||
@close="closeCallBack"
|
||||
size="50%"
|
||||
>
|
||||
<template slot="title">
|
||||
<div>{{ title + " 【处理审批】" }}</div>
|
||||
</template>
|
||||
<el-form
|
||||
ref="form"
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
style="padding-right: 20px; padding-left: 20px"
|
||||
>
|
||||
<el-form-item label="项目名称">
|
||||
{{ dataInfo.projectName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称">
|
||||
{{ dataInfo.deptName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="检验报告">
|
||||
<el-image
|
||||
ref="preview"
|
||||
v-for="(img, idx) in dataInfo.imageUrls.split(',')"
|
||||
:key="idx"
|
||||
:src="getImageUrl(img)"
|
||||
style="width: 120px; height: 120px; margin-right: 15px"
|
||||
@click="onPreview(img)"
|
||||
></el-image>
|
||||
</el-form-item>
|
||||
<el-form-item label="验收类型">
|
||||
<dict-tag
|
||||
:options="dict.type.project_fun_verify_type"
|
||||
:value="dataInfo.checkType"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验名称">
|
||||
{{ dataInfo.checkName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="质量专员">
|
||||
{{ dataInfo.qualityUserName }}
|
||||
<el-tag type="info" size="mini">{{ dataInfo.qualityUser }}</el-tag>
|
||||
</el-form-item>
|
||||
<el-form-item label="监理专员">
|
||||
{{ dataInfo.superviseUserName }}
|
||||
<el-tag type="info" size="mini">{{ dataInfo.superviseUser }}</el-tag>
|
||||
</el-form-item>
|
||||
<el-form-item label="验收时间">
|
||||
<span>{{ parseTime(dataInfo.checkDate, "{y}-{m}-{d}") }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="验收描述">
|
||||
<span>{{ dataInfo.intro }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="相关附件" v-if="dataInfo.checkFiles">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-paperclip"
|
||||
@click="handleDownload()"
|
||||
>下载相关附件</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="提交用户">
|
||||
{{ dataInfo.createBy }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="提交时间">
|
||||
<span>{{ parseTime(dataInfo.createTime, "{y}-{m}-{d}") }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="验收结果" prop="checkResult">
|
||||
<el-radio
|
||||
v-model="form.checkResult"
|
||||
v-for="dict in dict.type.project_FunVerify_result"
|
||||
:label="dict.value"
|
||||
:key="dict.value"
|
||||
border
|
||||
size="small"
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批意见" prop="comment">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入审批意见(200字内)"
|
||||
v-model="form.comment"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div style="text-align: center;margin-bottom:20px;">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-drawer>
|
||||
<el-image-viewer
|
||||
v-if="showViewer"
|
||||
:on-close="closeViewer"
|
||||
:url-list="previewList"
|
||||
style="z-index: 2050"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getProjectFunVerify, updateProjectFunVerify } from "@/api/project/projectFunVerify";
|
||||
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
|
||||
|
||||
export default {
|
||||
name: "approveFunVerifyDrawer",
|
||||
components: {
|
||||
ElImageViewer,
|
||||
},
|
||||
props: {
|
||||
closeCallBack: {
|
||||
type: Function,
|
||||
},
|
||||
},
|
||||
dicts: [
|
||||
"project_FunVerify_result",
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
showViewer: false,
|
||||
open: false,
|
||||
isOpen: false,
|
||||
dataInfo: {
|
||||
imageUrls: "",
|
||||
},
|
||||
title: "",
|
||||
form: {},
|
||||
rules: {
|
||||
checkResult: [{ required: true, message: "请选择检测结果", trigger: "blur" }],
|
||||
comment: [
|
||||
{ required: true, message: "请输入审批意见", trigger: "blur" },
|
||||
{ max: 200, message: "审批意见最多200字符", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
previewList: [],
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
getImageUrl(url) {
|
||||
return process.env.VUE_APP_BASE_API + url + ".min.jpg";
|
||||
},
|
||||
onPreview(urls) {
|
||||
this.previewList = [];
|
||||
urls.split(",").forEach((item) => {
|
||||
this.previewList.push(process.env.VUE_APP_BASE_API + item);
|
||||
});
|
||||
this.showViewer = true;
|
||||
},
|
||||
closeViewer() {
|
||||
this.showViewer = false;
|
||||
},
|
||||
show(options) {
|
||||
this.title = options.typeName;
|
||||
this.isOpen = true;
|
||||
this.form = {};
|
||||
this.form.id = options.id;
|
||||
getProjectFunVerify(options.id).then((res) => {
|
||||
this.dataInfo = res.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.isOpen = false;
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
// 结果状态同步到审批状态
|
||||
let msg = "合格";
|
||||
if (this.form.checkResult == "1") {
|
||||
this.form.approveStatus = "4";
|
||||
} else {
|
||||
msg = "不合格";
|
||||
this.form.approveStatus = "3";
|
||||
}
|
||||
this.$confirm("是否确认审批" + msg + "?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true;
|
||||
updateProjectFunVerify(this.form).then((res) => {
|
||||
this.$modal.msgSuccess("审批成功");
|
||||
this.loading = false;
|
||||
//关闭并刷新列表
|
||||
this.$refs.drawer.closeDrawer();
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
console.log("取消操作");
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 下载附件 */
|
||||
handleDownload() {
|
||||
let files = this.dataInfo.checkFiles.split(",");
|
||||
files.forEach((item) => {
|
||||
this.$download.resource(item);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -63,7 +63,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="封样时间">
|
||||
<span>{{ parseTime(dataInfo.sealDate, "{y}-{m}-{d} {h}:{i}") }}</span>
|
||||
<span>{{ parseTime(dataInfo.sealDate, "{y}-{m}-{d}") }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="会签单" v-if="dataInfo.signFiles != null">
|
||||
<el-button
|
||||
|
|
|
@ -416,7 +416,7 @@
|
|||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="验收图片" prop="imageUrls">
|
||||
<image-upload v-model="form.dataTypeLvl1" :limit="9" />
|
||||
<image-upload v-model="form.imageUrls" :limit="9" />
|
||||
</el-form-item>
|
||||
<el-form-item label="验收类型" prop="dataTypeLvl1">
|
||||
<el-select
|
||||
|
@ -507,10 +507,8 @@
|
|||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="form.checkingDate"
|
||||
type="datetime"
|
||||
type="date"
|
||||
placeholder="选择日期时间"
|
||||
default-time="10:00:00"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
|
|
@ -548,7 +548,6 @@ export default {
|
|||
},
|
||||
/** 下载附件 */
|
||||
handleDownload(row) {
|
||||
debugger
|
||||
this.files = row.files;
|
||||
this.files.forEach((item) => {
|
||||
this.$download.resource(item);
|
||||
|
|
|
@ -0,0 +1,777 @@
|
|||
<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="deptName">
|
||||
<el-input
|
||||
v-model="queryParams.deptName"
|
||||
placeholder="请输入单位名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验类型" prop="checkType">
|
||||
<el-select
|
||||
v-model="queryParams.checkType"
|
||||
placeholder="请选择检验类型"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.project_fun_verify_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="质量专员" prop="qualityUser">
|
||||
<el-input
|
||||
v-model="queryParams.qualityUser"
|
||||
placeholder="请输入质量专员"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监理专员" prop="superviseUser">
|
||||
<el-input
|
||||
v-model="queryParams.superviseUser"
|
||||
placeholder="请输入监理专员"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeDate"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批状态" prop="approveStatus" v-if="false">
|
||||
<el-select
|
||||
v-model="queryParams.approveStatus"
|
||||
placeholder="请选择审批状态"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.project_check_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- <el-row :gutter="10" class="mb8"> -->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['project:projectFunVerify: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:projectFunVerify: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:projectFunVerify: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:projectFunVerify:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row> -->
|
||||
<el-tabs type="card" v-model="queryParams.activeName" @tab-click="getList">
|
||||
<el-tab-pane :label="tabs.all" name="all"></el-tab-pane>
|
||||
<el-tab-pane :label="tabs.jxz" name="jxz"></el-tab-pane>
|
||||
<el-tab-pane :label="tabs.ywc" name="ywc"></el-tab-pane
|
||||
></el-tabs>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="projectFunVerifyList"
|
||||
@selection-change="handleSelectionChange"
|
||||
stripe
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="projectName"
|
||||
width="200"
|
||||
fixed="left"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位名称"
|
||||
align="center"
|
||||
prop="deptName"
|
||||
width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="检验报告" align="center" prop="mainImage" width="220">
|
||||
<template slot-scope="scope">
|
||||
<el-image
|
||||
ref="preview"
|
||||
style="width: 200px; height: 100px"
|
||||
:src="getImageUrl(scope.row.mainImage)"
|
||||
@click="onPreview(scope.row.imageUrls)"
|
||||
></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="检验类型"
|
||||
align="center"
|
||||
width="200"
|
||||
prop="checkType"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.project_fun_verify_type"
|
||||
:value="scope.row.checkType"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="检验名称"
|
||||
align="center"
|
||||
prop="checkName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="检验描述"
|
||||
align="center"
|
||||
prop="intro"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="质量专员"
|
||||
align="left"
|
||||
prop="qualityUser"
|
||||
width="130"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.qualityUserName }}</div>
|
||||
<div>{{ scope.row.qualityUser }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="监理专员"
|
||||
align="left"
|
||||
prop="superviseUser"
|
||||
width="130"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.superviseUserName }}</div>
|
||||
<div>{{ scope.row.superviseUser }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="检验时间"
|
||||
align="center"
|
||||
prop="checkDate"
|
||||
width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkDate, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="检验结果" align="center" prop="checkResult">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.project_FunVerify_result"
|
||||
:value="scope.row.checkResult"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="审批状态" align="center" prop="approveStatus" width="120">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.project_check_status"
|
||||
:value="scope.row.approveStatus"
|
||||
/>
|
||||
</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="createTime" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
width="200"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.checkFiles"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-paperclip"
|
||||
@click="handledownload(scope.row)"
|
||||
v-hasPermi="['project:projectFunVerify:list']"
|
||||
>下载附件</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.approveStatus != null"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-tickets"
|
||||
@click="handleAuditinfo(scope.row)"
|
||||
>审批日志</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.approveStatus == '1'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-finished"
|
||||
v-hasPermi="['project:projectFunVerify:approve']"
|
||||
@click="handleAudit(scope.row)"
|
||||
>处理审批</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.approveStatus != '4'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['project:projectFunVerify:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.approveStatus != '4'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:projectFunVerify: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="780px"
|
||||
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="projectName">
|
||||
<el-input
|
||||
v-model="form.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="deptName">
|
||||
<el-input
|
||||
v-model="form.deptName"
|
||||
placeholder="请输入单位名称"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验报告" prop="imageUrls">
|
||||
<image-upload v-model="form.imageUrls" :limit="999" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检验类型" prop="checkType">
|
||||
<el-select
|
||||
v-model="form.checkType"
|
||||
placeholder="请选择检验类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.project_fun_verify_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验名称" prop="checkName">
|
||||
<el-input v-model="form.checkName" placeholder="请输入检验名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="质量专员" prop="qualityUser">
|
||||
<el-select
|
||||
v-model="form.qualityUser"
|
||||
placeholder="请选择质量专员"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
@change="selectQualityUser"
|
||||
>
|
||||
<el-option-group
|
||||
v-for="group in deptUserData2"
|
||||
:key="group.unitId + ''"
|
||||
:label="group.unitName + ' [' + group.unitTypeName + '] '"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in group.userinfoList"
|
||||
:key="item.phonenumber"
|
||||
:label="item.nickName + ' [' + item.jobTypeName + '] '"
|
||||
:value="item.phonenumber"
|
||||
>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="监理专员" prop="superviseUser">
|
||||
<el-select
|
||||
v-model="form.superviseUser"
|
||||
placeholder="请选择监理专员"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
@change="selectSuperviseUser"
|
||||
>
|
||||
<el-option-group
|
||||
v-for="group in deptUserData"
|
||||
:key="group.unitId + ''"
|
||||
:label="group.unitName + ' [' + group.unitTypeName + '] '"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in group.userinfoList"
|
||||
:key="item.phonenumber"
|
||||
:label="item.nickName + ' [' + item.jobTypeName + '] '"
|
||||
:value="item.phonenumber"
|
||||
>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验时间" prop="checkDate">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="form.checkDate"
|
||||
type="date"
|
||||
placeholder="选择检验时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验描述" prop="intro">
|
||||
<el-input v-model="form.intro" type="textarea" placeholder="请输入检验描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="相关附件" prop="files">
|
||||
<FileUpload :limit="10" v-model="files" @input="fileInput"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="验收结果" prop="checkResult" v-if="false">
|
||||
<el-radio
|
||||
v-model="form.checkResult"
|
||||
v-for="dict in dict.type.project_FunVerify_result"
|
||||
:label="dict.value"
|
||||
:key="dict.value"
|
||||
border
|
||||
size="small"
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</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>
|
||||
<el-image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="previewList" />
|
||||
<index-drawer ref="indexDrawer"></index-drawer>
|
||||
<approveFunVerifyDrawer ref="approveFunVerifyDrawer" :closeCallBack="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listProjectFunVerify,
|
||||
getProjectFunVerify,
|
||||
delProjectFunVerify,
|
||||
addProjectFunVerify,
|
||||
updateProjectFunVerify,
|
||||
updateProjectFunVerifyNoLog,
|
||||
findGroupCountByApprove,
|
||||
} from "@/api/project/projectFunVerify";
|
||||
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
|
||||
import indexDrawer from "../projectAuditinfo/indexDrawer.vue";
|
||||
import approveFunVerifyDrawer from "../projectAuditinfo/approveFunVerifyDrawer.vue";
|
||||
|
||||
export default {
|
||||
name: "projectFunVerify",
|
||||
components: {
|
||||
indexDrawer,
|
||||
ElImageViewer,
|
||||
approveFunVerifyDrawer,
|
||||
},
|
||||
dicts: [
|
||||
"sys_common_isdel",
|
||||
"project_check_status",
|
||||
"project_fun_verify_type",
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
showViewer: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 项目验收表格数据
|
||||
projectFunVerifyList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 备注时间范围
|
||||
daterangeDate: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
groupDeptId: null,
|
||||
checkType: null,
|
||||
workingPositionType: null,
|
||||
checkWorkingPosition: null,
|
||||
checkResult: null,
|
||||
qualityUser: null,
|
||||
qualityUserName: null,
|
||||
superviseUser: null,
|
||||
superviseUserName: null,
|
||||
groupDeptUser: null,
|
||||
groupDeptUserName: null,
|
||||
FunVerifyDate: null,
|
||||
isDel: null,
|
||||
projectName: null,
|
||||
deptName: null,
|
||||
approveStatus: null,
|
||||
dataTypeLvl1: null,
|
||||
dataTypeLvl2: null,
|
||||
activeName: "jxz",
|
||||
},
|
||||
tabs: {
|
||||
all: "全部数据(0)",
|
||||
jxz: "进行中(0)",
|
||||
ywc: "已完成(0)",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
imageUrls: [{ required: true, message: "请上传检验报告", trigger: "blur" }],
|
||||
checkType: [{ required: true, message: "请选择检验类型", trigger: "blur" }],
|
||||
qualityUser: [{ required: true, message: "请选择质量专员", trigger: "blur" }],
|
||||
superviseUser: [{ required: true, message: "请选择监理专员", trigger: "blur" }],
|
||||
checkName: [
|
||||
{ required: true, message: "请输入检验名称", trigger: "blur" },
|
||||
{ max: 200, message: "检验名称最多200字符", trigger: "blur" },
|
||||
],
|
||||
intro: [
|
||||
{ required: true, message: "请输入检验描述", trigger: "blur" },
|
||||
{ max: 200, message: "检验描述最多200字符", trigger: "blur" },
|
||||
],
|
||||
checkDate: [{ required: true, message: "请选择检验时间", trigger: "blur" }],
|
||||
checkResult: [{ required: false, message: "请选择检验结果", trigger: "blur" }],
|
||||
},
|
||||
deptUserData: [],
|
||||
deptUserData2: [],
|
||||
previewList: [],
|
||||
files:null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
fileInput(fs) {
|
||||
let fileUrls = [];
|
||||
if (fs.length > 0) {
|
||||
fs.forEach((item) => {
|
||||
fileUrls.push(item.url);
|
||||
});
|
||||
}
|
||||
this.form.checkFiles = fileUrls.toString();
|
||||
},
|
||||
getImageUrl(url) {
|
||||
return process.env.VUE_APP_BASE_API + url + ".min.jpg";
|
||||
},
|
||||
onPreview(urls) {
|
||||
this.previewList = [];
|
||||
urls.split(",").forEach((item) => {
|
||||
this.previewList.push(process.env.VUE_APP_BASE_API + item);
|
||||
});
|
||||
this.showViewer = true;
|
||||
},
|
||||
closeViewer() {
|
||||
this.showViewer = false;
|
||||
},
|
||||
/** 查询项目验收列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeDate && "" != this.daterangeDate) {
|
||||
this.queryParams.params["beginDate"] = this.daterangeDate[0];
|
||||
this.queryParams.params["endDate"] = this.daterangeDate[1];
|
||||
}
|
||||
this.queryCount();
|
||||
listProjectFunVerify(this.queryParams).then((response) => {
|
||||
this.projectFunVerifyList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
queryCount() {
|
||||
findGroupCountByApprove(this.queryParams).then((response) => {
|
||||
if (response && response.data) {
|
||||
this.tabs.jxz = "进行中(" + response.data.jxz + ")";
|
||||
this.tabs.ywc = "已完成(" + response.data.ywc + ")";
|
||||
this.tabs.all = "全部数据(" + (response.data.jxz + response.data.ywc) + ")";
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
imageUrls: null,
|
||||
checkName: null,
|
||||
checkResult: null,
|
||||
intro: null,
|
||||
qualityUser: null,
|
||||
qualityUserName: null,
|
||||
superviseUser: null,
|
||||
superviseUserName: null,
|
||||
checkDate: null,
|
||||
checkFiles: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeDate = [];
|
||||
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;
|
||||
getProjectFunVerify(id).then((response) => {
|
||||
if(response.data.checkFiles){
|
||||
this.files = response.data.checkFiles.split(",");
|
||||
}else{
|
||||
this.files = [];
|
||||
}
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改项目验收";
|
||||
});
|
||||
this.$api.publics
|
||||
.selectProjectUnitUser({
|
||||
unitType: "4",
|
||||
projectId: row.projectId,
|
||||
})
|
||||
.then((d) => {
|
||||
this.deptUserData = d.data;
|
||||
});
|
||||
this.$api.publics
|
||||
.selectProjectUnitUser({
|
||||
unitType: "2",
|
||||
projectId: row.projectId,
|
||||
})
|
||||
.then((d) => {
|
||||
this.deptUserData2 = d.data;
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.approveStatus = "1";
|
||||
if (this.form.id) {
|
||||
updateProjectFunVerify(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProjectFunVerify(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 delProjectFunVerify(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"project/projectFunVerify/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`projectFunVerify_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
/** 选择质量专员*/
|
||||
selectQualityUser(val) {
|
||||
this.deptUserData2.forEach((item) => {
|
||||
item.userinfoList.forEach((u) => {
|
||||
if (u.phonenumber == val) {
|
||||
this.form.qualityUserName = u.nickName + " [" + u.jobTypeName + "] ";
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 选择监理专员*/
|
||||
selectSuperviseUser(val) {
|
||||
this.deptUserData.forEach((item) => {
|
||||
item.userinfoList.forEach((u) => {
|
||||
if (u.phonenumber == val) {
|
||||
this.form.superviseUserName = u.nickName + " [" + u.jobTypeName + "] ";
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 下载附件 */
|
||||
handleDownload(row) {
|
||||
this.files = row.checkFiles.split(",");
|
||||
this.files.forEach((item) => {
|
||||
this.$download.resource(item);
|
||||
});
|
||||
},
|
||||
/** 审批日志 */
|
||||
handleAuditinfo(row) {
|
||||
row.title = "工程功能检验";
|
||||
row.logType = "5";
|
||||
this.$refs.indexDrawer.show(row);
|
||||
},
|
||||
/** 处理审批 */
|
||||
handleAudit(row) {
|
||||
row.typeName = "工程功能检验";
|
||||
this.$refs.approveFunVerifyDrawer.show(row);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,739 @@
|
|||
<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>{{ title + " 【工程功能检验管理】" }}</div>
|
||||
</template>
|
||||
<el-tabs
|
||||
type="card"
|
||||
v-model="unitActiveName"
|
||||
style="margin-left: 20px; margin-right: 20px"
|
||||
@tab-click="getList"
|
||||
>
|
||||
<el-tab-pane
|
||||
v-for="(it, idx) in nodes"
|
||||
:label="it.unitName + ''"
|
||||
:name="it.unitId + ''"
|
||||
:key="idx"
|
||||
></el-tab-pane>
|
||||
</el-tabs>
|
||||
<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:projectFunVerify: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:projectFunVerify: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:projectFunVerify:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-tabs
|
||||
type="card"
|
||||
v-model="queryParams.activeName"
|
||||
@tab-click="getList"
|
||||
style="padding-left: 20px; padding-right: 20px"
|
||||
>
|
||||
<el-tab-pane :label="tabs.all" name="all"></el-tab-pane>
|
||||
<el-tab-pane :label="tabs.jxz" name="jxz"></el-tab-pane>
|
||||
<el-tab-pane :label="tabs.ywc" name="ywc"></el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="projectFunVerifyList"
|
||||
@selection-change="handleSelectionChange"
|
||||
style="padding-left: 20px; padding-right: 20px"
|
||||
stripe
|
||||
>
|
||||
<el-table-column label="检验报告" align="center" prop="mainImage" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-image
|
||||
ref="preview"
|
||||
style="width: 50px; height: 50px"
|
||||
:src="getImageUrl(scope.row.mainImage)"
|
||||
@click="onPreview(scope.row.imageUrls)"
|
||||
></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="验收类型"
|
||||
align="center"
|
||||
prop="checkType"
|
||||
width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.project_fun_verify_type"
|
||||
:value="scope.row.checkType"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="检验名称"
|
||||
align="left"
|
||||
prop="checkName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="检验描述"
|
||||
align="left"
|
||||
prop="intro"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="质量专员"
|
||||
align="left"
|
||||
prop="qualityUser"
|
||||
width="110"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.qualityUserName }}</div>
|
||||
<div>{{ scope.row.qualityUser }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="监理专员"
|
||||
align="left"
|
||||
prop="superviseUser"
|
||||
width="110"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.superviseUserName }}</div>
|
||||
<div>{{ scope.row.superviseUser }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="检验时间"
|
||||
align="center"
|
||||
prop="checkDate"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkDate, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="检验结果" align="center" prop="checkResult" width="80">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.project_checking_result"
|
||||
:value="scope.row.checkResult"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="审批状态" align="center" prop="approveStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.project_check_status"
|
||||
:value="scope.row.approveStatus"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提交时间" align="center" prop="createTime" width="110">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
fixed="right"
|
||||
class-name="small-padding fixed-width"
|
||||
width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.checkFiles"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-paperclip"
|
||||
@click="handleDownload(scope.row)"
|
||||
v-hasPermi="['project:projectFunVerify:list']"
|
||||
>下载附件</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.approveStatus != null"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-tickets"
|
||||
@click="handleAuditinfo(scope.row)"
|
||||
>审批日志</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.approveStatus != '4'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['project:projectFunVerify:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.approveStatus != '4'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:projectFunVerify: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="760px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
custom-class="prj-checking-drawer-dlg"
|
||||
:close-on-press-escape="false"
|
||||
>
|
||||
<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="deptName">
|
||||
<el-input
|
||||
v-model="form.deptName"
|
||||
placeholder="请输入单位名称"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验报告" prop="imageUrls">
|
||||
<image-upload v-model="form.imageUrls" :limit="999" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检验类型" prop="checkType">
|
||||
<el-select
|
||||
v-model="form.checkType"
|
||||
placeholder="请选择检验类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.project_fun_verify_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验名称" prop="checkName">
|
||||
<el-input v-model="form.checkName" placeholder="请输入检验名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="质量专员" prop="qualityUser">
|
||||
<el-select
|
||||
v-model="form.qualityUser"
|
||||
placeholder="请选择质量专员"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
@change="selectQualityUser"
|
||||
>
|
||||
<el-option-group
|
||||
v-for="group in deptUserData2"
|
||||
:key="group.unitId + ''"
|
||||
:label="group.unitName + ' [' + group.unitTypeName + '] '"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in group.userinfoList"
|
||||
:key="item.phonenumber"
|
||||
:label="item.nickName + ' [' + item.jobTypeName + '] '"
|
||||
:value="item.phonenumber"
|
||||
>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="监理专员" prop="superviseUser">
|
||||
<el-select
|
||||
v-model="form.superviseUser"
|
||||
placeholder="请选择监理专员"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
@change="selectSuperviseUser"
|
||||
>
|
||||
<el-option-group
|
||||
v-for="group in deptUserData"
|
||||
:key="group.unitId + ''"
|
||||
:label="group.unitName + ' [' + group.unitTypeName + '] '"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in group.userinfoList"
|
||||
:key="item.phonenumber"
|
||||
:label="item.nickName + ' [' + item.jobTypeName + '] '"
|
||||
:value="item.phonenumber"
|
||||
>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验时间" prop="checkDate">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="form.checkDate"
|
||||
type="date"
|
||||
placeholder="选择检验时间"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验描述" prop="intro">
|
||||
<el-input v-model="form.intro" type="textarea" placeholder="请输入检验描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="相关附件" prop="files">
|
||||
<FileUpload :limit="10" v-model="files" @input="fileInput"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验结果" prop="checkResult" v-if="false">
|
||||
<el-radio
|
||||
v-model="form.checkResult"
|
||||
v-for="dict in dict.type.project_checking_result"
|
||||
:label="dict.value"
|
||||
:key="dict.value"
|
||||
border
|
||||
size="small"
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</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>
|
||||
</el-drawer>
|
||||
<el-image-viewer
|
||||
v-if="showViewer"
|
||||
:on-close="closeViewer"
|
||||
:url-list="previewList"
|
||||
style="z-index: 2050"
|
||||
/>
|
||||
<index-drawer ref="indexDrawer"></index-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listProjectFunVerify,
|
||||
getProjectFunVerify,
|
||||
delProjectFunVerify,
|
||||
addProjectFunVerify,
|
||||
updateProjectFunVerify,
|
||||
findGroupCountByApprove,
|
||||
} from "@/api/project/projectFunVerify";
|
||||
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
|
||||
import indexDrawer from "../projectAuditinfo/indexDrawer.vue";
|
||||
|
||||
export default {
|
||||
name: "RuoyiUiProjectDeptWroksDrawer",
|
||||
components: {
|
||||
indexDrawer,
|
||||
ElImageViewer,
|
||||
},
|
||||
dicts: ["project_check_status", "project_checking_result", "project_fun_verify_type"],
|
||||
data() {
|
||||
return {
|
||||
showViewer: false,
|
||||
open: false,
|
||||
isOpen: false,
|
||||
project: null,
|
||||
title: "",
|
||||
isUnit: true,
|
||||
nodes: [],
|
||||
form: {},
|
||||
rules: {
|
||||
imageUrls: [{ required: true, message: "请上传检验报告", trigger: "blur" }],
|
||||
checkType: [{ required: true, message: "请选择检验类型", trigger: "blur" }],
|
||||
qualityUser: [{ required: true, message: "请选择质量专员", trigger: "blur" }],
|
||||
superviseUser: [{ required: true, message: "请选择监理专员", trigger: "blur" }],
|
||||
checkName: [
|
||||
{ required: true, message: "请输入检验名称", trigger: "blur" },
|
||||
{ max: 200, message: "检验名称最多200字符", trigger: "blur" },
|
||||
],
|
||||
intro: [
|
||||
{ required: true, message: "请输入检验描述", trigger: "blur" },
|
||||
{ max: 200, message: "检验描述最多200字符", trigger: "blur" },
|
||||
],
|
||||
checkDate: [{ required: true, message: "请选择检验时间", trigger: "blur" }],
|
||||
checkResult: [{ required: false, message: "请选择检验结果", trigger: "blur" }],
|
||||
},
|
||||
projectFunVerifyList: [],
|
||||
unitActiveName: "",
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
activeName: "jxz",
|
||||
},
|
||||
tabs: {
|
||||
all: "全部数据(0)",
|
||||
jxz: "进行中(0)",
|
||||
ywc: "已完成(0)",
|
||||
},
|
||||
deptUserData: [],
|
||||
deptUserData2: [],
|
||||
previewList: [],
|
||||
files:null,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
fileInput(fs) {
|
||||
let fileUrls = [];
|
||||
if (fs.length > 0) {
|
||||
fs.forEach((item) => {
|
||||
fileUrls.push(item.url);
|
||||
});
|
||||
}
|
||||
this.form.checkFiles = fileUrls.toString();
|
||||
},
|
||||
getImageUrl(url) {
|
||||
return process.env.VUE_APP_BASE_API + url + ".min.jpg";
|
||||
},
|
||||
onPreview(urls) {
|
||||
this.previewList = [];
|
||||
urls.split(",").forEach((item) => {
|
||||
this.previewList.push(process.env.VUE_APP_BASE_API + item);
|
||||
});
|
||||
this.showViewer = true;
|
||||
},
|
||||
closeViewer() {
|
||||
this.showViewer = false;
|
||||
},
|
||||
show(project) {
|
||||
this.project = project;
|
||||
this.title = project.projectName;
|
||||
this.isOpen = true;
|
||||
this.tabs.all = "全部数据(0)";
|
||||
this.tabs.jxz = "进行中(0)";
|
||||
this.tabs.ywc = "已完成(0)";
|
||||
this.queryParams.projectId = project.id;
|
||||
this.$api.publics
|
||||
.queryUnitList({
|
||||
projectId: project.id,
|
||||
unitType: "2",
|
||||
})
|
||||
.then((d) => {
|
||||
this.nodes = d.rows;
|
||||
if (d.rows.length > 0) {
|
||||
this.unitActiveName = this.nodes[0].unitId + "";
|
||||
this.isUnit = true;
|
||||
this.getList();
|
||||
} else {
|
||||
this.projectFunVerifyList = [];
|
||||
this.$message.error("当前项目未分配总包单位,不能办理工程功能检验!");
|
||||
this.isUnit = false;
|
||||
}
|
||||
});
|
||||
this.$api.publics
|
||||
.selectProjectUnitUser({
|
||||
unitType: "4",
|
||||
projectId: project.id,
|
||||
})
|
||||
.then((d) => {
|
||||
this.deptUserData = d.data;
|
||||
});
|
||||
this.$api.publics
|
||||
.selectProjectUnitUser({
|
||||
unitType: "2",
|
||||
projectId: project.id,
|
||||
})
|
||||
.then((d) => {
|
||||
this.deptUserData2 = d.data;
|
||||
});
|
||||
},
|
||||
// 页签点击
|
||||
getList() {
|
||||
this.queryParams.deptId = this.unitActiveName;
|
||||
this.queryCount();
|
||||
this.loading = true;
|
||||
listProjectFunVerify(this.queryParams).then((response) => {
|
||||
this.projectFunVerifyList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
queryCount() {
|
||||
findGroupCountByApprove(this.queryParams).then((response) => {
|
||||
if (response && response.data) {
|
||||
this.tabs.jxz = "进行中(" + response.data.jxz + ")";
|
||||
this.tabs.ywc = "已完成(" + response.data.ywc + ")";
|
||||
this.tabs.all = "全部数据(" + (response.data.jxz + response.data.ywc) + ")";
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
imageUrls: null,
|
||||
checkName: null,
|
||||
checkResult: null,
|
||||
intro: null,
|
||||
qualityUser: null,
|
||||
qualityUserName: null,
|
||||
superviseUser: null,
|
||||
superviseUserName: null,
|
||||
checkDate: null,
|
||||
checkFiles: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
if (this.nodes.length > 0) {
|
||||
this.reset();
|
||||
this.form.projectId = this.project.id;
|
||||
this.form.projectName = this.project.projectName;
|
||||
this.form.deptId = this.unitActiveName;
|
||||
this.nodes.forEach((item) => {
|
||||
if (item.unitId == this.unitActiveName) {
|
||||
this.form.deptName = item.unitName;
|
||||
}
|
||||
});
|
||||
this.open = true;
|
||||
this.title = "添加项目工程功能检验";
|
||||
} else {
|
||||
this.$message.error("当前项目未分配总包单位,不能办理工程功能检验!");
|
||||
}
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getProjectFunVerify(id).then((response) => {
|
||||
if(response.data.checkFiles){
|
||||
this.files = response.data.checkFiles.split(",");
|
||||
}else{
|
||||
this.files = [];
|
||||
}
|
||||
this.form = response.data;
|
||||
this.form.projectName = this.project.projectName;
|
||||
this.nodes.forEach((item) => {
|
||||
if (item.unitId == this.unitActiveName) {
|
||||
this.form.deptName = item.unitName;
|
||||
}
|
||||
});
|
||||
this.open = true;
|
||||
this.title = "修改项目工程功能检验";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.approveStatus = "1";
|
||||
if (this.form.id) {
|
||||
updateProjectFunVerify(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProjectFunVerify(this.form).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm('是否确认删除项目工程功能检验编号为"' + ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delProjectFunVerify(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"project/projectFunVerify/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`projectFunVerify_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
/** 选择质量专员*/
|
||||
selectQualityUser(val) {
|
||||
this.deptUserData2.forEach((item) => {
|
||||
item.userinfoList.forEach((u) => {
|
||||
if (u.phonenumber == val) {
|
||||
this.form.qualityUserName = u.nickName + " [" + u.jobTypeName + "] ";
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 选择监理专员*/
|
||||
selectSuperviseUser(val) {
|
||||
this.deptUserData.forEach((item) => {
|
||||
item.userinfoList.forEach((u) => {
|
||||
if (u.phonenumber == val) {
|
||||
this.form.superviseUserName = u.nickName + " [" + u.jobTypeName + "] ";
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 下载附件 */
|
||||
handleDownload(row) {
|
||||
row.checkFiles.split(",").forEach((item) => {
|
||||
this.$download.resource(item);
|
||||
});
|
||||
},
|
||||
/** 审批日志 */
|
||||
handleAuditinfo(row) {
|
||||
row.title = "工程功能检验";
|
||||
row.logType = "5";
|
||||
this.$refs.indexDrawer.show(row);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.prj-checking-drawer-dlg {
|
||||
.el-dialog__body {
|
||||
padding: 0px 10px;
|
||||
.el-form-item {
|
||||
margin-bottom: 16px;
|
||||
&.mg-b-8 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.el-form-item__error {
|
||||
z-index: 9;
|
||||
margin-top: -4px;
|
||||
}
|
||||
.upload-file {
|
||||
.upload-file-uploader {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 0px;
|
||||
line-height: 30px;
|
||||
.el-upload__tip {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.upload-file-list {
|
||||
max-height: 120px;
|
||||
overflow-y: auto;
|
||||
padding-right: 30px;
|
||||
.el-upload-list__item {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -146,6 +146,7 @@
|
|||
'project:assess:list',
|
||||
'project:build_node_data:list',
|
||||
'project:projectChecking:list',
|
||||
'project:projectFunVerify:list',
|
||||
'work:workTrain:list',
|
||||
'work:emergencyDrill:list',
|
||||
'project:surProjectInsurance:list',
|
||||
|
@ -176,6 +177,8 @@
|
|||
v-hasPermi="['project:projectDesign:list']">设计管理</el-dropdown-item>
|
||||
<el-dropdown-item command="handleProjectChecking" icon="el-icon-s-help"
|
||||
v-hasPermi="['project:projectChecking:list']">举牌验收管理</el-dropdown-item>
|
||||
<el-dropdown-item command="handleProjectFunVerify" icon="el-icon-s-help"
|
||||
v-hasPermi="['project:projectFunVerify:list']">工程功能检验</el-dropdown-item>
|
||||
<el-dropdown-item command="handleWorkTrain" icon="el-icon-notebook-2"
|
||||
v-hasPermi="['work:workTrain:list']">项目教育培训</el-dropdown-item>
|
||||
<el-dropdown-item command="handleEmergencyDrill" icon="el-icon-first-aid-kit"
|
||||
|
@ -380,6 +383,7 @@
|
|||
<surProjectSpecialDrawer ref="projectSpecial"></surProjectSpecialDrawer>
|
||||
<insuranceDrawer ref="insurance"></insuranceDrawer>
|
||||
<projectCheckingDrawer ref="projectChecking"></projectCheckingDrawer>
|
||||
<projectFunVerifyDrawer ref="projectFunVerify"></projectFunVerifyDrawer>
|
||||
<materialSealDrawer ref="materialSeal"></materialSealDrawer>
|
||||
<projectMeasureDrawer ref="projectMeasure"></projectMeasureDrawer>
|
||||
<videoConfigDrawer ref="videoConfig"></videoConfigDrawer>
|
||||
|
@ -414,6 +418,7 @@ import emergencyDrillDrawer from "../../work/emergencyDrill/emergencyDrillDrawer
|
|||
import surProjectSpecialDrawer from "../surProjectSpecial/surProjectSpecialDrawer.vue";
|
||||
import insuranceDrawer from "../surProjectInsurance/insuranceDrawer.vue";
|
||||
import projectCheckingDrawer from "../projectChecking/projectCheckingDrawer.vue";
|
||||
import projectFunVerifyDrawer from "../projectFunVerify/projectFunVerifyDrawer.vue";
|
||||
import materialSealDrawer from "@/views/project/materialSeal/projectMaterialSealDrawer.vue";
|
||||
import projectMeasureDrawer from "../projectMeasure/projectMeasureDrawer.vue";
|
||||
import videoConfigDrawer from "@/views/video/videoConfig/videoConfigDrawer";
|
||||
|
@ -440,6 +445,7 @@ export default {
|
|||
surProjectSpecialDrawer,
|
||||
insuranceDrawer,
|
||||
projectCheckingDrawer,
|
||||
projectFunVerifyDrawer,
|
||||
materialSealDrawer,
|
||||
projectMeasureDrawer,
|
||||
videoConfigDrawer,
|
||||
|
@ -685,6 +691,9 @@ export default {
|
|||
case "handleProjectChecking":
|
||||
this.$refs.projectChecking.show(row);
|
||||
break;
|
||||
case "handleProjectFunVerify":
|
||||
this.$refs.projectFunVerify.show(row);
|
||||
break;
|
||||
case "handleProjectMeasure":
|
||||
this.$refs.projectMeasure.show(row);
|
||||
break;
|
||||
|
|
|
@ -291,7 +291,6 @@
|
|||
<el-date-picker
|
||||
v-model="scope.row.nickedTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择截至时间"
|
||||
style="width: 160px"
|
||||
>
|
||||
|
|
|
@ -288,7 +288,6 @@
|
|||
<el-date-picker
|
||||
v-model="scope.row.nickedTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择截至时间"
|
||||
style="width: 160px"
|
||||
>
|
||||
|
|
|
@ -0,0 +1,151 @@
|
|||
package com.yanzhu.jh.project.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.yanzhu.jh.project.domain.SurProjectFunVerify;
|
||||
import com.yanzhu.jh.project.service.ISurProjectFunVerifyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工程功能检验Controller
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/project/projectFunVerify")
|
||||
public class SurProjectFunVerifyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISurProjectFunVerifyService surProjectFunVerifyService;
|
||||
|
||||
@Autowired
|
||||
private ISysDeptService sysDeptService;
|
||||
|
||||
/**
|
||||
* 查询工程功能检验列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectFunVerify:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SurProjectFunVerify surProjectFunVerify)
|
||||
{
|
||||
startPage();
|
||||
surProjectFunVerify.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectFunVerify.getNowRole())){
|
||||
surProjectFunVerify.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectFunVerify.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectFunVerify.setNowUser(Convert.toStr(getUserId()));
|
||||
surProjectFunVerify.setNowUserName(getUsername());
|
||||
List<SurProjectFunVerify> list = surProjectFunVerifyService.selectSurProjectFunVerifyList(surProjectFunVerify);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计工程功能检验
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectFunVerify:list')")
|
||||
@GetMapping("/findGroupCountByApprove")
|
||||
public AjaxResult findGroupCountByApprove(SurProjectFunVerify surProjectFunVerify)
|
||||
{
|
||||
surProjectFunVerify.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectFunVerify.getNowRole())){
|
||||
surProjectFunVerify.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectFunVerify.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectFunVerify.setNowUser(Convert.toStr(getUserId()));
|
||||
surProjectFunVerify.setNowUserName(getUsername());
|
||||
return success(surProjectFunVerifyService.findGroupCountByApprove(surProjectFunVerify));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工程功能检验列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectFunVerify:export')")
|
||||
@Log(title = "工程功能检验", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SurProjectFunVerify surProjectFunVerify)
|
||||
{
|
||||
surProjectFunVerify.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectFunVerify.getNowRole())){
|
||||
surProjectFunVerify.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectFunVerify.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectFunVerify.setNowUser(Convert.toStr(getUserId()));
|
||||
surProjectFunVerify.setNowUserName(getUsername());
|
||||
List<SurProjectFunVerify> list = surProjectFunVerifyService.selectSurProjectFunVerifyList(surProjectFunVerify);
|
||||
ExcelUtil<SurProjectFunVerify> util = new ExcelUtil<SurProjectFunVerify>(SurProjectFunVerify.class);
|
||||
util.exportExcel(response, list, "工程功能检验数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工程功能检验详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectFunVerify:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(surProjectFunVerifyService.selectSurProjectFunVerifyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工程功能检验
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectFunVerify:add')")
|
||||
@Log(title = "工程功能检验", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SurProjectFunVerify surProjectFunVerify)
|
||||
{
|
||||
surProjectFunVerify.setCreateBy(getUsername());
|
||||
return toAjax(surProjectFunVerifyService.insertSurProjectFunVerify(surProjectFunVerify));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工程功能检验
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectFunVerify:edit')")
|
||||
@Log(title = "工程功能检验", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SurProjectFunVerify surProjectFunVerify)
|
||||
{
|
||||
return toAjax(surProjectFunVerifyService.updateSurProjectFunVerify(surProjectFunVerify));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工程功能检验
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectFunVerify:edit')")
|
||||
@Log(title = "工程功能检验", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/editNoLog")
|
||||
public AjaxResult editNoLog(@RequestBody SurProjectFunVerify surProjectFunVerify)
|
||||
{
|
||||
return toAjax(surProjectFunVerifyService.updateSurProjectFunVerifyNoLog(surProjectFunVerify));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工程功能检验
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectFunVerify:remove')")
|
||||
@Log(title = "工程功能检验", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(surProjectFunVerifyService.deleteSurProjectFunVerifyByIds(ids));
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,273 @@
|
|||
package com.yanzhu.jh.project.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 项目验收对象 sur_project_checking
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-18
|
||||
*/
|
||||
public class SurProjectFunVerify extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 项目主键 */
|
||||
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
private Long deptId;
|
||||
|
||||
/** 部门主键 */
|
||||
@Excel(name = "单位名称")
|
||||
private String deptName;
|
||||
|
||||
/** 检验类型 */
|
||||
@Excel(name = "检验类型")
|
||||
private String checkType;
|
||||
|
||||
/** 检验报告 */
|
||||
@Excel(name = "检验报告")
|
||||
private String mainImage;
|
||||
|
||||
/** 图片列表 */
|
||||
@Excel(name = "图片列表")
|
||||
private String imageUrls;
|
||||
|
||||
/** 检验名称 */
|
||||
@Excel(name = "检验名称")
|
||||
private String checkName;
|
||||
|
||||
/** 检验结果 */
|
||||
@Excel(name = "检验结果")
|
||||
private String checkResult;
|
||||
|
||||
/** 检验描述 */
|
||||
@Excel(name = "检验描述")
|
||||
private String intro;
|
||||
|
||||
/** 质量用户 */
|
||||
@Excel(name = "质量用户")
|
||||
private String qualityUser;
|
||||
|
||||
/** 质量用户名称 */
|
||||
@Excel(name = "质量用户名称")
|
||||
private String qualityUserName;
|
||||
|
||||
/** 监理用户 */
|
||||
@Excel(name = "监理用户")
|
||||
private String superviseUser;
|
||||
|
||||
/** 监理用户名称 */
|
||||
@Excel(name = "监理用户名称")
|
||||
private String superviseUserName;
|
||||
|
||||
/** 检验时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date checkDate;
|
||||
|
||||
/** 检验附件 */
|
||||
@Excel(name = "检验附件")
|
||||
private String checkFiles;
|
||||
|
||||
/** 数据状态 */
|
||||
@Excel(name = "数据状态")
|
||||
private Long isDel;
|
||||
|
||||
/** 审核状态 */
|
||||
@Excel(name = "审核状态")
|
||||
private String approveStatus;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getCheckType() {
|
||||
return checkType;
|
||||
}
|
||||
|
||||
public void setCheckType(String checkType) {
|
||||
this.checkType = checkType;
|
||||
}
|
||||
|
||||
public String getMainImage() {
|
||||
return mainImage;
|
||||
}
|
||||
|
||||
public void setMainImage(String mainImage) {
|
||||
this.mainImage = mainImage;
|
||||
}
|
||||
|
||||
public String getImageUrls() {
|
||||
return imageUrls;
|
||||
}
|
||||
|
||||
public void setImageUrls(String imageUrls) {
|
||||
this.imageUrls = imageUrls;
|
||||
}
|
||||
|
||||
public String getCheckName() {
|
||||
return checkName;
|
||||
}
|
||||
|
||||
public void setCheckName(String checkName) {
|
||||
this.checkName = checkName;
|
||||
}
|
||||
|
||||
public String getCheckResult() {
|
||||
return checkResult;
|
||||
}
|
||||
|
||||
public void setCheckResult(String checkResult) {
|
||||
this.checkResult = checkResult;
|
||||
}
|
||||
|
||||
public String getIntro() {
|
||||
return intro;
|
||||
}
|
||||
|
||||
public void setIntro(String intro) {
|
||||
this.intro = intro;
|
||||
}
|
||||
|
||||
public String getQualityUser() {
|
||||
return qualityUser;
|
||||
}
|
||||
|
||||
public void setQualityUser(String qualityUser) {
|
||||
this.qualityUser = qualityUser;
|
||||
}
|
||||
|
||||
public String getQualityUserName() {
|
||||
return qualityUserName;
|
||||
}
|
||||
|
||||
public void setQualityUserName(String qualityUserName) {
|
||||
this.qualityUserName = qualityUserName;
|
||||
}
|
||||
|
||||
public String getSuperviseUser() {
|
||||
return superviseUser;
|
||||
}
|
||||
|
||||
public void setSuperviseUser(String superviseUser) {
|
||||
this.superviseUser = superviseUser;
|
||||
}
|
||||
|
||||
public String getSuperviseUserName() {
|
||||
return superviseUserName;
|
||||
}
|
||||
|
||||
public void setSuperviseUserName(String superviseUserName) {
|
||||
this.superviseUserName = superviseUserName;
|
||||
}
|
||||
|
||||
public Date getCheckDate() {
|
||||
return checkDate;
|
||||
}
|
||||
|
||||
public void setCheckDate(Date checkDate) {
|
||||
this.checkDate = checkDate;
|
||||
}
|
||||
|
||||
public String getCheckFiles() {
|
||||
return checkFiles;
|
||||
}
|
||||
|
||||
public void setCheckFiles(String checkFiles) {
|
||||
this.checkFiles = checkFiles;
|
||||
}
|
||||
|
||||
public Long getIsDel() {
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public void setIsDel(Long isDel) {
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getApproveStatus() {
|
||||
return approveStatus;
|
||||
}
|
||||
|
||||
public void setApproveStatus(String approveStatus) {
|
||||
this.approveStatus = approveStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("checkType", getCheckType())
|
||||
.append("mainImage", getMainImage())
|
||||
.append("imageUrls", getImageUrls())
|
||||
.append("checkName", getCheckName())
|
||||
.append("checkResult", getCheckResult())
|
||||
.append("intro", getIntro())
|
||||
.append("qualityUser", getQualityUser())
|
||||
.append("qualityUserName", getQualityUserName())
|
||||
.append("superviseUser", getSuperviseUser())
|
||||
.append("superviseUserName", getSuperviseUserName())
|
||||
.append("checkDate", getCheckDate())
|
||||
.append("checkFiles", getCheckFiles())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.yanzhu.jh.project.mapper;
|
||||
|
||||
import com.yanzhu.jh.project.domain.SurProjectFunVerify;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工程功能验收Mapper接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-18
|
||||
*/
|
||||
public interface SurProjectFunVerifyMapper
|
||||
{
|
||||
/**
|
||||
* 查询工程功能验收
|
||||
*
|
||||
* @param id 工程功能验收主键
|
||||
* @return 工程功能验收
|
||||
*/
|
||||
public SurProjectFunVerify selectSurProjectFunVerifyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询工程功能验收列表
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能验收
|
||||
* @return 工程功能验收集合
|
||||
*/
|
||||
public List<SurProjectFunVerify> selectSurProjectFunVerifyList(SurProjectFunVerify surProjectFunVerify);
|
||||
|
||||
/**
|
||||
* 新增工程功能验收
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能验收
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectFunVerify(SurProjectFunVerify surProjectFunVerify);
|
||||
|
||||
/**
|
||||
* 修改工程功能验收
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能验收
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectFunVerify(SurProjectFunVerify surProjectFunVerify);
|
||||
|
||||
/**
|
||||
* 删除工程功能验收
|
||||
*
|
||||
* @param id 工程功能验收主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectFunVerifyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除工程功能验收
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectFunVerifyByIds(Long[] ids);
|
||||
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.yanzhu.jh.project.service;
|
||||
|
||||
import com.yanzhu.jh.project.domain.SurProjectFunVerify;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 工程功能检验Service接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-18
|
||||
*/
|
||||
public interface ISurProjectFunVerifyService
|
||||
{
|
||||
/**
|
||||
* 查询工程功能检验
|
||||
*
|
||||
* @param id 工程功能检验主键
|
||||
* @return 工程功能检验
|
||||
*/
|
||||
public SurProjectFunVerify selectSurProjectFunVerifyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询工程功能检验列表
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能检验
|
||||
* @return 工程功能检验集合
|
||||
*/
|
||||
public List<SurProjectFunVerify> selectSurProjectFunVerifyList(SurProjectFunVerify surProjectFunVerify);
|
||||
|
||||
/**
|
||||
* 统计工程功能检验
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能检验
|
||||
* @return 工程功能检验集合
|
||||
*/
|
||||
public Map<String,Object> findGroupCountByApprove(SurProjectFunVerify surProjectFunVerify);
|
||||
|
||||
/**
|
||||
* 新增工程功能检验
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能检验
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectFunVerify(SurProjectFunVerify surProjectFunVerify);
|
||||
|
||||
/**
|
||||
* 修改工程功能检验
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能检验
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectFunVerify(SurProjectFunVerify surProjectFunVerify);
|
||||
|
||||
/**
|
||||
* 修改工程功能检验
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能检验
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectFunVerifyNoLog(SurProjectFunVerify surProjectFunVerify);
|
||||
|
||||
/**
|
||||
* 批量删除工程功能检验
|
||||
*
|
||||
* @param ids 需要删除的工程功能检验主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectFunVerifyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除工程功能检验信息
|
||||
*
|
||||
* @param id 工程功能检验主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectFunVerifyById(Long id);
|
||||
|
||||
}
|
|
@ -155,7 +155,7 @@ public class SurProjectAuditinfoServiceImpl implements ISurProjectAuditinfoServi
|
|||
dataMap.put("todo",0);
|
||||
}
|
||||
List<Map<String, Object>> approveList = surProjectAuditinfoMapper.selectMyAwaitFlowTask(flowTaskEntity);
|
||||
int a=0,b=0,c=0,d=0;
|
||||
int a=0,b=0,c=0,d=0,e=0;
|
||||
if(approveList!=null){
|
||||
for(Map<String, Object> map:approveList){
|
||||
if(PublicStateEnum.AUDIT_TYPE_QYFS.getCode().equals(map.get("type"))){
|
||||
|
@ -166,6 +166,8 @@ public class SurProjectAuditinfoServiceImpl implements ISurProjectAuditinfoServi
|
|||
c++;
|
||||
}else if(PublicStateEnum.AUDIT_TYPE_CLFY.getCode().equals(map.get("type"))){
|
||||
d++;
|
||||
}else if(PublicStateEnum.AUDIT_TYPE_GCGNJY.getCode().equals(map.get("type"))){
|
||||
e++;
|
||||
}
|
||||
}
|
||||
dataMap.put("approve",approveList.size());
|
||||
|
@ -209,6 +211,7 @@ public class SurProjectAuditinfoServiceImpl implements ISurProjectAuditinfoServi
|
|||
dataMap.put("approveSCSL",b);
|
||||
dataMap.put("approveJPYS",c);
|
||||
dataMap.put("approveCLFY",d);
|
||||
dataMap.put("approveGCGN",e);
|
||||
//查询劳资预警审批信息
|
||||
FlowLabourInfo flowLabourInfo=new FlowLabourInfo();
|
||||
if(StringUtils.isNotEmpty(flowTaskEntity.getBusinessKey())){
|
||||
|
|
|
@ -0,0 +1,202 @@
|
|||
package com.yanzhu.jh.project.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.yanzhu.jh.project.domain.SurProjectAuditinfo;
|
||||
import com.yanzhu.jh.project.domain.SurProjectFunVerify;
|
||||
import com.yanzhu.jh.project.mapper.SurProjectAuditinfoMapper;
|
||||
import com.yanzhu.jh.project.mapper.SurProjectFunVerifyMapper;
|
||||
import com.yanzhu.jh.project.service.ISurProjectFunVerifyService;
|
||||
import com.yanzhu.jh.wxsetting.service.impl.WeChatMessageServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 工程功能检验Service业务层处理
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-18
|
||||
*/
|
||||
@Service
|
||||
public class SurProjectFunVerifyServiceImpl extends WeChatMessageServiceImpl implements ISurProjectFunVerifyService
|
||||
{
|
||||
@Autowired
|
||||
private SurProjectAuditinfoMapper surProjectAuditinfoMapper;
|
||||
|
||||
@Autowired
|
||||
private SurProjectFunVerifyMapper surProjectFunVerifyMapper;
|
||||
|
||||
/**
|
||||
* 查询工程功能检验
|
||||
*
|
||||
* @param id 工程功能检验主键
|
||||
* @return 工程功能检验
|
||||
*/
|
||||
@Override
|
||||
public SurProjectFunVerify selectSurProjectFunVerifyById(Long id)
|
||||
{
|
||||
return surProjectFunVerifyMapper.selectSurProjectFunVerifyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工程功能检验列表
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能检验
|
||||
* @return 工程功能检验
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectFunVerify> selectSurProjectFunVerifyList(SurProjectFunVerify surProjectFunVerify)
|
||||
{
|
||||
return surProjectFunVerifyMapper.selectSurProjectFunVerifyList(surProjectFunVerify);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计工程功能检验
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能检验
|
||||
* @return 工程功能检验集合
|
||||
*/
|
||||
@Override
|
||||
public Map<String,Object> findGroupCountByApprove(SurProjectFunVerify surProjectFunVerify) {
|
||||
Map<String,Object> dataMap = new HashMap<>();
|
||||
surProjectFunVerify.setActiveName("jxz");
|
||||
List<SurProjectFunVerify> awaitList = surProjectFunVerifyMapper.selectSurProjectFunVerifyList(surProjectFunVerify);
|
||||
if(awaitList!=null){
|
||||
dataMap.put("jxz",awaitList.size());
|
||||
}else{
|
||||
dataMap.put("jxz",0);
|
||||
}
|
||||
surProjectFunVerify.setActiveName("ywc");
|
||||
List<SurProjectFunVerify> finishedList = surProjectFunVerifyMapper.selectSurProjectFunVerifyList(surProjectFunVerify);
|
||||
if(finishedList!=null){
|
||||
dataMap.put("ywc",finishedList.size());
|
||||
}else{
|
||||
dataMap.put("ywc",0);
|
||||
}
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工程功能检验
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能检验
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertSurProjectFunVerify(SurProjectFunVerify surProjectFunVerify)
|
||||
{
|
||||
//默认第一张图是主图
|
||||
surProjectFunVerify.setMainImage(surProjectFunVerify.getImageUrls().split(",")[0]);
|
||||
surProjectFunVerify.setIsDel(Convert.toLong(PublicStateEnum.OK.getCode()));
|
||||
surProjectFunVerify.setCreateTime(DateUtils.getNowDate());
|
||||
|
||||
int res = surProjectFunVerifyMapper.insertSurProjectFunVerify(surProjectFunVerify);
|
||||
//操作日志
|
||||
if(StringUtils.isNotBlank(surProjectFunVerify.getApproveStatus())){
|
||||
SurProjectAuditinfo surProjectAuditinfo = new SurProjectAuditinfo();
|
||||
surProjectAuditinfo.setFromType(PublicStateEnum.AUDIT_TYPE_GCGNJY.getCode());
|
||||
surProjectAuditinfo.setFromId(surProjectFunVerify.getId());
|
||||
surProjectAuditinfo.setApproveStatus(surProjectFunVerify.getApproveStatus());
|
||||
if(StringUtils.isNotBlank(surProjectFunVerify.getComment())){
|
||||
surProjectAuditinfo.setComment(surProjectFunVerify.getComment());
|
||||
}
|
||||
surProjectAuditinfo.setCreateBy(surProjectFunVerify.getCreateBy());
|
||||
surProjectAuditinfo.setCreateTime(new Date());
|
||||
surProjectAuditinfoMapper.insertSurProjectAuditinfo(surProjectAuditinfo);
|
||||
}
|
||||
|
||||
if(res>0){
|
||||
super.send(surProjectFunVerify);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工程功能检验
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能检验
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateSurProjectFunVerify(SurProjectFunVerify surProjectFunVerify)
|
||||
{
|
||||
if(surProjectFunVerify.getImageUrls()!=null){
|
||||
surProjectFunVerify.setMainImage(surProjectFunVerify.getImageUrls().split(",")[0]);
|
||||
}
|
||||
if(surProjectFunVerify.getUpdateBy()==null){
|
||||
surProjectFunVerify.setUpdateBy(SecurityUtils.getUsername());
|
||||
}
|
||||
surProjectFunVerify.setUpdateTime(DateUtils.getNowDate());
|
||||
int res = surProjectFunVerifyMapper.updateSurProjectFunVerify(surProjectFunVerify);
|
||||
|
||||
//操作日志
|
||||
if(StringUtils.isNotBlank(surProjectFunVerify.getApproveStatus())){
|
||||
SurProjectAuditinfo surProjectAuditinfo = new SurProjectAuditinfo();
|
||||
surProjectAuditinfo.setFromType(PublicStateEnum.AUDIT_TYPE_GCGNJY.getCode());
|
||||
surProjectAuditinfo.setFromId(surProjectFunVerify.getId());
|
||||
surProjectAuditinfo.setApproveStatus(surProjectFunVerify.getApproveStatus());
|
||||
if(StringUtils.isNotBlank(surProjectFunVerify.getComment())){
|
||||
surProjectAuditinfo.setComment(surProjectFunVerify.getComment());
|
||||
}
|
||||
surProjectAuditinfo.setCreateBy(surProjectFunVerify.getUpdateBy());
|
||||
surProjectAuditinfo.setCreateTime(new Date());
|
||||
surProjectAuditinfoMapper.insertSurProjectAuditinfo(surProjectAuditinfo);
|
||||
|
||||
//推送代办消息
|
||||
if(res>0){
|
||||
surProjectFunVerify = surProjectFunVerifyMapper.selectSurProjectFunVerifyById(surProjectFunVerify.getId());
|
||||
super.send(surProjectFunVerify);
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工程功能检验
|
||||
*
|
||||
* @param surProjectFunVerify 工程功能检验
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateSurProjectFunVerifyNoLog(SurProjectFunVerify surProjectFunVerify)
|
||||
{
|
||||
return surProjectFunVerifyMapper.updateSurProjectFunVerify(surProjectFunVerify);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除工程功能检验
|
||||
*
|
||||
* @param ids 需要删除的工程功能检验主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectFunVerifyByIds(Long[] ids)
|
||||
{
|
||||
return surProjectFunVerifyMapper.deleteSurProjectFunVerifyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工程功能检验信息
|
||||
*
|
||||
* @param id 工程功能检验主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectFunVerifyById(Long id)
|
||||
{
|
||||
return surProjectFunVerifyMapper.deleteSurProjectFunVerifyById(id);
|
||||
}
|
||||
}
|
|
@ -314,6 +314,65 @@ public class WeChatMessageServiceImpl {
|
|||
this.send(list,MessageTypeEnum.JPYSSP.getCode()+stateStr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 工程功能检验操作时推送信息
|
||||
* @param surProjectFunVerify
|
||||
*/
|
||||
@Async
|
||||
public void send(SurProjectFunVerify surProjectFunVerify){
|
||||
List<WxMpTemplateMessage> list = new ArrayList<>();
|
||||
String stateStr = surProjectFunVerify.getApproveStatus();
|
||||
if(Objects.equals(PublicStateEnum.AUDITINFO_DSH.getCode(),stateStr)){
|
||||
/**
|
||||
* 监理审批待审批
|
||||
*/
|
||||
String supMsgId = this.getMsgId(surProjectFunVerify.getSuperviseUser());
|
||||
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
|
||||
.toUser(supMsgId)
|
||||
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId())
|
||||
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pageage/project_funVerify/list/index?barProId="+surProjectFunVerify.getProjectId()))
|
||||
.build();
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(surProjectFunVerify.getProjectId())));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", MessageTypeEnum.GCGNJY.getName()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", "待"+surProjectFunVerify.getSuperviseUserName()+"审批"));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectFunVerify.getCreateBy())+"["+this.getMsgDepName(surProjectFunVerify.getDeptId())+"]"));
|
||||
list.add(templateMessage);
|
||||
|
||||
}else if(Objects.equals(PublicStateEnum.AUDITINFO_SHTG.getCode(),stateStr)){
|
||||
/**
|
||||
* 审批通过
|
||||
* 通知提交人审核通过
|
||||
*/
|
||||
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
|
||||
.toUser(this.getMsgId(surProjectFunVerify.getCreateBy()))
|
||||
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pageage/project_funVerify/list/index?barProId="+surProjectFunVerify.getProjectId()))
|
||||
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(surProjectFunVerify.getProjectId())));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", MessageTypeEnum.GCGNJY.getName()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", surProjectFunVerify.getSuperviseUserName()+"审批通过"));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectFunVerify.getCreateBy())+"["+this.getMsgDepName(surProjectFunVerify.getDeptId())+"]"));
|
||||
list.add(templateMessage);
|
||||
}else{
|
||||
/**
|
||||
* 审批驳回
|
||||
* 通知提交人审核驳回
|
||||
*/
|
||||
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
|
||||
.toUser(this.getMsgId(surProjectFunVerify.getCreateBy()))
|
||||
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pageage/project_funVerify/list/index?barProId="+surProjectFunVerify.getProjectId()))
|
||||
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(surProjectFunVerify.getProjectId())));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", MessageTypeEnum.GCGNJY.getName()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", surProjectFunVerify.getSuperviseUserName()+"审批驳回"));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectFunVerify.getCreateBy())+"["+this.getMsgDepName(surProjectFunVerify.getDeptId())+"]"));
|
||||
list.add(templateMessage);
|
||||
}
|
||||
this.send(list,MessageTypeEnum.GCGNJY.getCode()+stateStr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 实测实量操作时推送信息
|
||||
* @param surProjectMeasure
|
||||
|
|
|
@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!--监理单位/总包公司/分包单位-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||
<where>
|
||||
and spc.is_del=0 and sp.isDel=0 and sp.progressVisible=0
|
||||
and spc.is_del=0 and sp.isDel=0
|
||||
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
||||
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
|
@ -153,7 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!--监理单位/总包公司/分包单位-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||
<where>
|
||||
and spc.is_del=0 and sp.isDel=0 and sp.progressVisible=0
|
||||
and spc.is_del=0 and sp.isDel=0
|
||||
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
||||
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
|
@ -196,7 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select spc.check_result, count(spc.id) as total from sur_project_checking spc
|
||||
left join sur_project sp on spc.project_id = sp.id
|
||||
<where>
|
||||
and spc.is_del=0 and sp.isDel=0 and sp.progressVisible=0
|
||||
and spc.is_del=0 and sp.isDel=0
|
||||
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
|
||||
|
@ -367,7 +367,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
(
|
||||
SELECT data_type_lvl2,count(1) cnt
|
||||
FROM sur_project_checking a,sur_project b WHERE a.project_id=b.id
|
||||
and a.is_del=0 and b.isDel=0 and b.progressVisible=0
|
||||
and a.is_del=0 and b.isDel=0
|
||||
<if test="projectId != null "> and a.project_id = #{projectId}</if>
|
||||
<if test="projectDeptId != null "> and b.deptId = #{projectDeptId}</if>
|
||||
<if test="proType != null and proType != ''"> and b.projectType = #{proType}</if>
|
||||
|
@ -385,7 +385,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="groupCheckingByProjectId" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">
|
||||
SELECT a.project_id,COUNT(1) id,b.projectName
|
||||
FROM sur_project_checking a,sur_project b WHERE a.project_id=b.id AND a.data_type_lvl2=#{dataTypeLvl2}
|
||||
and a.is_del=0 and b.isDel=0 and b.progressVisible=0
|
||||
and a.is_del=0 and b.isDel=0
|
||||
<if test="projectId != null "> and a.project_id = #{projectId}</if>
|
||||
<if test="projectDeptId != null "> and b.deptId = #{projectDeptId}</if>
|
||||
<if test="proType != null and proType != ''"> and b.projectType = #{proType}</if>
|
||||
|
|
|
@ -0,0 +1,188 @@
|
|||
<?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.SurProjectFunVerifyMapper">
|
||||
|
||||
<resultMap type="SurProjectFunVerify" id="SurProjectFunVerifyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="checkType" column="check_type" />
|
||||
<result property="mainImage" column="main_image" />
|
||||
<result property="imageUrls" column="image_urls" />
|
||||
<result property="checkName" column="check_name" />
|
||||
<result property="checkResult" column="check_result" />
|
||||
<result property="intro" column="intro" />
|
||||
<result property="qualityUser" column="quality_user" />
|
||||
<result property="qualityUserName" column="quality_user_name" />
|
||||
<result property="superviseUser" column="supervise_user" />
|
||||
<result property="superviseUserName" column="supervise_user_name" />
|
||||
<result property="checkDate" column="check_date" />
|
||||
<result property="checkFiles" column="check_files" />
|
||||
<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" />
|
||||
<result property="projectName" column="projectName" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="approveStatus" column="approve_status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSurProjectFunVerifyVo">
|
||||
select spfv.id, spfv.project_id, spfv.dept_id, spfv.check_type, spfv.main_image, spfv.image_urls, spfv.check_name, spfv.check_result, spfv.intro, spfv.quality_user, spfv.quality_user_name, spfv.supervise_user, spfv.supervise_user_name, spfv.check_date, spfv.check_files, spfv.is_del, spfv.create_by, spfv.create_time, spfv.update_by, spfv.update_time, spfv.remark, spfv.approve_status, sp.projectName, sd.dept_name from sur_project_fun_verify spfv
|
||||
left join sur_project sp on spfv.project_id = sp.id
|
||||
left join sys_dept sd on sd.dept_id = spfv.dept_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectFunVerifyList" parameterType="SurProjectFunVerify" resultMap="SurProjectFunVerifyResult">
|
||||
<include refid="selectSurProjectFunVerifyVo"/>
|
||||
<where>
|
||||
and spfv.is_del=0
|
||||
<if test="projectId != null "> and spfv.project_id = #{projectId}</if>
|
||||
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
||||
<if test="deptId != null ">
|
||||
and (spfv.dept_id = #{deptId} or spfv.supervise_user like concat('%', #{nowUserName}, '%'))
|
||||
</if>
|
||||
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="checkType != null and checkType != ''"> and spfv.check_type = #{checkType}</if>
|
||||
<if test="approveStatus != null and approveStatus != ''"> and spfv.approve_status = #{approveStatus}</if>
|
||||
<if test="checkResult != null and checkResult != ''"> and spfv.check_result = #{checkResult}</if>
|
||||
<if test="qualityUser != null and qualityUser != ''"> and (spfv.quality_user like concat('%', #{qualityUser}, '%') or spfv.quality_user_name like concat('%', #{qualityUser}, '%'))</if>
|
||||
<if test="qualityUserName != null and qualityUserName != ''"> and spfv.quality_user_name like concat('%', #{qualityUserName}, '%')</if>
|
||||
<if test="superviseUser != null and superviseUser != ''"> and (spfv.supervise_user like concat('%', #{superviseUser}, '%') or spfv.supervise_user_name like concat('%', #{superviseUser}, '%'))</if>
|
||||
<if test="superviseUserName != null and superviseUserName != ''"> and spfv.supervise_user_name like concat('%', #{superviseUserName}, '%')</if>
|
||||
<if test="params.beginDate != null and params.beginDate != '' and params.endDate != null and params.endDate != ''"> and spfv.check_date between #{params.beginDate} and #{params.endDate}</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 spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.del_flag=0 )</if>
|
||||
<!--普通用户查询项目人员-->
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'>
|
||||
and (sp.id in (select spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)
|
||||
or spfv.supervise_user like concat('%', #{nowUserName}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test='activeName == "jxz"'> and spfv.approve_status != '4'</if>
|
||||
<if test='activeName == "ywc"'> and spfv.approve_status = '4'</if>
|
||||
</where>
|
||||
order by spfv.approve_status, spfv.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectBgscreenProjectCheckingView" parameterType="SurProjectFunVerify" resultType="map">
|
||||
select spfv.check_result, count(spfv.id) as total from sur_project_fun_verify spfv
|
||||
left join sur_project sp on spfv.project_id = sp.id
|
||||
<where>
|
||||
and spfv.is_del=0 and sp.isDel=0
|
||||
<if test="projectId != null "> and spfv.project_id = #{projectId}</if>
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and spfv.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
group by spfv.check_result
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectFunVerifyById" parameterType="Long" resultMap="SurProjectFunVerifyResult">
|
||||
<include refid="selectSurProjectFunVerifyVo"/>
|
||||
where spfv.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSurProjectFunVerify" parameterType="SurProjectFunVerify" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sur_project_fun_verify
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="checkType != null">check_type,</if>
|
||||
<if test="mainImage != null">main_image,</if>
|
||||
<if test="imageUrls != null">image_urls,</if>
|
||||
<if test="checkName != null">check_name,</if>
|
||||
<if test="checkResult != null">check_result,</if>
|
||||
<if test="intro != null">intro,</if>
|
||||
<if test="qualityUser != null">quality_user,</if>
|
||||
<if test="qualityUserName != null">quality_user_name,</if>
|
||||
<if test="superviseUser != null">supervise_user,</if>
|
||||
<if test="superviseUserName != null">supervise_user_name,</if>
|
||||
<if test="checkDate != null">check_date,</if>
|
||||
<if test="checkFiles != null">check_files,</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>
|
||||
<if test="approveStatus != null">approve_status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="checkType != null">#{checkType},</if>
|
||||
<if test="mainImage != null">#{mainImage},</if>
|
||||
<if test="imageUrls != null">#{imageUrls},</if>
|
||||
<if test="checkName != null">#{checkName},</if>
|
||||
<if test="checkResult != null">#{checkResult},</if>
|
||||
<if test="intro != null">#{intro},</if>
|
||||
<if test="qualityUser != null">#{qualityUser},</if>
|
||||
<if test="qualityUserName != null">#{qualityUserName},</if>
|
||||
<if test="superviseUser != null">#{superviseUser},</if>
|
||||
<if test="superviseUserName != null">#{superviseUserName},</if>
|
||||
<if test="checkDate != null">#{checkDate},</if>
|
||||
<if test="checkFiles != null">#{checkFiles},</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>
|
||||
<if test="approveStatus != null">#{approveStatus},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSurProjectFunVerify" parameterType="SurProjectFunVerify">
|
||||
update sur_project_fun_verify
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="checkType != null">check_type = #{checkType},</if>
|
||||
<if test="mainImage != null">main_image = #{mainImage},</if>
|
||||
<if test="imageUrls != null">image_urls = #{imageUrls},</if>
|
||||
<if test="checkName != null">check_name = #{checkName},</if>
|
||||
<if test="checkResult != null">check_result = #{checkResult},</if>
|
||||
<if test="intro != null">intro = #{intro},</if>
|
||||
<if test="qualityUser != null">quality_user = #{qualityUser},</if>
|
||||
<if test="qualityUserName != null">quality_user_name = #{qualityUserName},</if>
|
||||
<if test="superviseUser != null">supervise_user = #{superviseUser},</if>
|
||||
<if test="superviseUserName != null">supervise_user_name = #{superviseUserName},</if>
|
||||
<if test="checkDate != null">check_date = #{checkDate},</if>
|
||||
<if test="checkFiles != null">check_files = #{checkFiles},</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>
|
||||
<if test="approveStatus != null">approve_status = #{approveStatus},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSurProjectFunVerifyById" parameterType="Long">
|
||||
update sur_project_fun_verify set is_del = 1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSurProjectFunVerifyByIds" parameterType="String">
|
||||
update sur_project_fun_verify set is_del = 1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue