package com.bonus.bracelet.service;

import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.entity.bracelet.BraceletParamsDto;
import com.bonus.common.entity.bracelet.vo.PersonVo;
import com.bonus.common.entity.file.ResourceFileVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @className:PersonMgeService
 * @author:cwchen
 * @date:2024-07-16-11:03
 * @version:1.0
 * @description:人员-service
 */
public interface IPersonMgeService {
    /**
     * 新增人员
     *
     * @param file
     * @param params
     * @return AjaxResult
     * @author cwchen
     * @date 2024/7/16 12:57
     */
    AjaxResult addPerson(MultipartFile file, String params);

    /**
     * 修改人员
     *
     * @param file
     * @param params
     * @return AjaxResult
     * @author cwchen
     * @date 2024/7/16 14:28
     */
    AjaxResult editPerson(MultipartFile file, String params);

    /**
     * 人员详情
     *
     * @param dto
     * @return AjaxResult
     * @author cwchen
     * @date 2024/7/16 15:10
     */
    AjaxResult getPersonInfo(BraceletParamsDto dto);

    /**
     * 删除人员
     *
     * @param dto
     * @return AjaxResult
     * @author cwchen
     * @date 2024/7/16 15:34
     */
    AjaxResult delPerson(BraceletParamsDto dto);

    /**
     * 人员列表
     * @param dto
     * @return List<PersonVo>
     * @author cwchen
     * @date 2024/7/17 9:19
     */
    TableDataInfo getPersonLists(BraceletParamsDto dto);

    /**
     * 人员导入
     *
     * @param file
     * @param request
     * @param response
     * @return AjaxResult
     * @author cwchen
     * @date 2024/7/17 9:18
     */
    AjaxResult excelUpload(MultipartFile file, HttpServletRequest request, HttpServletResponse response);

    /**
     * 根据人员id获取证书详细信息
     * @param memberId
     * @return
     */
    public AjaxResult selectCertificateById(Integer memberId);

    public AjaxResult updateCertificate(@RequestPart(value = "highfile") MultipartFile[] highfile, @RequestPart(value = "electfile") MultipartFile[] electfile,
                                        @RequestPart(value = "elsefile") MultipartFile[] elsefile, @RequestBody Long id);


    /**
     * 获取文件地址
     *
     * @param dto
     * @return AjaxResult
     */
    AjaxResult getFileUrl(ResourceFileVo dto);

    /**
     * 获取人员导出数据
     * @param dto
     * @return List<PersonVo>
     * @author cwchen
     * @date 2024/8/9 8:51
     */
    List<PersonVo> getExportPersonLists(BraceletParamsDto dto);

    /**
     * 推送人脸照片到人脸库
     * @param dto
     * @return AjaxResult
     * @author cwchen
     * @date 2024/8/12 14:11
     */
    AjaxResult pushFace(BraceletParamsDto dto);

    /**
     * 获取人脸照片
     * @param dto
     * @return AjaxResult
     * @author cwchen
     * @date 2024/8/21 9:32
     */
    AjaxResult getPersonFace(BraceletParamsDto dto);
}
