From c4fa414b8f1001c46b1662e38f144067218260fb Mon Sep 17 00:00:00 2001 From: liwen Date: Tue, 23 Apr 2024 13:16:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=BC=94=E7=BB=83=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.java | 10 ++++++++-- .../com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.xml | 11 ++++++----- .../hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.java | 6 ++++-- .../hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.xml | 3 ++- .../safeproduct/service/impl/RehearsalPlanServiceImpl.java | 4 ++++ .../safeproduct/service/impl/RehearsalRecordServiceImpl.java | 6 ++++++ 6 files changed, 30 insertions(+), 10 deletions(-) diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.java index 7eaee13..d8cb3ec 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.java @@ -1,6 +1,5 @@ package com.hnac.hzims.safeproduct.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.safeproduct.dto.AnalysisYearDTO; import com.hnac.hzims.safeproduct.dto.RehearsalExportDTO; @@ -9,6 +8,8 @@ import com.hnac.hzims.safeproduct.vo.RehearsalMonthVO; import com.hnac.hzims.safeproduct.vo.RehearsalYearVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.springblade.core.datascope.annotation.UserDataAuth; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; import java.util.List; @@ -19,7 +20,7 @@ import java.util.List; * @date 2023-12-27 */ @Mapper -public interface RehearsalPlanMapper extends BaseMapper { +public interface RehearsalPlanMapper extends UserDataScopeBaseMapper { /** * 查询当月各单位的演练总数 @@ -28,6 +29,7 @@ public interface RehearsalPlanMapper extends BaseMapper { * @param month 月份 * @return 当月的演练总数据 */ + @UserDataAuth IPage selectByMonth(IPage page, String unit, String month); /** @@ -37,6 +39,7 @@ public interface RehearsalPlanMapper extends BaseMapper { * @param month 月份 * @return 当月的已完成数据 */ + @UserDataAuth IPage selectFinishedDataByMonth(IPage page, String unit, String month); /** @@ -46,6 +49,7 @@ public interface RehearsalPlanMapper extends BaseMapper { * @param year 年份 * @return 年度单位数据 */ + @UserDataAuth IPage selectUnitByYear(IPage page, String unit, @Param("year") String year); /** @@ -54,6 +58,7 @@ public interface RehearsalPlanMapper extends BaseMapper { * @param year 年份 * @return 单位各月的数据列表 */ + @UserDataAuth List selectFinishedDataByUnit(@Param("unitList") List unitList, @Param("year") String year); /** @@ -63,5 +68,6 @@ public interface RehearsalPlanMapper extends BaseMapper { * @param endTime 计划结束时间 * @return 演练数据列表 */ + @UserDataAuth List getRehearsalByUnitAndDate(String unit, String startTime, String endTime); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.xml index f855e8d..951d455 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.xml @@ -4,7 +4,7 @@ SELECT - unit, count(1) as finished_task_num + unit, count(1) as finished_task_num, create_user, create_dept FROM hzims_rehearsal_plan WHERE @@ -39,7 +39,7 @@ SELECT - unit, DATE_FORMAT(scheduled_end_time, '%m') as dateTime, count(1) as finished_num + unit, DATE_FORMAT(scheduled_end_time, '%m') as dateTime, count(1) as finished_num, create_user, create_dept FROM hzims_rehearsal_plan WHERE @@ -73,7 +73,8 @@ SELECT t1.id, t1.code, t2.unit, t2.subject, t2.scheduled_start_time, t2.scheduled_end_time, t1.people_name, t1.people_num, - t2.location, t1.actual_start_time, t1.actual_end_time, t2.rehearsal_status, t1.record, t1.comment + t2.location, t1.actual_start_time, t1.actual_end_time, t2.rehearsal_status, t1.record, t1.comment, t1.create_user, + t1.create_dept FROM hzims_rehearsal_record t1 LEFT JOIN hzims_rehearsal_plan t2 ON t1.rehearsal_plan_id = t2.id diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalPlanServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalPlanServiceImpl.java index a296345..1714714 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalPlanServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalPlanServiceImpl.java @@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.common.service.UserAuthDataService; import com.hnac.hzims.common.utils.Condition; import com.hnac.hzims.safeproduct.dto.AnalysisYearDTO; import com.hnac.hzims.safeproduct.dto.RehearsalExportDTO; @@ -51,6 +52,9 @@ public class RehearsalPlanServiceImpl extends ServiceImpl implements IRehearsalRecordService { + @Autowired + UserAuthDataService userAuthDataService; + @Resource RehearsalPlanMapper rehearsalPlanMapper;