优化代码
parent
fb0a2d81bf
commit
08bf19fc38
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询项目验收列表
|
||||||
|
export function listProjectChecking(query) {
|
||||||
|
return request({
|
||||||
|
url: '/project/projectChecking/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询项目验收详细
|
||||||
|
export function getProjectChecking(id) {
|
||||||
|
return request({
|
||||||
|
url: '/project/projectChecking/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增项目验收
|
||||||
|
export function addProjectChecking(data) {
|
||||||
|
return request({
|
||||||
|
url: '/project/projectChecking',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改项目验收
|
||||||
|
export function updateProjectChecking(data) {
|
||||||
|
return request({
|
||||||
|
url: '/project/projectChecking',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除项目验收
|
||||||
|
export function delProjectChecking(id) {
|
||||||
|
return request({
|
||||||
|
url: '/project/projectChecking/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
|
@ -9,6 +9,15 @@ export function listSurProjectSpecial(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询项目特种人员数量统计
|
||||||
|
export function findWorkSpecialCount(query) {
|
||||||
|
return request({
|
||||||
|
url: '/project/surProjectSpecial/findWorkSpecialCount',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询项目特种人员详细
|
// 查询项目特种人员详细
|
||||||
export function getSurProjectSpecial(id) {
|
export function getSurProjectSpecial(id) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询集团新闻列表
|
||||||
|
export function listWorkJournalism(query) {
|
||||||
|
return request({
|
||||||
|
url: '/work/workJournalism/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询集团新闻详细
|
||||||
|
export function getWorkJournalism(id) {
|
||||||
|
return request({
|
||||||
|
url: '/work/workJournalism/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增集团新闻
|
||||||
|
export function addWorkJournalism(data) {
|
||||||
|
return request({
|
||||||
|
url: '/work/workJournalism',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改集团新闻
|
||||||
|
export function updateWorkJournalism(data) {
|
||||||
|
return request({
|
||||||
|
url: '/work/workJournalism',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除集团新闻
|
||||||
|
export function delWorkJournalism(id) {
|
||||||
|
return request({
|
||||||
|
url: '/work/workJournalism/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
|
@ -21,7 +21,11 @@
|
||||||
placeholder="密码"
|
placeholder="密码"
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="password"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="code" v-if="captchaEnabled">
|
<el-form-item prop="code" v-if="captchaEnabled">
|
||||||
|
@ -32,25 +36,31 @@
|
||||||
style="width: 63%"
|
style="width: 63%"
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="validCode"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
<div class="login-code">
|
||||||
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
<img :src="codeUrl" @click="getCode" class="login-code-img" />
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
<el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px"
|
||||||
<el-form-item style="width:100%;">
|
>记住密码</el-checkbox
|
||||||
|
>
|
||||||
|
<el-form-item style="width: 100%">
|
||||||
<el-button
|
<el-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="medium"
|
size="medium"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>
|
>
|
||||||
<span v-if="!loading">登 录</span>
|
<span v-if="!loading">登 录</span>
|
||||||
<span v-else>登 录 中...</span>
|
<span v-else>登 录 中...</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<div style="float: right;" v-if="register">
|
<div style="float: right" v-if="register">
|
||||||
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -65,7 +75,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { getCodeImg } from "@/api/login";
|
import { getCodeImg } from "@/api/login";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: "Login",
|
||||||
|
@ -77,42 +87,40 @@ export default {
|
||||||
password: "",
|
password: "",
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
code: "",
|
code: "",
|
||||||
uuid: ""
|
uuid: "",
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [
|
username: [{ required: true, trigger: "blur", message: "请输入您的账号" }],
|
||||||
{ required: true, trigger: "blur", message: "请输入您的账号" }
|
password: [{ required: true, trigger: "blur", message: "请输入您的密码" }],
|
||||||
],
|
code: [{ required: true, trigger: "change", message: "请输入验证码" }],
|
||||||
password: [
|
|
||||||
{ required: true, trigger: "blur", message: "请输入您的密码" }
|
|
||||||
],
|
|
||||||
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
// 验证码开关
|
// 验证码开关
|
||||||
captchaEnabled: true,
|
captchaEnabled: true,
|
||||||
// 注册开关
|
// 注册开关
|
||||||
register: false,
|
register: false,
|
||||||
redirect: undefined
|
redirect: undefined,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route: {
|
$route: {
|
||||||
handler: function(route) {
|
handler: function (route) {
|
||||||
this.redirect = route.query && route.query.redirect;
|
this.redirect = route.query && route.query.redirect;
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
debugger;
|
||||||
this.getCode();
|
this.getCode();
|
||||||
this.getCookie();
|
this.getCookie();
|
||||||
location.hash="#/login?redirect=%2Findex"
|
location.hash = "#/login?redirect=%2Findex";
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCode() {
|
getCode() {
|
||||||
getCodeImg().then(res => {
|
getCodeImg().then((res) => {
|
||||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
this.captchaEnabled =
|
||||||
|
res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
||||||
if (this.captchaEnabled) {
|
if (this.captchaEnabled) {
|
||||||
this.codeUrl = "data:image/gif;base64," + res.img;
|
this.codeUrl = "data:image/gif;base64," + res.img;
|
||||||
this.loginForm.uuid = res.uuid;
|
this.loginForm.uuid = res.uuid;
|
||||||
|
@ -122,29 +130,32 @@ export default {
|
||||||
getCookie() {
|
getCookie() {
|
||||||
const username = Cookies.get("username");
|
const username = Cookies.get("username");
|
||||||
const password = Cookies.get("password");
|
const password = Cookies.get("password");
|
||||||
const rememberMe = Cookies.get('rememberMe')
|
const rememberMe = Cookies.get("rememberMe");
|
||||||
this.loginForm = {
|
this.loginForm = {
|
||||||
username: username === undefined ? this.loginForm.username : username,
|
username: username === undefined ? this.loginForm.username : username,
|
||||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
password: password === undefined ? this.loginForm.password : decrypt(password),
|
||||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.$refs.loginForm.validate(valid => {
|
this.$refs.loginForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
if (this.loginForm.rememberMe) {
|
if (this.loginForm.rememberMe) {
|
||||||
Cookies.set("username", this.loginForm.username, { expires: 30 });
|
Cookies.set("username", this.loginForm.username, { expires: 30 });
|
||||||
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
|
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
|
||||||
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
|
Cookies.set("rememberMe", this.loginForm.rememberMe, { expires: 30 });
|
||||||
} else {
|
} else {
|
||||||
Cookies.remove("username");
|
Cookies.remove("username");
|
||||||
Cookies.remove("password");
|
Cookies.remove("password");
|
||||||
Cookies.remove('rememberMe');
|
Cookies.remove("rememberMe");
|
||||||
}
|
}
|
||||||
this.$store.dispatch("Login", this.loginForm).then(() => {
|
this.$store
|
||||||
this.$router.push({ path: this.redirect || "#/index" }).catch(()=>{});
|
.dispatch("Login", this.loginForm)
|
||||||
}).catch(() => {
|
.then(() => {
|
||||||
|
this.$router.push({ path: this.redirect || "#/index" }).catch(() => {});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (this.captchaEnabled) {
|
if (this.captchaEnabled) {
|
||||||
this.getCode();
|
this.getCode();
|
||||||
|
@ -152,13 +163,13 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
.login-bg{
|
.login-bg {
|
||||||
background-image: url("/images/bg.jpg");
|
background-image: url("/images/bg.jpg");
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -0,0 +1,504 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="项目主键" prop="projectId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.projectId"
|
||||||
|
placeholder="请输入项目主键"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="部门主键" prop="deptId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.deptId"
|
||||||
|
placeholder="请输入部门主键"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分包单位主键" prop="groupDeptId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.groupDeptId"
|
||||||
|
placeholder="请输入分包单位主键"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验收工序部位" prop="checkWorkingPosition">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.checkWorkingPosition"
|
||||||
|
placeholder="请输入验收工序部位"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验收结果" prop="checkResult">
|
||||||
|
<el-select v-model="queryParams.checkResult" placeholder="请选择验收结果" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.project_checking_result"
|
||||||
|
: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="qualityUserName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.qualityUserName"
|
||||||
|
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="监理用户名称" prop="superviseUserName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.superviseUserName"
|
||||||
|
placeholder="请输入监理用户名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分包单位用户" prop="groupDeptUser">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.groupDeptUser"
|
||||||
|
placeholder="请输入分包单位用户"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分包单位用户名称" prop="groupDeptUserName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.groupDeptUserName"
|
||||||
|
placeholder="请输入分包单位用户名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验收时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="daterangeCheckingDate"
|
||||||
|
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="isDel">
|
||||||
|
<el-select v-model="queryParams.isDel" placeholder="请选择数据状态" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_common_isdel"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<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:projectChecking: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:projectChecking: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:projectChecking: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:projectChecking:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="projectCheckingList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="主键" align="center" prop="id" />
|
||||||
|
<el-table-column label="项目主键" align="center" prop="projectId" />
|
||||||
|
<el-table-column label="部门主键" align="center" prop="deptId" />
|
||||||
|
<el-table-column label="分包单位主键" align="center" prop="groupDeptId" />
|
||||||
|
<el-table-column label="验收类型" align="center" prop="checkType" />
|
||||||
|
<el-table-column label="验收主图" align="center" prop="mainImage" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="图片列表" align="center" prop="imageUrls" />
|
||||||
|
<el-table-column label="验收工序部位类型" align="center" prop="workingPositionType" />
|
||||||
|
<el-table-column label="验收工序部位" align="center" prop="checkWorkingPosition" />
|
||||||
|
<el-table-column label="验收次数" align="center" prop="checkingNum" />
|
||||||
|
<el-table-column label="验收结果" align="center" prop="checkResult">
|
||||||
|
<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="intro" />
|
||||||
|
<el-table-column label="质量用户" align="center" prop="qualityUser" />
|
||||||
|
<el-table-column label="质量用户名称" align="center" prop="qualityUserName" />
|
||||||
|
<el-table-column label="监理用户" align="center" prop="superviseUser" />
|
||||||
|
<el-table-column label="监理用户名称" align="center" prop="superviseUserName" />
|
||||||
|
<el-table-column label="分包单位用户" align="center" prop="groupDeptUser" />
|
||||||
|
<el-table-column label="分包单位用户名称" align="center" prop="groupDeptUserName" />
|
||||||
|
<el-table-column label="验收时间" align="center" prop="checkingDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.checkingDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="验收附件" align="center" prop="checkingFiles" />
|
||||||
|
<el-table-column label="数据状态" align="center" prop="isDel">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['project:projectChecking:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['project:projectChecking:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改项目验收对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="项目主键" prop="projectId">
|
||||||
|
<el-input v-model="form.projectId" placeholder="请输入项目主键" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="部门主键" prop="deptId">
|
||||||
|
<el-input v-model="form.deptId" placeholder="请输入部门主键" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分包单位主键" prop="groupDeptId">
|
||||||
|
<el-input v-model="form.groupDeptId" placeholder="请输入分包单位主键" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验收主图" prop="mainImage">
|
||||||
|
<image-upload v-model="form.mainImage"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="图片列表" prop="imageUrls">
|
||||||
|
<el-input v-model="form.imageUrls" placeholder="请输入图片列表" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验收工序部位" prop="checkWorkingPosition">
|
||||||
|
<el-input v-model="form.checkWorkingPosition" placeholder="请输入验收工序部位" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验收次数" prop="checkingNum">
|
||||||
|
<el-input v-model="form.checkingNum" placeholder="请输入验收次数" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验收结果" prop="checkResult">
|
||||||
|
<el-select v-model="form.checkResult" placeholder="请选择验收结果">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.project_checking_result"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</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="qualityUser">
|
||||||
|
<el-input v-model="form.qualityUser" placeholder="请输入质量用户" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="质量用户名称" prop="qualityUserName">
|
||||||
|
<el-input v-model="form.qualityUserName" placeholder="请输入质量用户名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="监理用户" prop="superviseUser">
|
||||||
|
<el-input v-model="form.superviseUser" placeholder="请输入监理用户" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="监理用户名称" prop="superviseUserName">
|
||||||
|
<el-input v-model="form.superviseUserName" placeholder="请输入监理用户名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分包单位用户" prop="groupDeptUser">
|
||||||
|
<el-input v-model="form.groupDeptUser" placeholder="请输入分包单位用户" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分包单位用户名称" prop="groupDeptUserName">
|
||||||
|
<el-input v-model="form.groupDeptUserName" placeholder="请输入分包单位用户名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验收时间" prop="checkingDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.checkingDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择验收时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验收附件" prop="checkingFiles">
|
||||||
|
<el-input v-model="form.checkingFiles" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据状态" prop="isDel">
|
||||||
|
<el-select v-model="form.isDel" placeholder="请选择数据状态">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_common_isdel"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="parseInt(dict.value)"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listProjectChecking, getProjectChecking, delProjectChecking, addProjectChecking, updateProjectChecking } from "@/api/project/projectChecking";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ProjectChecking",
|
||||||
|
dicts: ['project_checking_result', 'sys_common_isdel'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 项目验收表格数据
|
||||||
|
projectCheckingList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 备注时间范围
|
||||||
|
daterangeCheckingDate: [],
|
||||||
|
// 查询参数
|
||||||
|
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,
|
||||||
|
checkingDate: null,
|
||||||
|
isDel: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询项目验收列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.params = {};
|
||||||
|
if (null != this.daterangeCheckingDate && '' != this.daterangeCheckingDate) {
|
||||||
|
this.queryParams.params["beginCheckingDate"] = this.daterangeCheckingDate[0];
|
||||||
|
this.queryParams.params["endCheckingDate"] = this.daterangeCheckingDate[1];
|
||||||
|
}
|
||||||
|
listProjectChecking(this.queryParams).then(response => {
|
||||||
|
this.projectCheckingList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
projectId: null,
|
||||||
|
deptId: null,
|
||||||
|
groupDeptId: null,
|
||||||
|
checkType: null,
|
||||||
|
mainImage: null,
|
||||||
|
imageUrls: null,
|
||||||
|
workingPositionType: null,
|
||||||
|
checkWorkingPosition: null,
|
||||||
|
checkingNum: null,
|
||||||
|
checkResult: null,
|
||||||
|
intro: null,
|
||||||
|
qualityUser: null,
|
||||||
|
qualityUserName: null,
|
||||||
|
superviseUser: null,
|
||||||
|
superviseUserName: null,
|
||||||
|
groupDeptUser: null,
|
||||||
|
groupDeptUserName: null,
|
||||||
|
checkingDate: null,
|
||||||
|
checkingFiles: 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.daterangeCheckingDate = [];
|
||||||
|
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
|
||||||
|
getProjectChecking(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改项目验收";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateProjectChecking(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addProjectChecking(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 delProjectChecking(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('project/projectChecking/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `projectChecking_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -500,7 +500,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 预览 */
|
/** 预览 */
|
||||||
handledownload(row) {
|
handledownload(row) {
|
||||||
window.open("/jhapi" + row.credentialFile);
|
window.open("/jhapi" + row.insuranceFile);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -393,7 +393,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 预览 */
|
/** 预览 */
|
||||||
handledownload(row) {
|
handledownload(row) {
|
||||||
window.open("/jhapi" + row.credentialFile);
|
window.open("/jhapi" + row.insuranceFile);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,14 +24,14 @@
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否有证" prop="isCredential" v-if="false">
|
<el-form-item label="人员类型" prop="specialType">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.isCredential"
|
v-model="queryParams.specialType"
|
||||||
placeholder="请选择是否有证书"
|
placeholder="请选择是人员类型"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.sys_yes_no"
|
v-for="dict in dict.type.project_special_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
|
@ -121,6 +121,10 @@
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
|
<el-tab-pane :label="tabs.all" name="all"></el-tab-pane>
|
||||||
|
<el-tab-pane :label="tabs.wgq" name="wgq"></el-tab-pane>
|
||||||
|
<el-tab-pane :label="tabs.ygq" name="ygq"></el-tab-pane>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="surProjectSpecialList"
|
:data="surProjectSpecialList"
|
||||||
|
@ -141,12 +145,21 @@
|
||||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
|
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="联系方式" align="center" prop="phoneNumber" />
|
<el-table-column
|
||||||
<el-table-column label="是否有证书" align="center" prop="isCredential">
|
label="人员类型"
|
||||||
|
align="center"
|
||||||
|
prop="specialType"
|
||||||
|
width="120"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isCredential" />
|
<dict-tag
|
||||||
|
:options="dict.type.project_special_type"
|
||||||
|
:value="scope.row.specialType"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="联系方式" align="center" prop="phoneNumber" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="证书编号"
|
label="证书编号"
|
||||||
align="center"
|
align="center"
|
||||||
|
@ -161,10 +174,12 @@
|
||||||
width="120"
|
width="120"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.credentialExpirationTime, "{y}-{m}-{d}") }}</span>
|
<span>{{
|
||||||
|
parseTime(scope.row.credentialExpirationTime, "{y}-{m}-{d}")
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="证书预览" align="center" prop="credentialFile" width="200">
|
<el-table-column label="证书预览" align="center" prop="credentialFile" width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<svg
|
<svg
|
||||||
v-if="scope.row.credentialType == 'PDF'"
|
v-if="scope.row.credentialType == 'PDF'"
|
||||||
|
@ -195,8 +210,17 @@
|
||||||
></el-image>
|
></el-image>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
<el-table-column
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
label="备注"
|
||||||
|
align="center"
|
||||||
|
prop="remark"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -233,7 +257,7 @@
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
</el-tabs>
|
||||||
<!-- 添加或修改项目特种人员对话框 -->
|
<!-- 添加或修改项目特种人员对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
@ -253,24 +277,23 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系方式" prop="phoneNumber">
|
<el-form-item label="人员类型" prop="specialType">
|
||||||
<el-input v-model="form.phoneNumber" placeholder="请输入联系方式" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否有证书" prop="isCredential" v-if="false">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.isCredential"
|
v-model="form.specialType"
|
||||||
placeholder="请选择是否有证书"
|
placeholder="请选择是否有证书"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="credentialChange"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.sys_yes_no"
|
v-for="dict in dict.type.project_special_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="联系方式" prop="phoneNumber">
|
||||||
|
<el-input v-model="form.phoneNumber" placeholder="请输入联系方式" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="证书编号" prop="credentialNumber" v-show="credential">
|
<el-form-item label="证书编号" prop="credentialNumber" v-show="credential">
|
||||||
<el-input v-model="form.credentialNumber" placeholder="请输入证书编号" />
|
<el-input v-model="form.credentialNumber" placeholder="请输入证书编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -317,6 +340,7 @@ import {
|
||||||
delSurProjectSpecial,
|
delSurProjectSpecial,
|
||||||
addSurProjectSpecial,
|
addSurProjectSpecial,
|
||||||
updateSurProjectSpecial,
|
updateSurProjectSpecial,
|
||||||
|
findWorkSpecialCount,
|
||||||
} from "@/api/project/surProjectSpecial";
|
} from "@/api/project/surProjectSpecial";
|
||||||
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
|
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
|
||||||
|
|
||||||
|
@ -325,7 +349,7 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
ElImageViewer,
|
ElImageViewer,
|
||||||
},
|
},
|
||||||
dicts: ["sys_yes_no", "sys_user_sex"],
|
dicts: ["sys_user_sex", "project_special_type"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showViewer: false,
|
showViewer: false,
|
||||||
|
@ -361,12 +385,15 @@ export default {
|
||||||
credentialExpirationTime: null,
|
credentialExpirationTime: null,
|
||||||
isDel: null,
|
isDel: null,
|
||||||
projectDeptId: null,
|
projectDeptId: null,
|
||||||
|
specialType: null,
|
||||||
|
activeName: null,
|
||||||
},
|
},
|
||||||
depts: null,
|
depts: null,
|
||||||
credential: false,
|
credential: false,
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
files: [],
|
files: [],
|
||||||
|
activeName: "wgq",
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
|
@ -374,7 +401,7 @@ export default {
|
||||||
{ maxlength: 20, message: "人员姓名最多20字符", trigger: "blur" },
|
{ maxlength: 20, message: "人员姓名最多20字符", trigger: "blur" },
|
||||||
],
|
],
|
||||||
sex: [{ required: true, message: "请选择人员性别", trigger: "blur" }],
|
sex: [{ required: true, message: "请选择人员性别", trigger: "blur" }],
|
||||||
isCredential: [{ required: false, message: "请选择是否有证书", trigger: "blur" }],
|
specialType: [{ required: true, message: "请选择人员类型", trigger: "blur" }],
|
||||||
phoneNumber: [
|
phoneNumber: [
|
||||||
{ required: true, message: "请输入联系方式", trigger: "blur" },
|
{ required: true, message: "请输入联系方式", trigger: "blur" },
|
||||||
{
|
{
|
||||||
|
@ -395,15 +422,22 @@ export default {
|
||||||
credentialExpirationTime: [
|
credentialExpirationTime: [
|
||||||
{ required: true, message: "请选择证书过期时间", trigger: "blur" },
|
{ required: true, message: "请选择证书过期时间", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
credentialFile: [{ required: true, message: "请上传证书附件", trigger: "blur" }],
|
||||||
remark: [
|
remark: [
|
||||||
{ required: false, message: "请输入备注", trigger: "blur" },
|
{ required: false, message: "请输入备注", trigger: "blur" },
|
||||||
{ maxlength: 200, message: "备注最多200字符", trigger: "blur" },
|
{ maxlength: 200, message: "备注最多200字符", trigger: "blur" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
previewList: [],
|
previewList: [],
|
||||||
|
tabs: {
|
||||||
|
all: "全部数据(0)",
|
||||||
|
wgq: "未过期(0)",
|
||||||
|
ygq: "已过期(0)",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.queryParams.activeName = this.activeName;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$api.publics.getZgsDeptList().then((d) => {
|
this.$api.publics.getZgsDeptList().then((d) => {
|
||||||
this.depts = d?.data || [];
|
this.depts = d?.data || [];
|
||||||
|
@ -445,12 +479,29 @@ export default {
|
||||||
"endCredentialExpirationTime"
|
"endCredentialExpirationTime"
|
||||||
] = this.daterangeCredentialExpirationTime[1];
|
] = this.daterangeCredentialExpirationTime[1];
|
||||||
}
|
}
|
||||||
|
this.queryCount();
|
||||||
listSurProjectSpecial(this.queryParams).then((response) => {
|
listSurProjectSpecial(this.queryParams).then((response) => {
|
||||||
this.surProjectSpecialList = response.rows;
|
this.surProjectSpecialList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
queryCount() {
|
||||||
|
findWorkSpecialCount(this.queryParams).then((response) => {
|
||||||
|
if (response && response.data) {
|
||||||
|
let sum = 0;
|
||||||
|
if (response.data.notExpired) {
|
||||||
|
sum += response.data.notExpired;
|
||||||
|
this.tabs.wgq = "未过期(" + response.data.notExpired + ")";
|
||||||
|
}
|
||||||
|
if (response.data.expired) {
|
||||||
|
sum += response.data.expired;
|
||||||
|
this.tabs.ygq = "已过期(" + response.data.expired + ")";
|
||||||
|
}
|
||||||
|
this.tabs.all = "全部数据(" + sum + ")";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
@ -475,7 +526,11 @@ export default {
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
|
credentialType: null,
|
||||||
|
credentialFile: null,
|
||||||
|
specialType: null,
|
||||||
};
|
};
|
||||||
|
this.files = [];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
@ -483,6 +538,11 @@ export default {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
// 页签点击
|
||||||
|
handleClick() {
|
||||||
|
this.queryParams.activeName = this.activeName;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.daterangeCredentialExpirationTime = [];
|
this.daterangeCredentialExpirationTime = [];
|
||||||
|
@ -516,6 +576,10 @@ export default {
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
if (!this.form.credentialFile) {
|
||||||
|
this.$modal.msgWarning("请上传证书附件");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateSurProjectSpecial(this.form).then((response) => {
|
updateSurProjectSpecial(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
@ -558,7 +622,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 下载证书 */
|
/** 下载证书 */
|
||||||
handledownload(row) {
|
handledownload(row) {
|
||||||
window.open("/jhapi" + row.credentialFile);
|
this.$download.resource(row.credentialFile);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -53,6 +53,14 @@
|
||||||
@queryTable="getList"
|
@queryTable="getList"
|
||||||
></right-toolbar>
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-tabs
|
||||||
|
v-model="activeName"
|
||||||
|
@tab-click="handleClick"
|
||||||
|
style="margin-left: 25px; margin-right: 25px"
|
||||||
|
>
|
||||||
|
<el-tab-pane :label="tabs.all" name="all"></el-tab-pane>
|
||||||
|
<el-tab-pane :label="tabs.wgq" name="wgq"></el-tab-pane>
|
||||||
|
<el-tab-pane :label="tabs.ygq" name="ygq"></el-tab-pane>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="surProjectSpecialList"
|
:data="surProjectSpecialList"
|
||||||
|
@ -71,6 +79,20 @@
|
||||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
|
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="人员类型"
|
||||||
|
align="center"
|
||||||
|
prop="specialType"
|
||||||
|
width="120"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag
|
||||||
|
:options="dict.type.project_special_type"
|
||||||
|
:value="scope.row.specialType"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="联系方式"
|
label="联系方式"
|
||||||
align="center"
|
align="center"
|
||||||
|
@ -96,7 +118,12 @@
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="证书预览" align="center" prop="credentialFile" width="75">
|
<el-table-column
|
||||||
|
label="证书预览"
|
||||||
|
align="center"
|
||||||
|
prop="credentialFile"
|
||||||
|
width="75"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<svg
|
<svg
|
||||||
v-if="scope.row.credentialType == 'PDF'"
|
v-if="scope.row.credentialType == 'PDF'"
|
||||||
|
@ -168,6 +195,7 @@
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
</el-tabs>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="title"
|
:title="title"
|
||||||
v-if="open"
|
v-if="open"
|
||||||
|
@ -197,14 +225,14 @@
|
||||||
<el-form-item label="联系方式" prop="phoneNumber">
|
<el-form-item label="联系方式" prop="phoneNumber">
|
||||||
<el-input v-model="form.phoneNumber" placeholder="请输入联系方式" />
|
<el-input v-model="form.phoneNumber" placeholder="请输入联系方式" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否有证书" prop="isCredential" v-if="false">
|
<el-form-item label="人员类型" prop="specialType">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.isCredential"
|
v-model="form.specialType"
|
||||||
placeholder="请选择是否有证书"
|
placeholder="请选择人员类型"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.sys_yes_no"
|
v-for="dict in dict.type.project_special_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
|
@ -227,7 +255,7 @@
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="证书附件" prop="remark">
|
<el-form-item label="证书附件" prop="credentialFile">
|
||||||
<FileUpload
|
<FileUpload
|
||||||
@input="fileInput"
|
@input="fileInput"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
|
@ -261,6 +289,7 @@ import {
|
||||||
delSurProjectSpecial,
|
delSurProjectSpecial,
|
||||||
addSurProjectSpecial,
|
addSurProjectSpecial,
|
||||||
updateSurProjectSpecial,
|
updateSurProjectSpecial,
|
||||||
|
findWorkSpecialCount,
|
||||||
} from "@/api/project/surProjectSpecial";
|
} from "@/api/project/surProjectSpecial";
|
||||||
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
|
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
|
||||||
|
|
||||||
|
@ -274,7 +303,7 @@ export default {
|
||||||
projectName: String,
|
projectName: String,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dicts: ["sys_yes_no", "sys_user_sex"],
|
dicts: ["sys_user_sex", "project_special_type"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showViewer: false,
|
showViewer: false,
|
||||||
|
@ -301,9 +330,11 @@ export default {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
projectId: null,
|
projectId: null,
|
||||||
|
activeName: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
activeName: "wgq",
|
||||||
files: [],
|
files: [],
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
@ -325,7 +356,7 @@ export default {
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
isCredential: [{ required: false, message: "请选择是否有证书", trigger: "blur" }],
|
specialType: [{ required: true, message: "请选择人员类型", trigger: "blur" }],
|
||||||
credentialNumber: [
|
credentialNumber: [
|
||||||
{ required: true, message: "请输入证书编号", trigger: "blur" },
|
{ required: true, message: "请输入证书编号", trigger: "blur" },
|
||||||
{ maxlength: 50, message: "证书编号最多50字符", trigger: "blur" },
|
{ maxlength: 50, message: "证书编号最多50字符", trigger: "blur" },
|
||||||
|
@ -333,12 +364,18 @@ export default {
|
||||||
credentialExpirationTime: [
|
credentialExpirationTime: [
|
||||||
{ required: true, message: "请选择证书过期时间", trigger: "blur" },
|
{ required: true, message: "请选择证书过期时间", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
credentialFile: [{ required: true, message: "请上传证书附件", trigger: "blur" }],
|
||||||
remark: [
|
remark: [
|
||||||
{ required: false, message: "请输入备注", trigger: "blur" },
|
{ required: false, message: "请输入备注", trigger: "blur" },
|
||||||
{ maxlength: 200, message: "备注最多200字符", trigger: "blur" },
|
{ maxlength: 200, message: "备注最多200字符", trigger: "blur" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
previewList: [],
|
previewList: [],
|
||||||
|
tabs: {
|
||||||
|
all: "全部数据(0)",
|
||||||
|
wgq: "未过期(0)",
|
||||||
|
ygq: "已过期(0)",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
@ -387,6 +424,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onOpen() {
|
onOpen() {
|
||||||
|
this.queryParams.activeName = this.activeName;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
onClose() {},
|
onClose() {},
|
||||||
|
@ -395,6 +433,7 @@ export default {
|
||||||
if (this.formData.projectId) {
|
if (this.formData.projectId) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.projectId = this.formData.projectId;
|
this.queryParams.projectId = this.formData.projectId;
|
||||||
|
this.queryCount();
|
||||||
listSurProjectSpecial(this.queryParams).then((response) => {
|
listSurProjectSpecial(this.queryParams).then((response) => {
|
||||||
this.surProjectSpecialList = response.rows;
|
this.surProjectSpecialList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
|
@ -402,6 +441,22 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
queryCount() {
|
||||||
|
findWorkSpecialCount(this.queryParams).then((response) => {
|
||||||
|
if (response && response.data) {
|
||||||
|
let sum = 0;
|
||||||
|
if (response.data.notExpired) {
|
||||||
|
sum += response.data.notExpired;
|
||||||
|
this.tabs.wgq = "未过期(" + response.data.notExpired + ")";
|
||||||
|
}
|
||||||
|
if (response.data.expired) {
|
||||||
|
sum += response.data.expired;
|
||||||
|
this.tabs.ygq = "已过期(" + response.data.expired + ")";
|
||||||
|
}
|
||||||
|
this.tabs.all = "全部数据(" + sum + ")";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map((item) => item.id);
|
this.ids = selection.map((item) => item.id);
|
||||||
|
@ -429,7 +484,10 @@ export default {
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
|
credentialType: null,
|
||||||
|
specialType: null,
|
||||||
};
|
};
|
||||||
|
this.files = [];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
|
@ -446,6 +504,11 @@ export default {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
|
// 页签点击
|
||||||
|
handleClick() {
|
||||||
|
this.queryParams.activeName = this.activeName;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
@ -499,7 +562,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 下载证书 */
|
/** 下载证书 */
|
||||||
handledownload(row) {
|
handledownload(row) {
|
||||||
window.open("/jhapi" + row.credentialFile);
|
this.$download.resource(row.credentialFile);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -109,6 +109,15 @@
|
||||||
class-name="small-padding fixed-width"
|
class-name="small-padding fixed-width"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.trainFile"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-paperclip"
|
||||||
|
@click="handleDownload(scope.row)"
|
||||||
|
v-hasPermi="['work:emergencyDrill:edit']"
|
||||||
|
>下载文件</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.vDel == '0'"
|
v-if="scope.row.vDel == '0'"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -200,6 +209,9 @@
|
||||||
placeholder="请输入演练内容"
|
placeholder="请输入演练内容"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="相关文件" prop="trainFile">
|
||||||
|
<FileUpload @input="fileInput" :limit="9" v-model="files" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="协同部门" prop="remark">
|
<el-form-item label="协同部门" prop="remark">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.workTrainDeptList"
|
v-model="form.workTrainDeptList"
|
||||||
|
@ -289,9 +301,9 @@ export default {
|
||||||
rules: {
|
rules: {
|
||||||
mainImage: [{ required: true, message: "请上传演练主图", trigger: "blur" }],
|
mainImage: [{ required: true, message: "请上传演练主图", trigger: "blur" }],
|
||||||
trainNature: [{ required: false, message: "请选择演练类型", trigger: "blur" }],
|
trainNature: [{ required: false, message: "请选择演练类型", trigger: "blur" }],
|
||||||
beginDate: [{ required: false, message: "请选择演练时间", trigger: "blur" }],
|
beginDate: [{ required: true, message: "请选择演练时间", trigger: "blur" }],
|
||||||
trainTitle: [
|
trainTitle: [
|
||||||
{ required: true, message: "请输入培训标题", trigger: "blur" },
|
{ required: true, message: "请输入演练标题", trigger: "blur" },
|
||||||
{ max: 20, message: "培训标题最多20个字符", trigger: "blur" },
|
{ max: 20, message: "培训标题最多20个字符", trigger: "blur" },
|
||||||
],
|
],
|
||||||
trainParticipants: [
|
trainParticipants: [
|
||||||
|
@ -301,8 +313,10 @@ export default {
|
||||||
{ required: true, message: "请输入演练内容", trigger: "blur" },
|
{ required: true, message: "请输入演练内容", trigger: "blur" },
|
||||||
{ max: 1000, message: "演练内容长度在最多1000个字符", trigger: "blur" },
|
{ max: 1000, message: "演练内容长度在最多1000个字符", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
trainFile: [{ required: true, message: "请上传相关附件", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
previewList: [],
|
previewList: [],
|
||||||
|
files: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
@ -378,6 +392,7 @@ export default {
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
};
|
};
|
||||||
|
this.files = [];
|
||||||
this.deptOptions = [];
|
this.deptOptions = [];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -455,6 +470,9 @@ export default {
|
||||||
depts.push(item.deptId);
|
depts.push(item.deptId);
|
||||||
});
|
});
|
||||||
this.form.workTrainDeptList = depts;
|
this.form.workTrainDeptList = depts;
|
||||||
|
if (that.form.trainFile) {
|
||||||
|
that.files = that.form.trainFile.split(",");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
|
@ -471,28 +489,22 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
//日期格式化
|
//文件输入
|
||||||
getDateTime(unixtimestamp) {
|
fileInput(files) {
|
||||||
var unixtimestamp = new Date(unixtimestamp);
|
let trainFile = "";
|
||||||
var year = 1900 + unixtimestamp.getYear();
|
if (files.length > 0) {
|
||||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
files.forEach((item) => {
|
||||||
var date = "0" + unixtimestamp.getDate();
|
trainFile += "," + item.url;
|
||||||
var hour = "0" + unixtimestamp.getHours();
|
});
|
||||||
var minute = "0" + unixtimestamp.getMinutes();
|
trainFile = trainFile.substring(1);
|
||||||
var second = "0" + unixtimestamp.getSeconds();
|
}
|
||||||
return (
|
this.form.trainFile = trainFile;
|
||||||
year +
|
},
|
||||||
"-" +
|
handleDownload(row) {
|
||||||
month.substring(month.length - 2, month.length) +
|
this.files = row.trainFile.split(",");
|
||||||
"-" +
|
this.files.forEach((item) => {
|
||||||
date.substring(date.length - 2, date.length) +
|
this.$download.resource(item);
|
||||||
" " +
|
});
|
||||||
hour.substring(hour.length - 2, hour.length) +
|
|
||||||
":" +
|
|
||||||
minute.substring(minute.length - 2, minute.length) +
|
|
||||||
":" +
|
|
||||||
second.substring(second.length - 2, second.length)
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -190,6 +190,15 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.trainFile"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-paperclip"
|
||||||
|
@click="handleDownload(scope.row)"
|
||||||
|
v-hasPermi="['work:emergencyDrill:edit']"
|
||||||
|
>下载文件</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.vDel == '0'"
|
v-if="scope.row.vDel == '0'"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -221,7 +230,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改演练演练对话框 -->
|
<!-- 添加或修改演练演练对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="项目名称">
|
<el-form-item label="项目名称">
|
||||||
<el-input
|
<el-input
|
||||||
|
@ -248,7 +257,7 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="培训标题">
|
<el-form-item label="培训标题" prop="trainTitle">
|
||||||
<el-input placeholder="请输入培训标题" v-model="form.trainTitle"></el-input>
|
<el-input placeholder="请输入培训标题" v-model="form.trainTitle"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="参与人数" prop="trainParticipants">
|
<el-form-item label="参与人数" prop="trainParticipants">
|
||||||
|
@ -277,6 +286,9 @@
|
||||||
placeholder="请输入演练内容"
|
placeholder="请输入演练内容"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="相关文件" prop="trainFile">
|
||||||
|
<FileUpload @input="fileInput" :limit="9" v-model="files" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="协同部门" prop="workTrainDeptList">
|
<el-form-item label="协同部门" prop="workTrainDeptList">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.workTrainDeptList"
|
v-model="form.workTrainDeptList"
|
||||||
|
@ -366,9 +378,9 @@ export default {
|
||||||
rules: {
|
rules: {
|
||||||
mainImage: [{ required: true, message: "请上传演练主图", trigger: "blur" }],
|
mainImage: [{ required: true, message: "请上传演练主图", trigger: "blur" }],
|
||||||
trainNature: [{ required: false, message: "请选择演练类型", trigger: "blur" }],
|
trainNature: [{ required: false, message: "请选择演练类型", trigger: "blur" }],
|
||||||
beginDate: [{ required: false, message: "请选择演练时间", trigger: "blur" }],
|
beginDate: [{ required: true, message: "请选择演练时间", trigger: "blur" }],
|
||||||
trainTitle: [
|
trainTitle: [
|
||||||
{ required: true, message: "请输入培训标题", trigger: "blur" },
|
{ required: true, message: "请输入演练标题", trigger: "blur" },
|
||||||
{ max: 20, message: "培训标题最多20个字符", trigger: "blur" },
|
{ max: 20, message: "培训标题最多20个字符", trigger: "blur" },
|
||||||
],
|
],
|
||||||
trainParticipants: [
|
trainParticipants: [
|
||||||
|
@ -378,8 +390,10 @@ export default {
|
||||||
{ required: true, message: "请输入演练内容", trigger: "blur" },
|
{ required: true, message: "请输入演练内容", trigger: "blur" },
|
||||||
{ max: 1000, message: "演练内容长度在最多1000个字符", trigger: "blur" },
|
{ max: 1000, message: "演练内容长度在最多1000个字符", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
trainFile: [{ required: true, message: "请上传相关附件", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
previewList: [],
|
previewList: [],
|
||||||
|
files: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -446,6 +460,7 @@ export default {
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
};
|
};
|
||||||
|
this.files = [];
|
||||||
this.workTrainDeptList = [];
|
this.workTrainDeptList = [];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -490,6 +505,9 @@ export default {
|
||||||
depts.push(item.deptId);
|
depts.push(item.deptId);
|
||||||
});
|
});
|
||||||
this.form.workTrainDeptList = depts;
|
this.form.workTrainDeptList = depts;
|
||||||
|
if (that.form.trainFile) {
|
||||||
|
that.files = that.form.trainFile.split(",");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
@ -569,6 +587,23 @@ export default {
|
||||||
`workTrain_${new Date().getTime()}.xlsx`
|
`workTrain_${new Date().getTime()}.xlsx`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
//文件输入
|
||||||
|
fileInput(files) {
|
||||||
|
let trainFile = "";
|
||||||
|
if (files.length > 0) {
|
||||||
|
files.forEach((item) => {
|
||||||
|
trainFile += "," + item.url;
|
||||||
|
});
|
||||||
|
trainFile = trainFile.substring(1);
|
||||||
|
}
|
||||||
|
this.form.trainFile = trainFile;
|
||||||
|
},
|
||||||
|
handleDownload(row) {
|
||||||
|
this.files = row.trainFile.split(",");
|
||||||
|
this.files.forEach((item) => {
|
||||||
|
this.$download.resource(item);
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,407 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="标题" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
placeholder="请输入标题"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态标识" prop="statusFlag">
|
||||||
|
<el-select v-model="queryParams.statusFlag" placeholder="请选择状态标识" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.work_journalism_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="置顶标识" prop="topFlag">
|
||||||
|
<el-select v-model="queryParams.topFlag" placeholder="请选择置顶标识" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.work_journalism_top"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="sortNum">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.sortNum"
|
||||||
|
placeholder="请输入排序"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据状态" prop="isDel">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.isDel"
|
||||||
|
placeholder="请输入数据状态"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="daterangeCreateTime"
|
||||||
|
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>
|
||||||
|
<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="['work:workJournalism: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="['work:workJournalism: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="['work:workJournalism: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="['work:workJournalism:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="workJournalismList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="主键" align="center" prop="id" />
|
||||||
|
<el-table-column label="标题" align="center" prop="title" />
|
||||||
|
<el-table-column label="主图" align="center" prop="mainImage" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="简介" align="center" prop="intro" />
|
||||||
|
<el-table-column label="内容" align="center" prop="content" />
|
||||||
|
<el-table-column label="类型" align="center" prop="type" />
|
||||||
|
<el-table-column label="来源" align="center" prop="source" />
|
||||||
|
<el-table-column label="外部地址" align="center" prop="openUrl" />
|
||||||
|
<el-table-column label="阅读次数" align="center" prop="readNum" />
|
||||||
|
<el-table-column label="状态标识" align="center" prop="statusFlag">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.work_journalism_status" :value="scope.row.statusFlag"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="置顶标识" align="center" prop="topFlag">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.work_journalism_top" :value="scope.row.topFlag"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="相关附件" align="center" prop="files" />
|
||||||
|
<el-table-column label="排序" align="center" prop="sortNum" />
|
||||||
|
<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="createUser" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['work:workJournalism:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['work:workJournalism:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改集团新闻对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="标题" prop="title">
|
||||||
|
<el-input v-model="form.title" placeholder="请输入标题" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="主图" prop="mainImage">
|
||||||
|
<image-upload v-model="form.mainImage"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="简介" prop="intro">
|
||||||
|
<el-input v-model="form.intro" placeholder="请输入简介" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="内容">
|
||||||
|
<editor v-model="form.content" :min-height="192"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="来源" prop="source">
|
||||||
|
<el-input v-model="form.source" placeholder="请输入来源" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="外部地址" prop="openUrl">
|
||||||
|
<el-input v-model="form.openUrl" placeholder="请输入外部地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="阅读次数" prop="readNum">
|
||||||
|
<el-input v-model="form.readNum" placeholder="请输入阅读次数" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态标识" prop="statusFlag">
|
||||||
|
<el-select v-model="form.statusFlag" placeholder="请选择状态标识">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.work_journalism_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="置顶标识" prop="topFlag">
|
||||||
|
<el-select v-model="form.topFlag" placeholder="请选择置顶标识">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.work_journalism_top"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="相关附件" prop="files">
|
||||||
|
<el-input v-model="form.files" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="sortNum">
|
||||||
|
<el-input v-model="form.sortNum" placeholder="请输入排序" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据状态" prop="isDel">
|
||||||
|
<el-input v-model="form.isDel" placeholder="请输入数据状态" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建用户" prop="createUser">
|
||||||
|
<el-input v-model="form.createUser" placeholder="请输入创建用户" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listWorkJournalism, getWorkJournalism, delWorkJournalism, addWorkJournalism, updateWorkJournalism } from "@/api/work/workJournalism";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "WorkJournalism",
|
||||||
|
dicts: ['work_journalism_status', 'work_journalism_top'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 集团新闻表格数据
|
||||||
|
workJournalismList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 备注时间范围
|
||||||
|
daterangeCreateTime: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
title: null,
|
||||||
|
statusFlag: null,
|
||||||
|
topFlag: null,
|
||||||
|
sortNum: null,
|
||||||
|
isDel: null,
|
||||||
|
createTime: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询集团新闻列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.params = {};
|
||||||
|
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
||||||
|
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
||||||
|
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
||||||
|
}
|
||||||
|
listWorkJournalism(this.queryParams).then(response => {
|
||||||
|
this.workJournalismList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
title: null,
|
||||||
|
mainImage: null,
|
||||||
|
intro: null,
|
||||||
|
content: null,
|
||||||
|
type: null,
|
||||||
|
source: null,
|
||||||
|
openUrl: null,
|
||||||
|
readNum: null,
|
||||||
|
statusFlag: null,
|
||||||
|
topFlag: null,
|
||||||
|
files: null,
|
||||||
|
sortNum: null,
|
||||||
|
isDel: null,
|
||||||
|
createUser: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
remark: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.daterangeCreateTime = [];
|
||||||
|
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
|
||||||
|
getWorkJournalism(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改集团新闻";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateWorkJournalism(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addWorkJournalism(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 delWorkJournalism(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('work/workJournalism/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `workJournalism_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -190,6 +190,15 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.trainFile"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-paperclip"
|
||||||
|
@click="handleDownload(scope.row)"
|
||||||
|
v-hasPermi="['work:emergencyDrill:edit']"
|
||||||
|
>下载文件</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.vDel == '0'"
|
v-if="scope.row.vDel == '0'"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -221,7 +230,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改演练培训对话框 -->
|
<!-- 添加或修改演练培训对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="项目名称">
|
<el-form-item label="项目名称">
|
||||||
<el-input
|
<el-input
|
||||||
|
@ -248,7 +257,7 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="培训标题">
|
<el-form-item label="培训标题" prop="trainTitle">
|
||||||
<el-input placeholder="请输入培训标题" v-model="form.trainTitle"></el-input>
|
<el-input placeholder="请输入培训标题" v-model="form.trainTitle"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="参与人数" prop="trainParticipants">
|
<el-form-item label="参与人数" prop="trainParticipants">
|
||||||
|
@ -277,6 +286,9 @@
|
||||||
placeholder="请输入培训内容"
|
placeholder="请输入培训内容"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="相关文件" prop="trainFile">
|
||||||
|
<FileUpload @input="fileInput" :limit="9" v-model="files" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="协同部门" prop="workTrainDeptList">
|
<el-form-item label="协同部门" prop="workTrainDeptList">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.workTrainDeptList"
|
v-model="form.workTrainDeptList"
|
||||||
|
@ -366,7 +378,7 @@ export default {
|
||||||
rules: {
|
rules: {
|
||||||
mainImage: [{ required: true, message: "请上传培训主图", trigger: "blur" }],
|
mainImage: [{ required: true, message: "请上传培训主图", trigger: "blur" }],
|
||||||
trainNature: [{ required: false, message: "请选择培训类型", trigger: "blur" }],
|
trainNature: [{ required: false, message: "请选择培训类型", trigger: "blur" }],
|
||||||
beginDate: [{ required: false, message: "请选择演练时间", trigger: "blur" }],
|
beginDate: [{ required: true, message: "请选择培训时间", trigger: "blur" }],
|
||||||
trainTitle: [
|
trainTitle: [
|
||||||
{ required: true, message: "请输入培训标题", trigger: "blur" },
|
{ required: true, message: "请输入培训标题", trigger: "blur" },
|
||||||
{ max: 20, message: "培训标题最多20个字符", trigger: "blur" },
|
{ max: 20, message: "培训标题最多20个字符", trigger: "blur" },
|
||||||
|
@ -378,8 +390,10 @@ export default {
|
||||||
{ required: true, message: "请输入培训内容", trigger: "blur" },
|
{ required: true, message: "请输入培训内容", trigger: "blur" },
|
||||||
{ max: 1000, message: "培训内容长度在最多1000个字符", trigger: "blur" },
|
{ max: 1000, message: "培训内容长度在最多1000个字符", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
trainFile: [{ required: true, message: "请上传相关附件", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
previewList: [],
|
previewList: [],
|
||||||
|
files: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -446,6 +460,7 @@ export default {
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
};
|
};
|
||||||
|
this.files = [];
|
||||||
this.workTrainDeptList = [];
|
this.workTrainDeptList = [];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -490,6 +505,9 @@ export default {
|
||||||
depts.push(item.deptId);
|
depts.push(item.deptId);
|
||||||
});
|
});
|
||||||
this.form.workTrainDeptList = depts;
|
this.form.workTrainDeptList = depts;
|
||||||
|
if (that.form.trainFile) {
|
||||||
|
that.files = that.form.trainFile.split(",");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
@ -569,6 +587,23 @@ export default {
|
||||||
`workTrain_${new Date().getTime()}.xlsx`
|
`workTrain_${new Date().getTime()}.xlsx`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
//文件输入
|
||||||
|
fileInput(files) {
|
||||||
|
let trainFile = "";
|
||||||
|
if (files.length > 0) {
|
||||||
|
files.forEach((item) => {
|
||||||
|
trainFile += "," + item.url;
|
||||||
|
});
|
||||||
|
trainFile = trainFile.substring(1);
|
||||||
|
}
|
||||||
|
this.form.trainFile = trainFile;
|
||||||
|
},
|
||||||
|
handleDownload(row) {
|
||||||
|
this.files = row.trainFile.split(",");
|
||||||
|
this.files.forEach((item) => {
|
||||||
|
this.$download.resource(item);
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -109,6 +109,15 @@
|
||||||
class-name="small-padding fixed-width"
|
class-name="small-padding fixed-width"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.trainFile"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-paperclip"
|
||||||
|
@click="handleDownload(scope.row)"
|
||||||
|
v-hasPermi="['work:emergencyDrill:edit']"
|
||||||
|
>下载文件</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.vDel == '0'"
|
v-if="scope.row.vDel == '0'"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -200,6 +209,9 @@
|
||||||
placeholder="请输入培训内容"
|
placeholder="请输入培训内容"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="相关文件" prop="trainFile">
|
||||||
|
<FileUpload @input="fileInput" :limit="9" v-model="files" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="协同部门" prop="workTrainDeptList">
|
<el-form-item label="协同部门" prop="workTrainDeptList">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.workTrainDeptList"
|
v-model="form.workTrainDeptList"
|
||||||
|
@ -289,7 +301,7 @@ export default {
|
||||||
rules: {
|
rules: {
|
||||||
mainImage: [{ required: true, message: "请上传培训主图", trigger: "blur" }],
|
mainImage: [{ required: true, message: "请上传培训主图", trigger: "blur" }],
|
||||||
trainNature: [{ required: false, message: "请选择培训类型", trigger: "blur" }],
|
trainNature: [{ required: false, message: "请选择培训类型", trigger: "blur" }],
|
||||||
beginDate: [{ required: false, message: "请选择演练时间", trigger: "blur" }],
|
beginDate: [{ required: true, message: "请选择培训时间", trigger: "blur" }],
|
||||||
trainTitle: [
|
trainTitle: [
|
||||||
{ required: true, message: "请输入培训标题", trigger: "blur" },
|
{ required: true, message: "请输入培训标题", trigger: "blur" },
|
||||||
{ max: 20, message: "培训标题最多20个字符", trigger: "blur" },
|
{ max: 20, message: "培训标题最多20个字符", trigger: "blur" },
|
||||||
|
@ -301,8 +313,10 @@ export default {
|
||||||
{ required: true, message: "请输入培训内容", trigger: "blur" },
|
{ required: true, message: "请输入培训内容", trigger: "blur" },
|
||||||
{ max: 1000, message: "培训内容长度在最多1000个字符", trigger: "blur" },
|
{ max: 1000, message: "培训内容长度在最多1000个字符", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
trainFile: [{ required: true, message: "请上传相关附件", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
previewList: [],
|
previewList: [],
|
||||||
|
files: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
@ -378,6 +392,7 @@ export default {
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
};
|
};
|
||||||
|
this.files = [];
|
||||||
this.deptOptions = [];
|
this.deptOptions = [];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -396,7 +411,7 @@ export default {
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
// 获取协同部门列表
|
// 获取协同部门列表
|
||||||
getDeptList(id) {
|
getDeptList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let param = {
|
let param = {
|
||||||
projectId: this.form.projectId,
|
projectId: this.form.projectId,
|
||||||
|
@ -448,13 +463,17 @@ export default {
|
||||||
listProjectUnit(param).then((response) => {
|
listProjectUnit(param).then((response) => {
|
||||||
this.deptOptions = response.data;
|
this.deptOptions = response.data;
|
||||||
});
|
});
|
||||||
|
let that = this;
|
||||||
getWorkTrain(id).then((response) => {
|
getWorkTrain(id).then((response) => {
|
||||||
this.form = response.data;
|
that.form = response.data;
|
||||||
let depts = [];
|
let depts = [];
|
||||||
this.form.workTrainDeptList.forEach((item) => {
|
that.form.workTrainDeptList.forEach((item) => {
|
||||||
depts.push(item.deptId);
|
depts.push(item.deptId);
|
||||||
});
|
});
|
||||||
this.form.workTrainDeptList = depts;
|
that.form.workTrainDeptList = depts;
|
||||||
|
if (that.form.trainFile) {
|
||||||
|
that.files = that.form.trainFile.split(",");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
|
@ -471,28 +490,22 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
//日期格式化
|
//文件输入
|
||||||
getDateTime(unixtimestamp) {
|
fileInput(files) {
|
||||||
var unixtimestamp = new Date(unixtimestamp);
|
let trainFile = "";
|
||||||
var year = 1900 + unixtimestamp.getYear();
|
if (files.length > 0) {
|
||||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
files.forEach((item) => {
|
||||||
var date = "0" + unixtimestamp.getDate();
|
trainFile += "," + item.url;
|
||||||
var hour = "0" + unixtimestamp.getHours();
|
});
|
||||||
var minute = "0" + unixtimestamp.getMinutes();
|
trainFile = trainFile.substring(1);
|
||||||
var second = "0" + unixtimestamp.getSeconds();
|
}
|
||||||
return (
|
this.form.trainFile = trainFile;
|
||||||
year +
|
},
|
||||||
"-" +
|
handleDownload(row) {
|
||||||
month.substring(month.length - 2, month.length) +
|
this.files = row.trainFile.split(",");
|
||||||
"-" +
|
this.files.forEach((item) => {
|
||||||
date.substring(date.length - 2, date.length) +
|
this.$download.resource(item);
|
||||||
" " +
|
});
|
||||||
hour.substring(hour.length - 2, hour.length) +
|
|
||||||
":" +
|
|
||||||
minute.substring(minute.length - 2, minute.length) +
|
|
||||||
":" +
|
|
||||||
second.substring(second.length - 2, second.length)
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package com.yanzhu.jh.bigscreen.web.controller;
|
package com.yanzhu.jh.bigscreen.web.controller;
|
||||||
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
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.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.common.enums.PublicStateEnum;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectWorkSpecial;
|
import com.yanzhu.jh.project.domain.SurProjectWorkSpecial;
|
||||||
import com.yanzhu.jh.project.service.ISurProjectWorkSpecialService;
|
import com.yanzhu.jh.project.service.ISurProjectWorkSpecialService;
|
||||||
|
@ -46,12 +46,33 @@ public class ProjectSpecialController extends BaseController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getProjectSpecialList")
|
@GetMapping("/getProjectSpecialList")
|
||||||
public TableDataInfo getProjectSpecialList(String projectId){
|
public TableDataInfo getProjectSpecialList(String projectId, String activeName, String specialType){
|
||||||
SurProjectWorkSpecial surProjectWorkSpecial = new SurProjectWorkSpecial();
|
SurProjectWorkSpecial surProjectWorkSpecial = new SurProjectWorkSpecial();
|
||||||
surProjectWorkSpecial.setIsDel(Convert.toInt(PublicStateEnum.OK.getCode()));
|
|
||||||
if(projectId!=null && !"0".equals(projectId)){
|
if(projectId!=null && !"0".equals(projectId)){
|
||||||
surProjectWorkSpecial.setProjectId(Convert.toLong(projectId));
|
surProjectWorkSpecial.setProjectId(Convert.toLong(projectId));
|
||||||
}
|
}
|
||||||
|
if(StringUtils.isNotBlank(activeName)){
|
||||||
|
surProjectWorkSpecial.setActiveName(activeName);
|
||||||
|
}
|
||||||
|
if(specialType!=null && !"0".equals(specialType)){
|
||||||
|
surProjectWorkSpecial.setSpecialType(specialType);
|
||||||
|
}
|
||||||
return getDataTable(surProjectWorkSpecialService.selectSurProjectWorkSpecialList(surProjectWorkSpecial));
|
return getDataTable(surProjectWorkSpecialService.selectSurProjectWorkSpecialList(surProjectWorkSpecial));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目特种人员数量统计
|
||||||
|
*/
|
||||||
|
@GetMapping("/findWorkSpecialCount")
|
||||||
|
public AjaxResult findWorkSpecialCount(String projectId, String specialType)
|
||||||
|
{
|
||||||
|
SurProjectWorkSpecial surProjectWorkSpecial = new SurProjectWorkSpecial();
|
||||||
|
if(projectId!=null && !"0".equals(projectId)){
|
||||||
|
surProjectWorkSpecial.setProjectId(Convert.toLong(projectId));
|
||||||
|
}
|
||||||
|
if(specialType!=null && !"0".equals(specialType)){
|
||||||
|
surProjectWorkSpecial.setSpecialType(specialType);
|
||||||
|
}
|
||||||
|
return success(surProjectWorkSpecialService.findWorkSpecialCount(surProjectWorkSpecial));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,104 @@
|
||||||
|
package com.yanzhu.jh.project.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
||||||
|
import com.yanzhu.jh.project.service.ISurProjectCheckingService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目验收Controller
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-18
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/project/projectChecking")
|
||||||
|
public class SurProjectCheckingController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISurProjectCheckingService surProjectCheckingService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目验收列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:projectChecking:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SurProjectChecking surProjectChecking)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SurProjectChecking> list = surProjectCheckingService.selectSurProjectCheckingList(surProjectChecking);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出项目验收列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:projectChecking:export')")
|
||||||
|
@Log(title = "项目验收", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SurProjectChecking surProjectChecking)
|
||||||
|
{
|
||||||
|
List<SurProjectChecking> list = surProjectCheckingService.selectSurProjectCheckingList(surProjectChecking);
|
||||||
|
ExcelUtil<SurProjectChecking> util = new ExcelUtil<SurProjectChecking>(SurProjectChecking.class);
|
||||||
|
util.exportExcel(response, list, "项目验收数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目验收详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:projectChecking:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(surProjectCheckingService.selectSurProjectCheckingById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增项目验收
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:projectChecking:add')")
|
||||||
|
@Log(title = "项目验收", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SurProjectChecking surProjectChecking)
|
||||||
|
{
|
||||||
|
return toAjax(surProjectCheckingService.insertSurProjectChecking(surProjectChecking));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目验收
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:projectChecking:edit')")
|
||||||
|
@Log(title = "项目验收", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SurProjectChecking surProjectChecking)
|
||||||
|
{
|
||||||
|
return toAjax(surProjectCheckingService.updateSurProjectChecking(surProjectChecking));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目验收
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:projectChecking:remove')")
|
||||||
|
@Log(title = "项目验收", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(surProjectCheckingService.deleteSurProjectCheckingByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
|
@ -60,6 +60,23 @@ public class SurProjectWorkSpecialController extends BaseController
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目特种人员数量统计
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:surProjectSpecial:list')")
|
||||||
|
@GetMapping("/findWorkSpecialCount")
|
||||||
|
public AjaxResult findWorkSpecialCount(SurProjectWorkSpecial surProjectWorkSpecial)
|
||||||
|
{
|
||||||
|
surProjectWorkSpecial.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||||
|
if(SysRoleEnum.ZGS.getCode().equals(surProjectWorkSpecial.getNowRole())){
|
||||||
|
surProjectWorkSpecial.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||||
|
}else{
|
||||||
|
surProjectWorkSpecial.setNowDept(Convert.toStr(getDeptId()));
|
||||||
|
}
|
||||||
|
surProjectWorkSpecial.setNowUser(Convert.toStr(getUserId()));
|
||||||
|
return success(surProjectWorkSpecialService.findWorkSpecialCount(surProjectWorkSpecial));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出项目特种人员列表
|
* 导出项目特种人员列表
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,325 @@
|
||||||
|
package com.yanzhu.jh.project.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目验收对象 sur_project_checking
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-18
|
||||||
|
*/
|
||||||
|
public class SurProjectChecking extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 项目主键 */
|
||||||
|
@Excel(name = "项目主键")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/** 部门主键 */
|
||||||
|
@Excel(name = "部门主键")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/** 分包单位主键 */
|
||||||
|
@Excel(name = "分包单位主键")
|
||||||
|
private Long groupDeptId;
|
||||||
|
|
||||||
|
/** 验收类型 */
|
||||||
|
@Excel(name = "验收类型")
|
||||||
|
private String checkType;
|
||||||
|
|
||||||
|
/** 验收主图 */
|
||||||
|
@Excel(name = "验收主图")
|
||||||
|
private String mainImage;
|
||||||
|
|
||||||
|
/** 图片列表 */
|
||||||
|
@Excel(name = "图片列表")
|
||||||
|
private String imageUrls;
|
||||||
|
|
||||||
|
/** 验收工序部位类型 */
|
||||||
|
@Excel(name = "验收工序部位类型")
|
||||||
|
private String workingPositionType;
|
||||||
|
|
||||||
|
/** 验收工序部位 */
|
||||||
|
@Excel(name = "验收工序部位")
|
||||||
|
private String checkWorkingPosition;
|
||||||
|
|
||||||
|
/** 验收次数 */
|
||||||
|
@Excel(name = "验收次数")
|
||||||
|
private Long checkingNum;
|
||||||
|
|
||||||
|
/** 验收结果 */
|
||||||
|
@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;
|
||||||
|
|
||||||
|
/** 分包单位用户 */
|
||||||
|
@Excel(name = "分包单位用户")
|
||||||
|
private String groupDeptUser;
|
||||||
|
|
||||||
|
/** 分包单位用户名称 */
|
||||||
|
@Excel(name = "分包单位用户名称")
|
||||||
|
private String groupDeptUserName;
|
||||||
|
|
||||||
|
/** 验收时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "验收时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date checkingDate;
|
||||||
|
|
||||||
|
/** 验收附件 */
|
||||||
|
@Excel(name = "验收附件")
|
||||||
|
private String checkingFiles;
|
||||||
|
|
||||||
|
/** 数据状态 */
|
||||||
|
@Excel(name = "数据状态")
|
||||||
|
private Long isDel;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setProjectId(Long projectId)
|
||||||
|
{
|
||||||
|
this.projectId = projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getProjectId()
|
||||||
|
{
|
||||||
|
return projectId;
|
||||||
|
}
|
||||||
|
public void setDeptId(Long deptId)
|
||||||
|
{
|
||||||
|
this.deptId = deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDeptId()
|
||||||
|
{
|
||||||
|
return deptId;
|
||||||
|
}
|
||||||
|
public void setGroupDeptId(Long groupDeptId)
|
||||||
|
{
|
||||||
|
this.groupDeptId = groupDeptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getGroupDeptId()
|
||||||
|
{
|
||||||
|
return groupDeptId;
|
||||||
|
}
|
||||||
|
public void setCheckType(String checkType)
|
||||||
|
{
|
||||||
|
this.checkType = checkType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckType()
|
||||||
|
{
|
||||||
|
return checkType;
|
||||||
|
}
|
||||||
|
public void setMainImage(String mainImage)
|
||||||
|
{
|
||||||
|
this.mainImage = mainImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMainImage()
|
||||||
|
{
|
||||||
|
return mainImage;
|
||||||
|
}
|
||||||
|
public void setImageUrls(String imageUrls)
|
||||||
|
{
|
||||||
|
this.imageUrls = imageUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImageUrls()
|
||||||
|
{
|
||||||
|
return imageUrls;
|
||||||
|
}
|
||||||
|
public void setWorkingPositionType(String workingPositionType)
|
||||||
|
{
|
||||||
|
this.workingPositionType = workingPositionType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkingPositionType()
|
||||||
|
{
|
||||||
|
return workingPositionType;
|
||||||
|
}
|
||||||
|
public void setCheckWorkingPosition(String checkWorkingPosition)
|
||||||
|
{
|
||||||
|
this.checkWorkingPosition = checkWorkingPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckWorkingPosition()
|
||||||
|
{
|
||||||
|
return checkWorkingPosition;
|
||||||
|
}
|
||||||
|
public void setCheckingNum(Long checkingNum)
|
||||||
|
{
|
||||||
|
this.checkingNum = checkingNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCheckingNum()
|
||||||
|
{
|
||||||
|
return checkingNum;
|
||||||
|
}
|
||||||
|
public void setCheckResult(String checkResult)
|
||||||
|
{
|
||||||
|
this.checkResult = checkResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckResult()
|
||||||
|
{
|
||||||
|
return checkResult;
|
||||||
|
}
|
||||||
|
public void setIntro(String intro)
|
||||||
|
{
|
||||||
|
this.intro = intro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIntro()
|
||||||
|
{
|
||||||
|
return intro;
|
||||||
|
}
|
||||||
|
public void setQualityUser(String qualityUser)
|
||||||
|
{
|
||||||
|
this.qualityUser = qualityUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQualityUser()
|
||||||
|
{
|
||||||
|
return qualityUser;
|
||||||
|
}
|
||||||
|
public void setQualityUserName(String qualityUserName)
|
||||||
|
{
|
||||||
|
this.qualityUserName = qualityUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQualityUserName()
|
||||||
|
{
|
||||||
|
return qualityUserName;
|
||||||
|
}
|
||||||
|
public void setSuperviseUser(String superviseUser)
|
||||||
|
{
|
||||||
|
this.superviseUser = superviseUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuperviseUser()
|
||||||
|
{
|
||||||
|
return superviseUser;
|
||||||
|
}
|
||||||
|
public void setSuperviseUserName(String superviseUserName)
|
||||||
|
{
|
||||||
|
this.superviseUserName = superviseUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuperviseUserName()
|
||||||
|
{
|
||||||
|
return superviseUserName;
|
||||||
|
}
|
||||||
|
public void setGroupDeptUser(String groupDeptUser)
|
||||||
|
{
|
||||||
|
this.groupDeptUser = groupDeptUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGroupDeptUser()
|
||||||
|
{
|
||||||
|
return groupDeptUser;
|
||||||
|
}
|
||||||
|
public void setGroupDeptUserName(String groupDeptUserName)
|
||||||
|
{
|
||||||
|
this.groupDeptUserName = groupDeptUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGroupDeptUserName()
|
||||||
|
{
|
||||||
|
return groupDeptUserName;
|
||||||
|
}
|
||||||
|
public void setCheckingDate(Date checkingDate)
|
||||||
|
{
|
||||||
|
this.checkingDate = checkingDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCheckingDate()
|
||||||
|
{
|
||||||
|
return checkingDate;
|
||||||
|
}
|
||||||
|
public void setCheckingFiles(String checkingFiles)
|
||||||
|
{
|
||||||
|
this.checkingFiles = checkingFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckingFiles()
|
||||||
|
{
|
||||||
|
return checkingFiles;
|
||||||
|
}
|
||||||
|
public void setIsDel(Long isDel)
|
||||||
|
{
|
||||||
|
this.isDel = isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getIsDel()
|
||||||
|
{
|
||||||
|
return isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("projectId", getProjectId())
|
||||||
|
.append("deptId", getDeptId())
|
||||||
|
.append("groupDeptId", getGroupDeptId())
|
||||||
|
.append("checkType", getCheckType())
|
||||||
|
.append("mainImage", getMainImage())
|
||||||
|
.append("imageUrls", getImageUrls())
|
||||||
|
.append("workingPositionType", getWorkingPositionType())
|
||||||
|
.append("checkWorkingPosition", getCheckWorkingPosition())
|
||||||
|
.append("checkingNum", getCheckingNum())
|
||||||
|
.append("checkResult", getCheckResult())
|
||||||
|
.append("intro", getIntro())
|
||||||
|
.append("qualityUser", getQualityUser())
|
||||||
|
.append("qualityUserName", getQualityUserName())
|
||||||
|
.append("superviseUser", getSuperviseUser())
|
||||||
|
.append("superviseUserName", getSuperviseUserName())
|
||||||
|
.append("groupDeptUser", getGroupDeptUser())
|
||||||
|
.append("groupDeptUserName", getGroupDeptUserName())
|
||||||
|
.append("checkingDate", getCheckingDate())
|
||||||
|
.append("checkingFiles", getCheckingFiles())
|
||||||
|
.append("isDel", getIsDel())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -28,6 +28,10 @@ public class SurProjectWorkSpecial extends BaseEntity
|
||||||
@Excel(name = "部门主键")
|
@Excel(name = "部门主键")
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
|
/** 特种人员类型 */
|
||||||
|
@Excel(name = "特种人员类型")
|
||||||
|
private String specialType;
|
||||||
|
|
||||||
/** 姓名 */
|
/** 姓名 */
|
||||||
@Excel(name = "姓名")
|
@Excel(name = "姓名")
|
||||||
private String name;
|
private String name;
|
||||||
|
@ -75,6 +79,7 @@ public class SurProjectWorkSpecial extends BaseEntity
|
||||||
|
|
||||||
private String projectName;
|
private String projectName;
|
||||||
private String deptName;
|
private String deptName;
|
||||||
|
private String specialTypeName;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
|
@ -216,12 +221,29 @@ public class SurProjectWorkSpecial extends BaseEntity
|
||||||
this.credentialType = credentialType;
|
this.credentialType = credentialType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getSpecialType() {
|
||||||
|
return specialType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSpecialType(String specialType) {
|
||||||
|
this.specialType = specialType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSpecialTypeName() {
|
||||||
|
return specialTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSpecialTypeName(String specialTypeName) {
|
||||||
|
this.specialTypeName = specialTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
.append("id", getId())
|
.append("id", getId())
|
||||||
.append("projectId", getProjectId())
|
.append("projectId", getProjectId())
|
||||||
.append("deptId", getDeptId())
|
.append("deptId", getDeptId())
|
||||||
|
.append("specialType", getSpecialType())
|
||||||
.append("name", getName())
|
.append("name", getName())
|
||||||
.append("sex", getSex())
|
.append("sex", getSex())
|
||||||
.append("age", getAge())
|
.append("age", getAge())
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.yanzhu.jh.project.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目验收Mapper接口
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-18
|
||||||
|
*/
|
||||||
|
public interface SurProjectCheckingMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询项目验收
|
||||||
|
*
|
||||||
|
* @param id 项目验收主键
|
||||||
|
* @return 项目验收
|
||||||
|
*/
|
||||||
|
public SurProjectChecking selectSurProjectCheckingById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目验收列表
|
||||||
|
*
|
||||||
|
* @param surProjectChecking 项目验收
|
||||||
|
* @return 项目验收集合
|
||||||
|
*/
|
||||||
|
public List<SurProjectChecking> selectSurProjectCheckingList(SurProjectChecking surProjectChecking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增项目验收
|
||||||
|
*
|
||||||
|
* @param surProjectChecking 项目验收
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurProjectChecking(SurProjectChecking surProjectChecking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目验收
|
||||||
|
*
|
||||||
|
* @param surProjectChecking 项目验收
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurProjectChecking(SurProjectChecking surProjectChecking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目验收
|
||||||
|
*
|
||||||
|
* @param id 项目验收主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectCheckingById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除项目验收
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectCheckingByIds(Long[] ids);
|
||||||
|
}
|
|
@ -29,6 +29,22 @@ public interface SurProjectWorkSpecialMapper
|
||||||
*/
|
*/
|
||||||
public List<SurProjectWorkSpecial> selectSurProjectWorkSpecialList(SurProjectWorkSpecial surProjectWorkSpecial);
|
public List<SurProjectWorkSpecial> selectSurProjectWorkSpecialList(SurProjectWorkSpecial surProjectWorkSpecial);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目特种人员过期数
|
||||||
|
*
|
||||||
|
* @param surProjectWorkSpecial 项目特种人员
|
||||||
|
* @return 项目特种人员集合
|
||||||
|
*/
|
||||||
|
public Integer selectSurProjectWorkSpecialExpired(SurProjectWorkSpecial surProjectWorkSpecial);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目特种人员未过期数
|
||||||
|
*
|
||||||
|
* @param surProjectWorkSpecial 项目特种人员
|
||||||
|
* @return 项目特种人员集合
|
||||||
|
*/
|
||||||
|
public Integer selectSurProjectWorkSpecialNotExpired(SurProjectWorkSpecial surProjectWorkSpecial);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目特种人员统计列表
|
* 查询项目特种人员统计列表
|
||||||
*
|
*
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.yanzhu.jh.project.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目验收Service接口
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-18
|
||||||
|
*/
|
||||||
|
public interface ISurProjectCheckingService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询项目验收
|
||||||
|
*
|
||||||
|
* @param id 项目验收主键
|
||||||
|
* @return 项目验收
|
||||||
|
*/
|
||||||
|
public SurProjectChecking selectSurProjectCheckingById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目验收列表
|
||||||
|
*
|
||||||
|
* @param surProjectChecking 项目验收
|
||||||
|
* @return 项目验收集合
|
||||||
|
*/
|
||||||
|
public List<SurProjectChecking> selectSurProjectCheckingList(SurProjectChecking surProjectChecking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增项目验收
|
||||||
|
*
|
||||||
|
* @param surProjectChecking 项目验收
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurProjectChecking(SurProjectChecking surProjectChecking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目验收
|
||||||
|
*
|
||||||
|
* @param surProjectChecking 项目验收
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurProjectChecking(SurProjectChecking surProjectChecking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除项目验收
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的项目验收主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectCheckingByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目验收信息
|
||||||
|
*
|
||||||
|
* @param id 项目验收主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectCheckingById(Long id);
|
||||||
|
}
|
|
@ -29,6 +29,13 @@ public interface ISurProjectWorkSpecialService
|
||||||
*/
|
*/
|
||||||
public List<SurProjectWorkSpecial> selectSurProjectWorkSpecialList(SurProjectWorkSpecial surProjectWorkSpecial);
|
public List<SurProjectWorkSpecial> selectSurProjectWorkSpecialList(SurProjectWorkSpecial surProjectWorkSpecial);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目特种人员数量统计
|
||||||
|
*
|
||||||
|
* @param surProjectWorkSpecial 项目特种人员
|
||||||
|
* @return 项目特种人员集合
|
||||||
|
*/
|
||||||
|
public Map<String,Object> findWorkSpecialCount(SurProjectWorkSpecial surProjectWorkSpecial);
|
||||||
/**
|
/**
|
||||||
* 查询项目特种人员统计列表
|
* 查询项目特种人员统计列表
|
||||||
*
|
*
|
||||||
|
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.yanzhu.jh.project.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.yanzhu.jh.project.mapper.SurProjectCheckingMapper;
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
||||||
|
import com.yanzhu.jh.project.service.ISurProjectCheckingService;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
/**
|
||||||
|
* 项目验收Service业务层处理
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-18
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SurProjectCheckingServiceImpl implements ISurProjectCheckingService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SurProjectCheckingMapper surProjectCheckingMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目验收
|
||||||
|
*
|
||||||
|
* @param id 项目验收主键
|
||||||
|
* @return 项目验收
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SurProjectChecking selectSurProjectCheckingById(Long id)
|
||||||
|
{
|
||||||
|
return surProjectCheckingMapper.selectSurProjectCheckingById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目验收列表
|
||||||
|
*
|
||||||
|
* @param surProjectChecking 项目验收
|
||||||
|
* @return 项目验收
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SurProjectChecking> selectSurProjectCheckingList(SurProjectChecking surProjectChecking)
|
||||||
|
{
|
||||||
|
return surProjectCheckingMapper.selectSurProjectCheckingList(surProjectChecking);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增项目验收
|
||||||
|
*
|
||||||
|
* @param surProjectChecking 项目验收
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSurProjectChecking(SurProjectChecking surProjectChecking)
|
||||||
|
{
|
||||||
|
surProjectChecking.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
surProjectChecking.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return surProjectCheckingMapper.insertSurProjectChecking(surProjectChecking);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目验收
|
||||||
|
*
|
||||||
|
* @param surProjectChecking 项目验收
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSurProjectChecking(SurProjectChecking surProjectChecking)
|
||||||
|
{
|
||||||
|
surProjectChecking.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
surProjectChecking.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return surProjectCheckingMapper.updateSurProjectChecking(surProjectChecking);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除项目验收
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的项目验收主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectCheckingByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return surProjectCheckingMapper.deleteSurProjectCheckingByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目验收信息
|
||||||
|
*
|
||||||
|
* @param id 项目验收主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectCheckingById(Long id)
|
||||||
|
{
|
||||||
|
return surProjectCheckingMapper.deleteSurProjectCheckingById(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package com.yanzhu.jh.project.service.impl;
|
package com.yanzhu.jh.project.service.impl;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -48,6 +49,20 @@ public class SurProjectWorkSpecialServiceImpl implements ISurProjectWorkSpecialS
|
||||||
return surProjectWorkSpecialMapper.selectSurProjectWorkSpecialList(surProjectWorkSpecial);
|
return surProjectWorkSpecialMapper.selectSurProjectWorkSpecialList(surProjectWorkSpecial);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目特种人员数量统计
|
||||||
|
*
|
||||||
|
* @param surProjectWorkSpecial 项目特种人员
|
||||||
|
* @return 项目特种人员集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String,Object> findWorkSpecialCount(SurProjectWorkSpecial surProjectWorkSpecial) {
|
||||||
|
Map<String,Object> dataMap = new HashMap<>();
|
||||||
|
dataMap.put("expired",surProjectWorkSpecialMapper.selectSurProjectWorkSpecialExpired(surProjectWorkSpecial));
|
||||||
|
dataMap.put("notExpired",surProjectWorkSpecialMapper.selectSurProjectWorkSpecialNotExpired(surProjectWorkSpecial));
|
||||||
|
return dataMap;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目特种人员统计列表
|
* 查询项目特种人员统计列表
|
||||||
*
|
*
|
||||||
|
|
|
@ -0,0 +1,104 @@
|
||||||
|
package com.yanzhu.jh.work.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.yanzhu.jh.work.domain.WorkJournalism;
|
||||||
|
import com.yanzhu.jh.work.service.IWorkJournalismService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 集团新闻Controller
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-18
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/work/workJournalism")
|
||||||
|
public class WorkJournalismController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWorkJournalismService workJournalismService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询集团新闻列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('work:workJournalism:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WorkJournalism workJournalism)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WorkJournalism> list = workJournalismService.selectWorkJournalismList(workJournalism);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出集团新闻列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('work:workJournalism:export')")
|
||||||
|
@Log(title = "集团新闻", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, WorkJournalism workJournalism)
|
||||||
|
{
|
||||||
|
List<WorkJournalism> list = workJournalismService.selectWorkJournalismList(workJournalism);
|
||||||
|
ExcelUtil<WorkJournalism> util = new ExcelUtil<WorkJournalism>(WorkJournalism.class);
|
||||||
|
util.exportExcel(response, list, "集团新闻数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取集团新闻详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('work:workJournalism:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(workJournalismService.selectWorkJournalismById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增集团新闻
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('work:workJournalism:add')")
|
||||||
|
@Log(title = "集团新闻", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody WorkJournalism workJournalism)
|
||||||
|
{
|
||||||
|
return toAjax(workJournalismService.insertWorkJournalism(workJournalism));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改集团新闻
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('work:workJournalism:edit')")
|
||||||
|
@Log(title = "集团新闻", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody WorkJournalism workJournalism)
|
||||||
|
{
|
||||||
|
return toAjax(workJournalismService.updateWorkJournalism(workJournalism));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除集团新闻
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('work:workJournalism:remove')")
|
||||||
|
@Log(title = "集团新闻", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(workJournalismService.deleteWorkJournalismByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,238 @@
|
||||||
|
package com.yanzhu.jh.work.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 集团新闻对象 work_journalism
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-18
|
||||||
|
*/
|
||||||
|
public class WorkJournalism extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 标题 */
|
||||||
|
@Excel(name = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/** 主图 */
|
||||||
|
@Excel(name = "主图")
|
||||||
|
private String mainImage;
|
||||||
|
|
||||||
|
/** 简介 */
|
||||||
|
@Excel(name = "简介")
|
||||||
|
private String intro;
|
||||||
|
|
||||||
|
/** 内容 */
|
||||||
|
@Excel(name = "内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/** 类型 */
|
||||||
|
@Excel(name = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/** 来源 */
|
||||||
|
@Excel(name = "来源")
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
/** 外部地址 */
|
||||||
|
@Excel(name = "外部地址")
|
||||||
|
private String openUrl;
|
||||||
|
|
||||||
|
/** 阅读次数 */
|
||||||
|
@Excel(name = "阅读次数")
|
||||||
|
private Long readNum;
|
||||||
|
|
||||||
|
/** 状态标识 */
|
||||||
|
@Excel(name = "状态标识")
|
||||||
|
private String statusFlag;
|
||||||
|
|
||||||
|
/** 置顶标识 */
|
||||||
|
@Excel(name = "置顶标识")
|
||||||
|
private String topFlag;
|
||||||
|
|
||||||
|
/** 相关附件 */
|
||||||
|
@Excel(name = "相关附件")
|
||||||
|
private String files;
|
||||||
|
|
||||||
|
/** 排序 */
|
||||||
|
@Excel(name = "排序")
|
||||||
|
private Long sortNum;
|
||||||
|
|
||||||
|
/** 数据状态 */
|
||||||
|
@Excel(name = "数据状态")
|
||||||
|
private Long isDel;
|
||||||
|
|
||||||
|
/** 创建用户 */
|
||||||
|
@Excel(name = "创建用户")
|
||||||
|
private String createUser;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setTitle(String title)
|
||||||
|
{
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle()
|
||||||
|
{
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
public void setMainImage(String mainImage)
|
||||||
|
{
|
||||||
|
this.mainImage = mainImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMainImage()
|
||||||
|
{
|
||||||
|
return mainImage;
|
||||||
|
}
|
||||||
|
public void setIntro(String intro)
|
||||||
|
{
|
||||||
|
this.intro = intro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIntro()
|
||||||
|
{
|
||||||
|
return intro;
|
||||||
|
}
|
||||||
|
public void setContent(String content)
|
||||||
|
{
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent()
|
||||||
|
{
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
public void setType(String type)
|
||||||
|
{
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType()
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
public void setSource(String source)
|
||||||
|
{
|
||||||
|
this.source = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSource()
|
||||||
|
{
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
public void setOpenUrl(String openUrl)
|
||||||
|
{
|
||||||
|
this.openUrl = openUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOpenUrl()
|
||||||
|
{
|
||||||
|
return openUrl;
|
||||||
|
}
|
||||||
|
public void setReadNum(Long readNum)
|
||||||
|
{
|
||||||
|
this.readNum = readNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getReadNum()
|
||||||
|
{
|
||||||
|
return readNum;
|
||||||
|
}
|
||||||
|
public void setStatusFlag(String statusFlag)
|
||||||
|
{
|
||||||
|
this.statusFlag = statusFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatusFlag()
|
||||||
|
{
|
||||||
|
return statusFlag;
|
||||||
|
}
|
||||||
|
public void setTopFlag(String topFlag)
|
||||||
|
{
|
||||||
|
this.topFlag = topFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTopFlag()
|
||||||
|
{
|
||||||
|
return topFlag;
|
||||||
|
}
|
||||||
|
public void setFiles(String files)
|
||||||
|
{
|
||||||
|
this.files = files;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFiles()
|
||||||
|
{
|
||||||
|
return files;
|
||||||
|
}
|
||||||
|
public void setSortNum(Long sortNum)
|
||||||
|
{
|
||||||
|
this.sortNum = sortNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSortNum()
|
||||||
|
{
|
||||||
|
return sortNum;
|
||||||
|
}
|
||||||
|
public void setIsDel(Long isDel)
|
||||||
|
{
|
||||||
|
this.isDel = isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getIsDel()
|
||||||
|
{
|
||||||
|
return isDel;
|
||||||
|
}
|
||||||
|
public void setCreateUser(String createUser)
|
||||||
|
{
|
||||||
|
this.createUser = createUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateUser()
|
||||||
|
{
|
||||||
|
return createUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("title", getTitle())
|
||||||
|
.append("mainImage", getMainImage())
|
||||||
|
.append("intro", getIntro())
|
||||||
|
.append("content", getContent())
|
||||||
|
.append("type", getType())
|
||||||
|
.append("source", getSource())
|
||||||
|
.append("openUrl", getOpenUrl())
|
||||||
|
.append("readNum", getReadNum())
|
||||||
|
.append("statusFlag", getStatusFlag())
|
||||||
|
.append("topFlag", getTopFlag())
|
||||||
|
.append("files", getFiles())
|
||||||
|
.append("sortNum", getSortNum())
|
||||||
|
.append("isDel", getIsDel())
|
||||||
|
.append("createUser", getCreateUser())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -66,6 +66,10 @@ public class WorkTrain extends BaseEntity
|
||||||
@Excel(name = "演训内容")
|
@Excel(name = "演训内容")
|
||||||
private String trainContent;
|
private String trainContent;
|
||||||
|
|
||||||
|
/** 演训内容 */
|
||||||
|
@Excel(name = "演训内容")
|
||||||
|
private String trainFile;
|
||||||
|
|
||||||
/** 演练培训协同部门信息 */
|
/** 演练培训协同部门信息 */
|
||||||
private List<WorkTrainDept> workTrainDeptList;
|
private List<WorkTrainDept> workTrainDeptList;
|
||||||
|
|
||||||
|
@ -230,6 +234,14 @@ public class WorkTrain extends BaseEntity
|
||||||
this.trainTitle = trainTitle;
|
this.trainTitle = trainTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTrainFile() {
|
||||||
|
return trainFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrainFile(String trainFile) {
|
||||||
|
this.trainFile = trainFile;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
@ -243,6 +255,8 @@ public class WorkTrain extends BaseEntity
|
||||||
.append("trainParticipants", getTrainParticipants())
|
.append("trainParticipants", getTrainParticipants())
|
||||||
.append("beginDate", getBeginDate())
|
.append("beginDate", getBeginDate())
|
||||||
.append("endDate", getEndDate())
|
.append("endDate", getEndDate())
|
||||||
|
.append("trainContent", getTrainContent())
|
||||||
|
.append("trainFile", getTrainFile())
|
||||||
.append("isDel", getIsDel())
|
.append("isDel", getIsDel())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.yanzhu.jh.work.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.yanzhu.jh.work.domain.WorkJournalism;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 集团新闻Mapper接口
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-18
|
||||||
|
*/
|
||||||
|
public interface WorkJournalismMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询集团新闻
|
||||||
|
*
|
||||||
|
* @param id 集团新闻主键
|
||||||
|
* @return 集团新闻
|
||||||
|
*/
|
||||||
|
public WorkJournalism selectWorkJournalismById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询集团新闻列表
|
||||||
|
*
|
||||||
|
* @param workJournalism 集团新闻
|
||||||
|
* @return 集团新闻集合
|
||||||
|
*/
|
||||||
|
public List<WorkJournalism> selectWorkJournalismList(WorkJournalism workJournalism);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增集团新闻
|
||||||
|
*
|
||||||
|
* @param workJournalism 集团新闻
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWorkJournalism(WorkJournalism workJournalism);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改集团新闻
|
||||||
|
*
|
||||||
|
* @param workJournalism 集团新闻
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWorkJournalism(WorkJournalism workJournalism);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除集团新闻
|
||||||
|
*
|
||||||
|
* @param id 集团新闻主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWorkJournalismById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除集团新闻
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWorkJournalismByIds(Long[] ids);
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.yanzhu.jh.work.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.yanzhu.jh.work.domain.WorkJournalism;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 集团新闻Service接口
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-18
|
||||||
|
*/
|
||||||
|
public interface IWorkJournalismService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询集团新闻
|
||||||
|
*
|
||||||
|
* @param id 集团新闻主键
|
||||||
|
* @return 集团新闻
|
||||||
|
*/
|
||||||
|
public WorkJournalism selectWorkJournalismById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询集团新闻列表
|
||||||
|
*
|
||||||
|
* @param workJournalism 集团新闻
|
||||||
|
* @return 集团新闻集合
|
||||||
|
*/
|
||||||
|
public List<WorkJournalism> selectWorkJournalismList(WorkJournalism workJournalism);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增集团新闻
|
||||||
|
*
|
||||||
|
* @param workJournalism 集团新闻
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWorkJournalism(WorkJournalism workJournalism);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改集团新闻
|
||||||
|
*
|
||||||
|
* @param workJournalism 集团新闻
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWorkJournalism(WorkJournalism workJournalism);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除集团新闻
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的集团新闻主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWorkJournalismByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除集团新闻信息
|
||||||
|
*
|
||||||
|
* @param id 集团新闻主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWorkJournalismById(Long id);
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.yanzhu.jh.work.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.yanzhu.jh.work.mapper.WorkJournalismMapper;
|
||||||
|
import com.yanzhu.jh.work.domain.WorkJournalism;
|
||||||
|
import com.yanzhu.jh.work.service.IWorkJournalismService;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
/**
|
||||||
|
* 集团新闻Service业务层处理
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-18
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WorkJournalismServiceImpl implements IWorkJournalismService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WorkJournalismMapper workJournalismMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询集团新闻
|
||||||
|
*
|
||||||
|
* @param id 集团新闻主键
|
||||||
|
* @return 集团新闻
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WorkJournalism selectWorkJournalismById(Long id)
|
||||||
|
{
|
||||||
|
return workJournalismMapper.selectWorkJournalismById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询集团新闻列表
|
||||||
|
*
|
||||||
|
* @param workJournalism 集团新闻
|
||||||
|
* @return 集团新闻
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<WorkJournalism> selectWorkJournalismList(WorkJournalism workJournalism)
|
||||||
|
{
|
||||||
|
return workJournalismMapper.selectWorkJournalismList(workJournalism);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增集团新闻
|
||||||
|
*
|
||||||
|
* @param workJournalism 集团新闻
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertWorkJournalism(WorkJournalism workJournalism)
|
||||||
|
{
|
||||||
|
workJournalism.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
workJournalism.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return workJournalismMapper.insertWorkJournalism(workJournalism);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改集团新闻
|
||||||
|
*
|
||||||
|
* @param workJournalism 集团新闻
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateWorkJournalism(WorkJournalism workJournalism)
|
||||||
|
{
|
||||||
|
workJournalism.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
workJournalism.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return workJournalismMapper.updateWorkJournalism(workJournalism);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除集团新闻
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的集团新闻主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWorkJournalismByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return workJournalismMapper.deleteWorkJournalismByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除集团新闻信息
|
||||||
|
*
|
||||||
|
* @param id 集团新闻主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWorkJournalismById(Long id)
|
||||||
|
{
|
||||||
|
return workJournalismMapper.deleteWorkJournalismById(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -165,7 +165,7 @@ public class WorkTrainServiceImpl implements IWorkTrainService
|
||||||
SurProject surProject = surProjectMapper.selectSurProjectById(workTrain.getProjectId());
|
SurProject surProject = surProjectMapper.selectSurProjectById(workTrain.getProjectId());
|
||||||
dept.setDeptId(surProject.getDeptId());
|
dept.setDeptId(surProject.getDeptId());
|
||||||
}else{
|
}else{
|
||||||
dept.setDeptId(SecurityUtils.getDeptId());
|
dept.setDeptId(sysDept.getDeptId());
|
||||||
}
|
}
|
||||||
dept.setIsMain(PublicStateEnum.YES.getCode());
|
dept.setIsMain(PublicStateEnum.YES.getCode());
|
||||||
workTrainDeptList.add(dept);
|
workTrainDeptList.add(dept);
|
||||||
|
@ -176,7 +176,9 @@ public class WorkTrainServiceImpl implements IWorkTrainService
|
||||||
for (WorkTrainDept workTrainDept : workTrainDeptList)
|
for (WorkTrainDept workTrainDept : workTrainDeptList)
|
||||||
{
|
{
|
||||||
workTrainDept.setTrainId(id);
|
workTrainDept.setTrainId(id);
|
||||||
|
if(workTrainDept.getIsMain()==null){
|
||||||
workTrainDept.setIsMain(PublicStateEnum.NO.getCode());
|
workTrainDept.setIsMain(PublicStateEnum.NO.getCode());
|
||||||
|
}
|
||||||
list.add(workTrainDept);
|
list.add(workTrainDept);
|
||||||
}
|
}
|
||||||
if (list.size() > 0)
|
if (list.size() > 0)
|
||||||
|
|
|
@ -0,0 +1,166 @@
|
||||||
|
<?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.SurProjectCheckingMapper">
|
||||||
|
|
||||||
|
<resultMap type="SurProjectChecking" id="SurProjectCheckingResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="projectId" column="project_id" />
|
||||||
|
<result property="deptId" column="dept_id" />
|
||||||
|
<result property="groupDeptId" column="group_dept_id" />
|
||||||
|
<result property="checkType" column="check_type" />
|
||||||
|
<result property="mainImage" column="main_image" />
|
||||||
|
<result property="imageUrls" column="image_urls" />
|
||||||
|
<result property="workingPositionType" column="working_position_type" />
|
||||||
|
<result property="checkWorkingPosition" column="check_working_position" />
|
||||||
|
<result property="checkingNum" column="checking_num" />
|
||||||
|
<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="groupDeptUser" column="group_dept_user" />
|
||||||
|
<result property="groupDeptUserName" column="group_dept_user_name" />
|
||||||
|
<result property="checkingDate" column="checking_date" />
|
||||||
|
<result property="checkingFiles" column="checking_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" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSurProjectCheckingVo">
|
||||||
|
select id, project_id, dept_id, group_dept_id, check_type, main_image, image_urls, working_position_type, check_working_position, checking_num, check_result, intro, quality_user, quality_user_name, supervise_user, supervise_user_name, group_dept_user, group_dept_user_name, checking_date, checking_files, is_del, create_by, create_time, update_by, update_time, remark from sur_project_checking
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSurProjectCheckingList" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">
|
||||||
|
<include refid="selectSurProjectCheckingVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||||
|
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||||
|
<if test="groupDeptId != null "> and group_dept_id = #{groupDeptId}</if>
|
||||||
|
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if>
|
||||||
|
<if test="workingPositionType != null and workingPositionType != ''"> and working_position_type = #{workingPositionType}</if>
|
||||||
|
<if test="checkWorkingPosition != null and checkWorkingPosition != ''"> and check_working_position like concat('%', #{checkWorkingPosition}, '%')</if>
|
||||||
|
<if test="checkResult != null and checkResult != ''"> and check_result = #{checkResult}</if>
|
||||||
|
<if test="qualityUser != null and qualityUser != ''"> and quality_user like concat('%', #{qualityUser}, '%')</if>
|
||||||
|
<if test="qualityUserName != null and qualityUserName != ''"> and quality_user_name like concat('%', #{qualityUserName}, '%')</if>
|
||||||
|
<if test="superviseUser != null and superviseUser != ''"> and supervise_user like concat('%', #{superviseUser}, '%')</if>
|
||||||
|
<if test="superviseUserName != null and superviseUserName != ''"> and supervise_user_name like concat('%', #{superviseUserName}, '%')</if>
|
||||||
|
<if test="groupDeptUser != null and groupDeptUser != ''"> and group_dept_user like concat('%', #{groupDeptUser}, '%')</if>
|
||||||
|
<if test="groupDeptUserName != null and groupDeptUserName != ''"> and group_dept_user_name like concat('%', #{groupDeptUserName}, '%')</if>
|
||||||
|
<if test="params.beginCheckingDate != null and params.beginCheckingDate != '' and params.endCheckingDate != null and params.endCheckingDate != ''"> and checking_date between #{params.beginCheckingDate} and #{params.endCheckingDate}</if>
|
||||||
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSurProjectCheckingById" parameterType="Long" resultMap="SurProjectCheckingResult">
|
||||||
|
<include refid="selectSurProjectCheckingVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSurProjectChecking" parameterType="SurProjectChecking" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sur_project_checking
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="projectId != null">project_id,</if>
|
||||||
|
<if test="deptId != null">dept_id,</if>
|
||||||
|
<if test="groupDeptId != null">group_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="workingPositionType != null">working_position_type,</if>
|
||||||
|
<if test="checkWorkingPosition != null">check_working_position,</if>
|
||||||
|
<if test="checkingNum != null">checking_num,</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="groupDeptUser != null">group_dept_user,</if>
|
||||||
|
<if test="groupDeptUserName != null">group_dept_user_name,</if>
|
||||||
|
<if test="checkingDate != null">checking_date,</if>
|
||||||
|
<if test="checkingFiles != null">checking_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>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="projectId != null">#{projectId},</if>
|
||||||
|
<if test="deptId != null">#{deptId},</if>
|
||||||
|
<if test="groupDeptId != null">#{groupDeptId},</if>
|
||||||
|
<if test="checkType != null">#{checkType},</if>
|
||||||
|
<if test="mainImage != null">#{mainImage},</if>
|
||||||
|
<if test="imageUrls != null">#{imageUrls},</if>
|
||||||
|
<if test="workingPositionType != null">#{workingPositionType},</if>
|
||||||
|
<if test="checkWorkingPosition != null">#{checkWorkingPosition},</if>
|
||||||
|
<if test="checkingNum != null">#{checkingNum},</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="groupDeptUser != null">#{groupDeptUser},</if>
|
||||||
|
<if test="groupDeptUserName != null">#{groupDeptUserName},</if>
|
||||||
|
<if test="checkingDate != null">#{checkingDate},</if>
|
||||||
|
<if test="checkingFiles != null">#{checkingFiles},</if>
|
||||||
|
<if test="isDel != null">#{isDel},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSurProjectChecking" parameterType="SurProjectChecking">
|
||||||
|
update sur_project_checking
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="projectId != null">project_id = #{projectId},</if>
|
||||||
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||||
|
<if test="groupDeptId != null">group_dept_id = #{groupDeptId},</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="workingPositionType != null">working_position_type = #{workingPositionType},</if>
|
||||||
|
<if test="checkWorkingPosition != null">check_working_position = #{checkWorkingPosition},</if>
|
||||||
|
<if test="checkingNum != null">checking_num = #{checkingNum},</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="groupDeptUser != null">group_dept_user = #{groupDeptUser},</if>
|
||||||
|
<if test="groupDeptUserName != null">group_dept_user_name = #{groupDeptUserName},</if>
|
||||||
|
<if test="checkingDate != null">checking_date = #{checkingDate},</if>
|
||||||
|
<if test="checkingFiles != null">checking_files = #{checkingFiles},</if>
|
||||||
|
<if test="isDel != null">is_del = #{isDel},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSurProjectCheckingById" parameterType="Long">
|
||||||
|
delete from sur_project_checking where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSurProjectCheckingByIds" parameterType="String">
|
||||||
|
delete from sur_project_checking where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
|
@ -8,6 +8,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="projectId" column="project_id" />
|
<result property="projectId" column="project_id" />
|
||||||
<result property="deptId" column="dept_id" />
|
<result property="deptId" column="dept_id" />
|
||||||
|
<result property="specialType" column="special_type" />
|
||||||
|
<result property="specialTypeName" column="special_type_name" />
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name" />
|
||||||
<result property="sex" column="sex" />
|
<result property="sex" column="sex" />
|
||||||
<result property="age" column="age" />
|
<result property="age" column="age" />
|
||||||
|
@ -29,13 +31,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSurProjectWorkSpecialVo">
|
<sql id="selectSurProjectWorkSpecialVo">
|
||||||
select id, project_id, dept_id, name, sex, age, phone_number, id_number, is_credential, credential_number, credential_expiration_time, credential_file, credential_type, is_del, create_by, create_time, update_by, update_time, remark from sur_project_work_special
|
select id, project_id, dept_id, special_type, name, sex, age, phone_number, id_number, is_credential, credential_number, credential_expiration_time, credential_file, credential_type, is_del, create_by, create_time, update_by, update_time, remark from sur_project_work_special
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSurProjectWorkSpecialList" parameterType="SurProjectWorkSpecial" resultMap="SurProjectWorkSpecialResult">
|
<select id="selectSurProjectWorkSpecialList" parameterType="SurProjectWorkSpecial" resultMap="SurProjectWorkSpecialResult">
|
||||||
select spwp.id, spwp.project_id, spwp.dept_id, spwp.name, spwp.sex, spwp.age, spwp.phone_number, spwp.id_number, spwp.is_credential, spwp.credential_number, spwp.credential_expiration_time, spwp.credential_file, spwp.credential_type, spwp.is_del, spwp.create_by, spwp.create_time, spwp.update_by, spwp.update_time, spwp.remark, sp.projectName, sd.dept_name from sur_project_work_special spwp
|
select spwp.id, spwp.project_id, spwp.dept_id, spwp.special_type, sdd.dict_label as special_type_name, spwp.name, spwp.sex, spwp.age, spwp.phone_number, spwp.id_number, spwp.is_credential, spwp.credential_number, spwp.credential_expiration_time, spwp.credential_file, spwp.credential_type, spwp.is_del, spwp.create_by, spwp.create_time, spwp.update_by, spwp.update_time, spwp.remark, sp.projectName, sd.dept_name from sur_project_work_special spwp
|
||||||
left join sur_project sp on sp.id = spwp.project_id
|
left join sur_project sp on sp.id = spwp.project_id
|
||||||
left join sys_dept sd on sd.dept_id = spwp.dept_id
|
left join sys_dept sd on sd.dept_id = spwp.dept_id
|
||||||
|
left join sys_dict_data sdd on sdd.dict_type = 'project_special_type' and sdd.dict_value = spwp.special_type
|
||||||
<where>
|
<where>
|
||||||
and spwp.is_del=0
|
and spwp.is_del=0
|
||||||
<if test="projectId != null "> and spwp.project_id = #{projectId}</if>
|
<if test="projectId != null "> and spwp.project_id = #{projectId}</if>
|
||||||
|
@ -48,6 +51,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="params.beginCredentialExpirationTime != null and params.beginCredentialExpirationTime != '' and params.endCredentialExpirationTime != null and params.endCredentialExpirationTime != ''"> and spwp.credential_expiration_time between #{params.beginCredentialExpirationTime} and #{params.endCredentialExpirationTime}</if>
|
<if test="params.beginCredentialExpirationTime != null and params.beginCredentialExpirationTime != '' and params.endCredentialExpirationTime != null and params.endCredentialExpirationTime != ''"> and spwp.credential_expiration_time between #{params.beginCredentialExpirationTime} and #{params.endCredentialExpirationTime}</if>
|
||||||
<if test="isDel != null and isDel != ''"> and spwp.is_del = #{isDel}</if>
|
<if test="isDel != null and isDel != ''"> and spwp.is_del = #{isDel}</if>
|
||||||
<if test="credentialType != null and credentialType != ''"> and spwp.credential_type = #{credentialType}</if>
|
<if test="credentialType != null and credentialType != ''"> and spwp.credential_type = #{credentialType}</if>
|
||||||
|
<if test="specialType != null and credentialType != ''"> and spwp.special_type = #{specialType}</if>
|
||||||
|
<!-- 查询条件-项目部门 -->
|
||||||
|
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||||
|
<!--子部门数据-->
|
||||||
|
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
|
||||||
|
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||||
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select DISTINCT spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
|
||||||
|
<if test='nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
|
||||||
|
<if test='activeName == "wgq"'> and date(spwp.credential_expiration_time) <![CDATA[ < ]]> date(NOW())</if>
|
||||||
|
<if test='activeName == "ygq"'> and date(spwp.credential_expiration_time) <![CDATA[ >= ]]> date(NOW())</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSurProjectWorkSpecialExpired" parameterType="SurProjectWorkSpecial" resultType="integer">
|
||||||
|
select count(1) as total from sur_project_work_special spwp
|
||||||
|
left join sur_project sp on sp.id = spwp.project_id
|
||||||
|
<where>
|
||||||
|
and spwp.is_del=0
|
||||||
|
and date(spwp.credential_expiration_time) <![CDATA[ < ]]> date(NOW())
|
||||||
|
<if test="projectId != null "> and spwp.project_id = #{projectId}</if>
|
||||||
|
<if test="deptId != null "> and spwp.dept_id = #{deptId}</if>
|
||||||
|
<if test="name != null and name != ''"> and spwp.name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
||||||
|
<if test="isCredential != null and isCredential != ''"> and spwp.is_credential = #{isCredential}</if>
|
||||||
|
<if test="phoneNumber != null and phoneNumber != ''"> and spwp.phone_number like concat('%', #{phoneNumber}, '%')</if>
|
||||||
|
<if test="credentialNumber != null and credentialNumber != ''"> and spwp.credential_number like concat('%', #{credentialNumber}, '%')</if>
|
||||||
|
<if test="params.beginCredentialExpirationTime != null and params.beginCredentialExpirationTime != '' and params.endCredentialExpirationTime != null and params.endCredentialExpirationTime != ''"> and spwp.credential_expiration_time between #{params.beginCredentialExpirationTime} and #{params.endCredentialExpirationTime}</if>
|
||||||
|
<if test="isDel != null and isDel != ''"> and spwp.is_del = #{isDel}</if>
|
||||||
|
<if test="credentialType != null and credentialType != ''"> and spwp.credential_type = #{credentialType}</if>
|
||||||
|
<if test="specialType != null and credentialType != ''"> and spwp.special_type = #{specialType}</if>
|
||||||
|
<!-- 查询条件-项目部门 -->
|
||||||
|
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||||
|
<!--子部门数据-->
|
||||||
|
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
|
||||||
|
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||||
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select DISTINCT spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
|
||||||
|
<if test='nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSurProjectWorkSpecialNotExpired" parameterType="SurProjectWorkSpecial" resultType="integer">
|
||||||
|
select count(1) as total from sur_project_work_special spwp
|
||||||
|
left join sur_project sp on sp.id = spwp.project_id
|
||||||
|
<where>
|
||||||
|
and spwp.is_del=0
|
||||||
|
and date(spwp.credential_expiration_time) <![CDATA[ >= ]]> date(NOW())
|
||||||
|
<if test="projectId != null "> and spwp.project_id = #{projectId}</if>
|
||||||
|
<if test="deptId != null "> and spwp.dept_id = #{deptId}</if>
|
||||||
|
<if test="name != null and name != ''"> and spwp.name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
||||||
|
<if test="isCredential != null and isCredential != ''"> and spwp.is_credential = #{isCredential}</if>
|
||||||
|
<if test="phoneNumber != null and phoneNumber != ''"> and spwp.phone_number like concat('%', #{phoneNumber}, '%')</if>
|
||||||
|
<if test="credentialNumber != null and credentialNumber != ''"> and spwp.credential_number like concat('%', #{credentialNumber}, '%')</if>
|
||||||
|
<if test="params.beginCredentialExpirationTime != null and params.beginCredentialExpirationTime != '' and params.endCredentialExpirationTime != null and params.endCredentialExpirationTime != ''"> and spwp.credential_expiration_time between #{params.beginCredentialExpirationTime} and #{params.endCredentialExpirationTime}</if>
|
||||||
|
<if test="isDel != null and isDel != ''"> and spwp.is_del = #{isDel}</if>
|
||||||
|
<if test="credentialType != null and credentialType != ''"> and spwp.credential_type = #{credentialType}</if>
|
||||||
|
<if test="specialType != null and credentialType != ''"> and spwp.special_type = #{specialType}</if>
|
||||||
<!-- 查询条件-项目部门 -->
|
<!-- 查询条件-项目部门 -->
|
||||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||||
<!--子部门数据-->
|
<!--子部门数据-->
|
||||||
|
@ -123,6 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="projectId != null">project_id,</if>
|
<if test="projectId != null">project_id,</if>
|
||||||
<if test="deptId != null">dept_id,</if>
|
<if test="deptId != null">dept_id,</if>
|
||||||
|
<if test="specialType != null">special_type,</if>
|
||||||
<if test="name != null">name,</if>
|
<if test="name != null">name,</if>
|
||||||
<if test="sex != null">sex,</if>
|
<if test="sex != null">sex,</if>
|
||||||
<if test="age != null">age,</if>
|
<if test="age != null">age,</if>
|
||||||
|
@ -143,6 +204,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="projectId != null">#{projectId},</if>
|
<if test="projectId != null">#{projectId},</if>
|
||||||
<if test="deptId != null">#{deptId},</if>
|
<if test="deptId != null">#{deptId},</if>
|
||||||
|
<if test="specialType != null">#{specialType},</if>
|
||||||
<if test="name != null">#{name},</if>
|
<if test="name != null">#{name},</if>
|
||||||
<if test="sex != null">#{sex},</if>
|
<if test="sex != null">#{sex},</if>
|
||||||
<if test="age != null">#{age},</if>
|
<if test="age != null">#{age},</if>
|
||||||
|
@ -167,6 +229,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="projectId != null">project_id = #{projectId},</if>
|
<if test="projectId != null">project_id = #{projectId},</if>
|
||||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||||
|
<if test="specialType != null">special_type = #{specialType},</if>
|
||||||
<if test="name != null">name = #{name},</if>
|
<if test="name != null">name = #{name},</if>
|
||||||
<if test="sex != null">sex = #{sex},</if>
|
<if test="sex != null">sex = #{sex},</if>
|
||||||
<if test="age != null">age = #{age},</if>
|
<if test="age != null">age = #{age},</if>
|
||||||
|
|
|
@ -123,7 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<!--整改超时数-->
|
<!--整改超时数-->
|
||||||
<select id="findProblemmodifyTimeoutCount" parameterType="SmzSspProblemmodify" resultType="Integer">
|
<select id="findProblemmodifyTimeoutCount" parameterType="SmzSspProblemmodify" resultType="Integer">
|
||||||
SELECT ssp.checkState,COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp
|
SELECT COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp
|
||||||
left join sur_project sp on ssp.projectId = sp.id
|
left join sur_project sp on ssp.projectId = sp.id
|
||||||
<!--监理单位/总包公司/分包单位-->
|
<!--监理单位/总包公司/分包单位-->
|
||||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||||
|
|
|
@ -0,0 +1,133 @@
|
||||||
|
<?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.work.mapper.WorkJournalismMapper">
|
||||||
|
|
||||||
|
<resultMap type="WorkJournalism" id="WorkJournalismResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="title" column="title" />
|
||||||
|
<result property="mainImage" column="main_image" />
|
||||||
|
<result property="intro" column="intro" />
|
||||||
|
<result property="content" column="content" />
|
||||||
|
<result property="type" column="type" />
|
||||||
|
<result property="source" column="source" />
|
||||||
|
<result property="openUrl" column="open_url" />
|
||||||
|
<result property="readNum" column="read_num" />
|
||||||
|
<result property="statusFlag" column="status_flag" />
|
||||||
|
<result property="topFlag" column="top_flag" />
|
||||||
|
<result property="files" column="files" />
|
||||||
|
<result property="sortNum" column="sort_num" />
|
||||||
|
<result property="isDel" column="is_del" />
|
||||||
|
<result property="createUser" column="create_user" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectWorkJournalismVo">
|
||||||
|
select id, title, main_image, intro, content, type, source, open_url, read_num, status_flag, top_flag, files, sort_num, is_del, create_user, create_by, create_time, update_by, update_time, remark from work_journalism
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectWorkJournalismList" parameterType="WorkJournalism" resultMap="WorkJournalismResult">
|
||||||
|
<include refid="selectWorkJournalismVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
|
||||||
|
<if test="statusFlag != null and statusFlag != ''"> and status_flag = #{statusFlag}</if>
|
||||||
|
<if test="topFlag != null and topFlag != ''"> and top_flag = #{topFlag}</if>
|
||||||
|
<if test="sortNum != null "> and sort_num = #{sortNum}</if>
|
||||||
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||||
|
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWorkJournalismById" parameterType="Long" resultMap="WorkJournalismResult">
|
||||||
|
<include refid="selectWorkJournalismVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertWorkJournalism" parameterType="WorkJournalism" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into work_journalism
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="title != null">title,</if>
|
||||||
|
<if test="mainImage != null">main_image,</if>
|
||||||
|
<if test="intro != null">intro,</if>
|
||||||
|
<if test="content != null">content,</if>
|
||||||
|
<if test="type != null">type,</if>
|
||||||
|
<if test="source != null">source,</if>
|
||||||
|
<if test="openUrl != null">open_url,</if>
|
||||||
|
<if test="readNum != null">read_num,</if>
|
||||||
|
<if test="statusFlag != null">status_flag,</if>
|
||||||
|
<if test="topFlag != null">top_flag,</if>
|
||||||
|
<if test="files != null">files,</if>
|
||||||
|
<if test="sortNum != null">sort_num,</if>
|
||||||
|
<if test="isDel != null">is_del,</if>
|
||||||
|
<if test="createUser != null">create_user,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="title != null">#{title},</if>
|
||||||
|
<if test="mainImage != null">#{mainImage},</if>
|
||||||
|
<if test="intro != null">#{intro},</if>
|
||||||
|
<if test="content != null">#{content},</if>
|
||||||
|
<if test="type != null">#{type},</if>
|
||||||
|
<if test="source != null">#{source},</if>
|
||||||
|
<if test="openUrl != null">#{openUrl},</if>
|
||||||
|
<if test="readNum != null">#{readNum},</if>
|
||||||
|
<if test="statusFlag != null">#{statusFlag},</if>
|
||||||
|
<if test="topFlag != null">#{topFlag},</if>
|
||||||
|
<if test="files != null">#{files},</if>
|
||||||
|
<if test="sortNum != null">#{sortNum},</if>
|
||||||
|
<if test="isDel != null">#{isDel},</if>
|
||||||
|
<if test="createUser != null">#{createUser},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateWorkJournalism" parameterType="WorkJournalism">
|
||||||
|
update work_journalism
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="title != null">title = #{title},</if>
|
||||||
|
<if test="mainImage != null">main_image = #{mainImage},</if>
|
||||||
|
<if test="intro != null">intro = #{intro},</if>
|
||||||
|
<if test="content != null">content = #{content},</if>
|
||||||
|
<if test="type != null">type = #{type},</if>
|
||||||
|
<if test="source != null">source = #{source},</if>
|
||||||
|
<if test="openUrl != null">open_url = #{openUrl},</if>
|
||||||
|
<if test="readNum != null">read_num = #{readNum},</if>
|
||||||
|
<if test="statusFlag != null">status_flag = #{statusFlag},</if>
|
||||||
|
<if test="topFlag != null">top_flag = #{topFlag},</if>
|
||||||
|
<if test="files != null">files = #{files},</if>
|
||||||
|
<if test="sortNum != null">sort_num = #{sortNum},</if>
|
||||||
|
<if test="isDel != null">is_del = #{isDel},</if>
|
||||||
|
<if test="createUser != null">create_user = #{createUser},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteWorkJournalismById" parameterType="Long">
|
||||||
|
delete from work_journalism where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWorkJournalismByIds" parameterType="String">
|
||||||
|
delete from work_journalism where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
|
@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="beginDate" column="begin_date" />
|
<result property="beginDate" column="begin_date" />
|
||||||
<result property="endDate" column="end_date" />
|
<result property="endDate" column="end_date" />
|
||||||
<result property="trainContent" column="train_content" />
|
<result property="trainContent" column="train_content" />
|
||||||
|
<result property="trainFile" column="train_file" />
|
||||||
<result property="isDel" column="is_del" />
|
<result property="isDel" column="is_del" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
|
@ -38,11 +39,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectWorkTrainVo">
|
<sql id="selectWorkTrainVo">
|
||||||
select id, project_id, project_name, main_image, train_type, train_title,train_nature, train_participants, begin_date, end_date, train_content, is_del, create_by, create_time, update_by, update_time, remark from work_train
|
select id, project_id, project_name, main_image, train_type, train_title,train_nature, train_participants, begin_date, end_date, train_content, train_file, is_del, create_by, create_time, update_by, update_time, remark from work_train
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectWorkTrainList" parameterType="WorkTrain" resultMap="WorkTrainResult">
|
<select id="selectWorkTrainList" parameterType="WorkTrain" resultMap="WorkTrainResult">
|
||||||
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames,
|
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.train_file, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames,
|
||||||
CASE
|
CASE
|
||||||
WHEN (
|
WHEN (
|
||||||
wt.create_by = #{nowUserName}
|
wt.create_by = #{nowUserName}
|
||||||
|
@ -85,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectBgscreenWorkTrainList" parameterType="WorkTrain" resultMap="WorkTrainResult">
|
<select id="selectBgscreenWorkTrainList" parameterType="WorkTrain" resultMap="WorkTrainResult">
|
||||||
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, sdd.dict_label as train_nature_name, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames
|
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, sdd.dict_label as train_nature_name, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.train_file, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames
|
||||||
from work_train wt
|
from work_train wt
|
||||||
left join work_train_dept wtd on wtd.train_id = wt.id
|
left join work_train_dept wtd on wtd.train_id = wt.id
|
||||||
left join sys_dept sd on sd.dept_id = wtd.dept_id
|
left join sys_dept sd on sd.dept_id = wtd.dept_id
|
||||||
|
@ -106,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectBgscreenWorkTrainListv2" parameterType="WorkTrain" resultMap="WorkTrainResult">
|
<select id="selectBgscreenWorkTrainListv2" parameterType="WorkTrain" resultMap="WorkTrainResult">
|
||||||
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, sdd.dict_label as train_nature_name, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames
|
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, sdd.dict_label as train_nature_name, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.train_file, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames
|
||||||
from work_train wt
|
from work_train wt
|
||||||
left join work_train_dept wtd on wtd.train_id = wt.id
|
left join work_train_dept wtd on wtd.train_id = wt.id
|
||||||
left join sys_dept sd on sd.dept_id = wtd.dept_id
|
left join sys_dept sd on sd.dept_id = wtd.dept_id
|
||||||
|
@ -125,11 +126,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectWorkTrainById" parameterType="Long" resultMap="WorkTrainWorkTrainDeptResult">
|
<select id="selectWorkTrainById" parameterType="Long" resultMap="WorkTrainWorkTrainDeptResult">
|
||||||
select a.id, a.project_id, a.project_name, a.main_image, a.train_type, a.train_nature, a.train_participants, a.begin_date, a.end_date, a.train_content, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
|
select a.id, a.project_id, a.project_name, a.main_image, a.train_type, a.train_title, a.train_nature, a.train_participants, a.begin_date, a.end_date, a.train_content, a.train_file, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
|
||||||
b.train_id as sub_train_id, b.dept_id as sub_dept_id, b.is_main as sub_is_main
|
b.train_id as sub_train_id, b.dept_id as sub_dept_id, b.is_main as sub_is_main
|
||||||
from work_train a
|
from work_train a
|
||||||
left join work_train_dept b on b.train_id = a.id and b.is_main ='N'
|
left join work_train_dept b on b.train_id = a.id
|
||||||
where a.id = #{id}
|
where a.id = #{id}
|
||||||
|
and b.is_main ='N'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertWorkTrain" parameterType="WorkTrain" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertWorkTrain" parameterType="WorkTrain" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
@ -145,6 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="beginDate != null">begin_date,</if>
|
<if test="beginDate != null">begin_date,</if>
|
||||||
<if test="endDate != null">end_date,</if>
|
<if test="endDate != null">end_date,</if>
|
||||||
<if test="trainContent != null">train_content,</if>
|
<if test="trainContent != null">train_content,</if>
|
||||||
|
<if test="trainFile != null">train_file,</if>
|
||||||
<if test="isDel != null">is_del,</if>
|
<if test="isDel != null">is_del,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
|
@ -163,6 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="beginDate != null">#{beginDate},</if>
|
<if test="beginDate != null">#{beginDate},</if>
|
||||||
<if test="endDate != null">#{endDate},</if>
|
<if test="endDate != null">#{endDate},</if>
|
||||||
<if test="trainContent != null">#{trainContent},</if>
|
<if test="trainContent != null">#{trainContent},</if>
|
||||||
|
<if test="trainFile != null">#{trainFile},</if>
|
||||||
<if test="isDel != null">#{isDel},</if>
|
<if test="isDel != null">#{isDel},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
@ -185,6 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="beginDate != null">begin_date = #{beginDate},</if>
|
<if test="beginDate != null">begin_date = #{beginDate},</if>
|
||||||
<if test="endDate != null">end_date = #{endDate},</if>
|
<if test="endDate != null">end_date = #{endDate},</if>
|
||||||
<if test="trainContent != null">train_content = #{trainContent},</if>
|
<if test="trainContent != null">train_content = #{trainContent},</if>
|
||||||
|
<if test="trainFile != null">train_file = #{trainFile},</if>
|
||||||
<if test="isDel != null">is_del = #{isDel},</if>
|
<if test="isDel != null">is_del = #{isDel},</if>
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
|
Loading…
Reference in New Issue