diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/enums/DeptTypeEnum.java b/ruoyi-common/src/main/java/com/ruoyi/common/enums/DeptTypeEnum.java index dceff74a..e471a238 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/enums/DeptTypeEnum.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/enums/DeptTypeEnum.java @@ -10,9 +10,10 @@ public enum DeptTypeEnum { JTGSTYPE("3", "泾河产业发展集团"), ZGSTYPE("4", "发展集团子公司"), - JLDWTYPE("5", "监理单位"), - ZBDWTYPE("6", "总包单位"), - FBDWTYPE("7", "分包单位"), + JFDBTYPE("5", "监理单位"), + JLDWTYPE("6", "监理单位"), + ZBDWTYPE("7", "总包单位"), + FBDWTYPE("8", "分包单位"), COMFLAG("1","子公司标识"); diff --git a/ruoyi-ui/src/views/trouble/pshProblemmodify/index.vue b/ruoyi-ui/src/views/trouble/pshProblemmodify/index.vue index d8c0a863..8cb68993 100644 --- a/ruoyi-ui/src/views/trouble/pshProblemmodify/index.vue +++ b/ruoyi-ui/src/views/trouble/pshProblemmodify/index.vue @@ -181,7 +181,7 @@ width="135" > - {{ parseTime(scope.row.nickedTime, "{y}-{m}-{d} {h}:{s}") }} + {{ parseTime(scope.row.nickedTime, "{y}-{m}-{d}") }} - {{ parseTime(scope.row.nickedTime, "{y}-{m}-{d} {h}:{s}") }} + {{ parseTime(scope.row.nickedTime, "{y}-{m}-{d}") }} > selectCodeFromSmark(String proId); + + /** + * 查询项目用户信息 + * @param map + * @return + */ + List> queryProjectUserinfo(Map map); } diff --git a/ruoyi-wechat/src/main/java/com/ruoyi/web/pshManage/service/PshServiceImpl.java b/ruoyi-wechat/src/main/java/com/ruoyi/web/pshManage/service/PshServiceImpl.java index 4096d8b2..9d6151fa 100644 --- a/ruoyi-wechat/src/main/java/com/ruoyi/web/pshManage/service/PshServiceImpl.java +++ b/ruoyi-wechat/src/main/java/com/ruoyi/web/pshManage/service/PshServiceImpl.java @@ -146,9 +146,21 @@ public class PshServiceImpl implements IPshService { //当前角色时管理员时,修改角色为集团公司 String roleType = ""; if(DeptTypeEnum.JTGS.getCode().equals(deptMap.get("type_flag"))){ - roleType = DeptTypeEnum.JTGSTYPE.getCode(); + List> datalist = pshMapper.queryProjectUserinfo(map); + if(datalist!=null && datalist.size()>0 && datalist.get(0)!=null && "21".equals(datalist.get(0).get("job_type"))){ + //说明是甲方经理 + roleType = DeptTypeEnum.JFDBTYPE.getCode(); + }else{ + roleType = DeptTypeEnum.JTGSTYPE.getCode(); + } }else if(DeptTypeEnum.ZGS.getCode().equals(deptMap.get("type_flag"))){ - roleType = DeptTypeEnum.ZGSTYPE.getCode(); + List> datalist = pshMapper.queryProjectUserinfo(map); + if(datalist!=null && datalist.size()>0 && datalist.get(0)!=null && "21".equals(datalist.get(0).get("job_type"))){ + //说明是甲方经理 + roleType = DeptTypeEnum.JFDBTYPE.getCode(); + }else{ + roleType = DeptTypeEnum.ZGSTYPE.getCode(); + } }else if(DeptTypeEnum.JLDW.getCode().equals(deptMap.get("type_flag"))){ roleType = DeptTypeEnum.JLDWTYPE.getCode(); }else if(DeptTypeEnum.ZBDW.getCode().equals(deptMap.get("type_flag"))){ diff --git a/ruoyi-wechat/src/main/java/com/ruoyi/web/sspManage/mapper/SspMapper.java b/ruoyi-wechat/src/main/java/com/ruoyi/web/sspManage/mapper/SspMapper.java index 48d20434..40da5ffc 100644 --- a/ruoyi-wechat/src/main/java/com/ruoyi/web/sspManage/mapper/SspMapper.java +++ b/ruoyi-wechat/src/main/java/com/ruoyi/web/sspManage/mapper/SspMapper.java @@ -304,6 +304,13 @@ public interface SspMapper { */ List> querySspQualityMarkMyList(Map map); + /** + * 查询项目用户信息 + * @param map + * @return + */ + List> queryProjectUserinfo(Map map); + /** * 获取质量留痕记录详情 * @param map diff --git a/ruoyi-wechat/src/main/java/com/ruoyi/web/sspManage/service/SspServiceImpl.java b/ruoyi-wechat/src/main/java/com/ruoyi/web/sspManage/service/SspServiceImpl.java index b4c163eb..00fb5016 100644 --- a/ruoyi-wechat/src/main/java/com/ruoyi/web/sspManage/service/SspServiceImpl.java +++ b/ruoyi-wechat/src/main/java/com/ruoyi/web/sspManage/service/SspServiceImpl.java @@ -148,9 +148,21 @@ public class SspServiceImpl implements ISspService { //当前角色时管理员时,修改角色为集团公司 String roleType = ""; if(DeptTypeEnum.JTGS.getCode().equals(deptMap.get("type_flag"))){ - roleType = DeptTypeEnum.JTGSTYPE.getCode(); + List> datalist = sspMapper.queryProjectUserinfo(map); + if(datalist!=null && datalist.size()>0 && datalist.get(0)!=null && "21".equals(datalist.get(0).get("job_type"))){ + //说明是甲方经理 + roleType = DeptTypeEnum.JFDBTYPE.getCode(); + }else{ + roleType = DeptTypeEnum.JTGSTYPE.getCode(); + } }else if(DeptTypeEnum.ZGS.getCode().equals(deptMap.get("type_flag"))){ - roleType = DeptTypeEnum.ZGSTYPE.getCode(); + List> datalist = sspMapper.queryProjectUserinfo(map); + if(datalist!=null && datalist.size()>0 && datalist.get(0)!=null && "21".equals(datalist.get(0).get("job_type"))){ + //说明是甲方经理 + roleType = DeptTypeEnum.JFDBTYPE.getCode(); + }else{ + roleType = DeptTypeEnum.ZGSTYPE.getCode(); + } }else if(DeptTypeEnum.JLDW.getCode().equals(deptMap.get("type_flag"))){ roleType = DeptTypeEnum.JLDWTYPE.getCode(); }else if(DeptTypeEnum.ZBDW.getCode().equals(deptMap.get("type_flag"))){ diff --git a/ruoyi-wechat/src/main/resources/mapper/PshMapper.xml b/ruoyi-wechat/src/main/resources/mapper/PshMapper.xml index 342d82fd..ef8a7989 100644 --- a/ruoyi-wechat/src/main/resources/mapper/PshMapper.xml +++ b/ruoyi-wechat/src/main/resources/mapper/PshMapper.xml @@ -100,6 +100,7 @@ ssp.*, case when ud.type_flag in (1,11) then CONCAT(sd.dept_name,' ', '[责任主体]') else concat(ud.dept_name, ' ', '[', sdd.dict_label ,']') end as projectUnit, su.`nick_name` `name`, + sd2.dict_label as danger_typeName, ssa.id checkId FROM smz_ssp_problemmodify ssp @@ -110,6 +111,7 @@ left join sys_dept sd on sd.dept_id = spi.deptId left join sur_project_unit_info spui on spui.projectId = spi.id and spui.unitId = su.dept_id left join sys_dict_data sdd on sdd.dict_type = 'sys_dept_type' and sdd.dict_value = spui.unitType + left join sys_dict_data sd2 on sd2.dict_type = 'ssp_aqyhlx' and sd2.dict_value = ssp.danger_type WHERE ssp.id = #{id} GROUP BY ssp.id @@ -624,4 +626,12 @@ select code,name from smz_work_area where 1=1 and projectId = #{proId} + + + + 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=#{createUser} + + \ No newline at end of file diff --git a/ruoyi-wechat/src/main/resources/mapper/SspMapper.xml b/ruoyi-wechat/src/main/resources/mapper/SspMapper.xml index 0bcf969f..ffc0a3ec 100644 --- a/ruoyi-wechat/src/main/resources/mapper/SspMapper.xml +++ b/ruoyi-wechat/src/main/resources/mapper/SspMapper.xml @@ -100,6 +100,7 @@ ssp.*, case when ud.type_flag in (1,11) then CONCAT(sd.dept_name,' ', '[责任主体]') else concat(ud.dept_name, ' ', '[', sdd.dict_label ,']') end as projectUnit, su.`nick_name` `name`, + sd2.dict_label as danger_typeName, ssa.id checkId FROM smz_ssp_problemmodify ssp @@ -110,6 +111,7 @@ left join sys_dept sd on sd.dept_id = spi.deptId left join sur_project_unit_info spui on spui.projectId = spi.id and spui.unitId = su.dept_id left join sys_dict_data sdd on sdd.dict_type = 'sys_dept_type' and sdd.dict_value = spui.unitType + left join sys_dict_data sd2 on sd2.dict_type = 'ssp_zlyhlx' and sd2.dict_value = ssp.danger_type WHERE ssp.id = #{id} GROUP BY ssp.id @@ -318,6 +320,13 @@ UPDATE ${tableName} SET ${fieldName} = #{checkState},updateTime = NOW() WHERE ${keySet} = #{id} + + + 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=#{createUser} + + SELECT diff --git a/ruoyi-wechat/src/main/resources/templates/pshManage/myChanges.html b/ruoyi-wechat/src/main/resources/templates/pshManage/myChanges.html index ccca2240..6fb2187c 100644 --- a/ruoyi-wechat/src/main/resources/templates/pshManage/myChanges.html +++ b/ruoyi-wechat/src/main/resources/templates/pshManage/myChanges.html @@ -61,7 +61,14 @@ + + + 隐患类型 + + + + 隐患描述 diff --git a/ruoyi-wechat/src/main/resources/templates/pshManage/sspChange.html b/ruoyi-wechat/src/main/resources/templates/pshManage/sspChange.html index 1409b996..a9438af2 100644 --- a/ruoyi-wechat/src/main/resources/templates/pshManage/sspChange.html +++ b/ruoyi-wechat/src/main/resources/templates/pshManage/sspChange.html @@ -127,7 +127,7 @@ 整改截至时间 - + diff --git a/ruoyi-wechat/src/main/resources/templates/pshManage/sspStayCheck.html b/ruoyi-wechat/src/main/resources/templates/pshManage/sspStayCheck.html index efd6ccc4..517a864b 100644 --- a/ruoyi-wechat/src/main/resources/templates/pshManage/sspStayCheck.html +++ b/ruoyi-wechat/src/main/resources/templates/pshManage/sspStayCheck.html @@ -71,7 +71,14 @@ + + + 隐患类型 + + + + 隐患描述 diff --git a/ruoyi-wechat/src/main/resources/templates/sspManage/myChanges.html b/ruoyi-wechat/src/main/resources/templates/sspManage/myChanges.html index 7d29bcc8..9e03d472 100644 --- a/ruoyi-wechat/src/main/resources/templates/sspManage/myChanges.html +++ b/ruoyi-wechat/src/main/resources/templates/sspManage/myChanges.html @@ -61,7 +61,14 @@ + + + 隐患类型 + + + + 隐患描述 diff --git a/ruoyi-wechat/src/main/resources/templates/sspManage/sspChange.html b/ruoyi-wechat/src/main/resources/templates/sspManage/sspChange.html index 70679e96..1cc65f94 100644 --- a/ruoyi-wechat/src/main/resources/templates/sspManage/sspChange.html +++ b/ruoyi-wechat/src/main/resources/templates/sspManage/sspChange.html @@ -127,7 +127,7 @@ 整改截至时间 - + diff --git a/ruoyi-wechat/src/main/resources/templates/sspManage/sspStayCheck.html b/ruoyi-wechat/src/main/resources/templates/sspManage/sspStayCheck.html index 539e6204..0e0f4579 100644 --- a/ruoyi-wechat/src/main/resources/templates/sspManage/sspStayCheck.html +++ b/ruoyi-wechat/src/main/resources/templates/sspManage/sspStayCheck.html @@ -69,7 +69,14 @@ + + + 隐患类型 + + + + 隐患描述