package com.weaver.seconddev.chapanda.cost.service.impl;

import com.weaver.seconddev.chapanda.cost.dao.ConvertStaffCodeDao;
import com.weaver.seconddev.chapanda.cost.service.ConvertStaffCodeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;

/***
 * author:shil
 */
@Service
public class ConvertStaffCodeServiceImpl implements ConvertStaffCodeService {

    private final static Logger log = LoggerFactory.getLogger(ConvertStaffCodeServiceImpl.class);

    @Autowired
    private ConvertStaffCodeDao convertStaffCodeDao;

    /**
     * 
     * @param paraMap
     * @return
     */
    @Override
    public Map<String, Object> convStaffCode(Map<String, Object> paraMap) {
        String staffcode = String.valueOf(paraMap.get("staffcode"));
        log.error("staffcode:{}",staffcode);
        Map<String, Object> dataMap =  convertStaffCodeDao.queryEmployeeById(staffcode);
        return dataMap;
    }


    @Override
    public Long convEmployeeIdByCode(String staffcode) {
        log.error("staffcode:{}",staffcode);
        Long employeeId = convertStaffCodeDao.queryEmployeeByCode(staffcode);
        log.error("employeeId:{}",employeeId);
        return employeeId;
    }


}
