gaoxiong 1 an în urmă
părinte
comite
e7ba273c39

+ 1 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/safetycheck/CoreSafetyTaskMapper.xml

@@ -236,7 +236,7 @@
             and t.title like concat('%', #{task.title}, '%')
         </if>
         <if test="task.roleId != null  and task.roleId != ''">
-            and csptr.role_id =#{task.roleId}
+            and (csptr.role_id =#{task.roleId} or t.role_id = #{task.roleId})
         </if>
         <if test="task.planStartTime != null ">
             and DATE_FORMAT(t.plan_start_time, '%Y-%m-%d') = DATE_FORMAT(#{task.planStartTime}, '%Y-%m-%d')

+ 3 - 7
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysRoleServiceImpl.java

@@ -483,19 +483,15 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
             {
                 continue;
             }
-            // 停用的角色
-//            if(sysRole.getStatus()==1)
-//            {
-//                continue;
-//            }
+
             list.add(sysRole);
         }
-        list=  list.stream().sorted(new Comparator<SysRole>() {//使用List接口的方法排序
+    /*    list=  list.stream().sorted(new Comparator<SysRole>() {//使用List接口的方法排序
             @Override
             public int compare(SysRole o1, SysRole o2) {
                 return o1.getRoleSort().compareTo(o2.getRoleSort());
             }
-        }).collect(Collectors.toList());
+        }).collect(Collectors.toList());*/
         clearRoleCache();
         RedisUtils.setCacheList(CacheConstants.ROLE_CACHE_LIST_KEY, list);
     }

+ 3 - 2
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysNfcBindMapper.xml

@@ -89,7 +89,7 @@
         a.org_id,
         a.org_name,
         a.org_path,
-        a.collection_area_name,
+        c.check_name as  collection_area_name,
         a.check_id,
         a.create_by,
         a.create_time,
@@ -98,8 +98,9 @@
         FROM
         sys_nfc_bind a
         LEFT JOIN sys_org b on a.org_id = b.id
+        LEFT JOIN sys_area_check c on a.check_id = c.id
         WHERE
-        del_flag = 0
+        a.del_flag = 0
         <choose>
             <when test="info.checkSub">
                 AND b.path like concat('%', #{info.orgPath}, '%')

+ 4 - 0
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -36,6 +36,7 @@
                  left join sys_user_role ur on ur.role_id = r.id
                  left join sys_user u on u.id = ur.user_id
                  left join sys_dept d on u.dept_id = d.dept_id
+
     </sql>
 
     <select id="selectRoleList" parameterType="com.xunmei.system.api.domain.SysRole" resultMap="SysRoleResult">
@@ -69,6 +70,7 @@
     <select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
         <include refid="selectRoleVo"/>
         WHERE r.del_flag = '0' and ur.user_id = #{userId}
+        order by r.role_sort
     </select>
 
     <select id="selectRoleAll" resultMap="SysRoleResult">
@@ -86,6 +88,7 @@
     <select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult">
         <include refid="selectRoleVo"/>
         where r.id = #{roleId}
+        order by r.role_sort
     </select>
 
     <select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
@@ -119,6 +122,7 @@
         SELECT *
         FROM sys_role
         WHERE role_name !='超级管理员' and  del_flag=0
+        order by role_sort
     </select>
 
     <insert id="insertRole" parameterType="com.xunmei.system.api.domain.SysRole" useGeneratedKeys="true"