package com.elephant.framework.galaxy.aroad.module.zhtj.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.module.zhtj.entity.ZhtjGlqsqkQlqk;
import com.elephant.framework.galaxy.aroad.module.zhtj.mapper.ZhtjGlqsqkQlqkMapper;
import com.elephant.framework.galaxy.aroad.module.zhtj.service.ZhtjGlqsqkQlqkService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * 综合统计_公路桥隧情况_桥梁情况
 *
 * @author xuyanqi
 * @date 2019-03-12 08:57:24
 */
@Service
@AllArgsConstructor
public class ZhtjGlqsqkQlqkServiceImpl extends ServiceImpl<ZhtjGlqsqkQlqkMapper, ZhtjGlqsqkQlqk> implements ZhtjGlqsqkQlqkService {
    private final ZhtjGlqsqkQlqkMapper zhtjGlqsqkQlqkMapper;
    @Override
    public String newYear() {
        return zhtjGlqsqkQlqkMapper.newYear();
    }

    @Override
    public Map<String, ZhtjGlqsqkQlqk> getQlqk(ZhtjGlqsqkQlqk zhtjGlqsqkQlqk) {

        ZhtjGlqsqkQlqk qs = baseMapper.selectOne(Wrappers.query(zhtjGlqsqkQlqk));
        ZhtjGlqsqkQlqk ptgsd = zhtjGlqsqkQlqkMapper.selectOneForPtgsd(zhtjGlqsqkQlqk);
        Map<String,ZhtjGlqsqkQlqk> map = new HashMap<>();
        map.put("qs",qs);
        map.put("ptgsd",ptgsd);
        return map;
    }
}
