Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 965 → Rev 954

/trunk/src/org/tela_botanica/del/client/utils/UtilitairesServiceResultat.java
181,7 → 181,8
String courriel = getValeurOuVide(jsonIntervention, "auteur.courriel");
Contributeur contributeur = new Contributeur(idUtilisateur, nom, prenom, courriel);
 
Date date = parserDateObservation(getValeurOuVide(jsonIntervention, "date"));
// TODO : parser date
Date date = new Date();
 
if (!nomSel.equals("")) {
String nom_sel = getValeurOuVide(jsonIntervention, "nom_sel");
303,7 → 304,7
JSONObject vote = votes.get(itVotes.next()).isObject();
VoteDetermination vd = new VoteDetermination();
vd.setContributeur(getValeurOuVide(vote, "auteur.id"));
vd.setDate(parserDateObservation(getValeurOuVide(vote, "date")));
vd.setDate(new Date());
vd.setId(getValeurOuVide(vote, "vote.id"));
vd.setVote(Integer.parseInt(getValeurOuVide(vote, "vote")));
vd.setContributeur(getValeurOuVide(vote, "auteur.id"));
338,7 → 339,7
VoteProtocole vd = new VoteProtocole();
vd.setContributeur(voteEnCours.get("auteur.id").isString().stringValue());
// TODO récupérer la date du vote et la parser
vd.setDate(parserDateObservation(getValeurOuVide(voteEnCours, "date")));
vd.setDate(new Date());
int valeurVote = Integer.parseInt(voteEnCours.get("vote").isString().stringValue());
vd.setVote(valeurVote);
if (!votesProtocoles.containsKey(idProtocoleVote)) {
359,7 → 360,7
*/
public static Date parserDateObservation(String date) {
Date dateParsee = new Date();
DateTimeFormat formatDateObs = DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss");
DateTimeFormat formatDateObs = DateTimeFormat.getFormat("dd/MM/yyyy");
try {
dateParsee = formatDateObs.parse(date);
} catch (IllegalArgumentException e) {