package ink.wgink.service.department.service;

import ink.wgink.interfaces.department.IDepartmentBaseService;
import ink.wgink.interfaces.department.IDepartmentCheckService;
import ink.wgink.pojo.pos.DepartmentPO;
import ink.wgink.pojo.result.UploadExcelResultDTO;
import ink.wgink.service.department.pojo.vos.DepartmentVO;
import ink.wgink.service.department.pojo.vos.MergeDepartmentInfoVO;
import ink.wgink.service.department.pojo.vos.MergeNewDepartmentInfoVO;
import ink.wgink.service.department.pojo.vos.SplitDepartmentVO;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IDepartmentService
 * @Description: 组织部门
 * @Author: wanggeng
 * @Date: 2021/1/27 11:27 上午
 * @Version: 1.0
 */
public interface IDepartmentService extends IDepartmentBaseService, IDepartmentCheckService {

    /**
     * 新增组织部门
     *
     * @param departmentVO
     * @return
     */
    void save(DepartmentVO departmentVO);

    /**
     * 保存部门返回ID
     *
     * @param departmentVO
     * @return
     */
    String saveReturnId(DepartmentVO departmentVO);

    /**
     * 删除组织部门
     *
     * @param ids
     * @return
     */
    void remove(List<String> ids);

    /**
     * 修改组织部门
     *
     * @param departmentId
     * @param departmentVO
     * @return
     */
    void update(String departmentId, DepartmentVO departmentVO);

    /**
     * 更新合并到新增组织
     *
     * @param mergeNewDepartmentInfoVO
     * @return
     * @throws Exception
     */
    void updateMergeNew(MergeNewDepartmentInfoVO mergeNewDepartmentInfoVO);

    /**
     * 更新合并到组织
     *
     * @param departmentId
     * @param mergeDepartmentInfoVO
     * @return
     */
    void updateMerge(String departmentId, MergeDepartmentInfoVO mergeDepartmentInfoVO);

    /**
     * 更新分割部门
     *
     * @param departmentId
     * @param splitDepartmentVO
     * @return
     * @throws Exception
     */
    void updateSplit(String departmentId, SplitDepartmentVO splitDepartmentVO);

    /**
     * 保存部门Excel
     *
     * @param excel
     * @return
     */
    UploadExcelResultDTO importExcel(MultipartFile excel) throws IOException;

    /**
     * 重置组织部门编码
     *
     * @return
     */
    void resetCode();

    /**
     * 部门列表
     *
     * @param departmentNames
     * @return
     */
    List<DepartmentPO> listPOByNames(List<String> departmentNames);
}
