Browse Source

fix: 会议管理添加数据权限

zhongwei
liwen 7 months ago
parent
commit
3e334add4b
  1. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.java
  2. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.xml
  3. 14
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.java
  4. 15
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml
  5. 5
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java

6
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.java

@ -1,9 +1,10 @@
package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.safeproduct.dto.ConferenceExportDTO;
import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
@ -14,7 +15,7 @@ import java.util.List;
* @date 2023-12-27
*/
@Mapper
public interface ConferencePlanMapper extends BaseMapper<ConferencePlanEntity> {
public interface ConferencePlanMapper extends UserDataScopeBaseMapper<ConferencePlanEntity> {
/**
* 根据单位和计划时间查询会议记录
@ -23,5 +24,6 @@ public interface ConferencePlanMapper extends BaseMapper<ConferencePlanEntity> {
* @param endTime 计划结束时间
* @return 会议记录列表
*/
@UserDataAuth
List<ConferenceExportDTO> getConferenceByUnitAndDate(String unit, String startTime, String endTime);
}

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.xml

@ -3,7 +3,8 @@
<select id="getConferenceByUnitAndDate" resultType="com.hnac.hzims.safeproduct.dto.ConferenceExportDTO">
SELECT
unit, scheduled_start_time, scheduled_end_time, theme, location, conference_method, host, conference_status
unit, scheduled_start_time, scheduled_end_time, theme, location, conference_method, host, conference_status,
create_user, create_dept
FROM
hzims_conference_plan
WHERE

14
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.java

@ -1,12 +1,14 @@
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.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordVO;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
import java.util.Map;
/**
@ -16,7 +18,7 @@ import java.util.Map;
* @date 2023-12-27
*/
@Mapper
public interface ConferenceRecordMapper extends BaseMapper<ConferenceRecordEntity> {
public interface ConferenceRecordMapper extends UserDataScopeBaseMapper<ConferenceRecordEntity> {
/**
* 查询会议记录表详情
@ -31,5 +33,13 @@ public interface ConferenceRecordMapper extends BaseMapper<ConferenceRecordEntit
* @param param 参数
* @return 会议记录分页
*/
@UserDataAuth
IPage<ConferenceRecordVO> getConferenceRecordPage(IPage<ConferenceRecordVO> page, Map<String, Object> param);
/**
* 查询当月会议记录
* @param month 当月
* @return 当月会议数据表
*/
List<ConferenceRecordEntity> selectConferenceByMonth(String month);
}

15
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml

@ -17,7 +17,8 @@
<select id="getConferenceRecordPage" resultType="com.hnac.hzims.safeproduct.vo.ConferenceRecordVO">
SELECT
t1.id, t1.code, t2.unit, t2.scheduled_start_time, t2.scheduled_end_time, t1.actual_start_time, t1.actual_end_time,
t2.location, t2.host, t2.conference_method, t2.theme, t2.conference_status, t1.recorder, t1.content
t2.location, t2.host, t2.conference_method, t2.theme, t2.conference_status, t1.recorder, t1.content, t1.create_user,
t1.create_dept
FROM
hzims_conference_record t1
LEFT JOIN hzims_conference_plan t2 ON t1.conference_plan_id = t2.id
@ -38,4 +39,16 @@
ORDER BY
t1.create_time DESC
</select>
<select id="selectConferenceByMonth" resultType="com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity">
SELECT
*
FROM
hzims_conference_record
WHERE
is_deleted = 0
AND create_time like concat(#{month}, '%')
ORDER BY
code DESC
</select>
</mapper>

5
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java

@ -178,9 +178,6 @@ public class ConferenceRecordServiceImpl extends ServiceImpl<ConferenceRecordMap
* @return 当月会议数据表
*/
public List<ConferenceRecordEntity> getConferenceByMonth(String month) {
QueryWrapper<ConferenceRecordEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(ConferenceRecordEntity::getCreateTime, month)
.orderByDesc(ConferenceRecordEntity::getCode);
return this.list(queryWrapper);
return baseMapper.selectConferenceByMonth(month);
}
}

Loading…
Cancel
Save