package com.xunmei.core.resumption.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xunmei.core.resumption.domain.AppResumptionDataNfc;
import com.xunmei.core.resumption.mapper.AppResumptionDataNfcMapper;
import com.xunmei.core.resumption.service.AppResumptionDataNfcService;
import com.xunmei.core.resumption.vo.ResumptionNfcInfoVo;
import com.xunmei.core.resumption.vo.ResumptionNfcVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 履职nfc扫描表服务接口实现
 *
 * @author oygj
 * @since 2022-05-06 08:37:04
 * @description 由 Mybatisplus Code Generator 创建
 */
@Slf4j
@RequiredArgsConstructor
@Service
public class AppResumptionDataNfcServiceImpl extends ServiceImpl<AppResumptionDataNfcMapper, AppResumptionDataNfc> implements AppResumptionDataNfcService {
    @Override
    public List<Map<String, Object>> findnfcDataList(String taskid, Long areaid,Long orgId) {
        Map<String,Object> parmar = new HashMap<>();
        parmar.put("taskid",taskid);
        parmar.put("areaid",areaid);
        parmar.put("orgId",orgId);
        return baseMapper.findnfcDataList(parmar);
    }

    @Override
    public List<Map<String, Object>> findnfcDataListByPointid(Long pointid, String taskid, Long orgId) {
        Map<String,Object> parmar = new HashMap<>();
        parmar.put("pointid",pointid);
        parmar.put("taskid",taskid);
        parmar.put("orgId",orgId);
        return baseMapper.findnfcDataListByPointid(parmar);
    }

    @Override
    public List<Map<String, Object>> findnfcDataListNew(String taskid, Long orgId) {
        Map<String,Object> parmar = new HashMap<>();
        parmar.put("taskid",taskid);
        parmar.put("orgId",orgId);
        return baseMapper.findnfcDataListNew(parmar);
    }

    @Override
    public List<Map<String, Object>> findnfcDataListByPointidNew(String taskid, Long orgId) {
        Map<String,Object> parmar = new HashMap<>();
        parmar.put("taskid",taskid);
        parmar.put("orgId",orgId);
        return baseMapper.findnfcDataListByPointidNew(parmar);
    }

    @Override
    public List<ResumptionNfcInfoVo> findPointNfcData(String taskid, Long orgId) {
        Map<String,Object> parmar = new HashMap<>();
        parmar.put("taskid",taskid);
        parmar.put("orgId",orgId);
        return baseMapper.findPointNfcData(parmar);
    }

    @Override
    public List<ResumptionNfcVo> findNfcByAreaIdAndOrgId(Set<Long> nfcBindIdList, Long orgId, Long planId) {
        Map<String,Object> param = new HashMap<>();
        param.put("nfcBindIdList",nfcBindIdList);
        param.put("orgId",orgId);
        param.put("planId",planId);
       return baseMapper.findNfcByAreaIdAndOrgId(param);


    }

}