package org.gyk.modules.sz.cxcsssjjldbjcanshusz.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.gyk.modules.sz.cxcsssjjldbjcanshusz.entity.CxcSssjJldBjCanshuSz;
import org.gyk.modules.sz.cxcsssjjldbjcanshusz.mapper.CxcSssjJldBjCanshuSzMapper;
import org.gyk.modules.sz.cxcsssjjldbjcanshusz.service.ICxcSssjJldBjCanshuSzService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
 * @Description: 计量点报警参数字典
 * @Author: jeecg-boot
 * @Date:   2023-09-25
 * @Version: V1.0
 */
@Service
public class CxcSssjJldBjCanshuSzServiceImpl extends ServiceImpl<CxcSssjJldBjCanshuSzMapper, CxcSssjJldBjCanshuSz> implements ICxcSssjJldBjCanshuSzService {
    @Override
    public Map<String,CxcSssjJldBjCanshuSz> getbjcs() {
        List<CxcSssjJldBjCanshuSz> listallcs = list();
        Map<String,CxcSssjJldBjCanshuSz> map = listallcs.stream().collect(Collectors.toMap(CxcSssjJldBjCanshuSz::getCanshu, Function.identity(),(k1, k2)->k2));
        return map;
    };

}
