package org.dromara.payment.worker.service;

import jakarta.servlet.http.HttpServletResponse;
import org.dromara.payment.common.domain.CommonSelConditionEntity;
import org.dromara.payment.worker.domain.UserWorkerBusiness;
import org.dromara.payment.worker.domain.bo.UserWokerOperBo;
import org.dromara.payment.worker.domain.bo.UserWorkerBo;
import org.dromara.payment.worker.domain.vo.*;
import org.dromara.payment.worker.domain.bo.UserWorkerBusinessBo;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import java.util.Collection;
import java.util.List;

/**
 * 用工签约查询Service接口
 *
 * @author LionLi
 * @date 2024-04-26
 */
public interface IUserWorkerBusinessService {


    /***
     * 查询企业在所选服务商中未签约的用工者信息
     * @param pageQuery
     * @param sydId
     * @param merId
     * @param busType
     * @return
     */
    TableDataInfo<UserWorkerBusinessVo>  selUserWorkByMerServInfo(PageQuery pageQuery, Long sydId,Long merId,Integer busType);

    /**
     * 查询用工签约查询
     */
    UserWorkerBusinessVo queryById(Long id);

    /**
     * 查询用工签约查询列表
     */
    TableDataInfo<UserWorkerBusinessVo> queryPageList(CommonSelConditionEntity bo, PageQuery pageQuery);

    /**
     * 查询用工签约查询列表
     */
    List<UserWorkerBusinessVo> queryList(CommonSelConditionEntity bo);

    /**
     * 新增用工签约查询
     */
    Boolean insertByBo(UserWorkerBusinessBo bo);

    /**
     * 修改用工签约查询
     */
    Boolean updateByBo(UserWorkerBusinessBo bo);

    /**
     * 校验并批量删除用工签约查询信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);


    /***
     * 用工签约导入
     * @param file
     * @return
     */
    ImportResultVo upload(MultipartFile file, Integer busType, Long sydId,String sydNo,String code,Long merId,String merNo)throws Exception;


    /***
     * 下载错误信息
     * @param uuid
     */
    List<UploadExcelItem> selErrorList(String uuid);


    /***
     * 根據簽約信息，查詢對應的會員信息
     * @param bo
     * @return
     */
    UserWorkerVo selMemberInfo(UserWorkerBusinessBo  bo);


    /***
     * 添加用戶-运营商
     * @param bo
     * @return
     */
    Boolean addUserWorkdBz(UserWokerOperBo bo) throws Exception;



    Boolean operAddUserWorkSel(Long merId,Long sydId,Integer busType,String workIds);


    Boolean operAddUserWorkAll(Long merId, Long sydId, Integer busType);


    Boolean updateUserWorkInfo(UserWorkerBo uw);


     UserWorkerNoHideVo selMemberInfoNySignId(UserWorkerBusinessBo bo );


    /***
     * 单个导出用工的身份证信息
     * @param workId
     * @param response
     */
    void exportCardImg(Long workId, HttpServletResponse response)throws Exception;

    /****
     * 批量导出用工者身份证信息
     * @param workIds
     */
    void exportMutiCardImg(String workIds) throws Exception;
}
