提交代码
parent
2214d298e5
commit
4d0f4ee14b
|
@ -43,6 +43,7 @@ public class BaseEntity implements Serializable
|
|||
private String nowDept;
|
||||
private String nowUser;
|
||||
private String nowUserName;
|
||||
private String projectDeptId;
|
||||
|
||||
/** 请求参数 */
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
|
@ -148,6 +149,14 @@ public class BaseEntity implements Serializable
|
|||
this.nowUserName = nowUserName;
|
||||
}
|
||||
|
||||
public String getProjectDeptId() {
|
||||
return projectDeptId;
|
||||
}
|
||||
|
||||
public void setProjectDeptId(String projectDeptId) {
|
||||
this.projectDeptId = projectDeptId;
|
||||
}
|
||||
|
||||
public Map<String, Object> getParams()
|
||||
{
|
||||
if (params == null)
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
package com.ruoyi.common.enums;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*
|
||||
* @author ruoyi
|
||||
* 公共状态枚举
|
||||
*/
|
||||
public enum UserStatus
|
||||
{
|
||||
OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除");
|
||||
public enum PublicStateEnum {
|
||||
|
||||
YES("Y", "YES"),
|
||||
NO("N", "NO"),
|
||||
OK("0", "正常"),
|
||||
DISABLE("1", "停用"),
|
||||
DELETED("2", "删除"),
|
||||
COMZGS("1","子公司状态标识");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
UserStatus(String code, String info)
|
||||
PublicStateEnum(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
|
@ -27,4 +30,5 @@ public enum UserStatus
|
|||
{
|
||||
return info;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
package com.ruoyi.common.enums;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public enum SysStatusEnum {
|
||||
|
||||
OK(0L, "正常"), DISABLE(1L, "停用"), DELETED(2L, "删除");
|
||||
|
||||
private final Long code;
|
||||
private final String info;
|
||||
|
||||
SysStatusEnum(Long code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public Long getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.framework.web.service;
|
||||
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -9,7 +10,6 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.enums.UserStatus;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
@ -42,12 +42,12 @@ public class UserDetailsServiceImpl implements UserDetailsService
|
|||
log.info("登录用户:{} 不存在.", username);
|
||||
throw new ServiceException("登录用户:" + username + " 不存在");
|
||||
}
|
||||
else if (UserStatus.DELETED.getCode().equals(user.getDelFlag()))
|
||||
else if (PublicStateEnum.DELETED.getCode().equals(user.getDelFlag()))
|
||||
{
|
||||
log.info("登录用户:{} 已被删除.", username);
|
||||
throw new ServiceException("对不起,您的账号:" + username + " 已被删除");
|
||||
}
|
||||
else if (UserStatus.DISABLE.getCode().equals(user.getStatus()))
|
||||
else if (PublicStateEnum.DISABLE.getCode().equals(user.getStatus()))
|
||||
{
|
||||
log.info("登录用户:{} 已被停用.", username);
|
||||
throw new ServiceException("对不起,您的账号:" + username + " 已停用");
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
|
@ -308,12 +310,16 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|||
public Long getZGSDeptId(Long deptId) {
|
||||
SysDept sysDept = deptMapper.selectDeptById(deptId);
|
||||
//comFlag标识为1是子公司
|
||||
if("1".equals(sysDept.getComFlag())){
|
||||
if(PublicStateEnum.COMZGS.getCode().equals(sysDept.getComFlag())){
|
||||
return sysDept.getDeptId();
|
||||
}else{
|
||||
if("101".equals(Convert.toStr(sysDept.getDeptId()))){
|
||||
return sysDept.getDeptId();
|
||||
}else{
|
||||
return getZGSDeptId(sysDept.getParentId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归列表
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import project from './project/index'
|
||||
import publics from './publics.js'
|
||||
import projectAsscess from './project/surProjectAssess.js'
|
||||
|
||||
export default {
|
||||
project,
|
||||
publics,
|
||||
projectAsscess
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询流程表单列表
|
||||
const queryDeptList=()=> {
|
||||
return request({
|
||||
url: 'bgscreen/dept/list',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export default{
|
||||
queryDeptList
|
||||
}
|
|
@ -1,28 +1,35 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 获取部门
|
||||
export const getMyDeptList = () => {
|
||||
const getMyDeptList = () => {
|
||||
return request({
|
||||
url: '/publics/deptTree',
|
||||
url: '/publics/deptList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 查询部门下拉树结构
|
||||
export const getDeptTree = () => {
|
||||
const getDeptTree = () => {
|
||||
return request({
|
||||
url: '/publics/deptTree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 查询子公司列表
|
||||
const getZgsDeptList = () => {
|
||||
return request({
|
||||
url: '/publics/queryZgsDeptList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 获取项目
|
||||
export const getMyProjectList = () => {
|
||||
const getMyProjectList = () => {
|
||||
return request({
|
||||
url: '/publics/projectList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 获取人员
|
||||
export const getUserList = (data) => {
|
||||
const getUserList = (data) => {
|
||||
return request({
|
||||
url: '/publics/userList',
|
||||
method: 'get',
|
||||
|
@ -30,3 +37,11 @@ export const getUserList = (data) => {
|
|||
})
|
||||
}
|
||||
|
||||
export default{
|
||||
getMyDeptList,
|
||||
getDeptTree,
|
||||
getZgsDeptList,
|
||||
getMyProjectList,
|
||||
getUserList
|
||||
}
|
||||
|
||||
|
|
|
@ -559,7 +559,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.$api.project.queryDeptList().then(d=>{
|
||||
this.$api.publics.getZgsDeptList().then(d=>{
|
||||
this.depts=d?.data||[];
|
||||
})
|
||||
},
|
||||
|
|
|
@ -11,6 +11,16 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="责任主体" prop="projectDeptId" v-hasPermi="['project:project:zgs']">
|
||||
<el-select v-model="queryParams.projectDeptId" placeholder="请选择责任主体" clearable>
|
||||
<el-option
|
||||
v-for="dict in depts"
|
||||
:key="dict.deptId"
|
||||
:label="dict.deptName"
|
||||
:value="dict.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="提交时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeMarksTime"
|
||||
|
@ -22,7 +32,6 @@
|
|||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
|
@ -225,7 +234,9 @@ export default {
|
|||
existingProblem: null,
|
||||
problemProgress: null,
|
||||
isDel: null,
|
||||
projectDeptId: null
|
||||
},
|
||||
depts:null,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
|
@ -235,6 +246,9 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.$api.publics.getZgsDeptList().then(d=>{
|
||||
this.depts=d?.data||[];
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目进度列表 */
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="责任主体" prop="deptId" v-hasPermi="['project:project:zgs']">
|
||||
<el-select v-model="queryParams.deptId" placeholder="请选择责任主体" clearable>
|
||||
<el-form-item label="责任主体" prop="projectDeptId" v-hasPermi="['project:project:zgs']">
|
||||
<el-select v-model="queryParams.projectDeptId" placeholder="请选择责任主体" clearable>
|
||||
<el-option
|
||||
v-for="dict in depts"
|
||||
:key="dict.deptId"
|
||||
|
@ -54,7 +54,7 @@
|
|||
:value="dict.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</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>
|
||||
|
@ -214,7 +214,6 @@
|
|||
|
||||
<script>
|
||||
import { listSurProjectUserInfo, getSurProjectUserInfo, delSurProjectUserInfo, addSurProjectUserInfo, updateSurProjectUserInfo } from "@/api/project/surProjectUserInfo";
|
||||
import { getDeptTree, getMyProjectList, getUserList } from "@/api/publics";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
|
@ -229,7 +228,7 @@ export default {
|
|||
userIds: [],
|
||||
userOptions: [],
|
||||
// 单位树选项
|
||||
deptOptions: undefined,
|
||||
deptOptions: [],
|
||||
// 单位名称
|
||||
deptName: undefined,
|
||||
// 遮罩层
|
||||
|
@ -261,7 +260,9 @@ export default {
|
|||
jobType: null,
|
||||
userId: null,
|
||||
isDel: null,
|
||||
projectDeptId: null
|
||||
},
|
||||
depts:null,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
|
@ -289,6 +290,9 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.$api.publics.getZgsDeptList().then(d=>{
|
||||
this.depts=d?.data||[];
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目人员列表 */
|
||||
|
@ -306,14 +310,14 @@ export default {
|
|||
data: {}
|
||||
}
|
||||
//获取项目列表的接口
|
||||
getMyProjectList(param).then(response => {
|
||||
this.$api.publics.getMyProjectList(param).then(response => {
|
||||
this.projectOptions = response.rows
|
||||
})
|
||||
},
|
||||
// 获取单位列表
|
||||
getDeptTree() {
|
||||
//获取单位列表的接口
|
||||
getDeptTree().then(response => {
|
||||
this.$api.publics.getDeptTree().then(response => {
|
||||
this.deptOptions = response.data;
|
||||
})
|
||||
},
|
||||
|
@ -324,7 +328,7 @@ export default {
|
|||
deptId: this.form.deptId
|
||||
}
|
||||
//获取人员列表的接口
|
||||
getUserList(param).then(response => {
|
||||
this.$pai.publics.getUserList(param).then(response => {
|
||||
this.loading = false;
|
||||
this.userOptions = response.rows
|
||||
})
|
||||
|
|
|
@ -99,7 +99,6 @@
|
|||
|
||||
<script>
|
||||
import { listSurProjectUserInfo, delSurProjectUserInfo, addSurProjectUserInfo, updateSurProjectUserInfo, findUserByDeptId } from "@/api/project/surProjectUserInfo";
|
||||
import { getDeptTree} from "@/api/publics";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
|
@ -135,7 +134,7 @@
|
|||
userIds: [],
|
||||
userOptions: [],
|
||||
// 单位树选项
|
||||
deptOptions: null,
|
||||
deptOptions: [],
|
||||
// 单位名称
|
||||
deptName: null,
|
||||
// 查询参数
|
||||
|
@ -239,7 +238,7 @@
|
|||
// 获取单位列表
|
||||
getDeptTree() {
|
||||
//获取单位列表的接口
|
||||
getDeptTree().then(response => {
|
||||
this.$api.publics.getDeptTree().then(response => {
|
||||
this.deptOptions = response.data;
|
||||
})
|
||||
},
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
<dict-tag :options="dict.type.ssp_aqyhlx" :value="scope.row.projectType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="问题描述" align="center" prop="positionPart" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="隐患描述" align="center" prop="positionPart" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="留痕说明" align="center" prop="marksRemark" width="200" show-overflow-tooltip/>
|
||||
<el-table-column label="审核人" align="center" prop="auditorPerson" />
|
||||
<el-table-column label="审核人手机号" align="center" prop="auditorPhone" />
|
||||
|
@ -202,8 +202,8 @@
|
|||
<el-form-item label="工序名称" prop="processName">
|
||||
<el-input v-model="form.processName" placeholder="请输入工序名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="问题描述" prop="positionPart">
|
||||
<el-input v-model="form.positionPart" placeholder="请输入问题描述" />
|
||||
<el-form-item label="隐患描述" prop="positionPart">
|
||||
<el-input v-model="form.positionPart" placeholder="请输入隐患描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="留痕说明" prop="marksRemark">
|
||||
<el-input v-model="form.marksRemark" placeholder="请输入留痕说明" />
|
||||
|
|
|
@ -17,6 +17,14 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="隐患描述" prop="workParts">
|
||||
<el-input
|
||||
v-model="queryParams.workParts"
|
||||
placeholder="请输入隐患描述"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="隐患类型" prop="dangerType">
|
||||
<el-select v-model="queryParams.dangerType" placeholder="隐患类型" clearable>
|
||||
<el-option
|
||||
|
@ -27,14 +35,6 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="问题描述" prop="workParts">
|
||||
<el-input
|
||||
v-model="queryParams.workParts"
|
||||
placeholder="请输入问题描述"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="提交时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeMarksTime"
|
||||
|
@ -46,6 +46,16 @@
|
|||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="责任主体" prop="projectDeptId" v-hasPermi="['project:project:zgs']">
|
||||
<el-select v-model="queryParams.projectDeptId" placeholder="请选择责任主体" clearable>
|
||||
<el-option
|
||||
v-for="dict in depts"
|
||||
:key="dict.deptId"
|
||||
:label="dict.deptName"
|
||||
:value="dict.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
|
@ -121,7 +131,7 @@
|
|||
<dict-tag :options="dict.type.ssp_aqyhlx" :value="scope.row.dangerType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="问题描述" align="center" prop="workParts" width="100" show-overflow-tooltip/>
|
||||
<el-table-column label="隐患描述" align="center" prop="workParts" width="100" show-overflow-tooltip/>
|
||||
<el-table-column label="整改要求" align="center" prop="changeInfo" width="200" show-overflow-tooltip/>
|
||||
<el-table-column label="隐患整改人" align="left" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
|
@ -143,7 +153,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="流程状态" align="center" prop="checkState">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_check_state" :value="scope.row.checkState"/>
|
||||
<dict-tag :options="dict.type.smz_ssp_checkstate" :value="scope.row.checkState"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提交用户" align="center" prop="createUser" width="100"/>
|
||||
|
@ -175,6 +185,13 @@
|
|||
@click="handleLog(scope.row)"
|
||||
v-hasPermi="['trouble:sspProblemmodify:query']"
|
||||
>整改日志</el-button>
|
||||
<el-button v-if="scope.row.vDel=='0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['work:sspProblemmodify:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -198,8 +215,8 @@
|
|||
<el-form-item label="拍摄位置" prop="problemArea">
|
||||
<el-input v-model="form.problemArea" placeholder="请输入拍摄位置" />
|
||||
</el-form-item>
|
||||
<el-form-item label="问题描述" prop="workParts">
|
||||
<el-input v-model="form.workParts" placeholder="请输入问题描述" />
|
||||
<el-form-item label="隐患描述" prop="workParts">
|
||||
<el-input v-model="form.workParts" placeholder="请输入隐患描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="整改要求" prop="changeInfo">
|
||||
<el-input v-model="form.changeInfo" placeholder="请输入整改要求" />
|
||||
|
@ -285,7 +302,7 @@ export default {
|
|||
components:{
|
||||
sspProblemmodifyAuditinfoDrawer,ElImageViewer
|
||||
},
|
||||
dicts: ['ssp_aqyhlx','sys_common_isdel','sys_check_state'],
|
||||
dicts: ['ssp_aqyhlx','sys_common_isdel','smz_ssp_checkstate'],
|
||||
data() {
|
||||
return {
|
||||
showViewer: false,
|
||||
|
@ -339,8 +356,10 @@ export default {
|
|||
createUser: null,
|
||||
createTime: null,
|
||||
updateUser: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
projectDeptId: null,
|
||||
},
|
||||
depts: null,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
|
@ -356,6 +375,9 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.$api.publics.getZgsDeptList().then(d=>{
|
||||
this.depts=d?.data||[];
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
onPreview(urls) {
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
<dict-tag :options="dict.type.ssp_zlyhlx" :value="scope.row.projectType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="问题描述" align="center" prop="positionPart" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="隐患描述" align="center" prop="positionPart" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="留痕说明" align="center" prop="marksRemark" width="200" show-overflow-tooltip/>
|
||||
<el-table-column label="审核人" align="center" prop="auditorPerson" />
|
||||
<el-table-column label="审核人手机号" align="center" prop="auditorPhone" />
|
||||
|
@ -202,8 +202,8 @@
|
|||
<el-form-item label="工序名称" prop="processName">
|
||||
<el-input v-model="form.processName" placeholder="请输入工序名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="问题描述" prop="positionPart">
|
||||
<el-input v-model="form.positionPart" placeholder="请输入问题描述" />
|
||||
<el-form-item label="隐患描述" prop="positionPart">
|
||||
<el-input v-model="form.positionPart" placeholder="请输入隐患描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="留痕说明" prop="marksRemark">
|
||||
<el-input v-model="form.marksRemark" placeholder="请输入留痕说明" />
|
||||
|
|
|
@ -17,6 +17,14 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="隐患描述" prop="workParts">
|
||||
<el-input
|
||||
v-model="queryParams.workParts"
|
||||
placeholder="请输入隐患描述"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="隐患类型" prop="dangerType">
|
||||
<el-select v-model="queryParams.dangerType" placeholder="隐患类型" clearable>
|
||||
<el-option
|
||||
|
@ -27,14 +35,6 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="问题描述" prop="workParts">
|
||||
<el-input
|
||||
v-model="queryParams.workParts"
|
||||
placeholder="请输入问题描述"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="提交时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeMarksTime"
|
||||
|
@ -46,6 +46,16 @@
|
|||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="责任主体" prop="projectDeptId" v-hasPermi="['project:project:zgs']">
|
||||
<el-select v-model="queryParams.projectDeptId" placeholder="请选择责任主体" clearable>
|
||||
<el-option
|
||||
v-for="dict in depts"
|
||||
:key="dict.deptId"
|
||||
:label="dict.deptName"
|
||||
:value="dict.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
|
@ -121,7 +131,7 @@
|
|||
<dict-tag :options="dict.type.ssp_zlyhlx" :value="scope.row.dangerType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="问题描述" align="center" prop="workParts" width="100" show-overflow-tooltip/>
|
||||
<el-table-column label="隐患描述" align="center" prop="workParts" width="100" show-overflow-tooltip/>
|
||||
<el-table-column label="整改要求" align="center" prop="changeInfo" width="200" show-overflow-tooltip/>
|
||||
<el-table-column label="隐患整改人" align="left" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
|
@ -143,7 +153,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="流程状态" align="center" prop="checkState">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_check_state" :value="scope.row.checkState"/>
|
||||
<dict-tag :options="dict.type.smz_ssp_checkstate" :value="scope.row.checkState"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提交用户" align="center" prop="createUser" width="100"/>
|
||||
|
@ -168,7 +178,7 @@
|
|||
@click="handleLog(scope.row)"
|
||||
v-hasPermi="['trouble:sspProblemmodify:query']"
|
||||
>整改日志</el-button>
|
||||
<el-button v-if="getvDel(scope.row.vDel)"
|
||||
<el-button v-if="scope.row.vDel=='0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
|
@ -198,8 +208,8 @@
|
|||
<el-form-item label="拍摄位置" prop="problemArea">
|
||||
<el-input v-model="form.problemArea" placeholder="请输入拍摄位置" />
|
||||
</el-form-item>
|
||||
<el-form-item label="问题描述" prop="workParts">
|
||||
<el-input v-model="form.workParts" placeholder="请输入问题描述" />
|
||||
<el-form-item label="隐患描述" prop="workParts">
|
||||
<el-input v-model="form.workParts" placeholder="请输入隐患描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="整改要求" prop="changeInfo">
|
||||
<el-input v-model="form.changeInfo" placeholder="请输入整改要求" />
|
||||
|
@ -285,7 +295,7 @@ export default {
|
|||
components:{
|
||||
sspProblemmodifyAuditinfoDrawer,ElImageViewer
|
||||
},
|
||||
dicts: ['ssp_zlyhlx','sys_common_isdel','sys_check_state'],
|
||||
dicts: ['ssp_zlyhlx','sys_common_isdel','smz_ssp_checkstate'],
|
||||
data() {
|
||||
return {
|
||||
showViewer: false,
|
||||
|
@ -339,8 +349,10 @@ export default {
|
|||
createUser: null,
|
||||
createTime: null,
|
||||
updateUser: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
projectDeptId: null
|
||||
},
|
||||
depts: null,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
|
@ -356,15 +368,11 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.$api.publics.getZgsDeptList().then(d=>{
|
||||
this.depts=d?.data||[];
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getvDel(v){
|
||||
if(v=="0"){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
},
|
||||
onPreview(urls) {
|
||||
var arrayurls = urls.split(",");
|
||||
this.srcList=[];
|
||||
|
|
|
@ -19,6 +19,16 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="责任主体" prop="projectDeptId" v-hasPermi="['project:project:zgs']">
|
||||
<el-select v-model="queryParams.projectDeptId" placeholder="请选择责任主体" clearable>
|
||||
<el-option
|
||||
v-for="dict in depts"
|
||||
:key="dict.deptId"
|
||||
:label="dict.deptName"
|
||||
:value="dict.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="演练时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeMarksTime"
|
||||
|
@ -241,7 +251,9 @@ export default {
|
|||
trainType: 1,
|
||||
trainNature: null,
|
||||
isDel: null,
|
||||
projectDeptId: null
|
||||
},
|
||||
depts: null,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
|
@ -251,6 +263,9 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.$api.publics.getZgsDeptList().then(d=>{
|
||||
this.depts=d?.data||[];
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getTrainDeptNames(vals){
|
||||
|
|
|
@ -19,6 +19,16 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="责任主体" prop="projectDeptId" v-hasPermi="['project:project:zgs']">
|
||||
<el-select v-model="queryParams.projectDeptId" placeholder="请选择责任主体" clearable>
|
||||
<el-option
|
||||
v-for="dict in depts"
|
||||
:key="dict.deptId"
|
||||
:label="dict.deptName"
|
||||
:value="dict.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="培训时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeMarksTime"
|
||||
|
@ -241,7 +251,9 @@ export default {
|
|||
trainType: 0,
|
||||
trainNature: null,
|
||||
isDel: null,
|
||||
projectDeptId: null
|
||||
},
|
||||
depts:null,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
|
@ -251,6 +263,9 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.$api.publics.getZgsDeptList().then(d=>{
|
||||
this.depts=d?.data||[];
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getTrainDeptNames(vals){
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
WHERE
|
||||
ssp.projectId = #{projectId}
|
||||
AND ssp.infoType = 0
|
||||
and ssp.isDel=0
|
||||
<if test="searchText != null and searchText != ''"> AND ssp.workParts LIKE CONCAT('%',#{searchText},'%')</if>
|
||||
<if test="startTime != null and startTime != ''"> AND Date(ssp.createTime) >= #{startTime} </if>
|
||||
<if test="endTime != null and endTime != ''"> AND #{endTime} >= Date(ssp.createTime) </if>
|
||||
|
@ -75,6 +76,7 @@
|
|||
LEFT JOIN sur_project spi ON ssp.projectId = spi.id
|
||||
WHERE
|
||||
ssp.projectId = #{projectId}
|
||||
and ssp.isDel=0
|
||||
AND ssp.infoType = 0
|
||||
AND ssp.createUser = #{loginName}
|
||||
<if test="startTime != null and startTime != ''"> AND Date(ssp.createTime) >= #{startTime} </if>
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
LEFT JOIN sur_project spi ON ssp.projectId = spi.id
|
||||
WHERE
|
||||
ssp.projectId = #{projectId}
|
||||
and ssp.isDel=0
|
||||
AND ssp.infoType = 1
|
||||
<if test="searchText != null and searchText != ''"> AND ssp.workParts LIKE CONCAT('%',#{searchText},'%')</if>
|
||||
<if test="startTime != null and startTime != ''"> AND Date(ssp.createTime) >= #{startTime} </if>
|
||||
|
@ -75,6 +76,7 @@
|
|||
LEFT JOIN sur_project spi ON ssp.projectId = spi.id
|
||||
WHERE
|
||||
ssp.projectId = #{projectId}
|
||||
and ssp.isDel=0
|
||||
AND ssp.infoType = 1
|
||||
AND ssp.createUser = #{loginName}
|
||||
<if test="startTime != null and startTime != ''"> AND Date(ssp.createTime) >= #{startTime} </if>
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package com.yanzhu.jh.bigscreen.web.controller;
|
||||
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
|
|
@ -4,6 +4,9 @@ import java.util.List;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.yanzhu.jh.project.domain.SurProject;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -34,6 +37,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||
@RequestMapping("/project/surProjectUserInfo")
|
||||
public class SurProjectUserinfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysDeptService sysDeptService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectUserinfoService surProjectUserinfoService;
|
||||
|
||||
|
@ -45,6 +51,13 @@ public class SurProjectUserinfoController extends BaseController
|
|||
public TableDataInfo list(SurProjectUserinfo surProjectUserinfo)
|
||||
{
|
||||
startPage();
|
||||
surProjectUserinfo.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(surProjectUserinfo.getNowRole())){
|
||||
surProjectUserinfo.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
surProjectUserinfo.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectUserinfo.setNowUser(Convert.toStr(getUserId()));
|
||||
List<SurProjectUserinfo> list = surProjectUserinfoService.selectSurProjectUserinfoList(surProjectUserinfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@ import java.util.List;
|
|||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.enums.SysStatusEnum;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
|
@ -96,7 +97,7 @@ public class SurProjectUserinfoServiceImpl implements ISurProjectUserinfoService
|
|||
}
|
||||
surProjectUserinfo.setDeptName(sysDept.getDeptName());
|
||||
surProjectUserinfo.setDeptType(sysDept.getTypeFlag());
|
||||
surProjectUserinfo.setIsDel(SysStatusEnum.OK.getCode());
|
||||
surProjectUserinfo.setIsDel(Convert.toLong(PublicStateEnum.OK.getCode()));
|
||||
for(Long userId:surProjectUserinfo.getUserIds()){
|
||||
surProjectUserinfo.setUserId(userId);
|
||||
surProjectUserinfoMapper.insertSurProjectUserinfo(surProjectUserinfo);
|
||||
|
@ -114,7 +115,7 @@ public class SurProjectUserinfoServiceImpl implements ISurProjectUserinfoService
|
|||
surProjectUnitInfo.setUnitType(Long.parseLong(sysDept.getTypeFlag()));
|
||||
surProjectUnitInfo.setUnitName(sysDept.getDeptName());
|
||||
surProjectUnitInfo.setCreateTime(new Date());
|
||||
surProjectUnitInfo.setDelFlag(0L);
|
||||
surProjectUnitInfo.setDelFlag(Convert.toLong(PublicStateEnum.OK.getCode()));
|
||||
surProjectUnitInfoMapper.insertSurProjectUnitInfo(surProjectUnitInfo);
|
||||
}
|
||||
return res;
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.UserStatus;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.yanzhu.jh.project.domain.SurProject;
|
||||
|
@ -43,11 +43,22 @@ PublicsController extends BaseController {
|
|||
@GetMapping("/deptList")
|
||||
public AjaxResult list(SysDept dept)
|
||||
{
|
||||
dept.setStatus(UserStatus.OK.getCode());
|
||||
dept.setStatus(PublicStateEnum.OK.getCode());
|
||||
List<SysDept> depts = deptService.selectDeptList(dept);
|
||||
return success(depts);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子公司部门列表
|
||||
*/
|
||||
@GetMapping("/queryZgsDeptList")
|
||||
public AjaxResult queryZgsDeptList(SysDept dept)
|
||||
{
|
||||
dept.setStatus(PublicStateEnum.OK.getCode());
|
||||
dept.setComFlag(PublicStateEnum.COMZGS.getCode());
|
||||
return success(deptService.selectAllDeptList(dept));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目列表
|
||||
*/
|
||||
|
@ -64,7 +75,7 @@ PublicsController extends BaseController {
|
|||
@GetMapping("/userList")
|
||||
public TableDataInfo list(SysUser user)
|
||||
{
|
||||
user.setDelFlag(UserStatus.OK.getCode());
|
||||
user.setDelFlag(PublicStateEnum.OK.getCode());
|
||||
List<SysUser> list = userService.selectUserList(user);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,9 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.yanzhu.jh.project.domain.SurProjectUnitInfo;
|
||||
import com.yanzhu.jh.project.service.ISurProjectUnitInfoService;
|
||||
import com.yanzhu.jh.work.domain.WorkTrain;
|
||||
|
@ -31,6 +33,9 @@ public class EmergencyDrillController extends BaseController
|
|||
@Autowired
|
||||
private IWorkTrainService workTrainService;
|
||||
|
||||
@Autowired
|
||||
private ISysDeptService sysDeptService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectUnitInfoService surProjectUnitInfoService;
|
||||
|
||||
|
@ -43,6 +48,12 @@ public class EmergencyDrillController extends BaseController
|
|||
{
|
||||
startPage();
|
||||
workTrain.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(workTrain.getNowRole())){
|
||||
workTrain.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
workTrain.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
workTrain.setNowUser(Convert.toStr(getUserId()));
|
||||
workTrain.setNowUserName(getUsername());
|
||||
List<WorkTrain> list = workTrainService.selectWorkTrainList(workTrain);
|
||||
return getDataTable(list);
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.List;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.yanzhu.jh.project.domain.SurProjectUnitInfo;
|
||||
import com.yanzhu.jh.project.service.ISurProjectUnitInfoService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
@ -38,6 +40,9 @@ public class WorkTrainController extends BaseController
|
|||
@Autowired
|
||||
private IWorkTrainService workTrainService;
|
||||
|
||||
@Autowired
|
||||
private ISysDeptService sysDeptService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectUnitInfoService surProjectUnitInfoService;
|
||||
|
||||
|
@ -50,6 +55,12 @@ public class WorkTrainController extends BaseController
|
|||
{
|
||||
startPage();
|
||||
workTrain.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(workTrain.getNowRole())){
|
||||
workTrain.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
|
||||
}else{
|
||||
workTrain.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
workTrain.setNowUser(Convert.toStr(getUserId()));
|
||||
workTrain.setNowUserName(getUsername());
|
||||
List<WorkTrain> list = workTrainService.selectWorkTrainList(workTrain);
|
||||
return getDataTable(list);
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package com.yanzhu.jh.work.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -136,7 +139,7 @@ public class WorkTrainServiceImpl implements IWorkTrainService
|
|||
for (WorkTrainDept workTrainDept : workTrainDeptList)
|
||||
{
|
||||
workTrainDept.setTrainId(id);
|
||||
workTrainDept.setIsMain(0L);
|
||||
workTrainDept.setIsMain(Convert.toLong(PublicStateEnum.OK.getCode()));
|
||||
list.add(workTrainDept);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
|
|
|
@ -102,6 +102,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="supervisorPersonnel != null "> and sp.supervisorPersonnel = #{supervisorPersonnel}</if>
|
||||
<if test="generalContractor != null "> and sp.generalContractor = #{generalContractor}</if>
|
||||
<if test="weightType != null "> and sp.weightType = #{weightType}</if>
|
||||
<!-- 查询条件-项目部门 -->
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<!--子部门数据-->
|
||||
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
|
|
|
@ -47,6 +47,8 @@ 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 == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
|
||||
<!-- 查询条件-项目部门 -->
|
||||
<if test="projectDeptId != null "> and p.deptId = #{projectDeptId}</if>
|
||||
) as a
|
||||
<where>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
|
|
|
@ -31,6 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select spu.id, spu.project_id, spu.dept_id, spu.dept_name, spu.dept_type, spu.job_type, 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 from sur_project_userinfo spu
|
||||
left join sur_project sp on spu.project_id = sp.id
|
||||
left join sys_user su on spu.user_id = su.user_id
|
||||
<!--监理单位/总包公司/分包单位-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||
<where>
|
||||
<if test="projectId != null "> and spu.project_id = #{projectId}</if>
|
||||
<if test="projectName != null "> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
||||
|
@ -41,6 +43,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="jobType != null and jobType != ''"> and spu.job_type = #{jobType}</if>
|
||||
<if test="userId != null "> and spu.user_id = #{userId}</if>
|
||||
<if test="isDel != null "> and spu.is_del = #{isDel}</if>
|
||||
<!-- 查询条件-项目部门 -->
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<!--子部门数据-->
|
||||
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
@ -45,16 +45,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectSmzSspProblemmodifyList" 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,
|
||||
CASE (ssp.createUser = #{nowUser}
|
||||
AND ssp.checkState = '0') or (#{nowRole} in ('1','2','3','4'))
|
||||
WHEN 0 THEN
|
||||
1
|
||||
CASE WHEN(ssp.createUser = #{nowUser}
|
||||
or #{nowRole} in ('1','2','3','4') ) and ssp.checkState < 4
|
||||
THEN 0 ELSE 1
|
||||
END AS v_del
|
||||
from smz_ssp_problemmodify ssp
|
||||
left join sur_project sp on ssp.projectId = sp.id
|
||||
<!--监理单位/总包公司/分包单位-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||
<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="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
|
||||
|
@ -80,12 +80,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<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 = #{nowUser} or ssp.recheckSendUser = #{nowUser} )</if>
|
||||
<if test='nowRole == "99"'> and (ssp.lordSentUser = #{nowUser} or ssp.copySendUser = #{nowUser} or ssp.recheckSendUser = #{nowUser} or ssp.createUser = #{nowUser} )</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 == "ycl"'> and ssp.checkState = 4 </if>
|
||||
|
@ -183,11 +185,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</update>
|
||||
|
||||
<delete id="deleteSmzSspProblemmodifyById" parameterType="Long">
|
||||
delete from smz_ssp_problemmodify where id = #{id}
|
||||
update smz_ssp_problemmodify set isDel=1 where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSmzSspProblemmodifyByIds" parameterType="String">
|
||||
delete from smz_ssp_problemmodify where id in
|
||||
update smz_ssp_problemmodify set isDel=1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
|
|
@ -55,6 +55,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from work_train wt
|
||||
left join work_train_dept wtd on wtd.train_id = wt.id
|
||||
left join sys_dept sd on sd.dept_id = wtd.dept_id
|
||||
left join sur_project sp on sp.id = wt.project_id
|
||||
<!--监理单位/总包公司/分包单位-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||
<!--普通用户查询项目人员-->
|
||||
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
|
||||
<where>
|
||||
<if test="projectId != null"> and wt.project_id = #{projectId}</if>
|
||||
<if test="projectName != null and projectName != ''"> and wt.project_name like concat('%', #{projectName}, '%')</if>
|
||||
|
@ -62,6 +67,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="trainNature != null and trainNature != ''"> and wt.train_nature = #{trainNature}</if>
|
||||
<if test="isDel != null "> and wt.is_del = #{isDel}</if>
|
||||
<if test="params.beginMarksTime != null and params.beginMarksTime != '' and params.endMarksTime != null and params.endMarksTime != ''"> and ((wt.begin_date between #{params.beginMarksTime} and #{params.endMarksTime}) or (wt.end_date 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 == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
|
||||
<!--普通用户查询项目人员-->
|
||||
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
|
||||
</where>
|
||||
group by wt.id
|
||||
order by wt.create_time desc
|
||||
|
|
Loading…
Reference in New Issue