shudonghui 1 năm trước cách đây
mục cha
commit
d268cf7ba1

+ 1 - 1
sop-api/src/main/java/com/qmth/sop/server/api/ServiceAnalyseController.java

@@ -152,7 +152,7 @@ public class ServiceAnalyseController {
     public Result allocation(@ApiParam(value = "服务单元", required = true) @RequestParam Long serviceUnitId) {
         List<UserArchivesAllocationResult> crmAllocation = serviceAnalyseService.findCrmAllocation(serviceUnitId, null, null);
 
-        double result = crmAllocation.isEmpty() ? 0.00 : (double) crmAllocation.stream().filter(e -> e.getUnDistributed() > 0).count() / crmAllocation.size();
+        double result = crmAllocation.isEmpty() ? 0.00 : (double) crmAllocation.stream().filter(e -> e.getUnDistributed() == 0).count() / crmAllocation.size();
 // 创建DecimalFormat对象,指定保留两位小数
         DecimalFormat decimalFormat = new DecimalFormat("#0.00");
 // 使用DecimalFormat格式化浮点数结果,得到字符串形式的结果