%
/******************************************************************************
* 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"%><%@ page import="com.edeal.frontline.navigation.FlRequest,java.util.*,com.edeal.frontline.*;"%>
<%@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 id = "";
try{
id=Solicitation.getID();
}catch(Exception e){
id=flRequest.getRequestParameterOrAttribute("id");
}
String sActionType = context.getContextParameter("SActionType");
boolean isSimple = "SIMPLE".equals(sActionType);
boolean isComplete = "COMPLETE".equals(sActionType);
boolean isBoth = "BOTH".equals(sActionType);
// ramener les ids des 4 catégories de la sollicitation
String spresCategory; // Plainte d'un Guest suite à une réservation
String spfidCategory; // Plainte liée au programme de fidélisation
String spqaCategory; // Plainte de mécontentement (suivi qualité)
String scomCategory; // Compliment
try {
spresCategory = dico.getRefIdByCode("So_", "Te1", "SPRES");
spfidCategory = dico.getRefIdByCode("So_", "Te1", "SPFID");
spqaCategory = dico.getRefIdByCode("So_", "Te1", "SPQA");
scomCategory = dico.getRefIdByCode("So_", "Te1", "SCOM");
} catch (Exception e) {
spresCategory = null;
spfidCategory = null;
spqaCategory = null;
scomCategory = null;
}
// ramener les ids des 6 états de la sollicitation
String waitingState; // En Attente
String openState; // Ouverte
String assignedState; // Assignée
String notifyState; // Accusé de récéption
String closedState; // Fermée
String investigState; // Vérification
String archivedState; //Archivée
try {
waitingState = dico.getRefIdByCode("Sts", "Te1", "WAITING");
openState = dico.getRefIdByCode("Sts", "Te1", "OPEN");
assignedState = dico.getRefIdByCode("Sts", "Te1", "ASSIGNED");
notifyState = dico.getRefIdByCode("Sts", "Te1", "NOTIFY");
closedState = dico.getRefIdByCode("Sts", "Te1", "CLOSED");
investigState = dico.getRefIdByCode("Sts", "Te1", "INVESTIG");
archivedState = dico.getRefIdByCode("Sts", "Te1", "ARCHIVE");
} catch (Exception e) {
waitingState = null;
openState = null;
assignedState = null;
notifyState = null;
closedState = null;
investigState = null;
archivedState = null;
}
// Détecter l'état de la sollicitation
String statutID;
try {
statutID = Solicitation.getSolStsID();
} catch (FieldNotInitializedException e) {
statutID = openState; /*Par défaut on la considère dans l'état "Ouverte"*/
}
// Détecter la catégorie de la sollicitation
String categoryID = null; ;
try {
categoryID = (String)Solicitation.getCustomProperty("SolCategorie_");
} catch (FieldNotInitializedException e) {
categoryID = "";
}
// l'ID de la correspondance et de la todo
String corrID;
String todoID;
try {
corrID = dico.getRefIdByCode("IntType_", "COR");
todoID = dico.getRefIdByCode("IntType_", "ACT");
} catch (FieldNotInitializedException e) {
corrID = "";
todoID ="";
}
// Dans le cas d'un Refus ou d'un Problème Humain, il faut pouvoir faire une TOdo pour le service financier
String phID;
String prID;
try {
phID = dico.getRefIdByCode("SolSourcePlainte_", "PH");
prID = dico.getRefIdByCode("SolSourcePlainte_", "PR");
} catch (FieldNotInitializedException e) {
phID = "";
prID = "";
}
boolean todoAction = false;
try {
if(phID.equals((String)Solicitation.getCustomProperty("SolSourcePlainte_")) || prID.equals((String)Solicitation.getCustomProperty("SolSourcePlainte_"))){
todoAction =true;
}
} catch (FieldNotInitializedException e) {
}
String courrierTitle="LF35C";
%>
<%--
|
" href="javascript:doWord(' ','Solicitation','Word');">
">
" href="javascript:doWord(' ','Solicitation','PDF');">
">
|
|
--%>
|
Connexion I-Reflet...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<%
if( (statutID.equalsIgnoreCase(openState) && categoryID.equalsIgnoreCase(spresCategory)) || (statutID.equalsIgnoreCase(openState) && categoryID.equalsIgnoreCase(spfidCategory)) || (statutID.equalsIgnoreCase(openState) && categoryID.equalsIgnoreCase(spqaCategory)) || (statutID.equalsIgnoreCase(openState) && categoryID.equalsIgnoreCase(scomCategory)) ){%>
<%-- ---------------------Créer correspondance courrier au client--------------------
|
','Solicitation', 'WORD', 'Solicitation');"/>
" alt="Visualiser le PDF"/>" title=" ">
|
|
--%>
<%--
|
|
|
--%>
<%--
|
|
|
--%>
<%-- -----------------------Créer correspondance mail au client------------------
|
|
|
|
|
|
--%>
<%} else if(statutID.equalsIgnoreCase(notifyState) && categoryID.equalsIgnoreCase(spfidCategory)) {%>
|
|
|
|
|
|
<%} else if(statutID.equalsIgnoreCase(notifyState) && categoryID.equalsIgnoreCase(spresCategory)) {%>
|
|
|
|
|
|
<%} else if((statutID.equalsIgnoreCase(assignedState) && categoryID.equalsIgnoreCase(spresCategory)) || (statutID.equalsIgnoreCase(notifyState) && categoryID.equalsIgnoreCase(spqaCategory)) ) {%>
<%--
|
|
|
|
|
|
--%>
<%} else if( (statutID.equalsIgnoreCase(waitingState) && categoryID.equalsIgnoreCase(spfidCategory)) ) {%>
<%--
|
&IntType_=<%= corrID %>&initIntSolID_=<%= id %>">
|
|
|
|
|
|
|
|
|
|
|
--%>
<%} else if( (statutID.equalsIgnoreCase(notifyState) && categoryID.equalsIgnoreCase(scomCategory)) ) {%>
<%--
|
|
|
|
|
|
--%> <%} else if( (statutID.equalsIgnoreCase(investigState) && categoryID.equalsIgnoreCase(spresCategory)) || (statutID.equalsIgnoreCase(investigState) && categoryID.equalsIgnoreCase(spfidCategory)) || (statutID.equalsIgnoreCase(investigState) && categoryID.equalsIgnoreCase(spqaCategory)) ) {%>
<%--
|
&IntType_=<%= corrID %>&initIntSolID_=<%= id %>">
|
|
|
|
|
--%>
<%} else if( statutID.equalsIgnoreCase(closedState) && (categoryID.equalsIgnoreCase(spresCategory) || categoryID.equalsIgnoreCase(spfidCategory)) && !todoAction) {%>
|
&IntType_=<%= corrID %>&initIntSolID_=<%= id %>">
|
|
|
|
|
<%} else if( statutID.equalsIgnoreCase(closedState) && categoryID.equalsIgnoreCase(scomCategory)) {%>
<%--
|
&IntType_=<%= corrID %>&initIntSolID_=<%= id %>">
|
|
|
|
|
--%>
<%} else if( statutID.equalsIgnoreCase(closedState) && categoryID.equalsIgnoreCase(spfidCategory) && todoAction) {%>
<%--
|
&IntType_=<%= todoID %>&initIntSolID_=<%= id %>">
|
|
|
|
|
--%>
<%}%>
<%--
<% if(!statutID.equalsIgnoreCase(archivedState)) { %>
|
|
|
|
|
|
<%} %>
--%>
|
&IntType_=<%= todoID %>&initIntSolID_=<%= id %>">
|
|
|
|
|
<%--
|
&IntType_=<%= corrID %>&initIntSolID_=<%= id %>">
+
|
|
|
|
|
--%>
|
&typeVal=TIERS&initSolID=<%= id %>">
+
|
|
|
|
|
|
&typeVal=CONTACT&initSolID=<%= id %>">
+
|
|
|
|
|
<% if(! (statutID.equalsIgnoreCase(closedState)) ) { %>
|
|
|
|
|
|
<%} else { %>
|
|
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|