package org.jeecg.modules.newWarning.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.newWarning.entity.WellDrilling;
import org.jeecg.modules.newWarning.mapper.WellDrillingMapper;
import org.jeecg.modules.newWarning.service.WellDrillingService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


/**
 * @author Zhao RenJi
 */
@Service
public class WellDrillingServiceImpl extends ServiceImpl<WellDrillingMapper, WellDrilling> implements WellDrillingService {
    @Resource
    private WellDrillingMapper mapper;

    @Override
    public WellDrilling selectOneOrcale(String tableName) {
        return mapper.selectOneOrcale(tableName);
    }

    /**
     * 根据井号名称获得表代码
     *
     * @param AJH
     * @return
     */
    @Override
    public String getTableCode(String AJH) {
        //井号预处理
        String s = AJH.replace('-', '_').toUpperCase();
        return "LTD_" + s ;
    }

}
