Search in sources :

Example 11 with TGCompanyModel

use of com.kendy.entity.TGCompanyModel in project financial by greatkendy123.

the class DBUtil method get_tg_company_by_id.

public static TGCompanyModel get_tg_company_by_id(String company) {
    TGCompanyModel model = null;
    try {
        con = DBConnection.getConnection();
        String sql = "select * from tg_company where tg_company_name = '" + company + "'";
        ps = con.prepareStatement(sql);
        ResultSet rs = ps.executeQuery();
        while (rs.next()) {
            model = new TGCompanyModel(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getString(5), rs.getString(6), rs.getString(8), rs.getString(9));
            model.setBeizhu(rs.getString(7));
        }
    } catch (SQLException e) {
        ErrorUtil.err(company + ", 获有托管公司(根据公司名)失败", e);
    } finally {
        close(con, ps);
    }
    return model;
}
Also used : SQLException(java.sql.SQLException) ResultSet(java.sql.ResultSet) TGCompanyModel(com.kendy.entity.TGCompanyModel)

Aggregations

TGCompanyModel (com.kendy.entity.TGCompanyModel)11 ArrayList (java.util.ArrayList)4 ResultSet (java.sql.ResultSet)3 SQLException (java.sql.SQLException)3 MyController (application.MyController)2 TGController (com.kendy.controller.TGController)2 DBUtil (com.kendy.db.DBUtil)2 ProxyTeamInfo (com.kendy.entity.ProxyTeamInfo)2 TGFwfinfo (com.kendy.entity.TGFwfinfo)2 TGTeamInfo (com.kendy.entity.TGTeamInfo)2 TGTeamModel (com.kendy.entity.TGTeamModel)2 TypeValueInfo (com.kendy.entity.TypeValueInfo)2 CollectUtil (com.kendy.util.CollectUtil)2 NumUtil (com.kendy.util.NumUtil)2 ShowUtil (com.kendy.util.ShowUtil)2 StringUtil (com.kendy.util.StringUtil)2 HashSet (java.util.HashSet)2 List (java.util.List)2 Map (java.util.Map)2 Node (javafx.scene.Node)2