Compare commits
3 Commits
2f13947a84
...
e3e1c2fc2b
Author | SHA1 | Date |
---|---|---|
|
e3e1c2fc2b | |
|
4648c5950a | |
|
c598059e02 |
|
@ -48,4 +48,9 @@ public @interface Log
|
||||||
* 排除指定的请求参数
|
* 排除指定的请求参数
|
||||||
*/
|
*/
|
||||||
public String[] excludeParamNames() default {};
|
public String[] excludeParamNames() default {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 昵称
|
||||||
|
*/
|
||||||
|
public String nickname() default "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,13 +101,9 @@ public class LogAspect
|
||||||
if (loginUser != null)
|
if (loginUser != null)
|
||||||
{
|
{
|
||||||
operLog.setOperName(loginUser.getUsername());
|
operLog.setOperName(loginUser.getUsername());
|
||||||
/*********************getAuthentication未获取用户信息时,从cookies中获取操作人信息***************************/
|
/*********************getAuthentication未获取用户信息时,从RequestURI中获取操作人信息***************************/
|
||||||
}else if(ServletUtils.getRequest().getCookies()!=null && ServletUtils.getRequest().getCookies().length>0){
|
}else if(ServletUtils.getRequest().getHeader("Username")!=null){
|
||||||
for(Cookie cookie:ServletUtils.getRequest().getCookies()){
|
operLog.setOperName(ServletUtils.getRequest().getHeader("Username"));
|
||||||
if(cookie.getName().equals("username")){
|
|
||||||
operLog.setOperName(cookie.getValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e != null)
|
if (e != null)
|
||||||
|
|
|
@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||||
// 过滤请求
|
// 过滤请求
|
||||||
.authorizeRequests()
|
.authorizeRequests()
|
||||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||||
.antMatchers("/login","/wechatLogin/**", "/common/**", "/register", "/captchaImage", "/weixin/**","/bgscreen/**","/publics/**","/system/dict/data/**").permitAll()
|
.antMatchers("/login","/wechat/**", "/common/**", "/register", "/captchaImage", "/weixin/**","/bgscreen/**","/publics/**","/system/dict/data/**").permitAll()
|
||||||
// 静态资源,可匿名访问
|
// 静态资源,可匿名访问
|
||||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/**/img/**", "/profile/**").permitAll()
|
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/**/img/**", "/profile/**").permitAll()
|
||||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||||
|
|
|
@ -124,4 +124,20 @@ public interface SysDeptMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteDeptById(Long deptId);
|
public int deleteDeptById(Long deptId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据项目ID查询部门信息
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @return 部门信息
|
||||||
|
*/
|
||||||
|
public SysDept selectDeptByProjectId(Long projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户名称查询部门信息
|
||||||
|
*
|
||||||
|
* @param userName 用户名称
|
||||||
|
* @return 部门信息
|
||||||
|
*/
|
||||||
|
public SysDept selectDeptByUserName(String userName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,7 +367,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
// for(Long id:userIds){
|
// for(Long id:userIds){
|
||||||
// SysUserRole sr = new SysUserRole();
|
// SysUserRole sr = new SysUserRole();
|
||||||
// sr.setUserId(id);
|
// sr.setUserId(id);
|
||||||
// sr.setRoleId(95L);
|
// sr.setRoleId(5L);
|
||||||
// sysUserRoleList.add(sr);
|
// sysUserRoleList.add(sr);
|
||||||
// }
|
// }
|
||||||
// userRoleMapper.batchUserRole(sysUserRoleList);
|
// userRoleMapper.batchUserRole(sysUserRoleList);
|
||||||
|
|
|
@ -186,4 +186,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update sys_dept set del_flag = '2' where dept_id = #{deptId}
|
update sys_dept set del_flag = '2' where dept_id = #{deptId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectDeptByProjectId" parameterType="Long" resultMap="SysDeptResult">
|
||||||
|
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.com_flag, d.type_flag
|
||||||
|
from sys_dept d
|
||||||
|
left join sur_project sp on sp.deptId = d.dept_id
|
||||||
|
where sp.id = #{projectId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDeptByUserName" parameterType="String" resultMap="SysDeptResult">
|
||||||
|
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.com_flag, d.type_flag
|
||||||
|
from sys_dept d
|
||||||
|
left join sys_user u on u.dept_id = d.dept_id
|
||||||
|
where u.user_name = #{userName}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -217,7 +217,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectUserByDept" resultType="Long">
|
<select id="selectUserByDept" resultType="Long">
|
||||||
select u.user_id from sys_user u
|
select u.user_id from sys_user u
|
||||||
left join sys_dept d on d.dept_id=u.dept_id
|
left join sys_dept d on d.dept_id=u.dept_id
|
||||||
where d.ancestors like '%207%'
|
where d.ancestors like '%188%'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteUserByIds" parameterType="Long">
|
<delete id="deleteUserByIds" parameterType="Long">
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 4.9 KiB |
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询菜单配置列表
|
||||||
|
export function listWxMenConfig(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wxsetting/wxMenConfig/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询菜单配置详细
|
||||||
|
export function getWxMenConfig(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wxsetting/wxMenConfig/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增菜单配置
|
||||||
|
export function addWxMenConfig(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wxsetting/wxMenConfig',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改菜单配置
|
||||||
|
export function updateWxMenConfig(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wxsetting/wxMenConfig',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除菜单配置
|
||||||
|
export function delWxMenConfig(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wxsetting/wxMenConfig/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
|
@ -401,7 +401,7 @@ export default {
|
||||||
this.$api.publics
|
this.$api.publics
|
||||||
.queryUnitList({
|
.queryUnitList({
|
||||||
projectId: project.id,
|
projectId: project.id,
|
||||||
unitType: 2,
|
unitTypes: "2,4".split(","),
|
||||||
})
|
})
|
||||||
.then((d) => {
|
.then((d) => {
|
||||||
this.nodes = d.rows;
|
this.nodes = d.rows;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="doExport"
|
@click="doExport"
|
||||||
v-hasPermi="['project:build_node_data:import']"
|
v-hasPermi="['project:build_node_data:export']"
|
||||||
>导出</el-button
|
>导出</el-button
|
||||||
>
|
>
|
||||||
<el-popover
|
<el-popover
|
||||||
|
@ -27,6 +27,7 @@
|
||||||
type="success"
|
type="success"
|
||||||
slot="reference"
|
slot="reference"
|
||||||
@click="doImport"
|
@click="doImport"
|
||||||
|
v-hasPermi="['project:build_node_data:import']"
|
||||||
style="margin: 0px 12px"
|
style="margin: 0px 12px"
|
||||||
>导入</el-button
|
>导入</el-button
|
||||||
>
|
>
|
||||||
|
|
|
@ -0,0 +1,352 @@
|
||||||
|
<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="menuName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.menuName"
|
||||||
|
placeholder="请输入菜单名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="菜单标识" prop="menuIdenti">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.menuIdenti"
|
||||||
|
placeholder="请输入菜单标识"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="菜单图片" prop="menuImg">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.menuImg"
|
||||||
|
placeholder="请输入菜单图片"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="菜单地址" prop="menuUrl">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.menuUrl"
|
||||||
|
placeholder="请输入菜单地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="删除状态" prop="delFlag">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.delFlag"
|
||||||
|
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="['wxsetting:wxMenConfig: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="['wxsetting:wxMenConfig: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="['wxsetting:wxMenConfig: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="['wxsetting:wxMenConfig:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="wxMenConfigList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="${comment}" align="center" prop="id" />
|
||||||
|
<el-table-column label="菜单名称" align="center" prop="menuName" />
|
||||||
|
<el-table-column label="菜单标识" align="center" prop="menuIdenti" />
|
||||||
|
<el-table-column label="菜单图片" align="center" prop="menuImg" />
|
||||||
|
<el-table-column label="菜单地址" align="center" prop="menuUrl" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['wxsetting:wxMenConfig:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['wxsetting:wxMenConfig: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="menuName">
|
||||||
|
<el-input v-model="form.menuName" placeholder="请输入菜单名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="菜单标识" prop="menuIdenti">
|
||||||
|
<el-input v-model="form.menuIdenti" placeholder="请输入菜单标识" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="菜单图片" prop="menuImg">
|
||||||
|
<el-input v-model="form.menuImg" placeholder="请输入菜单图片" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="菜单地址" prop="menuUrl">
|
||||||
|
<el-input v-model="form.menuUrl" placeholder="请输入菜单地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="删除状态" prop="delFlag">
|
||||||
|
<el-input v-model="form.delFlag" placeholder="请输入删除状态" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-divider content-position="center">菜单配置角色信息</el-divider>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddSurMenuConfigRole">添加</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteSurMenuConfigRole">删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="surMenuConfigRoleList" :row-class-name="rowSurMenuConfigRoleIndex" @selection-change="handleSurMenuConfigRoleSelectionChange" ref="surMenuConfigRole">
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||||
|
<el-table-column label="角色主键" prop="roleId" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.roleId" placeholder="请输入角色主键" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listWxMenConfig, getWxMenConfig, delWxMenConfig, addWxMenConfig, updateWxMenConfig } from "@/api/wxsetting/wxMenConfig";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "WxMenConfig",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 子表选中数据
|
||||||
|
checkedSurMenuConfigRole: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 菜单配置表格数据
|
||||||
|
wxMenConfigList: [],
|
||||||
|
// 菜单配置角色表格数据
|
||||||
|
surMenuConfigRoleList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
menuName: null,
|
||||||
|
menuIdenti: null,
|
||||||
|
menuImg: null,
|
||||||
|
menuUrl: null,
|
||||||
|
delFlag: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询菜单配置列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listWxMenConfig(this.queryParams).then(response => {
|
||||||
|
this.wxMenConfigList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
menuName: null,
|
||||||
|
menuIdenti: null,
|
||||||
|
menuImg: null,
|
||||||
|
menuUrl: null,
|
||||||
|
delFlag: null,
|
||||||
|
createTime: null
|
||||||
|
};
|
||||||
|
this.surMenuConfigRoleList = [];
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加菜单配置";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getWxMenConfig(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.surMenuConfigRoleList = response.data.surMenuConfigRoleList;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改菜单配置";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.form.surMenuConfigRoleList = this.surMenuConfigRoleList;
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateWxMenConfig(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addWxMenConfig(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 delWxMenConfig(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 菜单配置角色序号 */
|
||||||
|
rowSurMenuConfigRoleIndex({ row, rowIndex }) {
|
||||||
|
row.index = rowIndex + 1;
|
||||||
|
},
|
||||||
|
/** 菜单配置角色添加按钮操作 */
|
||||||
|
handleAddSurMenuConfigRole() {
|
||||||
|
let obj = {};
|
||||||
|
obj.roleId = "";
|
||||||
|
this.surMenuConfigRoleList.push(obj);
|
||||||
|
},
|
||||||
|
/** 菜单配置角色删除按钮操作 */
|
||||||
|
handleDeleteSurMenuConfigRole() {
|
||||||
|
if (this.checkedSurMenuConfigRole.length == 0) {
|
||||||
|
this.$modal.msgError("请先选择要删除的菜单配置角色数据");
|
||||||
|
} else {
|
||||||
|
const surMenuConfigRoleList = this.surMenuConfigRoleList;
|
||||||
|
const checkedSurMenuConfigRole = this.checkedSurMenuConfigRole;
|
||||||
|
this.surMenuConfigRoleList = surMenuConfigRoleList.filter(function(item) {
|
||||||
|
return checkedSurMenuConfigRole.indexOf(item.index) == -1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 复选框选中数据 */
|
||||||
|
handleSurMenuConfigRoleSelectionChange(selection) {
|
||||||
|
this.checkedSurMenuConfigRole = selection.map(item => item.index)
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('wxsetting/wxMenConfig/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `wxMenConfig_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
* @Date: 2020/7/7 18:03
|
* @Date: 2020/7/7 18:03
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/weixin/projectchecking")
|
@RequestMapping("/wechat/projectchecking")
|
||||||
public class ProjectCheckingController extends BaseController {
|
public class ProjectCheckingController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -34,7 +34,7 @@ public class ProjectCheckingController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询当前用户举牌验收项目列表
|
* 查询举牌验收详情
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,150 @@
|
||||||
|
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.domain.entity.SysDictData;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.enums.PublicStateEnum;
|
||||||
|
import com.ruoyi.system.service.ISysDictDataService;
|
||||||
|
import com.yanzhu.jh.trouble.domain.SmzSspAuditinfo;
|
||||||
|
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
|
||||||
|
import com.yanzhu.jh.trouble.service.ISmzSspAuditinfoService;
|
||||||
|
import com.yanzhu.jh.trouble.service.ISmzSspProblemmodifyService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version : V1.0
|
||||||
|
* @ClassName: ProjectProblemmodifyController
|
||||||
|
* @Description: 项目问题修改
|
||||||
|
* @Auther: JiangYuQi
|
||||||
|
* @Date: 2020/7/7 18:03
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wechat/projectProblemmodify")
|
||||||
|
|
||||||
|
|
||||||
|
public class ProjectProblemmodifyController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ISysDictDataService sysDictDataService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ISmzSspAuditinfoService smzSspAuditinfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ISmzSspProblemmodifyService smzSspProblemmodifyService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当前用户问题整改列表
|
||||||
|
* @param smzSspProblemmodify
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list(SmzSspProblemmodify smzSspProblemmodify){
|
||||||
|
return success(smzSspProblemmodifyService.selectWechatSmzSspProblemmodifyList(smzSspProblemmodify));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当前用户问题整改列表
|
||||||
|
* @param smzSspProblemmodify
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryCount")
|
||||||
|
public AjaxResult queryCount(SmzSspProblemmodify smzSspProblemmodify){
|
||||||
|
return success(smzSspProblemmodifyService.findProblemmodifyGroupByCheckState(smzSspProblemmodify));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询问题整改详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/info")
|
||||||
|
public AjaxResult info(Long id){
|
||||||
|
return success(smzSspProblemmodifyService.selectSmzSspProblemmodifyInfoById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除质量整改
|
||||||
|
*/
|
||||||
|
@Log(title = "质量整改", businessType = BusinessType.DELETE)
|
||||||
|
@GetMapping("/removeSafety")
|
||||||
|
public AjaxResult removeSafety(@RequestParam Long id)
|
||||||
|
{
|
||||||
|
return toAjax(smzSspProblemmodifyService.deleteSmzSspProblemmodifyById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除质量整改
|
||||||
|
*/
|
||||||
|
@Log(title = "质量隐患排查", businessType = BusinessType.DELETE)
|
||||||
|
@GetMapping("/removeQuality")
|
||||||
|
public AjaxResult removeQuality(@RequestParam Long id)
|
||||||
|
{
|
||||||
|
return toAjax(smzSspProblemmodifyService.deleteSmzSspProblemmodifyById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增问题整改
|
||||||
|
* @param smzSspProblemmodify
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/addSafety")
|
||||||
|
@Log(title = "安全隐患排查", businessType = BusinessType.INSERT)
|
||||||
|
public AjaxResult addSafety(@RequestBody SmzSspProblemmodify smzSspProblemmodify){
|
||||||
|
return success(smzSspProblemmodifyService.insertSmzSspProblemmodify(smzSspProblemmodify));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增问题整改
|
||||||
|
* @param smzSspProblemmodify
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/addQuality")
|
||||||
|
@Log(title = "质量隐患排查", businessType = BusinessType.INSERT)
|
||||||
|
public AjaxResult addQuality(@RequestBody SmzSspProblemmodify smzSspProblemmodify){
|
||||||
|
return success(smzSspProblemmodifyService.insertSmzSspProblemmodify(smzSspProblemmodify));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询问题整改详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryAuditInfo")
|
||||||
|
public AjaxResult queryAuditInfo(@RequestParam Long id){
|
||||||
|
return success(smzSspAuditinfoService.selectLastSmzSspAuditinfoByMainId(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交问题整改
|
||||||
|
* @param smzSspAuditinfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/modifyProblem")
|
||||||
|
@Log(title = "举牌验收", businessType = BusinessType.INSERT)
|
||||||
|
public AjaxResult modifyProblem(@RequestBody SmzSspAuditinfo smzSspAuditinfo){
|
||||||
|
return success(smzSspAuditinfoService.insertSmzSspAuditinfo(smzSspAuditinfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询隐患类型
|
||||||
|
* @param type
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryDangerType")
|
||||||
|
public AjaxResult queryDangerType(@RequestParam String type){
|
||||||
|
SysDictData dictData = new SysDictData();
|
||||||
|
dictData.setDictType(type);
|
||||||
|
dictData.setStatus(PublicStateEnum.OK.getCode());
|
||||||
|
return success(sysDictDataService.selectDictDataList(dictData));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ import com.yanzhu.jh.project.service.ISurProjectUserinfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
* @Date: 2020/7/7 18:03
|
* @Date: 2020/7/7 18:03
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/weixin/projectuserinfo")
|
@RequestMapping("/wechat/projectuserinfo")
|
||||||
public class ProjectUserinfoController extends BaseController {
|
public class ProjectUserinfoController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -32,4 +33,15 @@ public class ProjectUserinfoController extends BaseController {
|
||||||
public AjaxResult list(SurProjectUserinfo surProjectUserinfo){
|
public AjaxResult list(SurProjectUserinfo surProjectUserinfo){
|
||||||
return success(surProjectUserinfoService.selectProjectUnitUser(surProjectUserinfo));
|
return success(surProjectUserinfoService.selectProjectUnitUser(surProjectUserinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目整改人,复检人,抄送人
|
||||||
|
* @param projectId
|
||||||
|
* @param loginName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryAllProjectUserByParams")
|
||||||
|
public AjaxResult queryAllProjectUserByParams(@RequestParam Long projectId, String loginName){
|
||||||
|
return success(surProjectUserinfoService.queryAllProjectUserInfo(projectId,loginName));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
* @Date: 2020/7/7 18:03
|
* @Date: 2020/7/7 18:03
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/wechatLogin")
|
@RequestMapping("/wechat")
|
||||||
public class WechatUserLoginController extends BaseController {
|
public class WechatUserLoginController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -83,4 +83,14 @@ public class WechatUserLoginController extends BaseController {
|
||||||
return wechatUserLoginService.getOpenId(code,appId);
|
return wechatUserLoginService.getOpenId(code,appId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户查询菜单信息
|
||||||
|
* @param username
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/selectRoleMenuList")
|
||||||
|
public Object selectRoleMenuList(String username){
|
||||||
|
return wechatUserLoginService.selectRoleMenuList(username);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.web.system.mapper;
|
package com.ruoyi.web.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,4 +61,11 @@ public interface WechatUserLoginMapper {
|
||||||
*/
|
*/
|
||||||
Map<String,Object> getUserNameByOpenId(String openId);
|
Map<String,Object> getUserNameByOpenId(String openId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户查询菜单信息
|
||||||
|
* @param username
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String,Object>> selectRoleMenuList(String username);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.ruoyi.web.system.service;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,4 +35,11 @@ public interface IWechatUserLoginService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public LoginUser getLoginUserByOpenId(String openId);
|
public LoginUser getLoginUserByOpenId(String openId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户查询菜单信息
|
||||||
|
* @param username
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String,Object>> selectRoleMenuList(String username);
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,4 +162,15 @@ public class WechatUserLoginServiceImpl implements IWechatUserLoginService {
|
||||||
json.remove("session_key");
|
json.remove("session_key");
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户查询菜单信息
|
||||||
|
* @param username
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String,Object>> selectRoleMenuList(String username) {
|
||||||
|
return wechatUserLoginMapper.selectRoleMenuList(username);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,4 +110,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select count(1) from sys_user_openid where openId=#{openId} and isDel=0
|
select count(1) from sys_user_openid where openId=#{openId} and isDel=0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!--查询角色相关菜单-->
|
||||||
|
<select id="selectRoleMenuList" parameterType="String" resultType="map">
|
||||||
|
SELECT
|
||||||
|
smc.id,
|
||||||
|
smc.menu_name,
|
||||||
|
smc.menu_identi,
|
||||||
|
smc.menu_img,
|
||||||
|
smc.menu_url,
|
||||||
|
smc.menu_sort
|
||||||
|
FROM
|
||||||
|
sur_menu_config smc
|
||||||
|
LEFT JOIN sur_menu_config_role smcr ON smcr.smcid = smc.id
|
||||||
|
LEFT JOIN sys_role sr ON sr.role_id = smcr.role_id
|
||||||
|
LEFT JOIN sys_user_role ur ON sr.role_id = ur.role_id
|
||||||
|
LEFT JOIN sys_user su ON ur.user_id = su.user_id
|
||||||
|
WHERE
|
||||||
|
smc.del_flag = 0
|
||||||
|
AND su.phonenumber = #{username}
|
||||||
|
order by smc.menu_sort asc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -62,6 +62,9 @@ public class SurProjectUserinfo extends BaseEntity
|
||||||
private Long[] projectIds;
|
private Long[] projectIds;
|
||||||
private Long[] userIds;
|
private Long[] userIds;
|
||||||
private String jobTypeName;
|
private String jobTypeName;
|
||||||
|
private String roleId;
|
||||||
|
private String deptTypeFlag;
|
||||||
|
private String deptAncestors;
|
||||||
|
|
||||||
public void setProjectName(String projectName) {
|
public void setProjectName(String projectName) {
|
||||||
this.projectName = projectName;
|
this.projectName = projectName;
|
||||||
|
@ -192,6 +195,30 @@ public class SurProjectUserinfo extends BaseEntity
|
||||||
this.state = false;
|
this.state = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getRoleId() {
|
||||||
|
return roleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoleId(String roleId) {
|
||||||
|
this.roleId = roleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeptTypeFlag() {
|
||||||
|
return deptTypeFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptTypeFlag(String deptTypeFlag) {
|
||||||
|
this.deptTypeFlag = deptTypeFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeptAncestors() {
|
||||||
|
return deptAncestors;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptAncestors(String deptAncestors) {
|
||||||
|
this.deptAncestors = deptAncestors;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
|
|
@ -30,6 +30,22 @@ public interface SurProjectUserinfoMapper
|
||||||
*/
|
*/
|
||||||
public List<SurProjectUserinfo> selectSurProjectUserinfoList(SurProjectUserinfo surProjectUserinfo);
|
public List<SurProjectUserinfo> selectSurProjectUserinfoList(SurProjectUserinfo surProjectUserinfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目部门用户列表
|
||||||
|
*
|
||||||
|
* @param surProjectUserinfo 项目用户
|
||||||
|
* @return 项目用户集合
|
||||||
|
*/
|
||||||
|
public List<SurProjectUserinfo> selectProjectDeptUserinfoList(SurProjectUserinfo surProjectUserinfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目用户信息
|
||||||
|
*
|
||||||
|
* @param surProjectUserinfo 项目用户
|
||||||
|
* @return 项目用户集合
|
||||||
|
*/
|
||||||
|
public List<SurProjectUserinfo> querySurProjectUserinfoByParams(SurProjectUserinfo surProjectUserinfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增项目用户
|
* 新增项目用户
|
||||||
*
|
*
|
||||||
|
|
|
@ -40,6 +40,15 @@ public interface ISurProjectUserinfoService
|
||||||
*/
|
*/
|
||||||
public List<SurProjectUnitInfo> selectProjectUnitUser(SurProjectUserinfo surProjectUserinfo);
|
public List<SurProjectUnitInfo> selectProjectUnitUser(SurProjectUserinfo surProjectUserinfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目相关人员
|
||||||
|
*
|
||||||
|
* @param projectId 项目主键
|
||||||
|
* @param loginName 项目用户
|
||||||
|
* @return 项目用户集合
|
||||||
|
*/
|
||||||
|
public List<SurProjectUnitInfo> queryAllProjectUserInfo(Long projectId, String loginName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增项目用户
|
* 新增项目用户
|
||||||
*
|
*
|
||||||
|
|
|
@ -81,7 +81,11 @@ public class SurProjectCheckingServiceImpl implements ISurProjectCheckingService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dataMap.put("sum",sum);//验收数
|
dataMap.put("sum",sum);//验收数
|
||||||
|
if(sum>0){
|
||||||
dataMap.put("okSum",okSum*100/sum);//合格率
|
dataMap.put("okSum",okSum*100/sum);//合格率
|
||||||
|
}else{
|
||||||
|
dataMap.put("okSum",100);//合格率
|
||||||
|
}
|
||||||
return dataMap;
|
return dataMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
package com.yanzhu.jh.project.service.impl;
|
package com.yanzhu.jh.project.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import com.ruoyi.common.annotation.DataScope;
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
|
@ -11,9 +8,11 @@ import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.common.enums.DeptTypeEnum;
|
import com.ruoyi.common.enums.DeptTypeEnum;
|
||||||
import com.ruoyi.common.enums.PublicStateEnum;
|
import com.ruoyi.common.enums.PublicStateEnum;
|
||||||
|
import com.ruoyi.common.enums.SysRoleEnum;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.system.mapper.SysDeptMapper;
|
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||||
|
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||||
import com.ruoyi.system.mapper.SysUserMapper;
|
import com.ruoyi.system.mapper.SysUserMapper;
|
||||||
import com.yanzhu.jh.project.domain.SurProject;
|
import com.yanzhu.jh.project.domain.SurProject;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectUnitInfo;
|
import com.yanzhu.jh.project.domain.SurProjectUnitInfo;
|
||||||
|
@ -44,6 +43,9 @@ public class SurProjectUserinfoServiceImpl implements ISurProjectUserinfoService
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysUserMapper sysUserMapper;
|
private SysUserMapper sysUserMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysRoleMapper sysRoleMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SurProjectUnitInfoMapper surProjectUnitInfoMapper;
|
private SurProjectUnitInfoMapper surProjectUnitInfoMapper;
|
||||||
|
|
||||||
|
@ -100,6 +102,74 @@ public class SurProjectUserinfoServiceImpl implements ISurProjectUserinfoService
|
||||||
return projectUnitUserInfoList;
|
return projectUnitUserInfoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据不同角色查询项目人员信息
|
||||||
|
*
|
||||||
|
* @param projectId 项目主键
|
||||||
|
* @param loginName 用户名称
|
||||||
|
* @return 项目用户集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SurProjectUnitInfo> queryAllProjectUserInfo(Long projectId, String loginName) {
|
||||||
|
String nowRole = Convert.toStr(sysRoleMapper.getUserMinRoleIdByLoginName(loginName));
|
||||||
|
//查询出公司信息
|
||||||
|
SurProjectUnitInfo surProjectUnitInfo = new SurProjectUnitInfo();
|
||||||
|
surProjectUnitInfo.setProjectId(projectId);
|
||||||
|
List<SurProjectUnitInfo> surProjectUnitInfoList = surProjectUnitInfoMapper.selectSurProjectUnitInfoList(surProjectUnitInfo);
|
||||||
|
List<SurProjectUserinfo> projectUserList = new ArrayList<>();
|
||||||
|
SurProjectUserinfo surProjectUserinfo = new SurProjectUserinfo();
|
||||||
|
surProjectUserinfo.setProjectId(projectId);
|
||||||
|
surProjectUserinfo.setCreateBy(loginName);
|
||||||
|
//根据项目主键查询所有项目人员
|
||||||
|
projectUserList = surProjectUserinfoMapper.selectSurProjectUserinfoList(surProjectUserinfo);
|
||||||
|
//根据角色查询项目单位人员信息
|
||||||
|
if(SysRoleEnum.ADMIN.getCode().equals(nowRole) || SysRoleEnum.SUPR.getCode().equals(nowRole) || SysRoleEnum.JTGS.getCode().equals(nowRole) || SysRoleEnum.ZGS.getCode().equals(nowRole)){
|
||||||
|
surProjectUserinfo.setRoleId(SysRoleEnum.ZGS.getCode());
|
||||||
|
//查询所属项目部门信息
|
||||||
|
SysDept sysDept = deptMapper.selectDeptByProjectId(projectId);
|
||||||
|
surProjectUserinfo.setDeptId(sysDept.getDeptId());
|
||||||
|
}else if(SysRoleEnum.JLDW.getCode().equals(nowRole)){
|
||||||
|
//监理单位只能选择监理单位
|
||||||
|
surProjectUserinfo.setRoleId(SysRoleEnum.JLDW.getCode());
|
||||||
|
//查询部门信息
|
||||||
|
SysDept sysDept = deptMapper.selectDeptByUserName(loginName);
|
||||||
|
surProjectUserinfo.setDeptId(sysDept.getDeptId());
|
||||||
|
}else if(SysRoleEnum.ZBDW.getCode().equals(nowRole)){
|
||||||
|
//总包单位只能选择总包单位
|
||||||
|
surProjectUserinfo.setRoleId(SysRoleEnum.ZBDW.getCode());
|
||||||
|
//查询部门信息
|
||||||
|
SysDept sysDept = deptMapper.selectDeptByUserName(loginName);
|
||||||
|
surProjectUserinfo.setDeptId(sysDept.getDeptId());
|
||||||
|
}else if(SysRoleEnum.FBDW.getCode().equals(nowRole)){
|
||||||
|
//分包单位只能选择分包单位
|
||||||
|
surProjectUserinfo.setRoleId(SysRoleEnum.FBDW.getCode());
|
||||||
|
//查询部门信息
|
||||||
|
SysDept sysDept = deptMapper.selectDeptByUserName(loginName);
|
||||||
|
surProjectUserinfo.setDeptId(sysDept.getDeptId());
|
||||||
|
}
|
||||||
|
//查询相关人员
|
||||||
|
List<SurProjectUserinfo> deptUserList = new ArrayList<>();
|
||||||
|
|
||||||
|
if(!SysRoleEnum.COMMON.getCode().equals(nowRole)){
|
||||||
|
deptUserList = surProjectUserinfoMapper.selectProjectDeptUserinfoList(surProjectUserinfo);
|
||||||
|
projectUserList.addAll(deptUserList);
|
||||||
|
}
|
||||||
|
for(SurProjectUnitInfo unitInfo:surProjectUnitInfoList){
|
||||||
|
List<SurProjectUserinfo> userInfoList = new ArrayList<>();
|
||||||
|
for(SurProjectUserinfo userinfo:projectUserList){
|
||||||
|
//同一部门组装数据
|
||||||
|
if(unitInfo.getUnitId().equals(userinfo.getDeptId())){
|
||||||
|
userInfoList.add(userinfo);
|
||||||
|
}else if(userinfo.getDeptAncestors()!=null && userinfo.getDeptAncestors().indexOf(Convert.toStr(unitInfo.getUnitId()))>-1){
|
||||||
|
userInfoList.add(userinfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unitInfo.setUserinfoList(userInfoList);
|
||||||
|
}
|
||||||
|
return surProjectUnitInfoList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增项目用户
|
* 新增项目用户
|
||||||
*
|
*
|
||||||
|
|
|
@ -0,0 +1,123 @@
|
||||||
|
package com.yanzhu.jh.trouble.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 随手拍文件信息对象 smz_ssp_fileinfo
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-23
|
||||||
|
*/
|
||||||
|
public class SmzSspFileinfo extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 审核表id */
|
||||||
|
@Excel(name = "审核表id")
|
||||||
|
private Long auditId;
|
||||||
|
|
||||||
|
/** 文件类型(0图片,1视频) */
|
||||||
|
@Excel(name = "文件类型", readConverterExp = "0=图片,1视频")
|
||||||
|
private Long fileType;
|
||||||
|
|
||||||
|
/** 文件的url */
|
||||||
|
@Excel(name = "文件的url")
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/** 删除状态(0未删除,1已删除) */
|
||||||
|
@Excel(name = "删除状态", readConverterExp = "0=未删除,1已删除")
|
||||||
|
private Long isDel;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
@Excel(name = "创建人")
|
||||||
|
private String createUser;
|
||||||
|
|
||||||
|
/** 修改人 */
|
||||||
|
@Excel(name = "修改人")
|
||||||
|
private String updateUser;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setAuditId(Long auditId)
|
||||||
|
{
|
||||||
|
this.auditId = auditId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAuditId()
|
||||||
|
{
|
||||||
|
return auditId;
|
||||||
|
}
|
||||||
|
public void setFileType(Long fileType)
|
||||||
|
{
|
||||||
|
this.fileType = fileType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFileType()
|
||||||
|
{
|
||||||
|
return fileType;
|
||||||
|
}
|
||||||
|
public void setFileUrl(String fileUrl)
|
||||||
|
{
|
||||||
|
this.fileUrl = fileUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileUrl()
|
||||||
|
{
|
||||||
|
return fileUrl;
|
||||||
|
}
|
||||||
|
public void setIsDel(Long isDel)
|
||||||
|
{
|
||||||
|
this.isDel = isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getIsDel()
|
||||||
|
{
|
||||||
|
return isDel;
|
||||||
|
}
|
||||||
|
public void setCreateUser(String createUser)
|
||||||
|
{
|
||||||
|
this.createUser = createUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateUser()
|
||||||
|
{
|
||||||
|
return createUser;
|
||||||
|
}
|
||||||
|
public void setUpdateUser(String updateUser)
|
||||||
|
{
|
||||||
|
this.updateUser = updateUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdateUser()
|
||||||
|
{
|
||||||
|
return updateUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("auditId", getAuditId())
|
||||||
|
.append("fileType", getFileType())
|
||||||
|
.append("fileUrl", getFileUrl())
|
||||||
|
.append("isDel", getIsDel())
|
||||||
|
.append("createUser", getCreateUser())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateUser", getUpdateUser())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -112,6 +112,8 @@ public class SmzSspProblemmodify extends BaseEntity
|
||||||
@Excel(name = "创建人")
|
@Excel(name = "创建人")
|
||||||
private String createUser;
|
private String createUser;
|
||||||
|
|
||||||
|
private String createUserName;
|
||||||
|
|
||||||
/** 修改人 */
|
/** 修改人 */
|
||||||
@Excel(name = "修改人")
|
@Excel(name = "修改人")
|
||||||
private String updateUser;
|
private String updateUser;
|
||||||
|
@ -124,8 +126,10 @@ public class SmzSspProblemmodify extends BaseEntity
|
||||||
private String recheckSend;
|
private String recheckSend;
|
||||||
private String recheckSendUser;
|
private String recheckSendUser;
|
||||||
private Integer roleType;
|
private Integer roleType;
|
||||||
|
private String dangerTypeName;
|
||||||
|
private String deptName;//检查单位
|
||||||
private String vDel;
|
private String vDel;
|
||||||
|
private String flag;//整改超时标识
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
|
@ -390,6 +394,38 @@ public class SmzSspProblemmodify extends BaseEntity
|
||||||
this.vDel = vDel;
|
this.vDel = vDel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDangerTypeName() {
|
||||||
|
return dangerTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDangerTypeName(String dangerTypeName) {
|
||||||
|
this.dangerTypeName = dangerTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeptName() {
|
||||||
|
return deptName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptName(String deptName) {
|
||||||
|
this.deptName = deptName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateUserName() {
|
||||||
|
return createUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateUserName(String createUserName) {
|
||||||
|
this.createUserName = createUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlag() {
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlag(String flag) {
|
||||||
|
this.flag = flag;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.yanzhu.jh.trouble.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.yanzhu.jh.trouble.domain.SmzSspAuditinfo;
|
import com.yanzhu.jh.trouble.domain.SmzSspAuditinfo;
|
||||||
|
import com.yanzhu.jh.trouble.domain.SmzSspFileinfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 随手拍流程信息Mapper接口
|
* 随手拍流程信息Mapper接口
|
||||||
|
@ -19,6 +20,15 @@ public interface SmzSspAuditinfoMapper
|
||||||
*/
|
*/
|
||||||
public SmzSspAuditinfo selectSmzSspAuditinfoById(Long id);
|
public SmzSspAuditinfo selectSmzSspAuditinfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询随手拍流程信息
|
||||||
|
*
|
||||||
|
* @param mainId 随手拍流程信息主键
|
||||||
|
* @return 随手拍流程信息
|
||||||
|
*/
|
||||||
|
public SmzSspAuditinfo selectLastSmzSspAuditinfoByMainId(Long mainId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询随手拍流程信息列表
|
* 查询随手拍流程信息列表
|
||||||
*
|
*
|
||||||
|
@ -58,4 +68,29 @@ public interface SmzSspAuditinfoMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSmzSspAuditinfoByIds(Long[] ids);
|
public int deleteSmzSspAuditinfoByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除随手拍文件信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSmzSspFileinfoByAuditIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增随手拍文件信息
|
||||||
|
*
|
||||||
|
* @param smzSspFileinfoList 随手拍文件信息列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int batchSmzSspFileinfo(List<SmzSspFileinfo> smzSspFileinfoList);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过随手拍流程信息主键删除随手拍文件信息信息
|
||||||
|
*
|
||||||
|
* @param id 随手拍流程信息ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSmzSspFileinfoByAuditId(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,14 @@ public interface SmzSspProblemmodifyMapper
|
||||||
*/
|
*/
|
||||||
public SmzSspProblemmodify selectSmzSspProblemmodifyById(Long id);
|
public SmzSspProblemmodify selectSmzSspProblemmodifyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询质量整改详情
|
||||||
|
*
|
||||||
|
* @param id 质量整改主键
|
||||||
|
* @return 质量整改
|
||||||
|
*/
|
||||||
|
public SmzSspProblemmodify selectSmzSspProblemmodifyInfoById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询质量整改列表
|
* 查询质量整改列表
|
||||||
*
|
*
|
||||||
|
@ -30,6 +38,14 @@ public interface SmzSspProblemmodifyMapper
|
||||||
*/
|
*/
|
||||||
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);
|
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询质量整改列表
|
||||||
|
*
|
||||||
|
* @param smzSspProblemmodify 质量整改
|
||||||
|
* @return 质量整改集合
|
||||||
|
*/
|
||||||
|
public List<SmzSspProblemmodify> selectWechatSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据状态分组统计数量
|
* 根据状态分组统计数量
|
||||||
* @param smzSspProblemmodify 查询条件
|
* @param smzSspProblemmodify 查询条件
|
||||||
|
|
|
@ -19,6 +19,14 @@ public interface ISmzSspAuditinfoService
|
||||||
*/
|
*/
|
||||||
public SmzSspAuditinfo selectSmzSspAuditinfoById(Long id);
|
public SmzSspAuditinfo selectSmzSspAuditinfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询随手拍流程信息
|
||||||
|
*
|
||||||
|
* @param mainId 随手拍流程信息主键
|
||||||
|
* @return 随手拍流程信息
|
||||||
|
*/
|
||||||
|
public SmzSspAuditinfo selectLastSmzSspAuditinfoByMainId(Long mainId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询随手拍流程信息列表
|
* 查询随手拍流程信息列表
|
||||||
*
|
*
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.yanzhu.jh.trouble.service;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.yanzhu.jh.trouble.domain.SmzSspAuditinfo;
|
||||||
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
|
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
|
||||||
import com.yanzhu.jh.trouble.domain.where.SmzSspProblemmodifyWhere;
|
import com.yanzhu.jh.trouble.domain.where.SmzSspProblemmodifyWhere;
|
||||||
|
|
||||||
|
@ -22,6 +23,14 @@ public interface ISmzSspProblemmodifyService
|
||||||
*/
|
*/
|
||||||
public SmzSspProblemmodify selectSmzSspProblemmodifyById(Long id);
|
public SmzSspProblemmodify selectSmzSspProblemmodifyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询质量整改详情
|
||||||
|
*
|
||||||
|
* @param id 质量整改主键
|
||||||
|
* @return 质量整改
|
||||||
|
*/
|
||||||
|
public SmzSspProblemmodify selectSmzSspProblemmodifyInfoById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询质量整改列表
|
* 查询质量整改列表
|
||||||
*
|
*
|
||||||
|
@ -30,6 +39,14 @@ public interface ISmzSspProblemmodifyService
|
||||||
*/
|
*/
|
||||||
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);
|
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询质量整改列表
|
||||||
|
*
|
||||||
|
* @param smzSspProblemmodify 质量整改
|
||||||
|
* @return 质量整改集合
|
||||||
|
*/
|
||||||
|
public List<SmzSspProblemmodify> selectWechatSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据状态分组统计数量
|
* 根据状态分组统计数量
|
||||||
* @param smzSspProblemmodify 查询条件
|
* @param smzSspProblemmodify 查询条件
|
||||||
|
|
|
@ -1,12 +1,19 @@
|
||||||
package com.yanzhu.jh.trouble.service.impl;
|
package com.yanzhu.jh.trouble.service.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.yanzhu.jh.trouble.domain.SmzSspFileinfo;
|
||||||
|
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
|
||||||
|
import com.yanzhu.jh.trouble.mapper.SmzSspProblemmodifyMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.yanzhu.jh.trouble.mapper.SmzSspAuditinfoMapper;
|
import com.yanzhu.jh.trouble.mapper.SmzSspAuditinfoMapper;
|
||||||
import com.yanzhu.jh.trouble.domain.SmzSspAuditinfo;
|
import com.yanzhu.jh.trouble.domain.SmzSspAuditinfo;
|
||||||
import com.yanzhu.jh.trouble.service.ISmzSspAuditinfoService;
|
import com.yanzhu.jh.trouble.service.ISmzSspAuditinfoService;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 随手拍流程信息Service业务层处理
|
* 随手拍流程信息Service业务层处理
|
||||||
|
@ -20,6 +27,9 @@ public class SmzSspAuditinfoServiceImpl implements ISmzSspAuditinfoService
|
||||||
@Autowired
|
@Autowired
|
||||||
private SmzSspAuditinfoMapper smzSspAuditinfoMapper;
|
private SmzSspAuditinfoMapper smzSspAuditinfoMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SmzSspProblemmodifyMapper smzSspProblemmodifyMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询随手拍流程信息
|
* 查询随手拍流程信息
|
||||||
*
|
*
|
||||||
|
@ -32,6 +42,16 @@ public class SmzSspAuditinfoServiceImpl implements ISmzSspAuditinfoService
|
||||||
return smzSspAuditinfoMapper.selectSmzSspAuditinfoById(id);
|
return smzSspAuditinfoMapper.selectSmzSspAuditinfoById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询随手拍流程信息
|
||||||
|
*
|
||||||
|
* @param mainId 随手拍流程信息主键
|
||||||
|
* @return 随手拍流程信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SmzSspAuditinfo selectLastSmzSspAuditinfoByMainId(Long mainId) {
|
||||||
|
return smzSspAuditinfoMapper.selectLastSmzSspAuditinfoByMainId(mainId);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 查询随手拍流程信息列表
|
* 查询随手拍流程信息列表
|
||||||
*
|
*
|
||||||
|
@ -51,10 +71,53 @@ public class SmzSspAuditinfoServiceImpl implements ISmzSspAuditinfoService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public int insertSmzSspAuditinfo(SmzSspAuditinfo smzSspAuditinfo)
|
public int insertSmzSspAuditinfo(SmzSspAuditinfo smzSspAuditinfo)
|
||||||
{
|
{
|
||||||
smzSspAuditinfo.setCreateTime(DateUtils.getNowDate());
|
smzSspAuditinfo.setCreateTime(DateUtils.getNowDate());
|
||||||
return smzSspAuditinfoMapper.insertSmzSspAuditinfo(smzSspAuditinfo);
|
int res = smzSspAuditinfoMapper.insertSmzSspAuditinfo(smzSspAuditinfo);
|
||||||
|
SmzSspProblemmodify smzSspProblemmodify = smzSspProblemmodifyMapper.selectSmzSspProblemmodifyById(smzSspAuditinfo.getMainId());
|
||||||
|
switch (smzSspAuditinfo.getProcessState()){
|
||||||
|
case "0": smzSspProblemmodify.setCheckState(1L); break;
|
||||||
|
case "2": smzSspProblemmodify.setCheckState(3L); break;
|
||||||
|
case "4": smzSspProblemmodify.setCheckState(4L); break;
|
||||||
|
default:break;
|
||||||
|
}
|
||||||
|
smzSspProblemmodifyMapper.updateSmzSspProblemmodify(smzSspProblemmodify);
|
||||||
|
insertSmzSspFileinfo(smzSspAuditinfo);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增随手拍文件信息信息
|
||||||
|
*
|
||||||
|
* @param smzSspAuditinfo 随手拍流程信息对象
|
||||||
|
*/
|
||||||
|
private void insertSmzSspFileinfo(SmzSspAuditinfo smzSspAuditinfo)
|
||||||
|
{
|
||||||
|
if(smzSspAuditinfo.getFileUrls()!=null){
|
||||||
|
String fileUrls[] = smzSspAuditinfo.getFileUrls().split(",");
|
||||||
|
Long id = smzSspAuditinfo.getId();
|
||||||
|
if (StringUtils.isNotNull(fileUrls))
|
||||||
|
{
|
||||||
|
List<SmzSspFileinfo> list = new ArrayList<SmzSspFileinfo>();
|
||||||
|
for (String fileUrl: fileUrls)
|
||||||
|
{
|
||||||
|
SmzSspFileinfo smzSspFileinfo = new SmzSspFileinfo();
|
||||||
|
smzSspFileinfo.setAuditId(id);
|
||||||
|
smzSspFileinfo.setFileType(0L);
|
||||||
|
smzSspFileinfo.setFileUrl(fileUrl);
|
||||||
|
smzSspFileinfo.setIsDel(0L);
|
||||||
|
smzSspFileinfo.setCreateUser(smzSspAuditinfo.getCreateUser());
|
||||||
|
smzSspFileinfo.setCreateTime(new Date());
|
||||||
|
list.add(smzSspFileinfo);
|
||||||
|
}
|
||||||
|
if (list.size() > 0)
|
||||||
|
{
|
||||||
|
smzSspAuditinfoMapper.batchSmzSspFileinfo(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,16 +1,26 @@
|
||||||
package com.yanzhu.jh.trouble.service.impl;
|
package com.yanzhu.jh.trouble.service.impl;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.enums.DeptTypeEnum;
|
||||||
|
import com.ruoyi.common.enums.PublicStateEnum;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectUserinfo;
|
||||||
|
import com.yanzhu.jh.project.mapper.SurProjectUserinfoMapper;
|
||||||
|
import com.yanzhu.jh.trouble.domain.SmzSspAuditinfo;
|
||||||
|
import com.yanzhu.jh.trouble.domain.SmzSspFileinfo;
|
||||||
import com.yanzhu.jh.trouble.domain.where.SmzSspProblemmodifyWhere;
|
import com.yanzhu.jh.trouble.domain.where.SmzSspProblemmodifyWhere;
|
||||||
|
import com.yanzhu.jh.trouble.mapper.SmzSspAuditinfoMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.yanzhu.jh.trouble.mapper.SmzSspProblemmodifyMapper;
|
import com.yanzhu.jh.trouble.mapper.SmzSspProblemmodifyMapper;
|
||||||
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
|
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
|
||||||
import com.yanzhu.jh.trouble.service.ISmzSspProblemmodifyService;
|
import com.yanzhu.jh.trouble.service.ISmzSspProblemmodifyService;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质量整改Service业务层处理
|
* 质量整改Service业务层处理
|
||||||
|
@ -21,9 +31,18 @@ import com.yanzhu.jh.trouble.service.ISmzSspProblemmodifyService;
|
||||||
@Service
|
@Service
|
||||||
public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyService
|
public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyService
|
||||||
{
|
{
|
||||||
|
@Autowired
|
||||||
|
private SysDeptMapper deptMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SmzSspAuditinfoMapper smzSspAuditinfoMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SmzSspProblemmodifyMapper smzSspProblemmodifyMapper;
|
private SmzSspProblemmodifyMapper smzSspProblemmodifyMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SurProjectUserinfoMapper surProjectUserinfoMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询质量整改
|
* 查询质量整改
|
||||||
*
|
*
|
||||||
|
@ -36,6 +55,16 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
|
||||||
return smzSspProblemmodifyMapper.selectSmzSspProblemmodifyById(id);
|
return smzSspProblemmodifyMapper.selectSmzSspProblemmodifyById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询质量整改详情
|
||||||
|
*
|
||||||
|
* @param id 质量整改主键
|
||||||
|
* @return 质量整改
|
||||||
|
*/
|
||||||
|
public SmzSspProblemmodify selectSmzSspProblemmodifyInfoById(Long id) {
|
||||||
|
return smzSspProblemmodifyMapper.selectSmzSspProblemmodifyInfoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询质量整改列表
|
* 查询质量整改列表
|
||||||
*
|
*
|
||||||
|
@ -48,6 +77,16 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
|
||||||
return smzSspProblemmodifyMapper.selectSmzSspProblemmodifyList(smzSspProblemmodify);
|
return smzSspProblemmodifyMapper.selectSmzSspProblemmodifyList(smzSspProblemmodify);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询质量整改列表
|
||||||
|
*
|
||||||
|
* @param smzSspProblemmodify 质量整改
|
||||||
|
* @return 质量整改集合
|
||||||
|
*/
|
||||||
|
public List<SmzSspProblemmodify> selectWechatSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify) {
|
||||||
|
return smzSspProblemmodifyMapper.selectWechatSmzSspProblemmodifyList(smzSspProblemmodify);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据状态分组统计数量
|
* 根据状态分组统计数量
|
||||||
* @param smzSspProblemmodify 查询条件
|
* @param smzSspProblemmodify 查询条件
|
||||||
|
@ -73,10 +112,56 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public int insertSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify)
|
public int insertSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify)
|
||||||
{
|
{
|
||||||
|
if(smzSspProblemmodify.getSmarkUrl()!=null){
|
||||||
|
smzSspProblemmodify.setMarksPicture(smzSspProblemmodify.getSmarkUrl().split(",")[0]);
|
||||||
|
}
|
||||||
smzSspProblemmodify.setCreateTime(DateUtils.getNowDate());
|
smzSspProblemmodify.setCreateTime(DateUtils.getNowDate());
|
||||||
return smzSspProblemmodifyMapper.insertSmzSspProblemmodify(smzSspProblemmodify);
|
SysDept sysDept = deptMapper.selectDeptByUserName(smzSspProblemmodify.getCreateUser());
|
||||||
|
//当前角色时管理员时,修改角色为集团公司
|
||||||
|
String roleType = "";
|
||||||
|
if(DeptTypeEnum.JTGS.getCode().equals(sysDept.getTypeFlag())){
|
||||||
|
SurProjectUserinfo surProjectUserinfo = new SurProjectUserinfo();
|
||||||
|
surProjectUserinfo.setProjectId(smzSspProblemmodify.getProjectId());
|
||||||
|
surProjectUserinfo.setCreateBy(smzSspProblemmodify.getCreateUser());
|
||||||
|
List<SurProjectUserinfo> datalist = surProjectUserinfoMapper.querySurProjectUserinfoByParams(surProjectUserinfo);
|
||||||
|
if(datalist!=null && datalist.size()>0 && datalist.get(0)!=null && PublicStateEnum.USERTYPE_JFJL.getCode().equals(datalist.get(0).getJobType())){
|
||||||
|
//说明是甲方经理
|
||||||
|
roleType = DeptTypeEnum.JFDBTYPE.getCode();
|
||||||
|
}else{
|
||||||
|
roleType = DeptTypeEnum.JTGSTYPE.getCode();
|
||||||
|
}
|
||||||
|
}else if(DeptTypeEnum.ZGS.getCode().equals(sysDept.getTypeFlag())){
|
||||||
|
SurProjectUserinfo surProjectUserinfo = new SurProjectUserinfo();
|
||||||
|
surProjectUserinfo.setProjectId(smzSspProblemmodify.getProjectId());
|
||||||
|
surProjectUserinfo.setCreateBy(smzSspProblemmodify.getCreateUser());
|
||||||
|
List<SurProjectUserinfo> datalist = surProjectUserinfoMapper.querySurProjectUserinfoByParams(surProjectUserinfo);
|
||||||
|
if(datalist!=null && datalist.size()>0 && datalist.get(0)!=null && PublicStateEnum.USERTYPE_JFJL.getCode().equals(datalist.get(0).getJobType())){
|
||||||
|
//说明是甲方经理
|
||||||
|
roleType = DeptTypeEnum.JFDBTYPE.getCode();
|
||||||
|
}else{
|
||||||
|
roleType = DeptTypeEnum.ZGSTYPE.getCode();
|
||||||
|
}
|
||||||
|
}else if(DeptTypeEnum.JLDW.getCode().equals(sysDept.getTypeFlag())){
|
||||||
|
roleType = DeptTypeEnum.JLDWTYPE.getCode();
|
||||||
|
}else if(DeptTypeEnum.ZBDW.getCode().equals(sysDept.getTypeFlag())){
|
||||||
|
roleType = DeptTypeEnum.ZBDWTYPE.getCode();
|
||||||
|
}else if(DeptTypeEnum.FBDW.getCode().equals(sysDept.getTypeFlag())){
|
||||||
|
roleType = DeptTypeEnum.FBDWTYPE.getCode();
|
||||||
|
}
|
||||||
|
smzSspProblemmodify.setRoleType(Convert.toInt(roleType));
|
||||||
|
smzSspProblemmodifyMapper.insertSmzSspProblemmodify(smzSspProblemmodify);
|
||||||
|
SmzSspAuditinfo smzSspAuditinfo = new SmzSspAuditinfo();
|
||||||
|
smzSspAuditinfo.setMainId(smzSspProblemmodify.getId());
|
||||||
|
smzSspAuditinfo.setProcessState("1");
|
||||||
|
smzSspAuditinfo.setCreateUser(smzSspProblemmodify.getCreateUser());
|
||||||
|
smzSspAuditinfo.setCreateTime(new Date());
|
||||||
|
int res = smzSspAuditinfoMapper.insertSmzSspAuditinfo(smzSspAuditinfo);
|
||||||
|
smzSspAuditinfo.setFileUrls(smzSspProblemmodify.getSmarkUrl());
|
||||||
|
insertSmzSspFileinfo(smzSspAuditinfo);
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -155,4 +240,37 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
|
||||||
public Long countTimeout(SmzSspProblemmodifyWhere where) {
|
public Long countTimeout(SmzSspProblemmodifyWhere where) {
|
||||||
return (long) smzSspProblemmodifyMapper.countTimeout(where);
|
return (long) smzSspProblemmodifyMapper.countTimeout(where);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增随手拍文件信息信息
|
||||||
|
*
|
||||||
|
* @param smzSspAuditinfo 随手拍流程信息对象
|
||||||
|
*/
|
||||||
|
private void insertSmzSspFileinfo(SmzSspAuditinfo smzSspAuditinfo)
|
||||||
|
{
|
||||||
|
if(smzSspAuditinfo.getFileUrls()!=null){
|
||||||
|
String fileUrls[] = smzSspAuditinfo.getFileUrls().split(",");
|
||||||
|
Long id = smzSspAuditinfo.getId();
|
||||||
|
if (StringUtils.isNotNull(fileUrls))
|
||||||
|
{
|
||||||
|
List<SmzSspFileinfo> list = new ArrayList<SmzSspFileinfo>();
|
||||||
|
for (String fileUrl: fileUrls)
|
||||||
|
{
|
||||||
|
SmzSspFileinfo smzSspFileinfo = new SmzSspFileinfo();
|
||||||
|
smzSspFileinfo.setAuditId(id);
|
||||||
|
smzSspFileinfo.setFileType(0L);
|
||||||
|
smzSspFileinfo.setFileUrl(fileUrl);
|
||||||
|
smzSspFileinfo.setIsDel(0L);
|
||||||
|
smzSspFileinfo.setCreateUser(smzSspAuditinfo.getCreateUser());
|
||||||
|
smzSspFileinfo.setCreateTime(new Date());
|
||||||
|
list.add(smzSspFileinfo);
|
||||||
|
}
|
||||||
|
if (list.size() > 0)
|
||||||
|
{
|
||||||
|
smzSspAuditinfoMapper.batchSmzSspFileinfo(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,104 @@
|
||||||
|
package com.yanzhu.jh.wxsetting.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.yanzhu.jh.wxsetting.domain.SurMenuConfig;
|
||||||
|
import com.yanzhu.jh.wxsetting.service.ISurMenuConfigService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单配置Controller
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-24
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wxsetting/wxMenConfig")
|
||||||
|
public class SurMenuConfigController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISurMenuConfigService surMenuConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询菜单配置列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wxsetting:wxMenConfig:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SurMenuConfig surMenuConfig)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SurMenuConfig> list = surMenuConfigService.selectSurMenuConfigList(surMenuConfig);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出菜单配置列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wxsetting:wxMenConfig:export')")
|
||||||
|
@Log(title = "菜单配置", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SurMenuConfig surMenuConfig)
|
||||||
|
{
|
||||||
|
List<SurMenuConfig> list = surMenuConfigService.selectSurMenuConfigList(surMenuConfig);
|
||||||
|
ExcelUtil<SurMenuConfig> util = new ExcelUtil<SurMenuConfig>(SurMenuConfig.class);
|
||||||
|
util.exportExcel(response, list, "菜单配置数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取菜单配置详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wxsetting:wxMenConfig:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(surMenuConfigService.selectSurMenuConfigById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增菜单配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wxsetting:wxMenConfig:add')")
|
||||||
|
@Log(title = "菜单配置", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SurMenuConfig surMenuConfig)
|
||||||
|
{
|
||||||
|
return toAjax(surMenuConfigService.insertSurMenuConfig(surMenuConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改菜单配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wxsetting:wxMenConfig:edit')")
|
||||||
|
@Log(title = "菜单配置", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SurMenuConfig surMenuConfig)
|
||||||
|
{
|
||||||
|
return toAjax(surMenuConfigService.updateSurMenuConfig(surMenuConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除菜单配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wxsetting:wxMenConfig:remove')")
|
||||||
|
@Log(title = "菜单配置", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(surMenuConfigService.deleteSurMenuConfigByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,134 @@
|
||||||
|
package com.yanzhu.jh.wxsetting.domain;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单配置对象 sur_menu_config
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-24
|
||||||
|
*/
|
||||||
|
public class SurMenuConfig extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 菜单名称 */
|
||||||
|
@Excel(name = "菜单名称")
|
||||||
|
private String menuName;
|
||||||
|
|
||||||
|
/** 菜单标识 */
|
||||||
|
@Excel(name = "菜单标识")
|
||||||
|
private String menuIdenti;
|
||||||
|
|
||||||
|
/** 菜单图片 */
|
||||||
|
@Excel(name = "菜单图片")
|
||||||
|
private String menuImg;
|
||||||
|
|
||||||
|
/** 菜单地址 */
|
||||||
|
@Excel(name = "菜单地址")
|
||||||
|
private String menuUrl;
|
||||||
|
|
||||||
|
/** 删除状态(0 未删除 1 已删除) */
|
||||||
|
private Long delFlag;
|
||||||
|
|
||||||
|
/** 菜单排序 */
|
||||||
|
@Excel(name = "菜单排序")
|
||||||
|
private Integer menuSort;
|
||||||
|
|
||||||
|
/** 菜单配置角色信息 */
|
||||||
|
private List<SurMenuConfigRole> surMenuConfigRoleList;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setMenuName(String menuName)
|
||||||
|
{
|
||||||
|
this.menuName = menuName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMenuName()
|
||||||
|
{
|
||||||
|
return menuName;
|
||||||
|
}
|
||||||
|
public void setMenuIdenti(String menuIdenti)
|
||||||
|
{
|
||||||
|
this.menuIdenti = menuIdenti;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMenuIdenti()
|
||||||
|
{
|
||||||
|
return menuIdenti;
|
||||||
|
}
|
||||||
|
public void setMenuImg(String menuImg)
|
||||||
|
{
|
||||||
|
this.menuImg = menuImg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMenuImg()
|
||||||
|
{
|
||||||
|
return menuImg;
|
||||||
|
}
|
||||||
|
public void setMenuUrl(String menuUrl)
|
||||||
|
{
|
||||||
|
this.menuUrl = menuUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMenuUrl()
|
||||||
|
{
|
||||||
|
return menuUrl;
|
||||||
|
}
|
||||||
|
public void setDelFlag(Long delFlag)
|
||||||
|
{
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDelFlag()
|
||||||
|
{
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<SurMenuConfigRole> getSurMenuConfigRoleList()
|
||||||
|
{
|
||||||
|
return surMenuConfigRoleList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSurMenuConfigRoleList(List<SurMenuConfigRole> surMenuConfigRoleList)
|
||||||
|
{
|
||||||
|
this.surMenuConfigRoleList = surMenuConfigRoleList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMenuSort() {
|
||||||
|
return menuSort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuSort(Integer menuSort) {
|
||||||
|
this.menuSort = menuSort;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("menuName", getMenuName())
|
||||||
|
.append("menuIdenti", getMenuIdenti())
|
||||||
|
.append("menuImg", getMenuImg())
|
||||||
|
.append("menuUrl", getMenuUrl())
|
||||||
|
.append("delFlag", getDelFlag())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("surMenuConfigRoleList", getSurMenuConfigRoleList())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.yanzhu.jh.wxsetting.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单配置角色对象 sur_menu_config_role
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-24
|
||||||
|
*/
|
||||||
|
public class SurMenuConfigRole extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 菜单关系主键 */
|
||||||
|
@Excel(name = "菜单关系主键")
|
||||||
|
private Long smcid;
|
||||||
|
|
||||||
|
/** 角色主键 */
|
||||||
|
@Excel(name = "角色主键")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
public void setSmcid(Long smcid)
|
||||||
|
{
|
||||||
|
this.smcid = smcid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSmcid()
|
||||||
|
{
|
||||||
|
return smcid;
|
||||||
|
}
|
||||||
|
public void setRoleId(Long roleId)
|
||||||
|
{
|
||||||
|
this.roleId = roleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getRoleId()
|
||||||
|
{
|
||||||
|
return roleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("smcid", getSmcid())
|
||||||
|
.append("roleId", getRoleId())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,87 @@
|
||||||
|
package com.yanzhu.jh.wxsetting.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.yanzhu.jh.wxsetting.domain.SurMenuConfig;
|
||||||
|
import com.yanzhu.jh.wxsetting.domain.SurMenuConfigRole;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单配置Mapper接口
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-24
|
||||||
|
*/
|
||||||
|
public interface SurMenuConfigMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询菜单配置
|
||||||
|
*
|
||||||
|
* @param id 菜单配置主键
|
||||||
|
* @return 菜单配置
|
||||||
|
*/
|
||||||
|
public SurMenuConfig selectSurMenuConfigById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询菜单配置列表
|
||||||
|
*
|
||||||
|
* @param surMenuConfig 菜单配置
|
||||||
|
* @return 菜单配置集合
|
||||||
|
*/
|
||||||
|
public List<SurMenuConfig> selectSurMenuConfigList(SurMenuConfig surMenuConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增菜单配置
|
||||||
|
*
|
||||||
|
* @param surMenuConfig 菜单配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurMenuConfig(SurMenuConfig surMenuConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改菜单配置
|
||||||
|
*
|
||||||
|
* @param surMenuConfig 菜单配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurMenuConfig(SurMenuConfig surMenuConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除菜单配置
|
||||||
|
*
|
||||||
|
* @param id 菜单配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurMenuConfigById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除菜单配置
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurMenuConfigByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除菜单配置角色
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurMenuConfigRoleBySmcids(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增菜单配置角色
|
||||||
|
*
|
||||||
|
* @param surMenuConfigRoleList 菜单配置角色列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int batchSurMenuConfigRole(List<SurMenuConfigRole> surMenuConfigRoleList);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过菜单配置主键删除菜单配置角色信息
|
||||||
|
*
|
||||||
|
* @param id 菜单配置ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurMenuConfigRoleBySmcid(Long id);
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.yanzhu.jh.wxsetting.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.yanzhu.jh.wxsetting.domain.SurMenuConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单配置Service接口
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-24
|
||||||
|
*/
|
||||||
|
public interface ISurMenuConfigService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询菜单配置
|
||||||
|
*
|
||||||
|
* @param id 菜单配置主键
|
||||||
|
* @return 菜单配置
|
||||||
|
*/
|
||||||
|
public SurMenuConfig selectSurMenuConfigById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询菜单配置列表
|
||||||
|
*
|
||||||
|
* @param surMenuConfig 菜单配置
|
||||||
|
* @return 菜单配置集合
|
||||||
|
*/
|
||||||
|
public List<SurMenuConfig> selectSurMenuConfigList(SurMenuConfig surMenuConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增菜单配置
|
||||||
|
*
|
||||||
|
* @param surMenuConfig 菜单配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurMenuConfig(SurMenuConfig surMenuConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改菜单配置
|
||||||
|
*
|
||||||
|
* @param surMenuConfig 菜单配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurMenuConfig(SurMenuConfig surMenuConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除菜单配置
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的菜单配置主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurMenuConfigByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除菜单配置信息
|
||||||
|
*
|
||||||
|
* @param id 菜单配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurMenuConfigById(Long id);
|
||||||
|
}
|
|
@ -0,0 +1,133 @@
|
||||||
|
package com.yanzhu.jh.wxsetting.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import com.yanzhu.jh.wxsetting.domain.SurMenuConfigRole;
|
||||||
|
import com.yanzhu.jh.wxsetting.mapper.SurMenuConfigMapper;
|
||||||
|
import com.yanzhu.jh.wxsetting.domain.SurMenuConfig;
|
||||||
|
import com.yanzhu.jh.wxsetting.service.ISurMenuConfigService;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
/**
|
||||||
|
* 菜单配置Service业务层处理
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2023-08-24
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SurMenuConfigServiceImpl implements ISurMenuConfigService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SurMenuConfigMapper surMenuConfigMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询菜单配置
|
||||||
|
*
|
||||||
|
* @param id 菜单配置主键
|
||||||
|
* @return 菜单配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SurMenuConfig selectSurMenuConfigById(Long id)
|
||||||
|
{
|
||||||
|
return surMenuConfigMapper.selectSurMenuConfigById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询菜单配置列表
|
||||||
|
*
|
||||||
|
* @param surMenuConfig 菜单配置
|
||||||
|
* @return 菜单配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SurMenuConfig> selectSurMenuConfigList(SurMenuConfig surMenuConfig)
|
||||||
|
{
|
||||||
|
return surMenuConfigMapper.selectSurMenuConfigList(surMenuConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增菜单配置
|
||||||
|
*
|
||||||
|
* @param surMenuConfig 菜单配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public int insertSurMenuConfig(SurMenuConfig surMenuConfig)
|
||||||
|
{
|
||||||
|
surMenuConfig.setCreateTime(DateUtils.getNowDate());
|
||||||
|
int rows = surMenuConfigMapper.insertSurMenuConfig(surMenuConfig);
|
||||||
|
insertSurMenuConfigRole(surMenuConfig);
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改菜单配置
|
||||||
|
*
|
||||||
|
* @param surMenuConfig 菜单配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public int updateSurMenuConfig(SurMenuConfig surMenuConfig)
|
||||||
|
{
|
||||||
|
surMenuConfigMapper.deleteSurMenuConfigRoleBySmcid(surMenuConfig.getId());
|
||||||
|
insertSurMenuConfigRole(surMenuConfig);
|
||||||
|
return surMenuConfigMapper.updateSurMenuConfig(surMenuConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除菜单配置
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的菜单配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public int deleteSurMenuConfigByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
surMenuConfigMapper.deleteSurMenuConfigRoleBySmcids(ids);
|
||||||
|
return surMenuConfigMapper.deleteSurMenuConfigByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除菜单配置信息
|
||||||
|
*
|
||||||
|
* @param id 菜单配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public int deleteSurMenuConfigById(Long id)
|
||||||
|
{
|
||||||
|
surMenuConfigMapper.deleteSurMenuConfigRoleBySmcid(id);
|
||||||
|
return surMenuConfigMapper.deleteSurMenuConfigById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增菜单配置角色信息
|
||||||
|
*
|
||||||
|
* @param surMenuConfig 菜单配置对象
|
||||||
|
*/
|
||||||
|
public void insertSurMenuConfigRole(SurMenuConfig surMenuConfig)
|
||||||
|
{
|
||||||
|
List<SurMenuConfigRole> surMenuConfigRoleList = surMenuConfig.getSurMenuConfigRoleList();
|
||||||
|
Long id = surMenuConfig.getId();
|
||||||
|
if (StringUtils.isNotNull(surMenuConfigRoleList))
|
||||||
|
{
|
||||||
|
List<SurMenuConfigRole> list = new ArrayList<SurMenuConfigRole>();
|
||||||
|
for (SurMenuConfigRole surMenuConfigRole : surMenuConfigRoleList)
|
||||||
|
{
|
||||||
|
surMenuConfigRole.setSmcid(id);
|
||||||
|
list.add(surMenuConfigRole);
|
||||||
|
}
|
||||||
|
if (list.size() > 0)
|
||||||
|
{
|
||||||
|
surMenuConfigMapper.batchSurMenuConfigRole(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -52,8 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
||||||
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
||||||
<if test="deptId != null ">
|
<if test="deptId != null ">
|
||||||
<if test="nowUserName == null or nowUserName == ''">and spc.dept_id = #{deptId}</if>
|
and spc.dept_id = #{deptId}
|
||||||
<if test="nowUserName != null and nowUserName != ''">and (spc.dept_id = #{deptId} or spc.quality_user=#{nowUserName} or spc.supervise_user=#{nowUserName})</if>
|
|
||||||
</if>
|
</if>
|
||||||
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
|
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
|
||||||
<if test="groupDeptId != null "> and spc.group_dept_id = #{groupDeptId}</if>
|
<if test="groupDeptId != null "> and spc.group_dept_id = #{groupDeptId}</if>
|
||||||
|
@ -74,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!--子部门数据-->
|
<!--子部门数据-->
|
||||||
<if test='nowRole == "4"'> and (sp.deptId = #{nowDept} or spc.quality_user=#{nowUserName} or spc.supervise_user=#{nowUserName})</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} 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 == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spc.quality_user=#{nowUserName} or spc.supervise_user=#{nowUserName})</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>
|
</where>
|
||||||
|
|
|
@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by sdd.dict_sort
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSurProjectUnitInfoById" parameterType="Long" resultMap="SurProjectUnitInfoResult">
|
<select id="selectSurProjectUnitInfoById" parameterType="Long" resultMap="SurProjectUnitInfoResult">
|
||||||
|
|
|
@ -22,6 +22,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="projectName" column="projectName" />
|
<result property="projectName" column="projectName" />
|
||||||
<result property="nickName" column="nick_name" />
|
<result property="nickName" column="nick_name" />
|
||||||
<result property="phonenumber" column="phonenumber" />
|
<result property="phonenumber" column="phonenumber" />
|
||||||
|
<result property="deptTypeFlag" column="dept_type_flag" />
|
||||||
|
<result property="deptAncestors" column="deptAncestors" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSurProjectUserinfoVo">
|
<sql id="selectSurProjectUserinfoVo">
|
||||||
|
@ -52,9 +54,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
|
||||||
<if test='nowRole == "99"'> and sp.id in (select spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
|
<if test='nowRole == "99"'> and sp.id in (select spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
|
||||||
|
<if test="createBy != null and createBy != ''"> and su.phonenumber != #{createBy}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectProjectDeptUserinfoList" parameterType="SurProjectUserinfo" resultMap="SurProjectUserinfoResult">
|
||||||
|
select spu.id, spu.project_id, spu.dept_id, spu.dept_name, spu.dept_type, spu.job_type, sdd.dict_label as job_type_name, spu.user_id, spu.is_del, spu.create_by, spu.create_time, spu.update_by, spu.update_time, spu.remark, sp.projectName, su.nick_name, su.phonenumber, sd.type_flag as dept_type_flag, sd.ancestors as deptAncestors from
|
||||||
|
sys_user su
|
||||||
|
left join sur_project_userinfo spu on spu.user_id = su.user_id
|
||||||
|
left join sys_dept sd on sd.dept_id = su.dept_id
|
||||||
|
left join sur_project sp on spu.project_id = sp.id
|
||||||
|
left join sys_dict_data sdd on sdd.dict_type='sys_job_type' and spu.job_type = sdd.dict_value
|
||||||
|
<where>
|
||||||
|
and spu.is_del=0
|
||||||
|
and su.user_id not in (select spuuu.user_id from sur_project_userinfo spuuu where spuuu.project_id = #{projectId})
|
||||||
|
<if test="deptId != null "> and (su.dept_id = #{deptId} OR su.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))</if>
|
||||||
|
<if test="createBy != null and createBy != ''"> and su.phonenumber != #{createBy}</if>
|
||||||
|
</where>
|
||||||
|
group by su.phonenumber
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询项目用户信息 -->
|
||||||
|
<select id="querySurProjectUserinfoByParams" parameterType="SurProjectUserinfo" resultMap="SurProjectUserinfoResult">
|
||||||
|
select spu.id,spu.project_id,spu.dept_id,spu.dept_name,spu.dept_type,spu.job_type,spu.user_id,spu.is_del from sur_project_userinfo spu
|
||||||
|
left join sys_user su on su.user_id=spu.user_id
|
||||||
|
where su.del_flag=0 and spu.is_del=0 and spu.dept_type=11 and spu.project_id=#{projectId} and su.phonenumber=#{createBy}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectSurProjectUserinfoById" parameterType="Long" resultMap="SurProjectUserinfoResult">
|
<select id="selectSurProjectUserinfoById" parameterType="Long" resultMap="SurProjectUserinfoResult">
|
||||||
<include refid="selectSurProjectUserinfoVo"/>
|
<include refid="selectSurProjectUserinfoVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
|
|
|
@ -40,6 +40,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
order by ssa.createTime desc
|
order by ssa.createTime desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectLastSmzSspAuditinfoByMainId" parameterType="Long" resultMap="SmzSspAuditinfoResult">
|
||||||
|
select ssa.id, ssa.mainId, ssa.processState, ssa.opinion, ssa.isDel, ssa.createUser, ssa.createTime, group_concat(ssf.fileUrl) as fileUrls, u.nick_name as createUserName,ssd.dict_label as process from smz_ssp_auditinfo ssa
|
||||||
|
left join smz_ssp_fileinfo ssf on ssf.auditId = ssa.id
|
||||||
|
left join sys_user u on u.phonenumber = ssa.createUser
|
||||||
|
left join sys_dict_data ssd on ssd.dict_type = 'smz_ssp_auditinfo' and ssd.dict_value = ssa.processState
|
||||||
|
where ssa.mainId = #{mainId} and ssa.processState in (0,2)
|
||||||
|
order by ssa.createTime
|
||||||
|
limit 0,1
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectSmzSspAuditinfoById" parameterType="Long" resultMap="SmzSspAuditinfoResult">
|
<select id="selectSmzSspAuditinfoById" parameterType="Long" resultMap="SmzSspAuditinfoResult">
|
||||||
<include refid="selectSmzSspAuditinfoVo"/>
|
<include refid="selectSmzSspAuditinfoVo"/>
|
||||||
where ssa.id = #{id}
|
where ssa.id = #{id}
|
||||||
|
@ -96,4 +106,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
group by ssa.id
|
group by ssa.id
|
||||||
order by ssa.createTime desc
|
order by ssa.createTime desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<delete id="deleteSmzSspFileinfoByAuditIds" parameterType="String">
|
||||||
|
delete from smz_ssp_fileinfo where auditId in
|
||||||
|
<foreach item="auditId" collection="array" open="(" separator="," close=")"> #{auditId} </foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSmzSspFileinfoByAuditId" parameterType="Long"> delete from smz_ssp_fileinfo where auditId = #{auditId} </delete>
|
||||||
|
|
||||||
|
<insert id="batchSmzSspFileinfo">
|
||||||
|
insert into smz_ssp_fileinfo( id, auditId, fileType, fileUrl, isDel, createUser, createTime, updateUser, updateTime) values
|
||||||
|
<foreach item="item" index="index" collection="list" separator=","> ( #{item.id}, #{item.auditId}, #{item.fileType}, #{item.fileUrl}, #{item.isDel}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime}) </foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -33,11 +33,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="marksVideo" column="marks_video" />
|
<result property="marksVideo" column="marks_video" />
|
||||||
<result property="smarkUrl" column="smark_url" />
|
<result property="smarkUrl" column="smark_url" />
|
||||||
<result property="dangerType" column="danger_type" />
|
<result property="dangerType" column="danger_type" />
|
||||||
|
<result property="dangerTypeName" column="danger_type_name" />
|
||||||
<result property="recheckSend" column="recheckSend" />
|
<result property="recheckSend" column="recheckSend" />
|
||||||
<result property="recheckSendUser" column="recheckSendUser" />
|
<result property="recheckSendUser" column="recheckSendUser" />
|
||||||
<result property="roleType" column="roleType" />
|
<result property="roleType" column="roleType" />
|
||||||
<result property="vDel" column="v_del" />
|
<result property="vDel" column="v_del" />
|
||||||
<result property="createBy" column="createBy"/>
|
<result property="createBy" column="createBy"/>
|
||||||
|
<result property="deptName" column="deptName"/>
|
||||||
|
<result property="createUserName" column="createUserName"/>
|
||||||
|
<result property="flag" column="flag"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSmzSspProblemmodifyVo">
|
<sql id="selectSmzSspProblemmodifyVo">
|
||||||
|
@ -89,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||||
<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}</if>
|
||||||
<!--普通整改人是我,复检人是我,抄送人是我,提交人是我的数据-->
|
<!--普通整改人是我,复检人是我,抄送人是我,提交人是我的数据-->
|
||||||
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser = #{nowUser} or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
|
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser like concat('%', #{nowUser}, '%') or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
|
||||||
<if test='activeName == "dzg"'> and ssp.checkState in (0,3)</if>
|
<if test='activeName == "dzg"'> and ssp.checkState in (0,3)</if>
|
||||||
<if test='activeName == "dqr"'> and ssp.checkState in (1)</if>
|
<if test='activeName == "dqr"'> and ssp.checkState in (1)</if>
|
||||||
<if test='activeName == "ycl"'> and ssp.checkState = 4 </if>
|
<if test='activeName == "ycl"'> and ssp.checkState = 4 </if>
|
||||||
|
@ -98,6 +102,65 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
order by createTime desc
|
order by createTime desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWechatSmzSspProblemmodifyList" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
||||||
|
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.createBy,
|
||||||
|
case when ud.type_flag in (1,11) then sd.dept_name else ud.dept_name end as deptName,
|
||||||
|
sdd.dict_label as danger_type_name,
|
||||||
|
case when ssp.recheckSendUser = #{nowUser} and ssp.checkState=1 then 0
|
||||||
|
when ssp.lordSentUser = #{nowUser} then 1
|
||||||
|
else 2 end sort
|
||||||
|
from vw_smz_ssp_problemmodify_audit ssp
|
||||||
|
left join sur_project sp on ssp.projectId = sp.id
|
||||||
|
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
|
||||||
|
left join sys_dept ud on ud.dept_id = su.dept_id
|
||||||
|
left join sys_dept sd on sd.dept_id = sp.deptId
|
||||||
|
<if test='infoType == "0" '> left join sys_dict_data sdd on sdd.dict_type = 'ssp_aqyhlx' and sdd.dict_value = ssp.danger_type</if>
|
||||||
|
<if test='infoType == "1" '> left join sys_dict_data sdd on sdd.dict_type = 'ssp_zlyhlx' and sdd.dict_value = ssp.danger_type</if>
|
||||||
|
<!--监理单位/总包公司/分包单位-->
|
||||||
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||||
|
<where>
|
||||||
|
and ssp.isDel=0
|
||||||
|
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
||||||
|
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
|
||||||
|
<if test="roleType != null and roleType >0 "> and ssp.roleType = #{roleType}</if>
|
||||||
|
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
|
||||||
|
<if test="workParts != null and workParts != ''"> and ssp.workParts like concat('%', #{workParts}, '%')</if>
|
||||||
|
<if test="changeInfo != null and changeInfo != ''"> and ssp.changeInfo like concat('%', #{changeInfo}, '%')</if>
|
||||||
|
<if test="lordSent != null and lordSent != ''"> and ssp.lordSent = #{lordSent}</if>
|
||||||
|
<if test="lordSentUser != null and lordSentUser != ''"> and ssp.lordSentUser = #{lordSentUser}</if>
|
||||||
|
<if test="copySend != null and copySend != ''"> and ssp.copySend = #{copySend}</if>
|
||||||
|
<if test="copySendUser != null and copySendUser != ''"> and ssp.copySendUser = #{copySendUser}</if>
|
||||||
|
<if test="checkState != null "> and ssp.checkState = #{checkState}</if>
|
||||||
|
<if test="nickedArea != null and nickedArea != ''"> and nickedArea = #{nickedArea}</if>
|
||||||
|
<if test="nickedTime != null "> and ssp.nickedTime = #{nickedTime}</if>
|
||||||
|
<if test="projectType != null and projectType != ''"> and ssp.projectType = #{projectType}</if>
|
||||||
|
<if test="processName != null and processName != ''"> and ssp.processName like concat('%', #{processName}, '%')</if>
|
||||||
|
<if test="projectName != null and projectName != ''"> and ssp.projectName like concat('%', #{projectName}, '%')</if>
|
||||||
|
<if test="nickedInfo != null and nickedInfo != ''"> and ssp.nickedInfo = #{nickedInfo}</if>
|
||||||
|
<if test="checkUser != null and checkUser != ''"> and ssp.checkUser = #{checkUser}</if>
|
||||||
|
<if test="checkUserPhone != null and checkUserPhone != ''"> and ssp.checkUserPhone = #{checkUserPhone}</if>
|
||||||
|
<if test="isDel != null "> and ssp.isDel = #{isDel}</if>
|
||||||
|
<if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if>
|
||||||
|
<if test="createTime != null "> and ssp.createTime = #{createTime}</if>
|
||||||
|
<if test="updateUser != null and updateUser != ''"> and ssp.updateUser = #{updateUser}</if>
|
||||||
|
<if test="updateTime != null "> and ssp.updateTime = #{updateTime}</if>
|
||||||
|
<if test="dangerType != null and dangerType != ''"> and ssp.danger_type = #{dangerType}</if>
|
||||||
|
<if test="params.beginMarksTime != null and params.beginMarksTime != '' and params.endMarksTime != null and params.endMarksTime != ''"> and ssp.createTime between #{params.beginMarksTime} and #{params.endMarksTime}</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 (ssp.lordSentUser = #{nowUser} or ssp.copySendUser like concat('%', #{nowUser}, '%') or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
|
||||||
|
<if test='activeName == "dzg"'> and ssp.checkState in (0,1,3)</if>
|
||||||
|
<if test='activeName == "ycl"'> and ssp.checkState = 4 </if>
|
||||||
|
<if test='activeName == "zgcs"'> and (date(NOW())<![CDATA[ > ]]> date(ssp.nickedTime) and (ssp.updateTime is null or date(ssp.updateTime) <![CDATA[ > ]]> date(ssp.nickedTime))) </if>
|
||||||
|
</where>
|
||||||
|
order by sort,ssp.createTime desc
|
||||||
|
</select>
|
||||||
|
|
||||||
<!--根据状态分组查询-->
|
<!--根据状态分组查询-->
|
||||||
<select id="findProblemmodifyGroupByCheckState" parameterType="SmzSspProblemmodify" resultType="map">
|
<select id="findProblemmodifyGroupByCheckState" parameterType="SmzSspProblemmodify" resultType="map">
|
||||||
SELECT ssp.checkState,COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp
|
SELECT ssp.checkState,COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp
|
||||||
|
@ -105,6 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!--监理单位/总包公司/分包单位-->
|
<!--监理单位/总包公司/分包单位-->
|
||||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||||
WHERE ssp.isDel=0
|
WHERE ssp.isDel=0
|
||||||
|
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
||||||
<if test="infoType !=null">and infoType=#{infoType}</if>
|
<if test="infoType !=null">and infoType=#{infoType}</if>
|
||||||
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
|
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
|
||||||
<if test="workParts != null and workParts != ''"> and ssp.workParts like concat('%', #{workParts}, '%')</if>
|
<if test="workParts != null and workParts != ''"> and ssp.workParts like concat('%', #{workParts}, '%')</if>
|
||||||
|
@ -118,7 +182,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||||
<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}</if>
|
||||||
<!--普通整改人是我,复检人是我,抄送人是我,提交人是我的数据-->
|
<!--普通整改人是我,复检人是我,抄送人是我,提交人是我的数据-->
|
||||||
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser = #{nowUser} or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
|
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser like concat('%', #{nowUser}, '%') or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
|
||||||
GROUP BY checkState
|
GROUP BY checkState
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -129,6 +193,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!--监理单位/总包公司/分包单位-->
|
<!--监理单位/总包公司/分包单位-->
|
||||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||||
WHERE ssp.isDel=0
|
WHERE ssp.isDel=0
|
||||||
|
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
||||||
and (date(NOW())<![CDATA[ > ]]> date(ssp.nickedTime) and (ssp.updateTime is null or date(ssp.updateTime) <![CDATA[ > ]]> date(ssp.nickedTime)))
|
and (date(NOW())<![CDATA[ > ]]> date(ssp.nickedTime) and (ssp.updateTime is null or date(ssp.updateTime) <![CDATA[ > ]]> date(ssp.nickedTime)))
|
||||||
<if test="infoType !=null">and infoType=#{infoType}</if>
|
<if test="infoType !=null">and infoType=#{infoType}</if>
|
||||||
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
|
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
|
||||||
|
@ -143,7 +208,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||||
<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}</if>
|
||||||
<!--普通整改人是我,复检人是我,抄送人是我,提交人是我的数据-->
|
<!--普通整改人是我,复检人是我,抄送人是我,提交人是我的数据-->
|
||||||
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser = #{nowUser} or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
|
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser like concat('%', #{nowUser}, '%') or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSmzSspProblemmodifyById" parameterType="Long" resultMap="SmzSspProblemmodifyResult">
|
<select id="selectSmzSspProblemmodifyById" parameterType="Long" resultMap="SmzSspProblemmodifyResult">
|
||||||
|
@ -151,11 +216,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSmzSspProblemmodifyInfoById" parameterType="Long" resultMap="SmzSspProblemmodifyResult">
|
||||||
|
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.createBy,
|
||||||
|
case when ud.type_flag in (1,11) then concat(sd.dept_name,' ', '[责任主体]') else concat(ud.dept_name, ' ', '[', sdd3.dict_label ,']') end as deptName,
|
||||||
|
IFNULL(sdd1.dict_label,sdd2.dict_label) as danger_type_name,
|
||||||
|
su.nick_name as createUserName
|
||||||
|
from vw_smz_ssp_problemmodify_audit ssp
|
||||||
|
left join sur_project sp on ssp.projectId = sp.id
|
||||||
|
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
|
||||||
|
left join sys_dept ud on ud.dept_id = su.dept_id
|
||||||
|
left join sys_dept sd on sd.dept_id = sp.deptId
|
||||||
|
left join sys_dict_data sdd1 on sdd1.dict_type = 'ssp_aqyhlx' and sdd1.dict_value = ssp.danger_type
|
||||||
|
left join sys_dict_data sdd2 on sdd2.dict_type = 'ssp_zlyhlx' and sdd2.dict_value = ssp.danger_type
|
||||||
|
left join sur_project_unit_info spui on spui.projectId = sp.id and spui.unitId = su.dept_id
|
||||||
|
left join sys_dict_data sdd3 on sdd3.dict_type = 'sys_dept_type' and sdd3.dict_value = spui.unitType
|
||||||
|
where ssp.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertSmzSspProblemmodify" parameterType="SmzSspProblemmodify" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertSmzSspProblemmodify" parameterType="SmzSspProblemmodify" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into smz_ssp_problemmodify
|
insert into smz_ssp_problemmodify
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="projectId != null">projectId,</if>
|
<if test="projectId != null">projectId,</if>
|
||||||
<if test="infoType != null">infoType,</if>
|
<if test="infoType != null">infoType,</if>
|
||||||
|
<if test="marksPicture != null">marks_picture,</if>
|
||||||
|
<if test="marksVideo != null">marks_video,</if>
|
||||||
<if test="problemArea != null">problemArea,</if>
|
<if test="problemArea != null">problemArea,</if>
|
||||||
<if test="workParts != null">workParts,</if>
|
<if test="workParts != null">workParts,</if>
|
||||||
<if test="changeInfo != null">changeInfo,</if>
|
<if test="changeInfo != null">changeInfo,</if>
|
||||||
|
@ -172,15 +256,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="nickedInfo != null">nickedInfo,</if>
|
<if test="nickedInfo != null">nickedInfo,</if>
|
||||||
<if test="checkUser != null">checkUser,</if>
|
<if test="checkUser != null">checkUser,</if>
|
||||||
<if test="checkUserPhone != null">checkUserPhone,</if>
|
<if test="checkUserPhone != null">checkUserPhone,</if>
|
||||||
|
<if test="smarkUrl != null">smark_url,</if>
|
||||||
<if test="isDel != null">isDel,</if>
|
<if test="isDel != null">isDel,</if>
|
||||||
<if test="createUser != null">createUser,</if>
|
<if test="createUser != null">createUser,</if>
|
||||||
<if test="createTime != null">createTime,</if>
|
<if test="createTime != null">createTime,</if>
|
||||||
<if test="updateUser != null">updateUser,</if>
|
<if test="updateUser != null">updateUser,</if>
|
||||||
<if test="updateTime != null">updateTime,</if>
|
<if test="updateTime != null">updateTime,</if>
|
||||||
|
<if test="dangerType != null">danger_type,</if>
|
||||||
|
<if test="recheckSend != null">recheckSend,</if>
|
||||||
|
<if test="recheckSendUser != null">recheckSendUser,</if>
|
||||||
|
<if test="roleType != null">roleType,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="projectId != null">#{projectId},</if>
|
<if test="projectId != null">#{projectId},</if>
|
||||||
<if test="infoType != null">#{infoType},</if>
|
<if test="infoType != null">#{infoType},</if>
|
||||||
|
<if test="marksPicture != null">#{marksPicture},</if>
|
||||||
|
<if test="marksVideo != null">#{marksVideo},</if>
|
||||||
<if test="problemArea != null">#{problemArea},</if>
|
<if test="problemArea != null">#{problemArea},</if>
|
||||||
<if test="workParts != null">#{workParts},</if>
|
<if test="workParts != null">#{workParts},</if>
|
||||||
<if test="changeInfo != null">#{changeInfo},</if>
|
<if test="changeInfo != null">#{changeInfo},</if>
|
||||||
|
@ -197,11 +288,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="nickedInfo != null">#{nickedInfo},</if>
|
<if test="nickedInfo != null">#{nickedInfo},</if>
|
||||||
<if test="checkUser != null">#{checkUser},</if>
|
<if test="checkUser != null">#{checkUser},</if>
|
||||||
<if test="checkUserPhone != null">#{checkUserPhone},</if>
|
<if test="checkUserPhone != null">#{checkUserPhone},</if>
|
||||||
|
<if test="smarkUrl != null">#{smarkUrl},</if>
|
||||||
<if test="isDel != null">#{isDel},</if>
|
<if test="isDel != null">#{isDel},</if>
|
||||||
<if test="createUser != null">#{createUser},</if>
|
<if test="createUser != null">#{createUser},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateUser != null">#{updateUser},</if>
|
<if test="updateUser != null">#{updateUser},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="dangerType != null">#{dangerType},</if>
|
||||||
|
<if test="recheckSend != null">#{recheckSend},</if>
|
||||||
|
<if test="recheckSendUser != null">#{recheckSendUser},</if>
|
||||||
|
<if test="roleType != null">#{roleType},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -210,6 +306,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="projectId != null">projectId = #{projectId},</if>
|
<if test="projectId != null">projectId = #{projectId},</if>
|
||||||
<if test="infoType != null">infoType = #{infoType},</if>
|
<if test="infoType != null">infoType = #{infoType},</if>
|
||||||
|
<if test="marksPicture != null">marks_picture = #{marksPicture},</if>
|
||||||
|
<if test="marksVideo != null">marks_video = #{marksVideo},</if>
|
||||||
<if test="problemArea != null">problemArea = #{problemArea},</if>
|
<if test="problemArea != null">problemArea = #{problemArea},</if>
|
||||||
<if test="workParts != null">workParts = #{workParts},</if>
|
<if test="workParts != null">workParts = #{workParts},</if>
|
||||||
<if test="changeInfo != null">changeInfo = #{changeInfo},</if>
|
<if test="changeInfo != null">changeInfo = #{changeInfo},</if>
|
||||||
|
@ -226,11 +324,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="nickedInfo != null">nickedInfo = #{nickedInfo},</if>
|
<if test="nickedInfo != null">nickedInfo = #{nickedInfo},</if>
|
||||||
<if test="checkUser != null">checkUser = #{checkUser},</if>
|
<if test="checkUser != null">checkUser = #{checkUser},</if>
|
||||||
<if test="checkUserPhone != null">checkUserPhone = #{checkUserPhone},</if>
|
<if test="checkUserPhone != null">checkUserPhone = #{checkUserPhone},</if>
|
||||||
|
<if test="smarkUrl != null">smark_url = #{smarkUrl},</if>
|
||||||
<if test="isDel != null">isDel = #{isDel},</if>
|
<if test="isDel != null">isDel = #{isDel},</if>
|
||||||
<if test="createUser != null">createUser = #{createUser},</if>
|
<if test="createUser != null">createUser = #{createUser},</if>
|
||||||
<if test="createTime != null">createTime = #{createTime},</if>
|
<if test="createTime != null">createTime = #{createTime},</if>
|
||||||
<if test="updateUser != null">updateUser = #{updateUser},</if>
|
<if test="updateUser != null">updateUser = #{updateUser},</if>
|
||||||
<if test="updateTime != null">updateTime = #{updateTime},</if>
|
<if test="updateTime != null">updateTime = #{updateTime},</if>
|
||||||
|
<if test="dangerType != null">danger_type = #{dangerType},</if>
|
||||||
|
<if test="recheckSend != null">recheckSend = #{recheckSend},</if>
|
||||||
|
<if test="recheckSendUser != null">recheckSendUser = #{recheckSendUser},</if>
|
||||||
|
<if test="roleType != null">roleType = #{roleType},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
@ -0,0 +1,110 @@
|
||||||
|
<?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.wxsetting.mapper.SurMenuConfigMapper">
|
||||||
|
|
||||||
|
<resultMap type="SurMenuConfig" id="SurMenuConfigResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="menuName" column="menu_name" />
|
||||||
|
<result property="menuIdenti" column="menu_identi" />
|
||||||
|
<result property="menuImg" column="menu_img" />
|
||||||
|
<result property="menuUrl" column="menu_url" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="SurMenuConfigSurMenuConfigRoleResult" type="SurMenuConfig" extends="SurMenuConfigResult">
|
||||||
|
<collection property="surMenuConfigRoleList" notNullColumn="sub_smcid" javaType="java.util.List" resultMap="SurMenuConfigRoleResult" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap type="SurMenuConfigRole" id="SurMenuConfigRoleResult">
|
||||||
|
<result property="smcid" column="sub_smcid" />
|
||||||
|
<result property="roleId" column="sub_role_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSurMenuConfigVo">
|
||||||
|
select id, menu_name, menu_identi, menu_img, menu_url, del_flag, create_time from sur_menu_config
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSurMenuConfigList" parameterType="SurMenuConfig" resultMap="SurMenuConfigResult">
|
||||||
|
<include refid="selectSurMenuConfigVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="menuName != null and menuName != ''"> and menu_name like concat('%', #{menuName}, '%')</if>
|
||||||
|
<if test="menuIdenti != null and menuIdenti != ''"> and menu_identi = #{menuIdenti}</if>
|
||||||
|
<if test="menuImg != null and menuImg != ''"> and menu_img = #{menuImg}</if>
|
||||||
|
<if test="menuUrl != null and menuUrl != ''"> and menu_url = #{menuUrl}</if>
|
||||||
|
<if test="delFlag != null "> and del_flag = #{delFlag}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSurMenuConfigById" parameterType="Long" resultMap="SurMenuConfigSurMenuConfigRoleResult">
|
||||||
|
select a.id, a.menu_name, a.menu_identi, a.menu_img, a.menu_url, a.del_flag, a.create_time,
|
||||||
|
b.smcid as sub_smcid, b.role_id as sub_role_id
|
||||||
|
from sur_menu_config a
|
||||||
|
left join sur_menu_config_role b on b.smcid = a.id
|
||||||
|
where a.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSurMenuConfig" parameterType="SurMenuConfig" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sur_menu_config
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="menuName != null">menu_name,</if>
|
||||||
|
<if test="menuIdenti != null">menu_identi,</if>
|
||||||
|
<if test="menuImg != null">menu_img,</if>
|
||||||
|
<if test="menuUrl != null">menu_url,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="menuName != null">#{menuName},</if>
|
||||||
|
<if test="menuIdenti != null">#{menuIdenti},</if>
|
||||||
|
<if test="menuImg != null">#{menuImg},</if>
|
||||||
|
<if test="menuUrl != null">#{menuUrl},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSurMenuConfig" parameterType="SurMenuConfig">
|
||||||
|
update sur_menu_config
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="menuName != null">menu_name = #{menuName},</if>
|
||||||
|
<if test="menuIdenti != null">menu_identi = #{menuIdenti},</if>
|
||||||
|
<if test="menuImg != null">menu_img = #{menuImg},</if>
|
||||||
|
<if test="menuUrl != null">menu_url = #{menuUrl},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSurMenuConfigById" parameterType="Long">
|
||||||
|
delete from sur_menu_config where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSurMenuConfigByIds" parameterType="String">
|
||||||
|
delete from sur_menu_config where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSurMenuConfigRoleBySmcids" parameterType="String">
|
||||||
|
delete from sur_menu_config_role where smcid in
|
||||||
|
<foreach item="smcid" collection="array" open="(" separator="," close=")">
|
||||||
|
#{smcid}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSurMenuConfigRoleBySmcid" parameterType="Long">
|
||||||
|
delete from sur_menu_config_role where smcid = #{smcid}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<insert id="batchSurMenuConfigRole">
|
||||||
|
insert into sur_menu_config_role( smcid, role_id) values
|
||||||
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
|
( #{item.smcid}, #{item.roleId})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue