package com.ruoyi.nanjing.service.impl;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ruoyi.nanjing.domain.ParaAllShow;
import com.ruoyi.nanjing.domain.ProParaInfo;
import com.ruoyi.nanjing.domain.ProRpList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.CallableStatementCallback;
import org.springframework.jdbc.core.CallableStatementCreator;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import com.ruoyi.nanjing.mapper.TSyTracestateMapper;
import com.ruoyi.nanjing.domain.TSyTracestate;
import com.ruoyi.nanjing.service.ITSyTracestateService;
import com.ruoyi.common.core.text.Convert;

/**
 * traceStateService业务层处理
 * 
 * @author limy
 * @date 2021-01-29
 */
@Service
public class TSyTracestateServiceImpl implements ITSyTracestateService 
{
    @Autowired
    private TSyTracestateMapper tSyTracestateMapper;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    /**
     * 查询traceState
     * 
     * @param barcode traceStateID
     * @return traceState
     */
    @Override
    public TSyTracestate selectTSyTracestateById(String barcode)
    {
        return tSyTracestateMapper.selectTSyTracestateById(barcode);
    }

    /**
     * 查询traceState列表
     * 
     * @param tSyTracestate traceState
     * @return traceState
     */
    @Override
    public List<TSyTracestate> selectTSyTracestateList(TSyTracestate tSyTracestate)
    {
        return tSyTracestateMapper.selectTSyTracestateList(tSyTracestate);
    }

    /**
     * 新增traceState
     * 
     * @param tSyTracestate traceState
     * @return 结果
     */
    @Override
    public int insertTSyTracestate(TSyTracestate tSyTracestate)
    {
        return tSyTracestateMapper.insertTSyTracestate(tSyTracestate);
    }

    /**
     * 修改traceState
     * 
     * @param tSyTracestate traceState
     * @return 结果
     */
    @Override
    public int updateTSyTracestate(TSyTracestate tSyTracestate)
    {
        return tSyTracestateMapper.updateTSyTracestate(tSyTracestate);
    }

    /**
     * 删除traceState对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTSyTracestateByIds(String ids)
    {
        return tSyTracestateMapper.deleteTSyTracestateByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除traceState信息
     * 
     * @param barcode traceStateID
     * @return 结果
     */
    @Override
    public int deleteTSyTracestateById(String barcode)
    {
        return tSyTracestateMapper.deleteTSyTracestateById(barcode);
    }

    @Override
    public List<List<HashMap<String,String>>> selectAllPara(Map map) {
        List<List<HashMap<String,String>>> paraAllShows= tSyTracestateMapper.selectAllPara(map);
        return paraAllShows;
    }

    @Override
    public List selectStationPara(Map map) {
        return tSyTracestateMapper.selectStationPara(map);
    }


}
