/*
 *      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.basic.service;

import org.security.trans.basic.dto.EmployeeDTO;
import org.security.ht.entity.basic.Employee;
import org.security.ht.vo.basic.EmployeeVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * 基础信息-员工 服务类
 *
 * @author BladeX
 * @since 2022-03-07
 */
public interface IEmployeeService extends IService<Employee> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param employeeDTO
	 * @return
	 */
	IPage<EmployeeVO> selectEmployeePage(IPage<EmployeeDTO> page, EmployeeDTO employeeDTO);

	/**
	 * 新增员工信息及关联家庭成员、工作履历信息
	 * @param employeeDTO
	 * @return boolean
	 */
	boolean saveEmployeeAndFamiliesAndJobRecords(EmployeeDTO employeeDTO);

	/**
	 * 逻辑删除员工信息及关联家庭成员、工作履历信息
	 * @param ids
	 * @return boolean
	 */
	boolean removeEmployeeAndFamiliesAndJobRecords(List<Long> ids);
	/**
	 * 逻辑删除员工信息及关联家庭成员、工作履历信息
	 * @param employeeDTO
	 * @return boolean
	 */
	boolean updateEmployeeAndFamiliesAndJobRecords(EmployeeDTO employeeDTO);

	/**
	 * 获取单个员工信息及关联家庭成员、工作履历信息
	 * @param id
	 * @return boolean
	 */
	EmployeeVO getEmployeeAndFamiliesAndJobRecords(String id);

	EmployeeVO getLeaderByDeptId();

	/**
	 * 消息总线同步用户信息-t_employee
	 * @param employees 员工信息
	 * @return
	 */
	boolean synEmployeeData(List<Employee> employees);


	List<EmployeeVO> getEmployeeStatisticsData(EmployeeDTO employeeDTO);
}
