}
public String getProblemreasonNotByGroup(Long userId,
ArrayList problemreasons) throws EasyJException {
StringBuffer buffer = new StringBuffer();
ProblemreasonEvaluation pre = new ProblemreasonEvaluation();
Problemreason pr = new Problemreason();
SingleDataProxy sdp = SingleDataProxy.getInstance();
ProblemreasonSolution prs = new ProblemreasonSolution();
ProblemreasonSolution prs2 = new ProblemreasonSolution();
buffer.append("<div class=\"bc0\" style=\"padding:0px 0pt;\">");
String solution = "";
if (problemreasons.size() > 0) {
for (int i = 0; i < problemreasons.size(); i++) {
pr = (Problemreason) problemreasons.get(i);
prs.setProblemreasonId(pr.getProblemreasonId());
ArrayList prss = sdp.query(prs);
if (prss.size() > 0) {
for (int j = 0; j < prss.size(); j++) {
prs2 = (ProblemreasonSolution) prss.get(j);
solution = solution + ","
+ prs2.getProblemreasonSolutionId();
}
buffer
.append("<div class=\"f14 p90 pl10\" class=\"answer_content\">"
+ pr.getProblemreasonContent() + "</div>");
buffer.append("<p></p>共有" + sdp.getCount(prs)
+ "个解决方案,对应的解决方案为" + solution + "<p></p>");
solution = "";
} else {
buffer
.append("<div id=\"Lg\" ></div><div class=\"f14 p90 pl10\" class=\"answer_content\">"
+ pr.getProblemreasonContent()
+ "</div><p></p>目前无该原因的解决方案,<A class=brown12 href=\"javascript:Problemsolution.loadNewSolution("
+ pr.getProblemId()
+ ")\">添加一个?</A><p></p>");
}
boolean flag = true;
int j = 0;
ArrayList pres = pr.getProblemreasonEvaluations();
while (flag == true && j < pres.size()) {
pre = (ProblemreasonEvaluation) pres.get(j);
if (pre.getCreatorId().intValue() == userId.intValue()) {
flag = false;
}
j++;
}