JX.Li 2 hari lalu
induk
melakukan
a1f9a83c32

+ 2 - 1
src/main/java/com/sooka/sponest/data/emergency/service/impl/TBusInspectionServiceImpl.java

@@ -2,6 +2,7 @@ package com.sooka.sponest.data.emergency.service.impl;
 
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.datascope.annotation.DataScope;
+import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.system.api.RemoteConfigService;
 import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.emergency.domain.*;
@@ -62,7 +63,7 @@ public class TBusInspectionServiceImpl extends BaseServiceImpl implements ITBusI
      * @return 巡检项记录
      */
     @Override
-    @DataScope(deptAlias = "d")
+    @DataScopeMutiDept(deptAlias = "d")
     public List<TBusInspection> selectTBusInspectionList(TBusInspection tBusInspection)
     {
         setSookaDataBase(tBusInspection);

+ 2 - 1
src/main/java/com/sooka/sponest/data/emergency/service/impl/TPatrolAlertServiceImpl.java

@@ -1,6 +1,7 @@
 package com.sooka.sponest.data.emergency.service.impl;
 
 import com.ruoyi.common.datascope.annotation.DataScope;
+import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.emergency.domain.TPatrolAlert;
 import com.sooka.sponest.data.emergency.mapper.TAttachMapper;
@@ -23,7 +24,7 @@ public class TPatrolAlertServiceImpl  extends BaseServiceImpl implements TPatrol
     }
 
     @Override
-    @DataScope(deptAlias = "d")
+    @DataScopeMutiDept(deptAlias = "d")
     public List<TPatrolAlert> selectTPatrolAlertList(TPatrolAlert patrolAlert) {
         setSookaDataBase(patrolAlert);
         return mapper.selectTPatrolAlertList(patrolAlert);

+ 3 - 2
src/main/resources/mapper/emergency/system/TPatrolAlertMapper.xml

@@ -12,16 +12,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTPatrolAlertVo">
-        select * from centerdata_t_emergency_patrol_alert
+        select a.* from centerdata_t_emergency_patrol_alert a
     </sql>
 
     <select id="selectTPatrolAlertList" parameterType="TPatrolAlert" resultMap="TPatrolAlertResult">
         <include refid="selectTPatrolAlertVo"/>
+        left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
             <if test="id != null  and id != ''"> and id = #{id}</if>
             <if test="title != null  and title != ''"> and title like concat('%', #{title}, '%')</if>
+            ${params.dataScope}
         </where>
-        ${params.dataScope}
     </select>
 
     <select id="selectTPatrolAlertById" parameterType="String" resultMap="TPatrolAlertResult">