package com.dayou.service;

import com.dayou.dto.OrderReportDTO;
import com.dayou.dto.PersonalAllotOrderDTO;
import com.dayou.dto.TaskRecordDTO;
import com.dayou.dto.WorkNodeCommit;
import com.dayou.entity.Personal;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dayou.enums.CertificateEnum;
import com.dayou.vo.PersonalVO;
import com.dayou.vo.TaskTodoVO;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 个贷业务订单 服务类
 * </p>
 *
 * @author wucl
 * @since 2024-03-01
 */
public interface IPersonalService extends IService<Personal> {

    Page<PersonalVO> selectPage(Page page, PersonalVO personal, String keyword);

    /**
     * 条件查询个贷已终止流程
     * @param page 分页
     * @param personal 查询条件
     * @param keyword 关键字
     * @return Page<PersonalVO>
     */
    Page<PersonalVO> getTerminatedPage(Page page, PersonalVO personal, String keyword);

    PersonalVO detail(Long id);

    WorkNodeCommit add(Personal personal);

    Boolean update(Personal personal);

    Boolean delete(Long id);

    Boolean allotOutwardStaff(TaskRecordDTO<Personal> taskRecordDTO);

    void updateCertificates(Long targetId, CertificateEnum cer, String location, String bailorA, String bailorB);

    Boolean doRecall(Long id);

    Page<PersonalVO> waitingClaimOrder(Page page, PersonalVO personalVO, String keyword);

    Page<PersonalVO> waitingSaveFile(Page page, PersonalVO personal, String keyword);

    Boolean batchSaveFile(List<TaskTodoVO> todoVOList);

    Page<PersonalVO> saveFileDone(Page page, PersonalVO personal, String keyword);

    Page<PersonalVO> myOrder(Page page, PersonalVO personal, String keyword);

    List<PersonalVO> exportMyOrder(PersonalVO personal, String keyword);

    Boolean personalAllotRealAmount(List<OrderReportDTO> claimOrders);

    Boolean doPersonalAllotRealAmount(List<OrderReportDTO> claimOrders);

    Page<PersonalVO> waitingAllotOrderPage(Page page, String keyword);

    Boolean doAllotOrder(PersonalAllotOrderDTO dto);

    Boolean changeCredentials(PersonalVO personal);

    Long nextInwardStaff();

    Long fixationPriceStaff(Long outwardStaffId);

    void fixationInwardStaff(Long personalId);

    Page<PersonalVO> getAllOrder(PersonalVO personal, Page page, String keyword);

    Long getAllOrderCount(PersonalVO personal, Page page, String keyword);
}
