package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;

import com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

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

@Service
public class DzbtgServiceImpl implements IExportPageService {
    @Autowired
    private BusinessFieldMapper businessFieldMapper;

    @Override
    public List<String> getStationId(Map<String, Object> filters) {
        Map<String, Object> map = new HashMap<>();
        if (Objects.nonNull(filters)) {
            map.putAll(filters);
        }
        if(!map.containsKey("processStatus"))
        {
            map.put("processStatus", PowerStationProcessStateEnum.不通过.getName());
        }
        return businessFieldMapper.getDzStationIdByProcessStatus(map);
    }
}
