package com.xdap.self_development.service;

import com.definesys.mpaas.query.db.PageQueryResult;
import com.xdap.api.moudle.department.pojo.entity.XdapDepartments;
import com.xdap.api.moudle.user.pojo.XdapUsers;
import com.xdap.self_development.common.MyResponse;
import com.xdap.self_development.controller.form.*;
import com.xdap.self_development.domain.pojo.ResponsiblePersonPojo;
import com.xdap.self_development.domain.view.XdapUserView;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

public interface ResponsiblePersonService {
    void saveResponsiblePerson(@Valid ResponsiblePersonForm form);

    void saveFilledPerson(@Valid FilledPersonForm form);

    void updateResponsiblePerson(@Valid UpdateResponsiblePersonForm form);

    void updateFilledPerson(@Valid UpdateFilledPersonForm form);

    void deleteResponsiblePerson(@NotBlank String rowId);

    PageQueryResult<ResponsiblePersonPojo> getDeptResponsible(@Valid DeptResponsiblePageForm form);

    PageQueryResult<ResponsiblePersonPojo> getDeptFilled(@Valid DeptResponsiblePageForm form);

    Boolean isResponsiblePerson(String userId);

    Set<String> getAllSubsystem();
    ArrayList<XdapUsers> getUserBydepartment(String dept,String subsystem);

    void exportPerson(HttpServletResponse response);

    void exportVoidPerson(HttpServletResponse response);

    MyResponse importPerson(MultipartFile file, String userId);

    void importAllPerson(List<ResponsiblePersonPojo> cachedDataList, MyResponse problems);

    XdapUserView getUserByDeptAndName(String department, String userAccount, String username);

    List<XdapDepartments> getResponsibleDepartment();
}
