18 package org.turro.dossier.zul.dossier;
20 import java.util.List;
21 import org.turro.dossier.db.DossierPU;
22 import org.turro.dossier.entity.Dossier;
23 import org.turro.dossier.entity.IssueParticipantRole;
24 import org.turro.dossier.entity.IssueResolution;
25 import org.turro.dossier.entity.IssueStatus;
26 import org.turro.elephant.db.WhereClause;
27 import org.turro.i18n.I_;
28 import org.turro.jpa.Dao;
29 import org.zkoss.zul.SimplePieModel;
38 private String issueParticipant;
48 this.issueParticipant = issueParticipant;
53 this.dossier = dossier;
57 private void readValues() {
60 wc.
addClause(
"select issue.resolution, count(distinct issue.id)");
62 wc.
addClause(
"left outer join issue.participants participant");
63 wc.
addClause(
"where issue.dossier = :dossier");
64 wc.
addClause(
"and (issue.status = :resolved");
65 wc.
addClause(
"or issue.status = :verified");
66 wc.
addClause(
"or issue.status = :closed)");
67 if(issueParticipant !=
null) {
68 wc.
addClause(
"and participant.idContact = :idContact");
69 wc.
addClause(
"and participant.role = :role");
78 List<Object[]> l = dao.getResultList(wc);
79 for(Object[] result : l) {
80 setValue(I_.byKey(((IssueResolution) result[0]).toString()),
void setDossier(Dossier dossier)
IssueResolutionModel(Dossier dossier, String issueParticipant)
IssueResolutionModel(Dossier dossier)
void addClause(String clause)
void addNamedValue(String name, Object value)