/*
 *      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.dailyDuties.mapper;

import org.apache.ibatis.annotations.Param;
import org.security.trans.dailyDuties.dto.InspectionLineDTO;
import org.security.trans.dailyDuties.entity.Inspection;
import org.security.trans.dailyDuties.entity.InspectionLine;
import org.security.trans.dailyDuties.vo.InspectionLineVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.security.trans.dailyDuties.vo.InspectionVO;
import org.springblade.core.datascope.annotation.DataAuth;
import org.springblade.core.datascope.enums.DataScopeEnum;

import java.util.List;

/**
 * 任务-监督检查明细 Mapper 接口
 *
 * @author BladeX
 * @since 2022-03-25
 */
public interface InspectionLineMapper extends BaseMapper<InspectionLine> {

	/**
	 * 自定义分页
	 */
	@DataAuth(type = DataScopeEnum.OWN_DEPT_CHILD, column = "DEPT_ID")
	List<InspectionLineVO> selectInspectionLinePage(IPage page, @Param("inspectionLineDTO") InspectionLineDTO inspectionLineDTO,@Param("formIdList") List<String> formIdList);


	/**
	 * 删除信息
	 * @param toLongList 主表关联id
	 * @return
	 */
    boolean removeData(@Param("toLongList") List<Long> toLongList);
	/**
	 * 根据主表id、相关筛选项查询明细
	 *
	 * @param
	 * @param inspectionLine
	 * @return
	 */
	List<InspectionLineVO> selectLinesByInspectionLine(@Param("inspectionLine") InspectionLine inspectionLine);
	/**
	 * 根据主表id查询主表信息
	 *
	 * @param
	 * @param formId
	 * @return
	 */
	List<InspectionVO> selectRelInspection(String formId);
	/**
	 * 更新主表信息
	 * @param inspection 主表信息
	 * @return
	 */
	boolean updateInspection(@Param("inspection")Inspection inspection);

	/**
	 *数据统计获取子级机构id
	 */
	List<String> getChildrenDeptId(@Param("aimDeptId") String aimDeptId);
}
