提交代码
parent
8a885b2527
commit
9a9a5ffb92
|
@ -1,5 +1,7 @@
|
|||
package com.ruoyi.common.enums;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
public enum SysRoleEnum {
|
||||
|
||||
ADMIN("1", "admin"),
|
||||
|
@ -28,6 +30,11 @@ public enum SysRoleEnum {
|
|||
return code;
|
||||
}
|
||||
|
||||
public Long getLongCode()
|
||||
{
|
||||
return Convert.toLong(code);
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
|
|
|
@ -146,6 +146,14 @@ public class SecurityUtils
|
|||
return userId != null && 1L == userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户权限最大的角色
|
||||
* @return role
|
||||
*/
|
||||
public Long getUserFirstRole(){
|
||||
return getLoginUser().getUser().getRoles().stream().mapToLong(r->r.getRoleId()).min().getAsLong();
|
||||
}
|
||||
|
||||
public static boolean isUserB() {
|
||||
long roleId=getRoleId();
|
||||
return 5==roleId || 6==roleId || 7==roleId || 99==roleId || 15==roleId || 16==roleId || 17==roleId;
|
||||
|
|
|
@ -401,7 +401,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sur_project_attendance_user u, sur_project_attendance_cfg c,view_sur_project_attendance_group g,
|
||||
sur_project sp
|
||||
where u.cfgid=c.id and u.companyId=g.companyId and u.state=#{id} and c.project_id = sp.id
|
||||
and sp.isDel=0 and sp.progressVisible=0
|
||||
and sp.isDel=0
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
|
@ -453,7 +453,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="todayAttendance" parameterType="QuartzProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select ady.* from sur_project_attendance_data_${year} ady
|
||||
left join sur_project sp on sp.id = ady.projectId
|
||||
where sp.isDel=0 and sp.progressVisible=0
|
||||
where sp.isDel=0
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and ady.projectId=#{projectId}
|
||||
</if>
|
||||
|
@ -505,7 +505,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="projectId!=null and projectId>0">
|
||||
and projectId=#{projectId}
|
||||
</if>
|
||||
and projectId in (select id from sur_project sp where sp.isDel=0 and sp.progressVisible=0
|
||||
and projectId in (select id from sur_project sp where sp.isDel=0
|
||||
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and sp.deptId=#{deptId}
|
||||
|
|
|
@ -758,7 +758,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT p.id, p.projectName NAME,c.dept_name groupName,g.companyTypeId companyId,COUNT(1) cfgid
|
||||
FROM sur_project_attendance_user u,sur_project_attendance_cfg b,view_sur_project_attendance_group g,sur_project p,sys_dept c
|
||||
where u.cfgid=b.id and u.state= #{state} and u.companyId=g.companyId and b.project_id=p.id and c.dept_id=b.sub_dept_id
|
||||
and p.isDel=0 and p.progressVisible=0
|
||||
and p.isDel=0
|
||||
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and p.deptId=#{deptId}
|
||||
|
@ -783,7 +783,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
b.project_id,b.sub_dept_id,u.companyName,u.workTypeName,u.groupName,
|
||||
b.project_id,b.sub_dept_id, g.teamname remark,g.companyName degreeName
|
||||
FROM sur_project_attendance_user u,sur_project_attendance_cfg b,view_sur_project_attendance_group g,sur_project sp
|
||||
WHERE u.cfgid=b.id and u.state=#{state} and u.companyId=g.companyId and sp.isDel=0 and sp.progressVisible=0 and b.project_id = sp.id
|
||||
WHERE u.cfgid=b.id and u.state=#{state} and u.companyId=g.companyId and sp.isDel=0 and b.project_id = sp.id
|
||||
<if test="id==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
</if>
|
||||
|
|
|
@ -59,11 +59,11 @@
|
|||
|
||||
<!--查询工作流操作日志-->
|
||||
<select id="selectCommentByProcInsId" parameterType="string" resultType="map">
|
||||
select * from vw_flow_comment where procInstId = #{procInstId} order by startTime DESC
|
||||
select * from vw_flow_comment where procInstId = #{procInstId} order by startTime DESC, IF(ISNULL(endTime),0,1)
|
||||
</select>
|
||||
|
||||
<select id="selectLastCommentByProcInsId" parameterType="string" resultType="map">
|
||||
select * from vw_flow_comment where procInstId = #{procInstId} order by startTime DESC limit 1
|
||||
select * from vw_flow_comment where procInstId = #{procInstId} order by startTime DESC, IF(ISNULL(endTime),0,1) limit 1
|
||||
</select>
|
||||
|
||||
<!--查询工作流携带的参数-->
|
||||
|
@ -518,7 +518,7 @@
|
|||
left join sur_project sp on a.businesskey=sp.id
|
||||
where a.procDefKey='flow_fbzzsp_fbszzsp'
|
||||
AND (A.finishTime is null OR (A.finishTime is not null and A.taskComType =1))
|
||||
and sp.progressVisible=0 and sp.isDel=0
|
||||
and sp.isDel=0
|
||||
<if test="deptId !=null and deptId>0">and a.businessDeptId=#{deptId}</if>
|
||||
<if test="projectId !=null and projectId>0">and a.businessKey=#{projectId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
|
@ -531,6 +531,7 @@
|
|||
group by d.dict_value,d.dict_label
|
||||
) y on x.dict_value=y.dict_value
|
||||
</select>
|
||||
|
||||
<select id="listFlowBySubDeptType" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
|
||||
SELECT a.procInsId,a.deployId,a.createTime,a.finishTime,a.businessKey,a.businessKeyName,a.startDeptName,b.TEXT_ as taskId, c.TEXT_ as deptName,d.dict_label taskName FROM
|
||||
vw_flow_all a
|
||||
|
@ -540,7 +541,7 @@
|
|||
left join sur_project sp on a.businesskey=sp.id
|
||||
where a.procDefKey='flow_fbzzsp_fbszzsp'
|
||||
AND (A.finishTime is null OR (A.finishTime is not null and A.taskComType =1))
|
||||
and sp.progressVisible=0 and sp.isDel=0
|
||||
and sp.isDel=0
|
||||
<if test="deptId !=null and deptId>0">and a.businessDeptId=#{deptId}</if>
|
||||
<if test="projectId !=null and projectId>0">and a.businessKey=#{projectId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
|
@ -550,6 +551,5 @@
|
|||
</foreach>
|
||||
</if>
|
||||
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
|
||||
|
||||
</select>
|
||||
</mapper>
|
|
@ -24,6 +24,14 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input
|
||||
v-model="queryParams.deviceName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序号" prop="deviceSn">
|
||||
<el-input
|
||||
v-model="queryParams.deviceSn"
|
||||
|
@ -96,9 +104,10 @@
|
|||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" width="180" />
|
||||
<el-table-column label="总包单位" align="center" prop="deptName" width="180" />
|
||||
<el-table-column label="设备序号" align="center" prop="deviceSn" width="180" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" width="150" />
|
||||
<el-table-column label="总包单位" align="center" prop="deptName" width="150" />
|
||||
<el-table-column label="设备名称" align="center" prop="deviceName" width="150" />
|
||||
<el-table-column label="设备序号" align="center" prop="deviceSn" width="150" />
|
||||
<el-table-column label="塔机类型" align="center" prop="towerType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.device_tower_type" :value="scope.row.towerType"/>
|
||||
|
@ -216,8 +225,11 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input v-model="form.deviceName" placeholder="请输入设备名称" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序列号" prop="deviceSn">
|
||||
<el-input v-model="form.deviceSn" placeholder="请输入设备序列号" />
|
||||
<el-input v-model="form.deviceSn" placeholder="请输入设备序列号" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备厂商" prop="deviceSource">
|
||||
<el-input v-model="form.deviceSource" placeholder="请输入设备厂商" />
|
||||
|
@ -331,6 +343,9 @@ export default {
|
|||
rules: {
|
||||
projectId: [{ required: true, message: "请选择所属项目", trigger: "change" }],
|
||||
deptId: [{ required: true, message: "请选择所属单位", trigger: "change" }],
|
||||
deviceName: [
|
||||
{ required: true, message: "设备名称不能为空", trigger: "blur" },
|
||||
],
|
||||
deviceSn: [
|
||||
{ required: true, message: "设备序列表不能为空", trigger: "blur" },
|
||||
{ max: 64, message: "最多输入64个字符" },
|
||||
|
|
|
@ -151,14 +151,14 @@
|
|||
</el-table-column> -->
|
||||
<el-table-column label="会签单" align="center" prop="signFiles" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.signFiles != null" size="mini" type="text" icon="el-icon-paperclip"
|
||||
<el-button v-if="scope.row.signFiles" size="mini" type="text" icon="el-icon-paperclip"
|
||||
@click="handledownloadSignFiles(scope.row)" v-hasPermi="['project:materialSeal:list']">下载会签单</el-button>
|
||||
<span v-if="scope.row.signFiles == null"> - </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变更单" align="center" prop="alterationFiles" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.alterationFiles != null" size="mini" type="text" icon="el-icon-paperclip"
|
||||
<el-button v-if="scope.row.alterationFiles" size="mini" type="text" icon="el-icon-paperclip"
|
||||
@click="handledownloadAlterationFiles(scope.row)"
|
||||
v-hasPermi="['project:materialSeal:list']">下载变更单</el-button>
|
||||
<span v-if="scope.row.signFiles == null"> - </span>
|
||||
|
@ -601,15 +601,15 @@ export default {
|
|||
},
|
||||
/** 下载附件 */
|
||||
handledownloadSignFiles(row) {
|
||||
this.files = row.signFiles.split(",");
|
||||
this.files.forEach((item) => {
|
||||
let files = row.signFiles.split(",");
|
||||
files.forEach((item) => {
|
||||
this.$download.resource(item);
|
||||
});
|
||||
},
|
||||
/** 下载附件 */
|
||||
handledownloadAlterationFiles(row) {
|
||||
this.files = row.alterationFiles.split(",");
|
||||
this.files.forEach((item) => {
|
||||
let files = row.alterationFiles.split(",");
|
||||
files.forEach((item) => {
|
||||
this.$download.resource(item);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -86,14 +86,14 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="会签单" align="center" prop="signFiles" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.signFiles != null" size="mini" type="text" icon="el-icon-paperclip"
|
||||
<el-button v-if="scope.row.signFiles" size="mini" type="text" icon="el-icon-paperclip"
|
||||
@click="handledownloadSignFiles(scope.row)" v-hasPermi="['project:materialSeal:list']">下载会签单</el-button>
|
||||
<span v-if="scope.row.signFiles == null"> - </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变更单" align="center" prop="alterationFiles" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.alterationFiles != null" size="mini" type="text" icon="el-icon-paperclip"
|
||||
<el-button v-if="scope.row.alterationFiles" size="mini" type="text" icon="el-icon-paperclip"
|
||||
@click="handledownloadAlterationFiles(scope.row)"
|
||||
v-hasPermi="['project:materialSeal:list']">下载变更单</el-button>
|
||||
<span v-if="scope.row.signFiles == null"> - </span>
|
||||
|
@ -523,22 +523,22 @@ export default {
|
|||
},
|
||||
/** 下载附件 */
|
||||
handleDownload(row) {
|
||||
this.files = row.checkingFiles.split(",");
|
||||
this.files.forEach((item) => {
|
||||
let files = row.checkingFiles.split(",");
|
||||
files.forEach((item) => {
|
||||
this.$download.resource(item);
|
||||
});
|
||||
},
|
||||
/** 下载附件 */
|
||||
handledownloadSignFiles(row) {
|
||||
this.files = row.signFiles.split(",");
|
||||
this.files.forEach((item) => {
|
||||
let files = row.signFiles.split(",");
|
||||
files.forEach((item) => {
|
||||
this.$download.resource(item);
|
||||
});
|
||||
},
|
||||
/** 下载附件 */
|
||||
handledownloadAlterationFiles(row) {
|
||||
this.files = row.alterationFiles.split(",");
|
||||
this.files.forEach((item) => {
|
||||
let files = row.alterationFiles.split(",");
|
||||
files.forEach((item) => {
|
||||
this.$download.resource(item);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -1,27 +1,22 @@
|
|||
package com.yanzhu.jh.bigscreen.web.controller;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
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.redis.RedisCache;
|
||||
import com.ruoyi.common.enums.ShiFouEnum;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.sign.Md5Utils;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.yanzhu.jh.project.domain.SurProject;
|
||||
import com.yanzhu.jh.project.domain.SurProjectUserinfo;
|
||||
import com.yanzhu.jh.project.service.ISurProjectService;
|
||||
import com.yanzhu.jh.project.domain.SurProjectBuildNodeData;
|
||||
import com.yanzhu.jh.project.domain.SurProjectUserinfo;
|
||||
import com.yanzhu.jh.project.service.ISurProjectBuildNodeDataService;
|
||||
import com.yanzhu.jh.project.service.ISurProjectService;
|
||||
import com.yanzhu.jh.project.service.ISurProjectUserinfoService;
|
||||
import org.aspectj.weaver.loadtime.Aj;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
@ -32,6 +27,9 @@ public class ProjectController extends BaseController {
|
|||
@Autowired
|
||||
private ISurProjectService isurProjectService;
|
||||
|
||||
@Autowired
|
||||
private ISysDeptService sysDeptService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectBuildNodeDataService surProjectBuildNodeDataService;
|
||||
|
||||
|
@ -44,7 +42,9 @@ public class ProjectController extends BaseController {
|
|||
@GetMapping("/findProjectByDept")
|
||||
public AjaxResult findProjectByDept(Long deptId){
|
||||
SurProject surProject=new SurProject();
|
||||
surProject.setProgressVisible(ShiFouEnum.FOU.getCode());
|
||||
/**
|
||||
* 单位其它用户【总包、监理、分包】等
|
||||
*/
|
||||
if(deptId==-1){
|
||||
long roleId= SecurityUtils.getRoleId();
|
||||
if(5==roleId||6==roleId||7==roleId){
|
||||
|
@ -54,10 +54,21 @@ public class ProjectController extends BaseController {
|
|||
}
|
||||
return success(isurProjectService.selectSurProjectListByBuser(surProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择的单位数据
|
||||
*/
|
||||
if(deptId!=null && deptId.longValue()>0){
|
||||
surProject.setDeptId(deptId);
|
||||
}
|
||||
/**
|
||||
* 子公司&&管理员
|
||||
*/
|
||||
if(deptId==0){
|
||||
// 子公司查询权限内项目数据
|
||||
if(super.getUserFirstRole()== SysRoleEnum.ZGS.getLongCode()){
|
||||
surProject.setDeptId(sysDeptService.getZGSDeptId(SecurityUtils.getDeptId()));
|
||||
}
|
||||
}
|
||||
List<SurProject> list=isurProjectService.selectSurProjectList(surProject);
|
||||
return success(list);
|
||||
}
|
||||
|
|
|
@ -36,8 +36,8 @@ public class BaseWorkingCommitteeController extends BaseController
|
|||
|
||||
/**
|
||||
* 查询工委会列表列表
|
||||
* @PreAuthorize("@ss.hasPermi('base:committee:list')")
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:committee:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BaseWorkingCommittee baseWorkingCommittee)
|
||||
{
|
||||
|
|
|
@ -118,8 +118,8 @@ public class SurProjectWorkingCommitteeController extends BaseController
|
|||
* 大屏工程管理 - 汇总信息
|
||||
* @param where
|
||||
* @return
|
||||
* @PreAuthorize("@ss.hasPermi('project:projectCommittee:list')")
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectCommittee:list')")
|
||||
@PostMapping("/sumGroupByType")
|
||||
public AjaxResult sumGroupByType(@RequestBody SurProjectWorkingCommittee where){
|
||||
Long deptId = where.getDeptId();
|
||||
|
@ -135,8 +135,8 @@ public class SurProjectWorkingCommitteeController extends BaseController
|
|||
* 大屏工程管理 - 付款明细
|
||||
* @param where
|
||||
* @return
|
||||
* @PreAuthorize("@ss.hasPermi('project:projectCommittee:list')")
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectCommittee:list')")
|
||||
@PostMapping("/selectByWorkingType")
|
||||
public AjaxResult selectByWorkingType(@RequestBody SurProjectWorkingCommittee where){
|
||||
Long deptId = where.getDeptId();
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
(select count(1) from vw_flow_all a where a.businessKey = sp.id and a.startDeptName = pui.unitName and a.finishTime is not null)as gcsp,
|
||||
(select count(1) from sur_project_standard a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as bzh,
|
||||
(select count(1) from sur_project_photography a where a.project_id = sp.id and a.is_del=0)as yssys,
|
||||
(select count(1) from flow_labour_info a where a.project_id = sp.id and a.dept_id=pui.unitId and a.is_del=0) as lzyjs,
|
||||
(select count(1) from flow_labour_info a where a.project_id = sp.id and a.dept_id=pui.unitId and a.is_del=0 and a.approve_status!='100') as lzyjs,
|
||||
'0' as hjyjs,
|
||||
(select count(1) from smz_ssp_problemmodify a where a.projectId=sp.id and a.infoType=1 and a.isDel=0 and a.checkState!=4 and date(NOW())<![CDATA[ > ]]> date(a.nickedTime)) as zlyjs,
|
||||
(select count(1) from smz_ssp_problemmodify a where a.projectId=sp.id and a.infoType=0 and a.isDel=0 and a.checkState!=4 and date(NOW())<![CDATA[ > ]]> date(a.nickedTime)) as aqyjs,
|
||||
|
|
Loading…
Reference in New Issue