package br.com.elotech.websaude.integracao.esus.model;

import java.sql.PreparedStatement;
import java.sql.SQLException;

import static br.com.elotech.websaude.integracao.esus.model.dao.Conexao.CONN;

public class EsusHistoricoItens {

  protected static String sql = "";
  protected static PreparedStatement pstmt;

  public boolean registratHistoricoItens(int eehCodigo, String uuidFicha, int tfeCodigo) throws SQLException {
    sql = "INSERT INTO esus_exportacao_historico_itens (tfe_codigo,uuid_ficha,eehi_data_exportacao,eeh_codigo) VALUES (?,?,NOW(),?)";
    pstmt = CONN.prepareStatement(sql);
    pstmt.setInt(1, tfeCodigo);
    pstmt.setString(2, uuidFicha);
    pstmt.setInt(3, eehCodigo);
    pstmt.executeUpdate();

    return true;

  }

}
