提交代码
parent
7600c2344a
commit
9ac4cb4e03
|
@ -60,9 +60,9 @@ spring:
|
|||
servlet:
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 10MB
|
||||
max-file-size: 100MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 20MB
|
||||
max-request-size: 500MB
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
|
|
|
@ -27,6 +27,11 @@ public class LoginBody
|
|||
*/
|
||||
private String uuid;
|
||||
|
||||
/**
|
||||
* 微信认证ID
|
||||
*/
|
||||
private String openId;
|
||||
|
||||
public String getUsername()
|
||||
{
|
||||
return username;
|
||||
|
@ -66,4 +71,12 @@ public class LoginBody
|
|||
{
|
||||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
public String getOpenId() {
|
||||
return openId;
|
||||
}
|
||||
|
||||
public void setOpenId(String openId) {
|
||||
this.openId = openId;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|||
// 过滤请求
|
||||
.authorizeRequests()
|
||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||
.antMatchers("/login", "/register", "/captchaImage", "/weixin/**","/bgscreen/**","/publics/**","/system/dict/data/**").permitAll()
|
||||
.antMatchers("/login","/wechatLogin/**", "/register", "/captchaImage", "/weixin/**","/bgscreen/**","/publics/**","/system/dict/data/**").permitAll()
|
||||
// 静态资源,可匿名访问
|
||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/**/img/**", "/profile/**").permitAll()
|
||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||
|
|
|
@ -111,7 +111,7 @@ public class SysLoginService
|
|||
public void validateCaptcha(String username, String code, String uuid)
|
||||
{
|
||||
boolean captchaEnabled = configService.selectCaptchaEnabled();
|
||||
if (captchaEnabled)
|
||||
if (code!=null && uuid!=null && captchaEnabled)
|
||||
{
|
||||
String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.nvl(uuid, "");
|
||||
String captcha = redisCache.getCacheObject(verifyKey);
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询材料封样列表
|
||||
export function listMaterialSeal(query) {
|
||||
return request({
|
||||
url: '/project/materialSeal/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询材料封样详细
|
||||
export function getMaterialSeal(id) {
|
||||
return request({
|
||||
url: '/project/materialSeal/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增材料封样
|
||||
export function addMaterialSeal(data) {
|
||||
return request({
|
||||
url: '/project/materialSeal',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改材料封样
|
||||
export function updateMaterialSeal(data) {
|
||||
return request({
|
||||
url: '/project/materialSeal',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除材料封样
|
||||
export function delMaterialSeal(id) {
|
||||
return request({
|
||||
url: '/project/materialSeal/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询实测实量列表
|
||||
export function listProjectMeasure(query) {
|
||||
return request({
|
||||
url: '/project/projectMeasure/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询实测实量详细
|
||||
export function getProjectMeasure(id) {
|
||||
return request({
|
||||
url: '/project/projectMeasure/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增实测实量
|
||||
export function addProjectMeasure(data) {
|
||||
return request({
|
||||
url: '/project/projectMeasure',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改实测实量
|
||||
export function updateProjectMeasure(data) {
|
||||
return request({
|
||||
url: '/project/projectMeasure',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除实测实量
|
||||
export function delProjectMeasure(id) {
|
||||
return request({
|
||||
url: '/project/projectMeasure/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,455 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门名称" prop="deptName">
|
||||
<el-input
|
||||
v-model="queryParams.deptName"
|
||||
placeholder="请输入部门名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="封样名称" prop="materialName">
|
||||
<el-input
|
||||
v-model="queryParams.materialName"
|
||||
placeholder="请输入封样名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用部位" prop="usePosition">
|
||||
<el-input
|
||||
v-model="queryParams.usePosition"
|
||||
placeholder="请输入使用部位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="指定品牌" prop="contractBrand">
|
||||
<el-input
|
||||
v-model="queryParams.contractBrand"
|
||||
placeholder="请输入指定品牌"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟用品牌" prop="useBrand">
|
||||
<el-input
|
||||
v-model="queryParams.useBrand"
|
||||
placeholder="请输入拟用品牌"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="封样时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeSealDate"
|
||||
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:materialSeal: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:materialSeal: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:materialSeal: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:materialSeal:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="materialSealList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<el-table-column label="部门名称" align="center" prop="deptName" />
|
||||
<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="imgUrls" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.imgUrls" :width="50" :height="50" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="封样名称" align="center" prop="materialName" />
|
||||
<el-table-column label="使用部位" align="center" prop="usePosition" />
|
||||
<el-table-column label="指定品牌" align="center" prop="contractBrand" />
|
||||
<el-table-column label="拟用品牌" align="center" prop="useBrand" />
|
||||
<el-table-column label="封样时间" align="center" prop="sealDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.sealDate, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="会签单" align="center" prop="signFiles" />
|
||||
<el-table-column label="变更单" align="center" prop="alterationFiles" />
|
||||
<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"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['project:materialSeal:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:materialSeal: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="mainImage">
|
||||
<image-upload v-model="form.mainImage" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图片集合" prop="imgUrls">
|
||||
<image-upload v-model="form.imgUrls" />
|
||||
</el-form-item>
|
||||
<el-form-item label="封样名称" prop="materialName">
|
||||
<el-input v-model="form.materialName" placeholder="请输入封样名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="使用部位" prop="usePosition">
|
||||
<el-input v-model="form.usePosition" placeholder="请输入使用部位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="指定品牌" prop="contractBrand">
|
||||
<el-input v-model="form.contractBrand" placeholder="请输入指定品牌" />
|
||||
</el-form-item>
|
||||
<el-form-item label="拟用品牌" prop="useBrand">
|
||||
<el-input v-model="form.useBrand" placeholder="请输入拟用品牌" />
|
||||
</el-form-item>
|
||||
<el-form-item label="封样时间" prop="sealDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.sealDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择封样时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="会签单" prop="signFiles">
|
||||
<file-upload v-model="form.signFiles" />
|
||||
</el-form-item>
|
||||
<el-form-item label="变更单" prop="alterationFiles">
|
||||
<file-upload v-model="form.alterationFiles" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据状态" prop="isDel">
|
||||
<el-select v-model="form.isDel" placeholder="请选择数据状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_common_isdel"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-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 {
|
||||
listMaterialSeal,
|
||||
getMaterialSeal,
|
||||
delMaterialSeal,
|
||||
addMaterialSeal,
|
||||
updateMaterialSeal,
|
||||
} from "@/api/project/materialSeal";
|
||||
|
||||
export default {
|
||||
name: "MaterialSeal",
|
||||
dicts: ["sys_common_isdel"],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 材料封样表格数据
|
||||
materialSealList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 备注时间范围
|
||||
daterangeSealDate: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: null,
|
||||
projectName: null,
|
||||
deptId: null,
|
||||
deptName: null,
|
||||
imgUrls: null,
|
||||
materialName: null,
|
||||
usePosition: null,
|
||||
contractBrand: null,
|
||||
useBrand: null,
|
||||
sealDate: null,
|
||||
isDel: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询材料封样列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeSealDate && "" != this.daterangeSealDate) {
|
||||
this.queryParams.params["beginSealDate"] = this.daterangeSealDate[0];
|
||||
this.queryParams.params["endSealDate"] = this.daterangeSealDate[1];
|
||||
}
|
||||
listMaterialSeal(this.queryParams).then((response) => {
|
||||
this.materialSealList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
mainImage: null,
|
||||
imgUrls: null,
|
||||
materialName: null,
|
||||
usePosition: null,
|
||||
contractBrand: null,
|
||||
useBrand: null,
|
||||
sealDate: null,
|
||||
signFiles: null,
|
||||
alterationFiles: 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.daterangeSealDate = [];
|
||||
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;
|
||||
getMaterialSeal(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) {
|
||||
updateMaterialSeal(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addMaterialSeal(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 delMaterialSeal(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"project/materialSeal/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`materialSeal_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -406,6 +406,7 @@ export default {
|
|||
this.isUnit = true;
|
||||
this.getList();
|
||||
} else {
|
||||
this.projectCheckingList = [];
|
||||
this.$message.error("当前项目未分配总包单位,不能办理举牌验收!");
|
||||
this.isUnit = false;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,474 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门名称" prop="deptName">
|
||||
<el-input
|
||||
v-model="queryParams.deptName"
|
||||
placeholder="请输入部门名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量部位" prop="measurePosition">
|
||||
<el-input
|
||||
v-model="queryParams.measurePosition"
|
||||
placeholder="请输入测量部位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量内容" prop="measureInfo">
|
||||
<el-input
|
||||
v-model="queryParams.measureInfo"
|
||||
placeholder="请输入测量内容"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeMeasureTime"
|
||||
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="measurePointPosition">
|
||||
<el-input
|
||||
v-model="queryParams.measurePointPosition"
|
||||
placeholder="请输入测量点位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量结果" prop="measureResult">
|
||||
<el-input
|
||||
v-model="queryParams.measureResult"
|
||||
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="isDel">
|
||||
<el-input
|
||||
v-model="queryParams.isDel"
|
||||
placeholder="请输入数据状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!--<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['project:projectMeasure: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:projectMeasure: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:projectMeasure: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:projectMeasure:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="projectMeasureList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" fixed="left" />
|
||||
<el-table-column label="部门名称" align="center" prop="deptName" />
|
||||
<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" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.imageUrls" :width="50" :height="50" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="测量类型" align="center" prop="measureType" />
|
||||
<el-table-column label="测量部位" align="center" prop="measurePosition" />
|
||||
<el-table-column label="测量内容" align="center" prop="measureInfo" />
|
||||
<el-table-column label="测量时间" align="center" prop="measureTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.measureTime, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="测量点位" align="center" prop="measurePointPosition" />
|
||||
<el-table-column label="测量结果" align="center" prop="measureResult">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.project_checking_result"
|
||||
:value="scope.row.measureResult"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="测量文件" align="center" prop="measureFiles" />
|
||||
<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="isDel" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['project:projectMeasure:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:projectMeasure: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="mainImage">
|
||||
<image-upload v-model="form.mainImage" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图片集合" prop="imageUrls">
|
||||
<image-upload v-model="form.imageUrls" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测量部位" prop="measurePosition">
|
||||
<el-input v-model="form.measurePosition" placeholder="请输入测量部位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测量内容" prop="measureInfo">
|
||||
<el-input v-model="form.measureInfo" placeholder="请输入测量内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测量时间" prop="measureTime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.measureTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择测量时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量点位" prop="measurePointPosition">
|
||||
<el-input v-model="form.measurePointPosition" placeholder="请输入测量点位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测量结果" prop="measureResult">
|
||||
<el-input v-model="form.measureResult" placeholder="请输入测量结果" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测量文件" prop="measureFiles">
|
||||
<file-upload v-model="form.measureFiles" />
|
||||
</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="isDel">
|
||||
<el-input v-model="form.isDel" 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 {
|
||||
listProjectMeasure,
|
||||
getProjectMeasure,
|
||||
delProjectMeasure,
|
||||
addProjectMeasure,
|
||||
updateProjectMeasure,
|
||||
} from "@/api/project/projectMeasure";
|
||||
|
||||
export default {
|
||||
name: "ProjectMeasure",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 实测实量表格数据
|
||||
projectMeasureList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 备注时间范围
|
||||
daterangeMeasureTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: null,
|
||||
projectName: null,
|
||||
deptId: null,
|
||||
deptName: null,
|
||||
measureType: null,
|
||||
measurePosition: null,
|
||||
measureInfo: null,
|
||||
measureTime: null,
|
||||
measurePointPosition: null,
|
||||
measureResult: null,
|
||||
superviseUser: null,
|
||||
isDel: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询实测实量列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeMeasureTime && "" != this.daterangeMeasureTime) {
|
||||
this.queryParams.params["beginMeasureTime"] = this.daterangeMeasureTime[0];
|
||||
this.queryParams.params["endMeasureTime"] = this.daterangeMeasureTime[1];
|
||||
}
|
||||
listProjectMeasure(this.queryParams).then((response) => {
|
||||
this.projectMeasureList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
mainImage: null,
|
||||
imageUrls: null,
|
||||
measureType: null,
|
||||
measurePosition: null,
|
||||
measureInfo: null,
|
||||
measureTime: null,
|
||||
measurePointPosition: null,
|
||||
measureResult: null,
|
||||
measureFiles: null,
|
||||
qualityUser: null,
|
||||
qualityUserName: null,
|
||||
superviseUser: null,
|
||||
superviseUserName: 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.daterangeMeasureTime = [];
|
||||
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;
|
||||
getProjectMeasure(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) {
|
||||
updateProjectMeasure(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProjectMeasure(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 delProjectMeasure(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"project/projectMeasure/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`projectMeasure_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -1,196 +1,262 @@
|
|||
<template>
|
||||
<div class="project-build-node-drawer" v-if="isOpen">
|
||||
<el-drawer v-if="isOpen" :visible.sync="isOpen" direction="rtl" size="60%" style="padding-left: 20px;">
|
||||
<template slot="title">
|
||||
<div>{{ title + ' 【计划节点】' }}</div>
|
||||
<right-toolbar @queryTable="loadData" :search="false">
|
||||
<template slot="left">
|
||||
<el-button type="primary" @click="doExport">导出</el-button>
|
||||
<el-popover placement="top-start" title="提示" trigger="hover" content="请选择导出的模板修改后的文件。">
|
||||
<el-button type="success" slot="reference" @click="doImport" style="margin:0px 12px;">导入</el-button>
|
||||
</el-popover>
|
||||
|
||||
</template>
|
||||
</right-toolbar>
|
||||
</template>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane :label="'' + it.nodeText" :name="'' + it.id" :key="idx" v-for="(it, idx) in nodes">
|
||||
<node-item :item="it" :showLabel="false" style="border-bottom: solid 1px #ccc;"></node-item>
|
||||
<div v-for="(it2, idx) in it.children" :key="idx" class="lvl-2">
|
||||
<node-item :item="it2"></node-item>
|
||||
<div v-for="(it3, idx) in it2.children" :key="idx" v-if="it2.children.length > 0"
|
||||
style="padding-left: 40px;" class="lvl-3">
|
||||
<node-item :item="it3"></node-item>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-drawer>
|
||||
<!-- 用户导入对话框 -->
|
||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="600px"
|
||||
:close-on-click-modal="false" :close-on-press-escape="false"
|
||||
append-to-body :custom-class="'build-node-import-dlg file-'+ upload.files.length">
|
||||
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :multiple="false" :on-change="uploadChange"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-remove="uploadChange"
|
||||
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip text-center" slot="tip">
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
|
||||
@click="doExport">下载模板</el-link>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
<div class="project-build-node-drawer" v-if="isOpen">
|
||||
<el-drawer
|
||||
v-if="isOpen"
|
||||
:visible.sync="isOpen"
|
||||
direction="rtl"
|
||||
size="60%"
|
||||
style="padding-left: 20px"
|
||||
>
|
||||
<template slot="title">
|
||||
<div>{{ title + " 【计划节点】" }}</div>
|
||||
<right-toolbar @queryTable="loadData" :search="false">
|
||||
<template slot="left">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="doExport"
|
||||
v-hasPermi="['project:build_node_data:import']"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
title="提示"
|
||||
trigger="hover"
|
||||
content="请选择导出的模板修改后的文件。"
|
||||
>
|
||||
<el-button
|
||||
type="success"
|
||||
slot="reference"
|
||||
@click="doImport"
|
||||
style="margin: 0px 12px"
|
||||
>导入</el-button
|
||||
>
|
||||
</el-popover>
|
||||
</template>
|
||||
</right-toolbar>
|
||||
</template>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane
|
||||
:label="'' + it.nodeText"
|
||||
:name="'' + it.id"
|
||||
:key="idx"
|
||||
v-for="(it, idx) in nodes"
|
||||
>
|
||||
<node-item
|
||||
:item="it"
|
||||
:showLabel="false"
|
||||
style="border-bottom: solid 1px #ccc"
|
||||
></node-item>
|
||||
<div v-for="(it2, idx) in it.children" :key="idx" class="lvl-2">
|
||||
<node-item :item="it2"></node-item>
|
||||
<div
|
||||
v-for="(it3, idx) in it2.children"
|
||||
:key="idx"
|
||||
v-if="it2.children.length > 0"
|
||||
style="padding-left: 40px"
|
||||
class="lvl-3"
|
||||
>
|
||||
<node-item :item="it3"></node-item>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-drawer>
|
||||
<!-- 用户导入对话框 -->
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
:visible.sync="upload.open"
|
||||
width="600px"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
append-to-body
|
||||
:custom-class="'build-node-import-dlg file-' + upload.files.length"
|
||||
>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:multiple="false"
|
||||
:on-change="uploadChange"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||
:disabled="upload.isUploading"
|
||||
:on-remove="uploadChange"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip text-center" slot="tip">
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
style="font-size: 12px; vertical-align: baseline"
|
||||
@click="doExport"
|
||||
>下载模板</el-link
|
||||
>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listByProject } from '@/api/project/build_node_data.js'
|
||||
import { listByProject } from "@/api/project/build_node_data.js";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import NodeItem from './nodeItem.vue'
|
||||
import NodeItem from "./nodeItem.vue";
|
||||
export default {
|
||||
name: 'RuoyiUiBuildNodeDrawer',
|
||||
components: {
|
||||
NodeItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isOpen: false,
|
||||
prj: null,
|
||||
nodes: [],
|
||||
activeName: '',
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
files:[],
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: "",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的用户数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API+"/project/build_node_data/importData"
|
||||
},
|
||||
};
|
||||
},
|
||||
name: "RuoyiUiBuildNodeDrawer",
|
||||
components: {
|
||||
NodeItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isOpen: false,
|
||||
prj: null,
|
||||
nodes: [],
|
||||
activeName: "",
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
files: [],
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: "",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的用户数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + "/project/build_node_data/importData",
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
uploadChange(a, b, c) {
|
||||
this.upload.files = b;
|
||||
},
|
||||
|
||||
methods: {
|
||||
uploadChange(a,b,c){
|
||||
this.upload.files=b;
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
"</div>",
|
||||
"导入结果",
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
this.loadData();
|
||||
},
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
doImport() {
|
||||
this.upload.title = `${this.prj.projectName}_项目计划节点导入`;
|
||||
this.upload.open = true;
|
||||
},
|
||||
doExport() {
|
||||
this.download(
|
||||
"project/build_node_data/export",
|
||||
{
|
||||
projectId: this.prj.id,
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
|
||||
this.loadData();
|
||||
},
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
doImport() {
|
||||
this.upload.title = `${this.prj.projectName}_项目计划节点导入`;
|
||||
this.upload.open = true;
|
||||
},
|
||||
doExport() {
|
||||
this.download('project/build_node_data/export', {
|
||||
projectId: this.prj.id
|
||||
}, `${this.prj.projectName}_项目计划节点.xlsx`);
|
||||
},
|
||||
loadData(init) {
|
||||
listByProject(this.prj.id).then(d => {
|
||||
let tmps = (d.data || []).map(it => {
|
||||
it.lvl = it.baseBuildNode.nodeLvl;
|
||||
it.parentLvl = it.lvl.substring(0, it.lvl.length - 2);
|
||||
it.nodeText = it.baseBuildNode.nodeText;
|
||||
it.file = this.$tryToJson(it.files, []);
|
||||
return it;
|
||||
});
|
||||
let objs = tmps.filter(d => d.parentLvl.length == 0);
|
||||
objs.forEach(it => {
|
||||
it.children = tmps.filter(item => item.parentLvl == it.lvl)
|
||||
it.children.forEach(item => {
|
||||
item.children = tmps.filter(item3 => item3.parentLvl == item.lvl);
|
||||
});
|
||||
})
|
||||
this.nodes = objs;
|
||||
if (init) {
|
||||
this.activeName = objs.length > 0 ? objs[0].id + '' : '';
|
||||
}
|
||||
});
|
||||
},
|
||||
show(prj) {
|
||||
this.prj = prj;
|
||||
this.title = prj.projectName;
|
||||
this.isOpen = true;
|
||||
this.loadData(true);
|
||||
`${this.prj.projectName}_项目计划节点.xlsx`
|
||||
);
|
||||
},
|
||||
loadData(init) {
|
||||
listByProject(this.prj.id).then((d) => {
|
||||
let tmps = (d.data || []).map((it) => {
|
||||
it.lvl = it.baseBuildNode.nodeLvl;
|
||||
it.parentLvl = it.lvl.substring(0, it.lvl.length - 2);
|
||||
it.nodeText = it.baseBuildNode.nodeText;
|
||||
it.file = this.$tryToJson(it.files, []);
|
||||
return it;
|
||||
});
|
||||
let objs = tmps.filter((d) => d.parentLvl.length == 0);
|
||||
objs.forEach((it) => {
|
||||
it.children = tmps.filter((item) => item.parentLvl == it.lvl);
|
||||
it.children.forEach((item) => {
|
||||
item.children = tmps.filter((item3) => item3.parentLvl == item.lvl);
|
||||
});
|
||||
});
|
||||
this.nodes = objs;
|
||||
if (init) {
|
||||
this.activeName = objs.length > 0 ? objs[0].id + "" : "";
|
||||
}
|
||||
});
|
||||
},
|
||||
show(prj) {
|
||||
this.prj = prj;
|
||||
this.title = prj.projectName;
|
||||
this.isOpen = true;
|
||||
this.loadData(true);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.project-build-node-drawer {
|
||||
::v-deep .el-drawer {
|
||||
min-width: 1600px;
|
||||
::v-deep .el-drawer {
|
||||
min-width: 1600px;
|
||||
}
|
||||
|
||||
::v-deep .el-drawer__header {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
::v-deep .el-drawer__body {
|
||||
padding: 0px 24px;
|
||||
|
||||
.el-form {
|
||||
overflow: hidden;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 15px !important;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-drawer__header {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
::v-deep .el-drawer__body {
|
||||
padding: 0px 24px;
|
||||
|
||||
.el-form {
|
||||
overflow: hidden;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 15px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.lvl-3 {
|
||||
.lbl-title {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
.lvl-3 {
|
||||
.lbl-title {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.build-node-import-dlg{
|
||||
.el-upload{
|
||||
width:100%;
|
||||
.el-upload-dragger{
|
||||
width: 100%;
|
||||
}
|
||||
.build-node-import-dlg {
|
||||
.el-upload {
|
||||
width: 100%;
|
||||
.el-upload-dragger {
|
||||
width: 100%;
|
||||
}
|
||||
&.file-1{
|
||||
.el-upload{
|
||||
display: none;
|
||||
}
|
||||
.el-upload__tip{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&.file-1 {
|
||||
.el-upload {
|
||||
display: none;
|
||||
}
|
||||
.el-upload__tip {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -89,7 +89,6 @@
|
|||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import {
|
||||
unitList,
|
||||
deptWroksViewData,
|
||||
updateProjectDeptWroks,
|
||||
} from "@/api/project/projectDeptWroks";
|
||||
|
|
|
@ -248,6 +248,7 @@ export default {
|
|||
this.isUnit = true;
|
||||
this.getList();
|
||||
} else {
|
||||
this.surProjectInsuranceList = [];
|
||||
this.$message.error("当前项目未分配总包单位,不能办理保险!");
|
||||
this.isUnit = false;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
<groupId>com.yanzhu.jh</groupId>
|
||||
<artifactId>yanzhu-jh</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package com.ruoyi.web.project;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
||||
import com.yanzhu.jh.project.service.ISurProjectCheckingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -48,6 +49,7 @@ public class ProjectCheckingController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
@Log(title = "举牌验收", businessType = BusinessType.INSERT)
|
||||
public AjaxResult add(@RequestBody SurProjectChecking surProjectChecking){
|
||||
return success(surProjectCheckingService.insertSurProjectChecking(surProjectChecking));
|
||||
}
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
package com.ruoyi.web.system.controller;
|
||||
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.framework.web.service.SysLoginService;
|
||||
import com.ruoyi.framework.web.service.TokenService;
|
||||
import com.ruoyi.web.system.service.IWechatUserLoginService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @version : V1.0
|
||||
* @ClassName: LoginController
|
||||
* @Description: 用户登录
|
||||
* @Auther: JiangYuQi
|
||||
* @Date: 2020/7/7 18:03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/wechatLogin")
|
||||
public class WechatUserLoginController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private SysLoginService loginService;
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
@Autowired
|
||||
private IWechatUserLoginService wechatUserLoginService;
|
||||
|
||||
/**
|
||||
* 登录方法
|
||||
*
|
||||
* @param loginBody 登录信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/login")
|
||||
public AjaxResult login(@RequestBody LoginBody loginBody)
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
// 生成令牌
|
||||
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), null,
|
||||
null);
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
ajax.put("data",wechatUserLoginService.findUserInfo(loginBody.getUsername(),loginBody.getOpenId()));
|
||||
return ajax;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 登录方法
|
||||
*
|
||||
* @param loginBody 登录信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/openIdLogin")
|
||||
public AjaxResult openIdLogin(@RequestBody LoginBody loginBody)
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
LoginUser loginUser = wechatUserLoginService.getLoginUserByOpenId(loginBody.getOpenId());
|
||||
if(loginUser!=null){
|
||||
// 生成令牌
|
||||
String token = tokenService.createToken(loginUser);
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
ajax.put("data",wechatUserLoginService.findUserInfo(loginUser.getUsername(),loginBody.getOpenId()));
|
||||
}else{
|
||||
return error();
|
||||
}
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出openid
|
||||
* @param code
|
||||
* @param appId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getOpenId")
|
||||
public Object getOpenId(String code,String appId){
|
||||
return wechatUserLoginService.getOpenId(code,appId);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.ruoyi.web.system.mapper;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @version : V1.0
|
||||
* @ClassName: WechatUserLoginMapper
|
||||
* @Description: 微信用户登录
|
||||
* @Auther: JiangYuQi
|
||||
* @Date: 2020/7/7 18:03
|
||||
*/
|
||||
public interface WechatUserLoginMapper {
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
* @param loginName
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> findUserInfo(String loginName);
|
||||
|
||||
/**
|
||||
* 添加用户openid信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int addUserOpenId(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 更新用户openid
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int updateUserOpenId(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 验证手机号码是否已经绑定
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
int checkBindByPhone(String phone);
|
||||
|
||||
/**
|
||||
* 验证手机号码是否已经绑定
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
int checkBindByOpenId(String openId);
|
||||
|
||||
/**
|
||||
* 根据用户openid查询用户信息
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getUserInfoByOpenId(String openId);
|
||||
|
||||
/**
|
||||
* 根据用户openid查询用户信息
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getUserNameByOpenId(String openId);
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.ruoyi.web.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @version : V1.0
|
||||
* @ClassName: IWechatUserLoginService
|
||||
* @Description: 微信用户登录
|
||||
* @Auther: JiangYuQi
|
||||
* @Date: 2020/7/7 18:03
|
||||
*/
|
||||
public interface IWechatUserLoginService {
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
* @param loginName
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> findUserInfo(String loginName,String openId);
|
||||
|
||||
/**
|
||||
* 获取openId
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> getOpenId(String code,String appId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据openId查询用户认证对象
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
public LoginUser getLoginUserByOpenId(String openId);
|
||||
}
|
|
@ -0,0 +1,165 @@
|
|||
package com.ruoyi.web.system.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.DeptTypeEnum;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
||||
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.web.system.mapper.WechatUserLoginMapper;
|
||||
import com.ruoyi.web.system.service.IWechatUserLoginService;
|
||||
import com.yanzhu.jh.project.domain.SurProject;
|
||||
import com.yanzhu.jh.project.mapper.SurProjectMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @version : V1.0
|
||||
* @ClassName: WechatUserLoginServiceImpl
|
||||
* @Description: 微信用户登录
|
||||
* @Auther: JiangYuQi
|
||||
* @Date: 2020/7/7 18:03
|
||||
*/
|
||||
@Service
|
||||
public class WechatUserLoginServiceImpl implements IWechatUserLoginService {
|
||||
|
||||
private static Map<String,String>appInfo = new HashMap<>();
|
||||
|
||||
static {
|
||||
//产发数字系统
|
||||
appInfo.put("wxc44b5d588f599758","b4da7402397f559395db7c1b0534c369");
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@Autowired
|
||||
private SysPermissionService permissionService;
|
||||
|
||||
@Autowired
|
||||
private SysDeptMapper sysDeptMapper;
|
||||
|
||||
@Autowired
|
||||
private SurProjectMapper surProjectMapper;
|
||||
|
||||
@Autowired
|
||||
private WechatUserLoginMapper wechatUserLoginMapper;
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
* @param loginName
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> findUserInfo(String loginName,String openId) {
|
||||
Map<String,Object> data = new HashMap<>();
|
||||
Map<String, Object> userData = wechatUserLoginMapper.findUserInfo(loginName);
|
||||
Map<String,Object> userInfo = new HashMap<>();
|
||||
userInfo.put("loginName",loginName);
|
||||
userInfo.put("userName",userData.get("user_name"));
|
||||
userInfo.put("nickName",userData.get("nick_name"));
|
||||
userInfo.put("deptName",userData.get("dept_name"));
|
||||
userInfo.put("deptId",userData.get("dept_id"));
|
||||
userInfo.put("userId",userData.get("user_id"));
|
||||
userInfo.put("remark",userData.containsKey("remark")?userData.get("remark"):"");
|
||||
userInfo.put("roleId",userData.get("roleId"));
|
||||
userInfo.put("roleName",userData.get("roleName"));
|
||||
/** 查询当前用户项目信息 **/
|
||||
|
||||
SurProject surProject = new SurProject();
|
||||
String nowRole = Convert.toStr(userData.get("minRoleId"));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(nowRole)){
|
||||
Long deptId = this.getZgsDept(Convert.toLong(userData.get("dept_id"))).getDeptId();
|
||||
surProject.setNowDept(Convert.toStr(deptId));
|
||||
}else{
|
||||
surProject.setNowDept(Convert.toStr(userData.get("dept_id")));
|
||||
}
|
||||
//当前角色时管理员时,修改角色为集团公司
|
||||
if(Convert.toInt(SysRoleEnum.JTGS.getCode())>Convert.toInt(nowRole)){
|
||||
nowRole = SysRoleEnum.JTGS.getCode();
|
||||
}
|
||||
surProject.setNowRole(nowRole);
|
||||
surProject.setNowUser(Convert.toStr(userData.get("user_id")));
|
||||
List<SurProject> projectList = surProjectMapper.selectSurProjectList(surProject);
|
||||
//只有一个项目时直接保存项目信息
|
||||
if(projectList!=null && projectList.size()==1){
|
||||
Map<String,Object> projectInfo = new HashMap<>();
|
||||
projectInfo.put("projectId",projectList.get(0).getId());
|
||||
projectInfo.put("projectName",projectList.get(0).getProjectName());
|
||||
projectInfo.put("projectInfoList",projectList);
|
||||
projectInfo.put("shengName","西安市");
|
||||
projectInfo.put("shiName","西咸新区");
|
||||
projectInfo.put("quName","泾河新城");
|
||||
projectInfo.put("logCompanyName",userData.get("dept_name"));
|
||||
data.put("projectInfo",projectInfo);
|
||||
}
|
||||
data.put("userinfo",userInfo);
|
||||
//存储用户openid
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("loginName",loginName);
|
||||
map.put("userId", Convert.toStr(userData.get("user_id")));
|
||||
map.put("nickname",userData.get("nick_name"));
|
||||
map.put("openId",openId);
|
||||
//验证手机号码是否绑定
|
||||
int count = wechatUserLoginMapper.checkBindByOpenId(openId);
|
||||
if(count > 0){
|
||||
wechatUserLoginMapper.updateUserOpenId(map);
|
||||
}else {
|
||||
wechatUserLoginMapper.addUserOpenId(map);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据openId查询用户认证对象
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
public LoginUser getLoginUserByOpenId(String openId) {
|
||||
Map<String,Object> userMap = wechatUserLoginMapper.getUserNameByOpenId(openId);
|
||||
if(userMap!=null){
|
||||
SysUser user = userService.selectUserByUserName(Convert.toStr(userMap.get("loginName")));
|
||||
return new LoginUser(user.getUserId(), user.getDeptId(), user, permissionService.getMenuPermission(user));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询子公司部门ID
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
* @return 结果
|
||||
*/
|
||||
private SysDept getZgsDept(Long deptId){
|
||||
SysDept sysDept = sysDeptMapper.selectDeptById(deptId);
|
||||
if(DeptTypeEnum.ZGS.getCode().equals(sysDept.getTypeFlag())){
|
||||
//comFlag标识为1是子公司
|
||||
if(DeptTypeEnum.COMFLAG.getCode().equals(sysDept.getComFlag())){
|
||||
return sysDept;
|
||||
}else{
|
||||
return getZgsDept(sysDept.getParentId());
|
||||
}
|
||||
}else{
|
||||
return sysDept;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getOpenId(String code, String appId) {
|
||||
String url = "https://api.weixin.qq.com/sns/jscode2session?appid="+appId+"&secret="+appInfo.get(appId)+"&js_code="+code+"&grant_type=authorization_code";
|
||||
String resultStr = HttpUtil.get(url);
|
||||
JSONObject json = JSONObject.parseObject(resultStr);
|
||||
//删除参数session_key,否则小程序检测关键参数暴露,提示整改
|
||||
json.remove("session_key");
|
||||
return json;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
<?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.ruoyi.web.system.mapper.WechatUserLoginMapper">
|
||||
|
||||
<!--验证登录用户信息-->
|
||||
<select id="findUserInfo" parameterType="String" resultType="map">
|
||||
SELECT
|
||||
su.*,
|
||||
IFNULL(GROUP_CONCAT( sur.role_id ),'') AS roleId,
|
||||
IFNULL(GROUP_CONCAT( sr.role_name ),'') AS roleName,
|
||||
d.dept_name,
|
||||
MIN(sur.role_id) AS minRoleId,
|
||||
IFNULL( spu.project_id, '' ) AS projectId
|
||||
FROM
|
||||
sys_user su
|
||||
LEFT JOIN sys_user_role sur ON su.user_id = sur.user_id
|
||||
LEFT JOIN sys_role sr ON sur.role_id = sr.role_id
|
||||
LEFT JOIN sur_project_userinfo spu ON su.user_id = spu.user_id
|
||||
left join sys_dept d on d.dept_id = su.dept_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND su.phonenumber=#{loginName,jdbcType=VARCHAR}
|
||||
AND su.del_flag=0
|
||||
AND su.status=0
|
||||
GROUP BY su.user_id
|
||||
</select>
|
||||
|
||||
<!--添加用户openid信息-->
|
||||
<insert id="addUserOpenId" parameterType="map">
|
||||
insert into sys_user_openid
|
||||
(
|
||||
<if test="openId != null and openId != ''">openId,</if>
|
||||
<if test="userId != null and userId != ''">userId,</if>
|
||||
<if test="loginName != null and loginName != ''">loginName,</if>
|
||||
<if test="nickname != null and nickname != ''">nickname,</if>
|
||||
creatTime
|
||||
) values
|
||||
(
|
||||
<if test="openId != null and openId != ''">#{openId},</if>
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
<if test="loginName != null and loginName != ''">#{loginName},</if>
|
||||
<if test="nickname != null and nickname != ''">#{nickname},</if>
|
||||
now()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!--更新用户openid-->
|
||||
<update id="updateUserOpenId" parameterType="String">
|
||||
update sys_user_openid set userId=#{userId},loginName=#{loginName},nickname=#{nickname} where openId =#{openId} and isDel = 0
|
||||
</update>
|
||||
|
||||
<!--根据电话查询用户id-->
|
||||
<select id="getUserIdByPhone" parameterType="String" resultType="String">
|
||||
select user_id from sys_user where 1=1 and del_flag=0 and phonenumber=#{phone} and status=0
|
||||
</select>
|
||||
|
||||
<!--根据用户openid查询用户信息-->
|
||||
<select id="getUserInfoByOpenId" parameterType="String" resultType="map">
|
||||
SELECT
|
||||
IFNULL(su.user_id,'') AS userId,
|
||||
IFNULL(su.phonenumber,'') AS loginName,
|
||||
IFNULL(su.user_name,'') AS userName,
|
||||
IFNULL(su.nick_name,'') AS nickName,
|
||||
IFNULL(su.nick_name,'') AS nickName,
|
||||
IFNULL(su.dept_id,'') AS deptId,
|
||||
IFNULL(d.dept_name,'') AS deptName,
|
||||
IFNULL(su.remark,'') AS remark,
|
||||
IFNULL(GROUP_CONCAT( sur.role_id ),'') AS roleId,
|
||||
IFNULL(GROUP_CONCAT( sr.role_name ),'') AS roleName,
|
||||
'' AS projectId
|
||||
FROM
|
||||
sys_user_openid suo
|
||||
LEFT JOIN sys_user su ON suo.userId = su.user_id
|
||||
LEFT JOIN sys_user_role sur ON su.user_id = sur.user_id
|
||||
LEFT JOIN sys_role sr ON sur.role_id = sr.role_id
|
||||
left join sys_dept d on d.dept_id = su.dept_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND suo.isDel = 0
|
||||
AND su.del_flag = 0
|
||||
AND su.STATUS = 0
|
||||
AND suo.openId =#{openId}
|
||||
GROUP BY suo.openId
|
||||
</select>
|
||||
|
||||
<!--根据用户openid查询用户名称-->
|
||||
<select id="getUserNameByOpenId" parameterType="String" resultType="map">
|
||||
SELECT
|
||||
id,
|
||||
openId,
|
||||
userId,
|
||||
loginName,
|
||||
nickname
|
||||
FROM
|
||||
sys_user_openid
|
||||
WHERE isDel = 0
|
||||
AND openId =#{openId}
|
||||
GROUP BY openId
|
||||
</select>
|
||||
|
||||
<!--验证手机号码是否已经绑定-->
|
||||
<select id="checkBindByPhone" parameterType="String" resultType="int">
|
||||
select count(1) from sys_user_openid where 1=1 and loginName=#{phone} and isDel=0
|
||||
</select>
|
||||
|
||||
<!--验证当前openId是否已绑定-->
|
||||
<select id="checkBindByOpenId" parameterType="String" resultType="int">
|
||||
select count(1) from sys_user_openid where openId=#{openId} and isDel=0
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -5,7 +5,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.yanzhu.jh.project.domain.vo.SurProjectBuildNodeDataExport;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
|
@ -5,7 +5,6 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -27,7 +26,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
|
|||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 项目验收Controller
|
||||
* 举牌验收Controller
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-18
|
||||
|
@ -43,7 +42,7 @@ public class SurProjectCheckingController extends BaseController
|
|||
private ISysDeptService sysDeptService;
|
||||
|
||||
/**
|
||||
* 查询项目验收列表
|
||||
* 查询举牌验收列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectChecking:list')")
|
||||
@GetMapping("/list")
|
||||
|
@ -57,26 +56,34 @@ public class SurProjectCheckingController extends BaseController
|
|||
surProjectChecking.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectChecking.setNowUser(Convert.toStr(getUserId()));
|
||||
surProjectChecking.setNowUserName(Convert.toStr(getUserId()));
|
||||
surProjectChecking.setNowUserName(getUsername());
|
||||
List<SurProjectChecking> list = surProjectCheckingService.selectSurProjectCheckingList(surProjectChecking);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出项目验收列表
|
||||
* 导出举牌验收列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectChecking:export')")
|
||||
@Log(title = "项目验收", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "举牌验收", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SurProjectChecking surProjectChecking)
|
||||
{
|
||||
surProjectChecking.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectChecking.getNowRole())){
|
||||
surProjectChecking.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectChecking.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectChecking.setNowUser(Convert.toStr(getUserId()));
|
||||
surProjectChecking.setNowUserName(getUsername());
|
||||
List<SurProjectChecking> list = surProjectCheckingService.selectSurProjectCheckingList(surProjectChecking);
|
||||
ExcelUtil<SurProjectChecking> util = new ExcelUtil<SurProjectChecking>(SurProjectChecking.class);
|
||||
util.exportExcel(response, list, "项目验收数据");
|
||||
util.exportExcel(response, list, "举牌验收数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目验收详细信息
|
||||
* 获取举牌验收详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectChecking:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
|
@ -86,10 +93,10 @@ public class SurProjectCheckingController extends BaseController
|
|||
}
|
||||
|
||||
/**
|
||||
* 新增项目验收
|
||||
* 新增举牌验收
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectChecking:add')")
|
||||
@Log(title = "项目验收", businessType = BusinessType.INSERT)
|
||||
@Log(title = "举牌验收", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SurProjectChecking surProjectChecking)
|
||||
{
|
||||
|
@ -98,10 +105,10 @@ public class SurProjectCheckingController extends BaseController
|
|||
}
|
||||
|
||||
/**
|
||||
* 修改项目验收
|
||||
* 修改举牌验收
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectChecking:edit')")
|
||||
@Log(title = "项目验收", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "举牌验收", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SurProjectChecking surProjectChecking)
|
||||
{
|
||||
|
@ -109,10 +116,10 @@ public class SurProjectCheckingController extends BaseController
|
|||
}
|
||||
|
||||
/**
|
||||
* 删除项目验收
|
||||
* 删除举牌验收
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectChecking:remove')")
|
||||
@Log(title = "项目验收", businessType = BusinessType.DELETE)
|
||||
@Log(title = "举牌验收", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
|
|
|
@ -82,6 +82,13 @@ public class SurProjectInsuranceController extends BaseController
|
|||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SurProjectInsurance surProjectInsurance)
|
||||
{
|
||||
surProjectInsurance.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectInsurance.getNowRole())){
|
||||
surProjectInsurance.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectInsurance.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectInsurance.setNowUser(Convert.toStr(getUserId()));
|
||||
List<SurProjectInsurance> list = surProjectInsuranceService.selectSurProjectInsuranceList(surProjectInsurance);
|
||||
ExcelUtil<SurProjectInsurance> util = new ExcelUtil<SurProjectInsurance>(SurProjectInsurance.class);
|
||||
util.exportExcel(response, list, "项目保险数据");
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
package com.yanzhu.jh.project.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.yanzhu.jh.project.domain.SurProjectMaterialSeal;
|
||||
import com.yanzhu.jh.project.service.ISurProjectMaterialSealService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 材料封样Controller
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/project/materialSeal")
|
||||
public class SurProjectMaterialSealController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysDeptService sysDeptService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectMaterialSealService surProjectMaterialSealService;
|
||||
|
||||
/**
|
||||
* 查询材料封样列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:materialSeal:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SurProjectMaterialSeal surProjectMaterialSeal)
|
||||
{
|
||||
startPage();
|
||||
surProjectMaterialSeal.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectMaterialSeal.getNowRole())){
|
||||
surProjectMaterialSeal.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectMaterialSeal.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectMaterialSeal.setNowUser(Convert.toStr(getUserId()));
|
||||
List<SurProjectMaterialSeal> list = surProjectMaterialSealService.selectSurProjectMaterialSealList(surProjectMaterialSeal);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出材料封样列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:materialSeal:export')")
|
||||
@Log(title = "材料封样", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SurProjectMaterialSeal surProjectMaterialSeal)
|
||||
{
|
||||
surProjectMaterialSeal.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectMaterialSeal.getNowRole())){
|
||||
surProjectMaterialSeal.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectMaterialSeal.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectMaterialSeal.setNowUser(Convert.toStr(getUserId()));
|
||||
List<SurProjectMaterialSeal> list = surProjectMaterialSealService.selectSurProjectMaterialSealList(surProjectMaterialSeal);
|
||||
ExcelUtil<SurProjectMaterialSeal> util = new ExcelUtil<SurProjectMaterialSeal>(SurProjectMaterialSeal.class);
|
||||
util.exportExcel(response, list, "材料封样数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取材料封样详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:materialSeal:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(surProjectMaterialSealService.selectSurProjectMaterialSealById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增材料封样
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:materialSeal:add')")
|
||||
@Log(title = "材料封样", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SurProjectMaterialSeal surProjectMaterialSeal)
|
||||
{
|
||||
return toAjax(surProjectMaterialSealService.insertSurProjectMaterialSeal(surProjectMaterialSeal));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改材料封样
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:materialSeal:edit')")
|
||||
@Log(title = "材料封样", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SurProjectMaterialSeal surProjectMaterialSeal)
|
||||
{
|
||||
return toAjax(surProjectMaterialSealService.updateSurProjectMaterialSeal(surProjectMaterialSeal));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除材料封样
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:materialSeal:remove')")
|
||||
@Log(title = "材料封样", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(surProjectMaterialSealService.deleteSurProjectMaterialSealByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
package com.yanzhu.jh.project.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.yanzhu.jh.project.domain.SurProjectMeasure;
|
||||
import com.yanzhu.jh.project.service.ISurProjectMeasureService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 实测实量Controller
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/project/projectMeasure")
|
||||
public class SurProjectMeasureController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysDeptService sysDeptService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectMeasureService surProjectMeasureService;
|
||||
|
||||
/**
|
||||
* 查询实测实量列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectMeasure:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SurProjectMeasure surProjectMeasure)
|
||||
{
|
||||
startPage();
|
||||
surProjectMeasure.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectMeasure.getNowRole())){
|
||||
surProjectMeasure.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectMeasure.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectMeasure.setNowUser(Convert.toStr(getUserId()));
|
||||
List<SurProjectMeasure> list = surProjectMeasureService.selectSurProjectMeasureList(surProjectMeasure);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出实测实量列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectMeasure:export')")
|
||||
@Log(title = "实测实量", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SurProjectMeasure surProjectMeasure)
|
||||
{
|
||||
surProjectMeasure.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectMeasure.getNowRole())){
|
||||
surProjectMeasure.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectMeasure.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectMeasure.setNowUser(Convert.toStr(getUserId()));
|
||||
List<SurProjectMeasure> list = surProjectMeasureService.selectSurProjectMeasureList(surProjectMeasure);
|
||||
ExcelUtil<SurProjectMeasure> util = new ExcelUtil<SurProjectMeasure>(SurProjectMeasure.class);
|
||||
util.exportExcel(response, list, "实测实量数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实测实量详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectMeasure:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(surProjectMeasureService.selectSurProjectMeasureById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增实测实量
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectMeasure:add')")
|
||||
@Log(title = "实测实量", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SurProjectMeasure surProjectMeasure)
|
||||
{
|
||||
return toAjax(surProjectMeasureService.insertSurProjectMeasure(surProjectMeasure));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改实测实量
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectMeasure:edit')")
|
||||
@Log(title = "实测实量", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SurProjectMeasure surProjectMeasure)
|
||||
{
|
||||
return toAjax(surProjectMeasureService.updateSurProjectMeasure(surProjectMeasure));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除实测实量
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectMeasure:remove')")
|
||||
@Log(title = "实测实量", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(surProjectMeasureService.deleteSurProjectMeasureByIds(ids));
|
||||
}
|
||||
}
|
|
@ -84,6 +84,13 @@ public class SurProjectWorkAttendanceController extends BaseController
|
|||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SurProjectWorkAttendance surProjectWorkAttendance)
|
||||
{
|
||||
surProjectWorkAttendance.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectWorkAttendance.getNowRole())){
|
||||
surProjectWorkAttendance.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectWorkAttendance.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectWorkAttendance.setNowUser(Convert.toStr(getUserId()));
|
||||
List<SurProjectWorkAttendance> list = surProjectWorkAttendanceService.selectSurProjectWorkAttendanceList(surProjectWorkAttendance);
|
||||
ExcelUtil<SurProjectWorkAttendance> util = new ExcelUtil<SurProjectWorkAttendance>(SurProjectWorkAttendance.class);
|
||||
util.exportExcel(response, list, "项目出勤数据");
|
||||
|
|
|
@ -0,0 +1,232 @@
|
|||
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_material_seal
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-22
|
||||
*/
|
||||
public class SurProjectMaterialSeal extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 项目主键 */
|
||||
@Excel(name = "项目主键")
|
||||
private Long projectId;
|
||||
|
||||
/** 部门主键 */
|
||||
@Excel(name = "部门主键")
|
||||
private Long deptId;
|
||||
|
||||
/** 封样主图 */
|
||||
@Excel(name = "封样主图")
|
||||
private String mainImage;
|
||||
|
||||
/** 图片集合 */
|
||||
@Excel(name = "图片集合")
|
||||
private String imgUrls;
|
||||
|
||||
/** 封样名称 */
|
||||
@Excel(name = "封样名称")
|
||||
private String materialName;
|
||||
|
||||
/** 使用部位 */
|
||||
@Excel(name = "使用部位")
|
||||
private String usePosition;
|
||||
|
||||
/** 指定品牌 */
|
||||
@Excel(name = "指定品牌")
|
||||
private String contractBrand;
|
||||
|
||||
/** 拟用品牌 */
|
||||
@Excel(name = "拟用品牌")
|
||||
private String useBrand;
|
||||
|
||||
/** 封样时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "封样时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date sealDate;
|
||||
|
||||
/** 会签单 */
|
||||
@Excel(name = "会签单")
|
||||
private String signFiles;
|
||||
|
||||
/** 变更单 */
|
||||
@Excel(name = "变更单")
|
||||
private String alterationFiles;
|
||||
|
||||
/** 数据状态 */
|
||||
@Excel(name = "数据状态")
|
||||
private String isDel;
|
||||
|
||||
private String projectName;
|
||||
private String deptName;
|
||||
|
||||
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 setMainImage(String mainImage)
|
||||
{
|
||||
this.mainImage = mainImage;
|
||||
}
|
||||
|
||||
public String getMainImage()
|
||||
{
|
||||
return mainImage;
|
||||
}
|
||||
public void setImgUrls(String imgUrls)
|
||||
{
|
||||
this.imgUrls = imgUrls;
|
||||
}
|
||||
|
||||
public String getImgUrls()
|
||||
{
|
||||
return imgUrls;
|
||||
}
|
||||
public void setMaterialName(String materialName)
|
||||
{
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getMaterialName()
|
||||
{
|
||||
return materialName;
|
||||
}
|
||||
public void setUsePosition(String usePosition)
|
||||
{
|
||||
this.usePosition = usePosition;
|
||||
}
|
||||
|
||||
public String getUsePosition()
|
||||
{
|
||||
return usePosition;
|
||||
}
|
||||
public void setContractBrand(String contractBrand)
|
||||
{
|
||||
this.contractBrand = contractBrand;
|
||||
}
|
||||
|
||||
public String getContractBrand()
|
||||
{
|
||||
return contractBrand;
|
||||
}
|
||||
public void setUseBrand(String useBrand)
|
||||
{
|
||||
this.useBrand = useBrand;
|
||||
}
|
||||
|
||||
public String getUseBrand()
|
||||
{
|
||||
return useBrand;
|
||||
}
|
||||
public void setSealDate(Date sealDate)
|
||||
{
|
||||
this.sealDate = sealDate;
|
||||
}
|
||||
|
||||
public Date getSealDate()
|
||||
{
|
||||
return sealDate;
|
||||
}
|
||||
public void setSignFiles(String signFiles)
|
||||
{
|
||||
this.signFiles = signFiles;
|
||||
}
|
||||
|
||||
public String getSignFiles()
|
||||
{
|
||||
return signFiles;
|
||||
}
|
||||
public void setAlterationFiles(String alterationFiles)
|
||||
{
|
||||
this.alterationFiles = alterationFiles;
|
||||
}
|
||||
|
||||
public String getAlterationFiles()
|
||||
{
|
||||
return alterationFiles;
|
||||
}
|
||||
public void setIsDel(String isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("mainImage", getMainImage())
|
||||
.append("imgUrls", getImgUrls())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("usePosition", getUsePosition())
|
||||
.append("contractBrand", getContractBrand())
|
||||
.append("useBrand", getUseBrand())
|
||||
.append("sealDate", getSealDate())
|
||||
.append("signFiles", getSignFiles())
|
||||
.append("alterationFiles", getAlterationFiles())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,288 @@
|
|||
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_measure
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-22
|
||||
*/
|
||||
public class SurProjectMeasure extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 项目主键 */
|
||||
@Excel(name = "项目主键")
|
||||
private Long projectId;
|
||||
|
||||
/** 部门主键 */
|
||||
@Excel(name = "部门主键")
|
||||
private Long deptId;
|
||||
|
||||
/** 测量主图 */
|
||||
@Excel(name = "测量主图")
|
||||
private String mainImage;
|
||||
|
||||
/** 图片集合 */
|
||||
@Excel(name = "图片集合")
|
||||
private String imageUrls;
|
||||
|
||||
/** 测量类型 */
|
||||
@Excel(name = "测量类型")
|
||||
private String measureType;
|
||||
|
||||
/** 测量部位 */
|
||||
@Excel(name = "测量部位")
|
||||
private String measurePosition;
|
||||
|
||||
/** 测量内容 */
|
||||
@Excel(name = "测量内容")
|
||||
private String measureInfo;
|
||||
|
||||
/** 测量时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "测量时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date measureTime;
|
||||
|
||||
/** 测量点位 */
|
||||
@Excel(name = "测量点位")
|
||||
private String measurePointPosition;
|
||||
|
||||
/** 测量结果 */
|
||||
@Excel(name = "测量结果")
|
||||
private String measureResult;
|
||||
|
||||
/** 测量文件 */
|
||||
@Excel(name = "测量文件")
|
||||
private String measureFiles;
|
||||
|
||||
/** 质量专员 */
|
||||
@Excel(name = "质量专员")
|
||||
private String qualityUser;
|
||||
|
||||
/** 质量专员名称 */
|
||||
@Excel(name = "质量专员名称")
|
||||
private String qualityUserName;
|
||||
|
||||
/** 监理专员 */
|
||||
@Excel(name = "监理专员")
|
||||
private String superviseUser;
|
||||
|
||||
/** 监理专员名称 */
|
||||
@Excel(name = "监理专员名称")
|
||||
private String superviseUserName;
|
||||
|
||||
/** 数据状态 */
|
||||
@Excel(name = "数据状态")
|
||||
private String isDel;
|
||||
|
||||
private String projectName;
|
||||
private String deptName;
|
||||
|
||||
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 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 setMeasureType(String measureType)
|
||||
{
|
||||
this.measureType = measureType;
|
||||
}
|
||||
|
||||
public String getMeasureType()
|
||||
{
|
||||
return measureType;
|
||||
}
|
||||
public void setMeasurePosition(String measurePosition)
|
||||
{
|
||||
this.measurePosition = measurePosition;
|
||||
}
|
||||
|
||||
public String getMeasurePosition()
|
||||
{
|
||||
return measurePosition;
|
||||
}
|
||||
public void setMeasureInfo(String measureInfo)
|
||||
{
|
||||
this.measureInfo = measureInfo;
|
||||
}
|
||||
|
||||
public String getMeasureInfo()
|
||||
{
|
||||
return measureInfo;
|
||||
}
|
||||
public void setMeasureTime(Date measureTime)
|
||||
{
|
||||
this.measureTime = measureTime;
|
||||
}
|
||||
|
||||
public Date getMeasureTime()
|
||||
{
|
||||
return measureTime;
|
||||
}
|
||||
public void setMeasurePointPosition(String measurePointPosition)
|
||||
{
|
||||
this.measurePointPosition = measurePointPosition;
|
||||
}
|
||||
|
||||
public String getMeasurePointPosition()
|
||||
{
|
||||
return measurePointPosition;
|
||||
}
|
||||
public void setMeasureResult(String measureResult)
|
||||
{
|
||||
this.measureResult = measureResult;
|
||||
}
|
||||
|
||||
public String getMeasureResult()
|
||||
{
|
||||
return measureResult;
|
||||
}
|
||||
public void setMeasureFiles(String measureFiles)
|
||||
{
|
||||
this.measureFiles = measureFiles;
|
||||
}
|
||||
|
||||
public String getMeasureFiles()
|
||||
{
|
||||
return measureFiles;
|
||||
}
|
||||
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 setIsDel(String isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("mainImage", getMainImage())
|
||||
.append("imageUrls", getImageUrls())
|
||||
.append("measureType", getMeasureType())
|
||||
.append("measurePosition", getMeasurePosition())
|
||||
.append("measureInfo", getMeasureInfo())
|
||||
.append("measureTime", getMeasureTime())
|
||||
.append("measurePointPosition", getMeasurePointPosition())
|
||||
.append("measureResult", getMeasureResult())
|
||||
.append("measureFiles", getMeasureFiles())
|
||||
.append("qualityUser", getQualityUser())
|
||||
.append("qualityUserName", getQualityUserName())
|
||||
.append("superviseUser", getSuperviseUser())
|
||||
.append("superviseUserName", getSuperviseUserName())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.jh.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.jh.project.domain.SurProjectMaterialSeal;
|
||||
|
||||
/**
|
||||
* 材料封样Mapper接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-22
|
||||
*/
|
||||
public interface SurProjectMaterialSealMapper
|
||||
{
|
||||
/**
|
||||
* 查询材料封样
|
||||
*
|
||||
* @param id 材料封样主键
|
||||
* @return 材料封样
|
||||
*/
|
||||
public SurProjectMaterialSeal selectSurProjectMaterialSealById(Long id);
|
||||
|
||||
/**
|
||||
* 查询材料封样列表
|
||||
*
|
||||
* @param surProjectMaterialSeal 材料封样
|
||||
* @return 材料封样集合
|
||||
*/
|
||||
public List<SurProjectMaterialSeal> selectSurProjectMaterialSealList(SurProjectMaterialSeal surProjectMaterialSeal);
|
||||
|
||||
/**
|
||||
* 新增材料封样
|
||||
*
|
||||
* @param surProjectMaterialSeal 材料封样
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectMaterialSeal(SurProjectMaterialSeal surProjectMaterialSeal);
|
||||
|
||||
/**
|
||||
* 修改材料封样
|
||||
*
|
||||
* @param surProjectMaterialSeal 材料封样
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectMaterialSeal(SurProjectMaterialSeal surProjectMaterialSeal);
|
||||
|
||||
/**
|
||||
* 删除材料封样
|
||||
*
|
||||
* @param id 材料封样主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectMaterialSealById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除材料封样
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectMaterialSealByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.jh.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.jh.project.domain.SurProjectMeasure;
|
||||
|
||||
/**
|
||||
* 实测实量Mapper接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-22
|
||||
*/
|
||||
public interface SurProjectMeasureMapper
|
||||
{
|
||||
/**
|
||||
* 查询实测实量
|
||||
*
|
||||
* @param id 实测实量主键
|
||||
* @return 实测实量
|
||||
*/
|
||||
public SurProjectMeasure selectSurProjectMeasureById(Long id);
|
||||
|
||||
/**
|
||||
* 查询实测实量列表
|
||||
*
|
||||
* @param surProjectMeasure 实测实量
|
||||
* @return 实测实量集合
|
||||
*/
|
||||
public List<SurProjectMeasure> selectSurProjectMeasureList(SurProjectMeasure surProjectMeasure);
|
||||
|
||||
/**
|
||||
* 新增实测实量
|
||||
*
|
||||
* @param surProjectMeasure 实测实量
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectMeasure(SurProjectMeasure surProjectMeasure);
|
||||
|
||||
/**
|
||||
* 修改实测实量
|
||||
*
|
||||
* @param surProjectMeasure 实测实量
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectMeasure(SurProjectMeasure surProjectMeasure);
|
||||
|
||||
/**
|
||||
* 删除实测实量
|
||||
*
|
||||
* @param id 实测实量主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectMeasureById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除实测实量
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectMeasureByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.jh.project.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.jh.project.domain.SurProjectMaterialSeal;
|
||||
|
||||
/**
|
||||
* 材料封样Service接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-22
|
||||
*/
|
||||
public interface ISurProjectMaterialSealService
|
||||
{
|
||||
/**
|
||||
* 查询材料封样
|
||||
*
|
||||
* @param id 材料封样主键
|
||||
* @return 材料封样
|
||||
*/
|
||||
public SurProjectMaterialSeal selectSurProjectMaterialSealById(Long id);
|
||||
|
||||
/**
|
||||
* 查询材料封样列表
|
||||
*
|
||||
* @param surProjectMaterialSeal 材料封样
|
||||
* @return 材料封样集合
|
||||
*/
|
||||
public List<SurProjectMaterialSeal> selectSurProjectMaterialSealList(SurProjectMaterialSeal surProjectMaterialSeal);
|
||||
|
||||
/**
|
||||
* 新增材料封样
|
||||
*
|
||||
* @param surProjectMaterialSeal 材料封样
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectMaterialSeal(SurProjectMaterialSeal surProjectMaterialSeal);
|
||||
|
||||
/**
|
||||
* 修改材料封样
|
||||
*
|
||||
* @param surProjectMaterialSeal 材料封样
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectMaterialSeal(SurProjectMaterialSeal surProjectMaterialSeal);
|
||||
|
||||
/**
|
||||
* 批量删除材料封样
|
||||
*
|
||||
* @param ids 需要删除的材料封样主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectMaterialSealByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除材料封样信息
|
||||
*
|
||||
* @param id 材料封样主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectMaterialSealById(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.jh.project.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.jh.project.domain.SurProjectMeasure;
|
||||
|
||||
/**
|
||||
* 实测实量Service接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-22
|
||||
*/
|
||||
public interface ISurProjectMeasureService
|
||||
{
|
||||
/**
|
||||
* 查询实测实量
|
||||
*
|
||||
* @param id 实测实量主键
|
||||
* @return 实测实量
|
||||
*/
|
||||
public SurProjectMeasure selectSurProjectMeasureById(Long id);
|
||||
|
||||
/**
|
||||
* 查询实测实量列表
|
||||
*
|
||||
* @param surProjectMeasure 实测实量
|
||||
* @return 实测实量集合
|
||||
*/
|
||||
public List<SurProjectMeasure> selectSurProjectMeasureList(SurProjectMeasure surProjectMeasure);
|
||||
|
||||
/**
|
||||
* 新增实测实量
|
||||
*
|
||||
* @param surProjectMeasure 实测实量
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectMeasure(SurProjectMeasure surProjectMeasure);
|
||||
|
||||
/**
|
||||
* 修改实测实量
|
||||
*
|
||||
* @param surProjectMeasure 实测实量
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectMeasure(SurProjectMeasure surProjectMeasure);
|
||||
|
||||
/**
|
||||
* 批量删除实测实量
|
||||
*
|
||||
* @param ids 需要删除的实测实量主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectMeasureByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除实测实量信息
|
||||
*
|
||||
* @param id 实测实量主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectMeasureById(Long id);
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.yanzhu.jh.project.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.jh.project.mapper.SurProjectMaterialSealMapper;
|
||||
import com.yanzhu.jh.project.domain.SurProjectMaterialSeal;
|
||||
import com.yanzhu.jh.project.service.ISurProjectMaterialSealService;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
/**
|
||||
* 材料封样Service业务层处理
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-22
|
||||
*/
|
||||
@Service
|
||||
public class SurProjectMaterialSealServiceImpl implements ISurProjectMaterialSealService
|
||||
{
|
||||
@Autowired
|
||||
private SurProjectMaterialSealMapper surProjectMaterialSealMapper;
|
||||
|
||||
/**
|
||||
* 查询材料封样
|
||||
*
|
||||
* @param id 材料封样主键
|
||||
* @return 材料封样
|
||||
*/
|
||||
@Override
|
||||
public SurProjectMaterialSeal selectSurProjectMaterialSealById(Long id)
|
||||
{
|
||||
return surProjectMaterialSealMapper.selectSurProjectMaterialSealById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询材料封样列表
|
||||
*
|
||||
* @param surProjectMaterialSeal 材料封样
|
||||
* @return 材料封样
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectMaterialSeal> selectSurProjectMaterialSealList(SurProjectMaterialSeal surProjectMaterialSeal)
|
||||
{
|
||||
return surProjectMaterialSealMapper.selectSurProjectMaterialSealList(surProjectMaterialSeal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增材料封样
|
||||
*
|
||||
* @param surProjectMaterialSeal 材料封样
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSurProjectMaterialSeal(SurProjectMaterialSeal surProjectMaterialSeal)
|
||||
{
|
||||
surProjectMaterialSeal.setCreateBy(SecurityUtils.getUsername());
|
||||
surProjectMaterialSeal.setCreateTime(DateUtils.getNowDate());
|
||||
return surProjectMaterialSealMapper.insertSurProjectMaterialSeal(surProjectMaterialSeal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改材料封样
|
||||
*
|
||||
* @param surProjectMaterialSeal 材料封样
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSurProjectMaterialSeal(SurProjectMaterialSeal surProjectMaterialSeal)
|
||||
{
|
||||
surProjectMaterialSeal.setUpdateBy(SecurityUtils.getUsername());
|
||||
surProjectMaterialSeal.setUpdateTime(DateUtils.getNowDate());
|
||||
return surProjectMaterialSealMapper.updateSurProjectMaterialSeal(surProjectMaterialSeal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除材料封样
|
||||
*
|
||||
* @param ids 需要删除的材料封样主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectMaterialSealByIds(Long[] ids)
|
||||
{
|
||||
return surProjectMaterialSealMapper.deleteSurProjectMaterialSealByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除材料封样信息
|
||||
*
|
||||
* @param id 材料封样主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectMaterialSealById(Long id)
|
||||
{
|
||||
return surProjectMaterialSealMapper.deleteSurProjectMaterialSealById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.yanzhu.jh.project.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.jh.project.mapper.SurProjectMeasureMapper;
|
||||
import com.yanzhu.jh.project.domain.SurProjectMeasure;
|
||||
import com.yanzhu.jh.project.service.ISurProjectMeasureService;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
/**
|
||||
* 实测实量Service业务层处理
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-22
|
||||
*/
|
||||
@Service
|
||||
public class SurProjectMeasureServiceImpl implements ISurProjectMeasureService
|
||||
{
|
||||
@Autowired
|
||||
private SurProjectMeasureMapper surProjectMeasureMapper;
|
||||
|
||||
/**
|
||||
* 查询实测实量
|
||||
*
|
||||
* @param id 实测实量主键
|
||||
* @return 实测实量
|
||||
*/
|
||||
@Override
|
||||
public SurProjectMeasure selectSurProjectMeasureById(Long id)
|
||||
{
|
||||
return surProjectMeasureMapper.selectSurProjectMeasureById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询实测实量列表
|
||||
*
|
||||
* @param surProjectMeasure 实测实量
|
||||
* @return 实测实量
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectMeasure> selectSurProjectMeasureList(SurProjectMeasure surProjectMeasure)
|
||||
{
|
||||
return surProjectMeasureMapper.selectSurProjectMeasureList(surProjectMeasure);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增实测实量
|
||||
*
|
||||
* @param surProjectMeasure 实测实量
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSurProjectMeasure(SurProjectMeasure surProjectMeasure)
|
||||
{
|
||||
surProjectMeasure.setCreateBy(SecurityUtils.getUsername());
|
||||
surProjectMeasure.setCreateTime(DateUtils.getNowDate());
|
||||
return surProjectMeasureMapper.insertSurProjectMeasure(surProjectMeasure);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改实测实量
|
||||
*
|
||||
* @param surProjectMeasure 实测实量
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSurProjectMeasure(SurProjectMeasure surProjectMeasure)
|
||||
{
|
||||
surProjectMeasure.setUpdateBy(SecurityUtils.getUsername());
|
||||
surProjectMeasure.setUpdateTime(DateUtils.getNowDate());
|
||||
return surProjectMeasureMapper.updateSurProjectMeasure(surProjectMeasure);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除实测实量
|
||||
*
|
||||
* @param ids 需要删除的实测实量主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectMeasureByIds(Long[] ids)
|
||||
{
|
||||
return surProjectMeasureMapper.deleteSurProjectMeasureByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除实测实量信息
|
||||
*
|
||||
* @param id 实测实量主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectMeasureById(Long id)
|
||||
{
|
||||
return surProjectMeasureMapper.deleteSurProjectMeasureById(id);
|
||||
}
|
||||
}
|
|
@ -72,11 +72,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!-- 查询条件-项目部门 -->
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<!--子部门数据-->
|
||||
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
|
||||
<if test='nowRole == "4"'> and (sp.deptId = #{nowDept} or spc.quality_user=#{nowUserName} or spc.supervise_user=#{nowUserName})</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and (spui.unitId = #{nowDept} or spc.quality_user=#{nowUserName} or spc.supervise_user=#{nowUserName})</if>
|
||||
<!--普通用户查询项目人员-->
|
||||
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
|
||||
<if test='nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spc.quality_user=#{nowUserName} or spc.supervise_user=#{nowUserName})</if>
|
||||
</where>
|
||||
order by checking_date desc
|
||||
</select>
|
||||
|
|
|
@ -0,0 +1,145 @@
|
|||
<?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.SurProjectMaterialSealMapper">
|
||||
|
||||
<resultMap type="SurProjectMaterialSeal" id="SurProjectMaterialSealResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="projectName" column="projectName" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="mainImage" column="main_image" />
|
||||
<result property="imgUrls" column="img_urls" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="usePosition" column="use_position" />
|
||||
<result property="contractBrand" column="contract_brand" />
|
||||
<result property="useBrand" column="use_brand" />
|
||||
<result property="sealDate" column="seal_date" />
|
||||
<result property="signFiles" column="sign_files" />
|
||||
<result property="alterationFiles" column="alteration_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="selectSurProjectMaterialSealVo">
|
||||
select spme.id, spme.project_id, spme.dept_id, spme.main_image, spme.img_urls, spme.material_name, spme.use_position, spme.contract_brand, spme.use_brand, spme.seal_date, spme.sign_files, spme.alteration_files, spme.is_del, spme.create_by, spme.create_time, spme.update_by, spme.update_time, spme.remark, sp.projectName, sd.dept_name from sur_project_material_seal spme
|
||||
left join sur_project sp on spme.project_id = sp.id
|
||||
left join sys_dept sd on sd.dept_id = spme.dept_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectMaterialSealList" parameterType="SurProjectMaterialSeal" resultMap="SurProjectMaterialSealResult">
|
||||
<include refid="selectSurProjectMaterialSealVo"/>
|
||||
<!--监理单位/总包公司/分包单位-->
|
||||
<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 == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
|
||||
<where>
|
||||
and spme.is_del='0'
|
||||
<if test="projectId != null "> and spme.project_id = #{projectId}</if>
|
||||
<if test="deptId != null "> and spme.dept_id = #{deptId}</if>
|
||||
<if test="imgUrls != null and imgUrls != ''"> and spme.img_urls = #{imgUrls}</if>
|
||||
<if test="materialName != null and materialName != ''"> and spme.material_name like concat('%', #{materialName}, '%')</if>
|
||||
<if test="usePosition != null and usePosition != ''"> and spme.use_position like concat('%', #{usePosition}, '%')</if>
|
||||
<if test="contractBrand != null and contractBrand != ''"> and spme.contract_brand like concat('%', #{contractBrand}, '%')</if>
|
||||
<if test="useBrand != null and useBrand != ''"> and spme.use_brand like concat('%', #{useBrand}, '%')</if>
|
||||
<if test="params.beginSealDate != null and params.beginSealDate != '' and params.endSealDate != null and params.endSealDate != ''"> and spme.seal_date between #{params.beginSealDate} and #{params.endSealDate}</if>
|
||||
<if test="isDel != null and isDel != ''"> and spme.is_del = #{isDel}</if>
|
||||
<!-- 查询条件-项目部门 -->
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<!--子部门数据-->
|
||||
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
|
||||
<!--普通用户查询项目人员-->
|
||||
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectMaterialSealById" parameterType="Long" resultMap="SurProjectMaterialSealResult">
|
||||
<include refid="selectSurProjectMaterialSealVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSurProjectMaterialSeal" parameterType="SurProjectMaterialSeal" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sur_project_material_seal
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="mainImage != null">main_image,</if>
|
||||
<if test="imgUrls != null">img_urls,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="usePosition != null">use_position,</if>
|
||||
<if test="contractBrand != null">contract_brand,</if>
|
||||
<if test="useBrand != null">use_brand,</if>
|
||||
<if test="sealDate != null">seal_date,</if>
|
||||
<if test="signFiles != null">sign_files,</if>
|
||||
<if test="alterationFiles != null">alteration_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="mainImage != null">#{mainImage},</if>
|
||||
<if test="imgUrls != null">#{imgUrls},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="usePosition != null">#{usePosition},</if>
|
||||
<if test="contractBrand != null">#{contractBrand},</if>
|
||||
<if test="useBrand != null">#{useBrand},</if>
|
||||
<if test="sealDate != null">#{sealDate},</if>
|
||||
<if test="signFiles != null">#{signFiles},</if>
|
||||
<if test="alterationFiles != null">#{alterationFiles},</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="updateSurProjectMaterialSeal" parameterType="SurProjectMaterialSeal">
|
||||
update sur_project_material_seal
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="mainImage != null">main_image = #{mainImage},</if>
|
||||
<if test="imgUrls != null">img_urls = #{imgUrls},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="usePosition != null">use_position = #{usePosition},</if>
|
||||
<if test="contractBrand != null">contract_brand = #{contractBrand},</if>
|
||||
<if test="useBrand != null">use_brand = #{useBrand},</if>
|
||||
<if test="sealDate != null">seal_date = #{sealDate},</if>
|
||||
<if test="signFiles != null">sign_files = #{signFiles},</if>
|
||||
<if test="alterationFiles != null">alteration_files = #{alterationFiles},</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="deleteSurProjectMaterialSealById" parameterType="Long">
|
||||
delete from sur_project_material_seal where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectMaterialSealByIds" parameterType="String">
|
||||
delete from sur_project_material_seal where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -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.SurProjectMeasureMapper">
|
||||
|
||||
<resultMap type="SurProjectMeasure" id="SurProjectMeasureResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="projectName" column="projectName" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="mainImage" column="main_image" />
|
||||
<result property="imageUrls" column="image_urls" />
|
||||
<result property="measureType" column="measure_type" />
|
||||
<result property="measurePosition" column="measure_position" />
|
||||
<result property="measureInfo" column="measure_info" />
|
||||
<result property="measureTime" column="measure_time" />
|
||||
<result property="measurePointPosition" column="measure_point_position" />
|
||||
<result property="measureResult" column="measure_result" />
|
||||
<result property="measureFiles" column="measure_files" />
|
||||
<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="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="selectSurProjectMeasureVo">
|
||||
select spm.id, spm.project_id, spm.dept_id, spm.main_image, spm.image_urls, spm.measure_type, spm.measure_position, spm.measure_info, spm.measure_time, spm.measure_point_position, spm.measure_result, spm.measure_files, spm.quality_user, spm.quality_user_name, spm.supervise_user, spm.supervise_user_name, spm.is_del, spm.create_by, spm.create_time, spm.update_by, spm.update_time, spm.remark, sp.prijectName, sd.dept_name from sur_project_measure spm
|
||||
left join sur_project sp on spm.project_id = sp.id
|
||||
left join sys_dept sd on sd.dept_id = spm.dept_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectMeasureList" parameterType="SurProjectMeasure" resultMap="SurProjectMeasureResult">
|
||||
<include refid="selectSurProjectMeasureVo"/>
|
||||
<!--监理单位/总包公司/分包单位-->
|
||||
<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 == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
|
||||
<where>
|
||||
and spm.is_del='0'
|
||||
<if test="projectId != null "> and spm.project_id = #{projectId}</if>
|
||||
<if test="deptId != null ">
|
||||
<if test="nowUserName == null or nowUserName == ''">and spm.dept_id = #{deptId}</if>
|
||||
<if test="nowUserName != null and nowUserName != ''">and (spm.dept_id = #{deptId} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
|
||||
</if>
|
||||
<if test="measureType != null and measureType != ''"> and spm.measure_type = #{measureType}</if>
|
||||
<if test="measurePosition != null and measurePosition != ''"> and spm.measure_position like concat('%', #{measurePosition}, '%')</if>
|
||||
<if test="measureInfo != null and measureInfo != ''"> and spm.measure_info like concat('%', #{measureInfo}, '%')</if>
|
||||
<if test="params.beginMeasureTime != null and params.beginMeasureTime != '' and params.endMeasureTime != null and params.endMeasureTime != ''"> and spm.measure_time between #{params.beginMeasureTime} and #{params.endMeasureTime}</if>
|
||||
<if test="measurePointPosition != null and measurePointPosition != ''"> and spm.measure_point_position like concat('%', #{measurePointPosition}, '%')</if>
|
||||
<if test="measureResult != null and measureResult != ''"> and measure_result = #{measureResult}</if>
|
||||
<if test="qualityUser != null and qualityUser != ''"> and (spm.quality_user like concat('%', #{qualityUser}, '%') or spm.quality_user_name like concat('%', #{qualityUser}, '%'))</if>
|
||||
<if test="superviseUser != null and superviseUser != ''"> and (spm.supervise_user like concat('%', #{superviseUser}, '%') or spm.supervise_user_name like concat('%', #{superviseUser}, '%'))</if>
|
||||
<if test="isDel != null and isDel != ''"> and spm.is_del like concat('%', #{isDel}, '%')</if>
|
||||
<!-- 查询条件-项目部门 -->
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<!--子部门数据-->
|
||||
<if test='nowRole == "4"'> and (sp.deptId = #{nowDept} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and (spui.unitId = #{nowDept} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
|
||||
<!--普通用户查询项目人员-->
|
||||
<if test='nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectMeasureById" parameterType="Long" resultMap="SurProjectMeasureResult">
|
||||
<include refid="selectSurProjectMeasureVo"/>
|
||||
where spm.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSurProjectMeasure" parameterType="SurProjectMeasure" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sur_project_measure
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="mainImage != null">main_image,</if>
|
||||
<if test="imageUrls != null">image_urls,</if>
|
||||
<if test="measureType != null">measure_type,</if>
|
||||
<if test="measurePosition != null">measure_position,</if>
|
||||
<if test="measureInfo != null">measure_info,</if>
|
||||
<if test="measureTime != null">measure_time,</if>
|
||||
<if test="measurePointPosition != null">measure_point_position,</if>
|
||||
<if test="measureResult != null">measure_result,</if>
|
||||
<if test="measureFiles != null">measure_files,</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="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="mainImage != null">#{mainImage},</if>
|
||||
<if test="imageUrls != null">#{imageUrls},</if>
|
||||
<if test="measureType != null">#{measureType},</if>
|
||||
<if test="measurePosition != null">#{measurePosition},</if>
|
||||
<if test="measureInfo != null">#{measureInfo},</if>
|
||||
<if test="measureTime != null">#{measureTime},</if>
|
||||
<if test="measurePointPosition != null">#{measurePointPosition},</if>
|
||||
<if test="measureResult != null">#{measureResult},</if>
|
||||
<if test="measureFiles != null">#{measureFiles},</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="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="updateSurProjectMeasure" parameterType="SurProjectMeasure">
|
||||
update sur_project_measure
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="mainImage != null">main_image = #{mainImage},</if>
|
||||
<if test="imageUrls != null">image_urls = #{imageUrls},</if>
|
||||
<if test="measureType != null">measure_type = #{measureType},</if>
|
||||
<if test="measurePosition != null">measure_position = #{measurePosition},</if>
|
||||
<if test="measureInfo != null">measure_info = #{measureInfo},</if>
|
||||
<if test="measureTime != null">measure_time = #{measureTime},</if>
|
||||
<if test="measurePointPosition != null">measure_point_position = #{measurePointPosition},</if>
|
||||
<if test="measureResult != null">measure_result = #{measureResult},</if>
|
||||
<if test="measureFiles != null">measure_files = #{measureFiles},</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="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="deleteSurProjectMeasureById" parameterType="Long">
|
||||
delete from sur_project_measure where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectMeasureByIds" parameterType="String">
|
||||
delete from sur_project_measure where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue