/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.security.trans.task.mapper;

import org.apache.ibatis.annotations.Param;
import org.security.trans.assessment.entity.Assessment;
import org.security.trans.dailyDuties.entity.Inspection;
import org.security.trans.app.vo.BacklogVO;
import org.security.trans.dailyDuties.entity.InspectionLine;
import org.security.trans.dataStatistics.dto.EduAndDrillDataDTO;
import org.security.trans.dataStatistics.vo.EduAndDrillDataVO;
import org.security.trans.prevent.entity.PreventMaterial;
import org.security.trans.securityCommandCenter.entity.SccAlarmPush;
import org.security.trans.securityCommandCenter.entity.SccUnlocaleCheck;
import org.security.trans.securityCommandCenter.entity.SccUnlocaleCheckLine;
import org.security.trans.task.dto.TaskDTO;
import org.security.trans.task.dto.TaskHandinDTO;
import org.security.trans.task.entity.Task;
import org.security.trans.task.entity.TaskHandin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.datascope.annotation.DataAuth;
import org.springblade.core.datascope.enums.DataScopeEnum;

import java.util.List;

/**
 * 任务-任务提报 Mapper 接口
 *
 * @author BladeX
 * @since 2022-03-14
 */
public interface TaskHandinMapper extends BaseMapper<TaskHandin> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param taskHandinDTO
	 * @return
	 */
	@DataAuth(type = DataScopeEnum.OWN_DEPT_CHILD, column = "DEPT_ID")
	List<TaskHandin> selectTaskHandinPage(IPage page, @Param("taskHandinDTO") TaskHandinDTO taskHandinDTO);

	List<Task> selectTaskPage(@Param("taskDTO") TaskDTO taskDTO);

    List<String> getByRoleAndDept(@Param("roleId") String roleId,@Param("deptId") String deptId);

//	@DataAuth(type = DataScopeEnum.OWN_DEPT_CHILD, column = "DEPT_ID")
	List<TaskHandin> selectTaskHandinTodo(@Param("userId") String userId);

//	@DataAuth(type = DataScopeEnum.OWN_DEPT_CHILD, column = "DEPT_ID")
	List<Inspection> selectInspectionTodo(@Param("userId") String userId);

//	@DataAuth(type = DataScopeEnum.OWN_DEPT_CHILD, column = "DEPT_ID")
	List<InspectionLine> selectInspectionLineTodo(@Param("userId") String userId);

//	@DataAuth(type = DataScopeEnum.OWN_DEPT_CHILD, column = "DEPT_ID")
	List<Assessment> selectAssessmentTodo(@Param("userId") String userId);

//	@DataAuth(type = DataScopeEnum.OWN_DEPT_CHILD, column = "DEPT_ID")
	List<PreventMaterial> selectPreventTodo(@Param("userId") String userId);

//	@DataAuth(type = DataScopeEnum.OWN_DEPT_CHILD, column = "DEPT_ID")
	List<SccUnlocaleCheck> selectSccUnlocaleCheckTodo(@Param("userId") String userId);

//	@DataAuth(type = DataScopeEnum.OWN_DEPT_CHILD, column = "DEPT_ID")
	List<SccAlarmPush> selectSccAlarmPushTodo(@Param("roleId") String roleId, @Param("deptId") String deptId);

    List<BacklogVO> getAppBacklog(@Param("userId") String userId, @Param("state") String state,@Param("moduleType") String moduleType);

	List<SccUnlocaleCheckLine> selectUnLocalCheckContinued(@Param("userId") String userId);

	String getDeptName(@Param("deptId") String deptId);

	List<EduAndDrillDataVO> getAimStatisticsData(@Param("eduAndDrillDataDTO") EduAndDrillDataDTO eduAndDrillDataDTO, @Param("aimDepts") List<String> aimDepts, @Param("aimModule") String aimModule);
}
