1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
public ActionForward historique(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws SQLException, IOException, RowsExceededException, WriteException {
EtaStkForm etaStkForm = (EtaStkForm) form;
Connexion connexion=new Connexion();
Connection con=connexion.createConnection();
Statement st = null;
ResultSet rs = null;
ArrayList list = new ArrayList();
st=con.createStatement();
//String rng=request.getParameter("dat_au");
String rng=etaStkForm.getHiddenTest();
String id=rng.substring(0,10);
String act=rng.substring(11,14);
System.out.println(rng);
System.out.println(id);
System.out.println(act);
rs=st.executeQuery("select tr.t_r_trans_type||'-'||tr.t_r_trans_whs||'-'||tr.t_r_trans_no,to_char(tr.t_r_date, 'DD/MM/YYYY HH24:MI:SS')from gss_transaction_range tr where tr.t_r_rng_id='"+id+"' and tr.t_r_rng_act_id='"+act+"' order by tr.t_r_date");
while (rs.next())
{
Article art = new Article();
art.setCode(rs.getString(1).trim());
art.setDate(rs.getString(2).trim());
art.setCode_art(rs.getString(1).trim());
list.add(art);
}
etaStkForm.setEtat(list);
return mapping.findForward("pophistorique");
} |
Partager