Memory_LG 2 месяцев назад
Родитель
Сommit
c59d366bd1

+ 2 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/bo/VisuForestCloudMapEventListBO.java

@@ -47,4 +47,6 @@ public class VisuForestCloudMapEventListBO {
 
     private String isExamine;
     private String eventTypeName;
+
+    private String isCollect;
 }

+ 1 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/vo/VisuForestCloudMapVO.java

@@ -64,4 +64,5 @@ public class VisuForestCloudMapVO extends BaseBusinessEntity {
 
     private List<String> eventTypeXls;
 
+    private String userId;
 }

+ 2 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/CenterEventViewServiceImpl.java

@@ -5,6 +5,7 @@ import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.file.FilePrefixUtils;
 import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.common.datascope.base.service.BaseService;
+import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.system.api.RemoteConfigService;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.CentereventTEventcatalogue;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudExposureStageBO;
@@ -100,6 +101,7 @@ public class CenterEventViewServiceImpl extends BaseService implements ICenterEv
     @Override
     public List<VisuForestCloudMapEventListBO> selectEventList(VisuForestCloudMapVO visuForestCloudMapVO) {
         setSookaDataBase(visuForestCloudMapVO);
+        visuForestCloudMapVO.setUserId(String.valueOf(SecurityUtils.getUserId()));
         List<VisuForestCloudMapEventListBO> result = centerEventViewMapper.selectEventList(visuForestCloudMapVO);
         if (StringUtils.isEmpty(result)) {
             return result;

+ 4 - 1
src/main/resources/mapper/centereventteventcatalogue/CenterEventViewMapper.xml

@@ -93,7 +93,9 @@
     </select>
 
     <select id="selectEventList" parameterType="VisuForestCloudMapVO" resultType="VisuForestCloudMapEventListBO">
-        select t.* from (
+        select t.*,
+               IFNULL(ec.id, '0') isCollect
+        from (
         <if test="isHgj != null and isHgj == 'false'">
             select event_code eventCode,event_name eventName,longitude,latitude,reportor,event_status
             eventStatus,event_status_value eventStatusValue,create_time createTime,urge_count urgeCount,
@@ -145,6 +147,7 @@
             and (is_examine = 1 and event_status_value = 'forest_event_status_5')
         </if>
         ) t
+        left join centerevent_t_event_collect ec on ec.event_code = t.eventCode and ec.user_id = #{userId}
         left join centerevent_t_dept_event d on d.event_code = t.eventCode and d.event_status_value !=
         'forest_event_status_3'
         left join ${database_system}.sys_dept c on c.dept_id = d.dept_id