From d8460bad4509889c25c68e822faf7a9da646cbf9 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: Tue, 15 Aug 2023 18:23:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/pshManage/mapper/PshMapper.java | 11 +++++++ .../web/pshManage/service/PshServiceImpl.java | 30 +++++++++++++------ .../ruoyi/web/sspManage/mapper/SspMapper.java | 11 +++++++ .../web/sspManage/service/SspServiceImpl.java | 2 +- .../src/main/resources/mapper/PshMapper.xml | 4 +++ .../src/main/resources/mapper/SspMapper.xml | 4 +++ 6 files changed, 52 insertions(+), 10 deletions(-) diff --git a/ruoyi-wechat/src/main/java/com/ruoyi/web/pshManage/mapper/PshMapper.java b/ruoyi-wechat/src/main/java/com/ruoyi/web/pshManage/mapper/PshMapper.java index e2c6c925..e88363fa 100644 --- a/ruoyi-wechat/src/main/java/com/ruoyi/web/pshManage/mapper/PshMapper.java +++ b/ruoyi-wechat/src/main/java/com/ruoyi/web/pshManage/mapper/PshMapper.java @@ -129,6 +129,17 @@ public interface PshMapper { */ public int updateState(Map map); + /** + * @describe:修改状态 + * @author: + * @date:2021/4/2&11:28 + * @version:V1.0 + * @param: + * @return: + * @Exception: + */ + public int updateStateOk(Map map); + /** * @describe:查询已整改的基本信息 * @author: 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 3c4875fa..4096d8b2 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 @@ -3,11 +3,13 @@ package com.ruoyi.web.pshManage.service; import com.alibaba.fastjson.JSONArray; import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.enums.DeptTypeEnum; import com.ruoyi.common.enums.SysRoleEnum; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.QiniuBase64UploadUtil; import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.system.mapper.SysRoleMapper; +import com.ruoyi.web.projectInfo.mapper.WxProjectInfoMapper; import com.ruoyi.web.pshManage.mapper.PshMapper; import com.ruoyi.web.sspMarks.domain.ProcessName; import com.ruoyi.web.userLogin.mapper.WxUserLoginMapper; @@ -39,6 +41,9 @@ public class PshServiceImpl implements IPshService { @Autowired private SysRoleMapper sysRoleMapper; + @Autowired + private WxProjectInfoMapper wxProjectInfoMapper; + /** * @describe:查询随手拍信息的列表(问题整改) @@ -136,15 +141,22 @@ public class PshServiceImpl implements IPshService { Map updateMap = new HashMap<>(); Map dataMap = new HashMap<>(); dataMap.put("loginName",map.get("createUser")); - Map userMap = wxUserLoginMapper.checkLoginNameAndPsw(dataMap); - //当前登录账号角色信息 - String nowRole = Convert.toStr(sysRoleMapper.getUserMinRoleId(Convert.toLong(userMap.get("user_id")))); - //当前角色时管理员时,修改角色为集团公司 - if(Convert.toInt(SysRoleEnum.JTGS.getCode())>Convert.toInt(nowRole)){ - nowRole = SysRoleEnum.JTGS.getCode(); - } - map.put("roleType",nowRole); //问题整改 + Map deptMap = wxProjectInfoMapper.selectDeptByUserName(Convert.toStr(map.get("createUser"))); + //当前角色时管理员时,修改角色为集团公司 + String roleType = ""; + if(DeptTypeEnum.JTGS.getCode().equals(deptMap.get("type_flag"))){ + roleType = DeptTypeEnum.JTGSTYPE.getCode(); + }else if(DeptTypeEnum.ZGS.getCode().equals(deptMap.get("type_flag"))){ + 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"))){ + roleType = DeptTypeEnum.ZBDWTYPE.getCode(); + }else if(DeptTypeEnum.FBDW.getCode().equals(deptMap.get("type_flag"))){ + roleType = DeptTypeEnum.FBDWTYPE.getCode(); + } + map.put("roleType",roleType); /** * 基本信息入库 * 图片 视频入库 @@ -411,7 +423,7 @@ public class PshServiceImpl implements IPshService { map.put("fieldName", "checkState"); map.put("checkState", map.get("checkState")); map.put("keySet", "id"); - code = pshMapper.updateState(map); + code = pshMapper.updateStateOk(map); //添加通过意见 Map rejectMap = new HashMap<>(16); rejectMap.put("mainId", map.get("id")); 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 6da6f901..48d20434 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 @@ -129,6 +129,17 @@ public interface SspMapper { */ public int updateState(Map map); + /** + * @describe:修改状态 + * @author: + * @date:2021/4/2&11:28 + * @version:V1.0 + * @param: + * @return: + * @Exception: + */ + public int updateStateOk(Map map); + /** * @describe:查询已整改的基本信息 * @author: 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 be3f4987..b4c163eb 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 @@ -468,7 +468,7 @@ public class SspServiceImpl implements ISspService { map.put("fieldName", "checkState"); map.put("checkState", map.get("checkState")); map.put("keySet", "id"); - code = sspMapper.updateState(map); + code = sspMapper.updateStateOk(map); //添加通过意见 Map rejectMap = new HashMap<>(16); rejectMap.put("mainId", map.get("id")); diff --git a/ruoyi-wechat/src/main/resources/mapper/PshMapper.xml b/ruoyi-wechat/src/main/resources/mapper/PshMapper.xml index aa7717f5..342d82fd 100644 --- a/ruoyi-wechat/src/main/resources/mapper/PshMapper.xml +++ b/ruoyi-wechat/src/main/resources/mapper/PshMapper.xml @@ -314,6 +314,10 @@ UPDATE ${tableName} SET ${fieldName} = #{checkState} WHERE ${keySet} = #{id} + + UPDATE ${tableName} SET ${fieldName} = #{checkState},updateTime = NOW() WHERE ${keySet} = #{id} + + SELECT