% /****************************************************************************** * Copyright (c) 2000-2004 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. * * ******************************************************************************/ %><%@page session="true" import="com.edeal.frontline.*,java.util.*"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl"%> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); String dbVendor = context.getContextParameter("DatabaseVendor"); boolean isOracle = "oracle".equalsIgnoreCase(dbVendor); boolean isDB2 = "IBM DB2".equalsIgnoreCase(dbVendor); Vector vectURL = new Vector(); int nb = 0; Vector vectCorQuery = new Vector(); Vector vectActQuery = new Vector(); String oppQuery = new String(); String str = null; if((str = Utils.getRequestParameter(context, request, "nb")) != null && !"".equals(str.trim())) { try { nb = Integer.parseInt(str); } catch (Throwable ex) { } } if((str = Utils.getRequestParameter(context, request, "perID")) != null && !"".equals(str.trim())) { vectCorQuery.addElement("CorPerID = " + Utils.formatToSQL(context, str.trim())); vectURL.addElement("PerID=" + str.trim()); } if((str = Utils.getRequestParameter(context, request, "EntID")) != null && !"".equals(str.trim())) { vectCorQuery.addElement("CorEntID = " + Utils.formatToSQL(context, str.trim())); vectURL.addElement("EntID=" + str.trim()); } if((str = Utils.getRequestParameter(context, request, "JouID")) != null && !"".equals(str.trim())) { vectCorQuery.addElement("CorJouID = " + Utils.formatToSQL(context, str.trim())); vectURL.addElement("JouID=" + str.trim()); } if((str = Utils.getRequestParameter(context, request, "SupID")) != null && !"".equals(str.trim())) { vectCorQuery.addElement("CorSupID = " + Utils.formatToSQL(context, str.trim())); vectURL.addElement("SupID=" + str.trim()); } if((str = Utils.getRequestParameter(context, request, "ActID")) != null && !"".equals(str.trim())) { vectCorQuery.addElement("MvaText = " + Utils.formatToSQL(context, str.trim())); vectURL.addElement("ActID=" + str.trim()); } if((str = Utils.getRequestParameter(context, request, "OppID")) != null && !"".equals(str.trim())) { oppQuery = "IntOppID = " + Utils.formatToSQL(context, str.trim()); vectURL.addElement("OppID=" + str.trim()); } String strQuery = "SELECT DISTINCT IntID, IntStiID, IntDate, IntAtvID, IntSubject, " + (isDB2 ? "''" : "IntDetails") + ", IntPlace \n" + "FROM Interaction "; if(!vectCorQuery.isEmpty()) strQuery += ", MvaIntCorID mCor, Correspondent"; if(!vectActQuery.isEmpty()) strQuery += ", MvaIntActID mAct"; strQuery += "\n"; if(!vectCorQuery.isEmpty() || !vectActQuery.isEmpty() || !"".equals(oppQuery)) { strQuery += "WHERE "; boolean firstClause = true; if(!vectCorQuery.isEmpty()) { if (!firstClause) strQuery += "AND "; strQuery += "mCor.MvaColID = IntID\n" + " AND CorID = mCor.MvaText\n" + " AND " + Utils.implodeList(vectCorQuery, "\n AND ") + "\n"; firstClause = false; } if(!vectActQuery.isEmpty()) { if (!firstClause) strQuery += "AND "; strQuery += "mAct.MvaColID = IntID\n" + " AND " + Utils.implodeList(vectCorQuery, "\n AND ") + "\n"; firstClause = false; } if (!"".equals(oppQuery)) { if (!firstClause) strQuery += "AND "; strQuery += oppQuery + "\n"; firstClause = false; } } strQuery += "ORDER BY IntDate DESC"; Vector vectObjs = BasicBean.listSQL(context, new String[]{"IntID", "IntStiID", "IntDate", "IntAtvID", "IntSubject", "IntDetails", "IntPlace"}, strQuery, 0, nb); %>
|
> <%= formatIntDate %> - <%= formatIntSubject %> <%= formatIntAtvID %> <%= formatDone %> |