/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.dm.dmVisitorsApply.service;

import com.alibaba.fastjson.JSONArray;
import me.zhengjie.modules.dm.dmVisitorsApply.domain.DmVisitorsApply;
import me.zhengjie.modules.dm.dmVisitorsApply.service.dto.DmVisXq;
import me.zhengjie.modules.dm.dmVisitorsApply.service.dto.DmVisitorsApplyDto;
import me.zhengjie.modules.dm.dmVisitorsApply.service.dto.DmVisitorsApplyQueryCriteria;
import me.zhengjie.modules.dm.dmVisitorsApply.service.dto.DmVisitorsDto;
import me.zhengjie.ykt.domain.DmPlateNumber;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.query.Param;

import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

/**
* @website https://el-admin.vip
* @description 服务接口
* @author juan
* @date 2021-11-19
**/
public interface DmVisitorsApplyService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(DmVisitorsApplyQueryCriteria criteria, Pageable pageable);

    /**
     * 根据用户id查询被访人访客列表
     * @param userNumber 员工id
     * @param pageable 分页参数
     * @return Map<String, Object>
     */
    JSONArray getVisApp(String userNumber,Pageable pageable);

    /**
     * 根据用户id查询被访人访客列表
     * @param userNumber 员工id
     * @param pageable 分页参数
     * @return Map<String, Object>
     */
    Map<String, Object> getVisApp2(String userNumber, Pageable pageable);

    /**
     * 根据用户id查询访客访问列表
     * @param phone 访客手机号
     * @param pageable 分页参数
     * @return Map<String, Object>
     */
    Map<String, Object> getVisitorVisitList(String phone, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<DmVisitorsApplyDto>
    */
    List<DmVisitorsApplyDto> queryAll(DmVisitorsApplyQueryCriteria criteria);
    List<DmVisitorsApplyDto> queryAllXq(DmVisitorsApplyQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param id ID
     * @return DmVisitorsApplyDto
     */
    DmVisitorsApplyDto findById(Long id);

    /**
    * 创建
    * @param resources /
    * @return DmVisitorsApplyDto
    */
    DmVisitorsApplyDto create(DmVisitorsDto resources);

    /**
     * 菜品评价 APP
     * @param userNumber
     * @return
     */
//    List<DmVisitorsDto> getVisitors (String userNumber, Pageable pageable);
    List<DmVisXq> getVisitors (Long userNumber);
    /**
     * app访客申请
     * @param resources
     * @return
     */
    String visitorsApplyAdd(DmVisitorsDto resources);

    String visitorsApplyAdd2(DmVisitorsDto query);

    /**
     * app访客申请(新)
     * @param resources
     * @return
     */
    DmVisitorsApply newVisitorsApplyAdd(DmVisitorsDto resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(DmVisitorsDto resources);

    /**
     * 编辑
     * @param resources /
     */
    void updateDmVisitorsApply(DmVisitorsApply resources);

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(Long[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<DmVisitorsApplyDto> all, HttpServletResponse response) throws IOException;

    int updateDmVisitorsApplyStatus(List<String> list, Integer status);

    /*
    根据任务id查询
     */
    DmVisitorsApply findDmVisitorsApplyByTaskId(String taskId);

    JSONArray getVisitantApp(String userNumber,Pageable pageable);


}