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.entity.ZhtjGlqsqkSdqk;
import com.elephant.framework.galaxy.aroad.module.zhtj.mapper.ZhtjGlqsqkSdqkMapper;
import com.elephant.framework.galaxy.aroad.module.zhtj.service.ZhtjGlqsqkSdqkService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

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

/**
 * 综合统计_公路桥隧情况_隧道情况
 *
 * @author xuyanqi
 * @date 2019-03-11 20:53:25
 */
@Service
@AllArgsConstructor
public class ZhtjGlqsqkSdqkServiceImpl extends ServiceImpl<ZhtjGlqsqkSdqkMapper, ZhtjGlqsqkSdqk> implements ZhtjGlqsqkSdqkService {
    private final ZhtjGlqsqkSdqkMapper zhtjGlqsqkSdqkMapper;
    @Override
    public String newYear() {
        return zhtjGlqsqkSdqkMapper.newYear();
    }

    @Override
    public Object getSdqk(ZhtjGlqsqkSdqk zhtjGlqsqkSdqk) {
        ZhtjGlqsqkSdqk qs = baseMapper.selectOne(Wrappers.query(zhtjGlqsqkSdqk));
        ZhtjGlqsqkSdqk ptgsd = zhtjGlqsqkSdqkMapper.selectOneForPtgsd(zhtjGlqsqkSdqk);
        Map<String,ZhtjGlqsqkSdqk> map = new HashMap<>();
        map.put("qs",qs);
        map.put("ptgsd",ptgsd);
        return map;
    }
}
