From 8e05388032db62002270073eb1395f52fecca6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Wed, 16 Aug 2023 23:37:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/common/enums/DeptTypeEnum.java | 7 ++++--- .../src/views/trouble/pshProblemmodify/index.vue | 2 +- .../src/views/trouble/sspProblemmodify/index.vue | 2 +- .../ruoyi/web/pshManage/mapper/PshMapper.java | 7 +++++++ .../web/pshManage/service/PshServiceImpl.java | 16 ++++++++++++++-- .../ruoyi/web/sspManage/mapper/SspMapper.java | 7 +++++++ .../web/sspManage/service/SspServiceImpl.java | 16 ++++++++++++++-- .../src/main/resources/mapper/PshMapper.xml | 10 ++++++++++ .../src/main/resources/mapper/SspMapper.xml | 9 +++++++++ .../resources/templates/pshManage/myChanges.html | 7 +++++++ .../resources/templates/pshManage/sspChange.html | 2 +- .../templates/pshManage/sspStayCheck.html | 7 +++++++ .../resources/templates/sspManage/myChanges.html | 7 +++++++ .../resources/templates/sspManage/sspChange.html | 2 +- .../templates/sspManage/sspStayCheck.html | 7 +++++++ 15 files changed, 97 insertions(+), 11 deletions(-) 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" > > 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 @@ + + + + \ 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} + + + +
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 @@
+
+
+ 隐患类型 +
+
+
+
隐患描述