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;
}
Aggregations