//通过文书表号和案件ID获得某个表的ID
public int getCnIdByCaseId(int caseId,int writId){
int id=0;
try{
super.openConn();
String sql = " select cn_id from correctnotice where caseID =" + caseId + " and writID =" + writId;
pStatement = connection.prepareStatement(sql);
set = pStatement.executeQuery();
if(set.next()){
id = set.getInt(1);
}
}catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}finally{
super.closeAll();
}
return id;
}

浙公网安备 33010602011771号