提交代码

dev_xds
姜玉琦 2024-05-21 22:22:32 +08:00
parent faa9c0110c
commit 71524f2092
4 changed files with 320 additions and 163 deletions

View File

@ -9,7 +9,6 @@ import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.RateLimiter;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
@ -19,7 +18,6 @@ import com.ruoyi.common.enums.*;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.exception.user.BlackListException;
import com.ruoyi.common.utils.AuthRsaUtils;
import com.ruoyi.common.utils.MessageUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
@ -28,8 +26,6 @@ import com.ruoyi.common.utils.file.MultipartFileUtils;
import com.ruoyi.common.utils.http.HttpClientUtil;
import com.ruoyi.common.utils.ip.IpUtils;
import com.ruoyi.common.utils.sign.Md5Utils;
import com.ruoyi.framework.manager.AsyncManager;
import com.ruoyi.framework.manager.factory.AsyncFactory;
import com.ruoyi.framework.web.service.SysLoginService;
import com.ruoyi.system.domain.SysApplyConfig;
import com.ruoyi.system.service.ISysConfigService;
@ -49,7 +45,10 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.ConstraintViolation;
@ -484,7 +483,7 @@ public class LabourApiController extends BaseController {
SurProjectAttendanceData surProjectAttendanceData = JSONObject.parseObject(req.getData(), SurProjectAttendanceData.class);
//30秒内未重复请求
if(Convert.toBool(redisCache.getCacheObject(CACHEKEY+surProjectAttendanceData.getWorkerId()),true)){
redisCache.setCacheObject(CACHEKEY+surProjectAttendanceData.getWorkerId(),false,30, TimeUnit.SECONDS);
redisCache.setCacheObject(CACHEKEY+surProjectAttendanceData.getWorkerId(),false,60, TimeUnit.SECONDS);
//判断base64图片
if(StringUtils.isNotEmpty(surProjectAttendanceData.getScanPhotoBase64())){
String filePath = FileUploadUtils.uploadImages(RuoYiConfig.getUploadPath(), MultipartFileUtils.base64ToMultipartFile(surProjectAttendanceData.getScanPhotoBase64()));
@ -643,7 +642,7 @@ public class LabourApiController extends BaseController {
for(SurProjectAttendanceData surProjectAttendanceData:surProjectAttendanceDataList){
//30秒内未重复请求
if(Convert.toBool(redisCache.getCacheObject(CACHEKEY+surProjectAttendanceData.getWorkerId()),true)){
redisCache.setCacheObject(CACHEKEY+surProjectAttendanceData.getWorkerId(),false,30, TimeUnit.SECONDS);
redisCache.setCacheObject(CACHEKEY+surProjectAttendanceData.getWorkerId(),false,60, TimeUnit.SECONDS);
//判断base64图片
if(StringUtils.isNotEmpty(surProjectAttendanceData.getScanPhotoBase64())){
String filePath = FileUploadUtils.uploadImages(RuoYiConfig.getUploadPath(), MultipartFileUtils.base64ToMultipartFile(surProjectAttendanceData.getScanPhotoBase64()));

View File

@ -1,20 +1,47 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="82px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="82px"
>
<el-form-item label="项目名称" prop="projectId">
<el-select :disabled="prjDisabled" v-model="queryParams.projectId" placeholder="请选择项目" clearable @change="doQuerySub()">
<el-option v-for="(item, index) in projectOptions" :key="index" :label="item.projectName" :value="item.id">
<el-select
:disabled="prjDisabled"
v-model="queryParams.projectId"
placeholder="请选择项目"
clearable
@change="doQuerySub()"
>
<el-option
v-for="(item, index) in projectOptions"
:key="index"
:label="item.projectName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="总包单位" prop="deptId">
<el-select v-model="queryParams.deptId" placeholder="请选择总包单位" clearable>
<el-option v-for="(item, index) in depts" :key="index" :label="item.deptName" :value="item.deptId">
<el-option
v-for="(item, index) in depts"
:key="index"
:label="item.deptName"
:value="item.deptId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="分包商类型" prop="companyTypeId">
<el-select v-model="queryParams.companyTypeId" placeholder="请选择分包商类型" clearable>
<el-select
v-model="queryParams.companyTypeId"
placeholder="请选择分包商类型"
clearable
>
<el-option value="0" label="所有"></el-option>
<el-option value="101" label="总包人员"></el-option>
<el-option value="102" label="监理人员"></el-option>
@ -22,102 +49,193 @@
</el-select>
</el-form-item>
<el-form-item label="日期" prop="createBy">
<el-date-picker v-model="queryParams.attendanceTime" :picker-options="disableTime" type="date" placeholder="选择日期">
<el-date-picker
v-model="queryParams.attendanceTime"
:picker-options="disableTime"
type="date"
placeholder="选择日期"
>
</el-date-picker>
-
<el-date-picker v-model="queryParams.attendanceOutTime" :picker-options="disableTime" type="date" placeholder="选择日期">
<el-date-picker
v-model="queryParams.attendanceOutTime"
:picker-options="disableTime"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="姓名" prop="workerName">
<el-input v-model="queryParams.workerName" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<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-button type="warning" plain icon="el-icon-setting" size="mini" @click="handleSetting" v-if="!prjDisabled"
v-hasPermi="['project:attendanceConfig:edit']">设置</el-button>
<el-button
type="warning"
plain
icon="el-icon-setting"
size="mini"
@click="handleSetting"
v-if="!prjDisabled"
v-hasPermi="['project:attendanceConfig:edit']"
>设置</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8" v-if="1 == 2">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['project:attendance:add']">新增</el-button>
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['project:attendance:add']"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
v-hasPermi="['project:attendance:edit']">修改</el-button>
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['project:attendance:edit']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
v-hasPermi="['project:attendance:remove']">删除</el-button>
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['project:attendance:remove']"
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['project:attendance:export']">导出</el-button>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['project:attendance:export']"
>导出</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="attendanceList" @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="attendanceList"
@selection-change="handleSelectionChange"
>
<el-table-column label="照片" align="center" prop="id">
<template slot-scope="{row}">
<el-image :src="row.scanPhoto||row.workerPhoto" :preview-src-list="[row.scanPhoto||row.workerPhoto]" style="height:60px"/>
<template slot-scope="{ row }">
<el-image
:src="row.scanPhoto || row.workerPhoto"
:preview-src-list="[row.scanPhoto || row.workerPhoto]"
style="height: 60px"
/>
</template>
</el-table-column>
<el-table-column label="姓名" align="center" prop="workerName" />
<el-table-column label="籍贯" align="center" prop="nativePlace" />
<el-table-column label="性别" align="center" prop="attendanceType" >
<template slot-scope="{row}">{{ row.workerGender==1?'女':'男' }}</template>
<el-table-column label="性别" align="center" prop="attendanceType">
<template slot-scope="{ row }">{{
row.workerGender == 1 ? "女" : "男"
}}</template>
</el-table-column>
<el-table-column label="进场时间" align="center" prop="inTime" width="96">
<template slot-scope="{row}">
<template slot-scope="{ row }">
<span v-if="row.attendanceTime">
{{ row.attendanceTime|formatDateTime }}
{{ row.attendanceTime | formatDateTime }}
</span>
<i v-else class="el-icon-close" style="color:red;"></i>
<i v-else class="el-icon-close" style="color: red"></i>
</template>
</el-table-column>
<el-table-column label="离场时间" align="center" prop="outTime" width="96">
<template slot-scope="{row}">
<template slot-scope="{ row }">
<span v-if="row.attendanceOutTime">
{{ row.attendanceOutTime|formatDateTime }}
{{ row.attendanceOutTime | formatDateTime }}
</span>
<i v-else class="el-icon-close" style="color:red;"></i>
<i v-else class="el-icon-close" style="color: red"></i>
</template>
</el-table-column>
<el-table-column label="分包商名称" align="center" prop="companyName" />
<el-table-column label="所属班组" align="center" prop="groupName" />
<el-table-column label="工种" align="center" prop="workTypeName" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="1==2">
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
v-if="1 == 2"
>
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['project:attendance:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['project:attendance:remove']">删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['project:attendance:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['project:attendance: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" />
<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 :close-on-click-modal="false" :close-on-press-escape="false">
<el-dialog
:title="title"
:visible.sync="open"
width="500px"
append-to-body
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="厂商编号参考字典attendance_vendors" prop="vendorsCode">
<el-input v-model="form.vendorsCode" placeholder="请输入厂商编号参考字典attendance_vendors" />
<el-input
v-model="form.vendorsCode"
placeholder="请输入厂商编号参考字典attendance_vendors"
/>
</el-form-item>
<el-form-item label="工人Id" prop="workerId">
<el-input v-model="form.workerId" placeholder="请输入工人Id" />
</el-form-item>
<el-form-item label="考勤时间yyyy-MM-dd HH:mm:ss" prop="attendanceTime">
<el-input v-model="form.attendanceTime" placeholder="请输入考勤时间yyyy-MM-dd HH:mm:ss" />
<el-input
v-model="form.attendanceTime"
placeholder="请输入考勤时间yyyy-MM-dd HH:mm:ss"
/>
</el-form-item>
<el-form-item label="设备编号" prop="deviceCode">
<el-input v-model="form.deviceCode" placeholder="请输入设备编号" />
@ -148,9 +266,22 @@
</template>
<script>
import { listAttendance, getAttendance, delAttendance, addAttendance, updateAttendance } from "@/api/project/attendance";
import { listAttendanceWorker, getAttendanceWorker, delAttendanceWorker, addAttendanceWorker, updateAttendanceWorker, queryAttendanceData } from "@/api/project/attendanceWorker";
import attConfigDrawer from '../attendanceConfig/attendanceConfigDrawer.vue'
import {
listAttendance,
getAttendance,
delAttendance,
addAttendance,
updateAttendance,
} from "@/api/project/attendance";
import {
listAttendanceWorker,
getAttendanceWorker,
delAttendanceWorker,
addAttendanceWorker,
updateAttendanceWorker,
queryAttendanceData,
} from "@/api/project/attendanceWorker";
import attConfigDrawer from "../attendanceConfig/attendanceConfigDrawer.vue";
export default {
name: "Attendance",
components: {
@ -178,33 +309,32 @@ export default {
open: false,
//
queryParams: {
vendorsCode:'huazhu',
vendorsCode: "huazhu",
pageNum: 1,
pageSize: 10,
projectId:null,
workerName:'',
deptId:null,
companyTypeId:"0",
attendanceTime:new Date(),
attendanceOutTime:undefined
projectId: null,
workerName: "",
deptId: null,
companyTypeId: "0",
attendanceTime: new Date(),
attendanceOutTime: undefined,
},
//
form: {},
//
rules: {
},
rules: {},
projectOptions: [],
depts: [],
prjDisabled:false,
cfgList:[],
disableTime:{
disabledDate:time=>{
var t1=+this.$dt("2023-1-1").$d
var t2=+this.$dt(time).$d;
var t3=+this.$dt("2028-12-31").$d
return t2<t1 || t2>t3;
}
}
prjDisabled: false,
cfgList: [],
disableTime: {
disabledDate: (time) => {
var t1 = +this.$dt("2023-1-1").$d;
var t2 = +this.$dt(time).$d;
var t3 = +this.$dt("2028-12-31").$d;
return t2 < t1 || t2 > t3;
},
},
};
},
created() {
@ -212,33 +342,38 @@ export default {
this.projectOptions = response.rows;
});
this.$api.publics.findAttendanceCfgList({}).then((response) => {
this.cfgList = response.data||[];
this.cfgList = response.data || [];
});
},
methods: {
init(prj){
this.queryParams.projectId=prj.id;
this.prjDisabled=true;
init(prj) {
this.queryParams.projectId = prj.id;
this.prjDisabled = true;
this.doQuerySub(true);
},
doQuerySub(init) {
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
let tmps =
this.prjDept2 && this.prjDept2[this.queryParams.projectId]
? this.prjDept2[this.queryParams.projectId] || []
: [];
if (tmps.length > 0) {
this.depts = tmps;
if (tmps.length == 1) {
this.queryParams.deptId = tmps[0].deptId;
} else {
this.queryParams.deptId = '';
this.queryParams.deptId = "";
}
if(init){
if (init) {
this.getList();
}
return;
}
this.$api.publics.queryUnitList({
this.$api.publics
.queryUnitList({
projectId: this.queryParams.projectId,
unitTypes: "2".split(","),
}).then((d) => {
})
.then((d) => {
let objs = d.rows || [];
if (!this.prjDept2) {
this.prjDept2 = {};
@ -248,9 +383,9 @@ export default {
if (objs.length == 1) {
this.queryParams.deptId = objs[0].deptId;
} else {
this.queryParams.deptId = '';
this.queryParams.deptId = "";
}
if(init){
if (init) {
this.getList();
}
});
@ -261,48 +396,61 @@ export default {
/** 查询劳务实名制管理列表 */
getList() {
this.loading = true;
let postData={};
if(this.queryParams.attendanceTime){
postData.attendanceTime=this.$dt(this.queryParams.attendanceTime).format("YYYY-MM-DD");
let postData = {};
if (this.queryParams.attendanceTime) {
postData.attendanceTime = this.$dt(this.queryParams.attendanceTime).format(
"YYYY-MM-DD"
);
}
if(this.queryParams.attendanceOutTime){
postData.attendanceOutTime=this.$dt(this.queryParams.attendanceOutTime).format("YYYY-MM-DD");
if (this.queryParams.attendanceOutTime) {
postData.attendanceOutTime = this.$dt(this.queryParams.attendanceOutTime).format(
"YYYY-MM-DD"
);
}
let tmps=this.cfgList.filter(d=>d.projectId==this.queryParams.projectId && d.subDeptId==this.queryParams.deptId);
if(tmps.length>0){
postData.cfgid=tmps[0].id;
}else{
postData.projectId=this.queryParams.projectId;
postData.deptId=this.queryParams.deptId;
let tmps = this.cfgList.filter(
(d) =>
d.projectId == this.queryParams.projectId &&
d.subDeptId == this.queryParams.deptId
);
if (tmps.length > 0) {
postData.cfgid = tmps[0].id;
} else {
postData.projectId = this.queryParams.projectId;
postData.deptId = this.queryParams.deptId;
}
postData.pageNum=this.queryParams.pageNum;
postData.pageSize=this.queryParams.pageSize;
if(this.queryParams.workerName){
postData.workerName=this.queryParams.workerName;
postData.pageNum = this.queryParams.pageNum;
postData.pageSize = this.queryParams.pageSize;
if (this.queryParams.workerName) {
postData.workerName = this.queryParams.workerName;
}
if(this.queryParams.companyTypeId && this.queryParams.companyTypeId>0){
postData.companyTypeId=this.queryParams.companyTypeId;
if (this.queryParams.companyTypeId && this.queryParams.companyTypeId > 0) {
postData.companyTypeId = this.queryParams.companyTypeId;
}
listAttendance(postData).then(response=>{
this.attendanceList = (response.rows||[]).map(it=>{
let dt1=it.attendanceTime;
let dt2=it.attendanceOutTime;
if((!dt1 || !dt2)||dt1==dt2){
let dt=dt1||dt2;
if(it.remark=="E"){
it.attendanceTime=dt;
it.attendanceOutTime="";
}else{
it.attendanceTime="";
it.attendanceOutTime=dt;
listAttendance(postData).then((response) => {
this.attendanceList = (response.rows || []).map((it) => {
if (it.vendorsCode != "yanzhu") {
let dt1 = it.attendanceTime;
let dt2 = it.attendanceOutTime;
if (!dt1 || !dt2 || dt1 == dt2) {
let dt = dt1 || dt2;
if (it.remark == "E") {
it.attendanceTime = dt;
it.attendanceOutTime = "";
} else {
it.attendanceTime = "";
it.attendanceOutTime = dt;
}
}
it.scanPhoto=it.scanPhoto && it.scanPhoto.indexOf("/profile")==0?"/jhapi"+it.scanPhoto:it.scanPhoto;
}
it.scanPhoto =
it.scanPhoto && it.scanPhoto.indexOf("/profile") == 0
? "/jhapi" + it.scanPhoto
: it.scanPhoto;
return it;
});
this.total = response.total;
this.loading = false;
})
});
},
//
cancel() {
@ -326,7 +474,7 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
};
this.resetForm("form");
},
@ -342,9 +490,9 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
@ -355,8 +503,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getAttendance(id).then(response => {
const id = row.id || this.ids;
getAttendance(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改劳务实名制管理";
@ -364,16 +512,16 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateAttendance(this.form).then(response => {
updateAttendance(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addAttendance(this.form).then(response => {
addAttendance(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -385,19 +533,27 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除劳务实名制管理编号为"' + ids + '"的数据项?').then(function () {
this.$modal
.confirm('是否确认删除劳务实名制管理编号为"' + ids + '"的数据项?')
.then(function () {
return delAttendance(ids);
}).then(() => {
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('project/attendance/export', {
...this.queryParams
}, `attendance_${new Date().getTime()}.xlsx`)
}
}
this.download(
"project/attendance/export",
{
...this.queryParams,
},
`attendance_${new Date().getTime()}.xlsx`
);
},
},
};
</script>

View File

@ -104,7 +104,7 @@ public class SmzSspProblemmodifyController extends BaseController
smzSspProblemmodify.setNowDept(Convert.toStr(getDeptId()));
}
smzSspProblemmodify.setNowUser(getLoginUser().getUsername());
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSmzSspProblemmodifyList(smzSspProblemmodify);
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSmzSspProblemmodifyListAndUnitName(smzSspProblemmodify);
List<SmzSspProblemmodifyExport> exportList=new ArrayList<>();
for(SmzSspProblemmodify it :list){
exportList.add(SmzSspProblemmodifyExport.newItem(it));

View File

@ -772,13 +772,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sp.dept_Name deptName,ssp.dangerLabel,ssp.chkLabel
from (
SELECT c.*,a.dict_label dangerLabel,b.dict_label chkLabel FROM
vw_smz_ssp_problemmodify_audit c,sys_dict_data a,sys_dict_data b WHERE c.danger_Type=a.dict_value AND a.dict_type='ssp_aqyhlx'
vw_smz_ssp_problemmodify_audit c,sys_dict_data a,sys_dict_data b WHERE c.danger_Type=a.dict_value
<if test="infoType == 0 "> and a.dict_type='ssp_aqyhlx'</if>
<if test="infoType == 1 "> and a.dict_type='ssp_aqyhlx'</if>
AND c.checkState=b.dict_value AND b.dict_type='smz_ssp_checkstate'
) ssp
left join sur_project sp on ssp.projectId=sp.id
left join (
SELECT p.dept_Name,p.dept_id,u.phonenumber
FROM sys_user u,sur_project_userinfo p WHERE u.user_id=p.user_id AND p.dept_type=2
FROM sys_user u,sur_project_userinfo p WHERE p.is_del=0 and u.user_id=p.user_id AND p.dept_type=2
) sp on ssp.lordSentUser = sp.phonenumber
<!--监理单位/总包公司/分包单位-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = ssp.projectId</if>