Commit 439b9f39 by zhiwj

修改bug

parent 4ef38458
......@@ -147,17 +147,18 @@ public class EvaluateOverviewApiServiceImpl implements EvaluateOverviewApiServic
Long totalCount = (Long) e.get("totalCount");
Long orderCount = (Long) map.get("orderCount");
Long goodCount = (Long) e.get("goodCount");
Double goodRate = (Double) e.get("goodRate");
if (orderCount != null && orderCount != 0) {
e.put("evaluateRate", (double)Math.round(totalCount.doubleValue() / orderCount.doubleValue()*10000)/100 + "%");
} else {
e.put("evaluateRate", 0);
}
// if (goodCount != null && goodCount != 0) {
// e.put("goodRate", (double)Math.round(goodCount.doubleValue() / totalCount.doubleValue()*10000)/100 + "%");
// } else {
// e.put("goodRate", 0);
// }
if (goodRate != null) {
e.put("goodRate", (double)Math.round(goodRate*10000)/100 + "%");
} else {
e.put("goodRate", 0);
}
} else {
e.put("evaluateRate", 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment