|
@@ -137,7 +137,7 @@ public class ServiceAnalyseController {
|
|
|
@ApiParam(value = "大区", required = true) @RequestParam Long regionId) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("projectRoleQuota", serviceAnalyseService.findCrmAllocationSubTotal(serviceUnitId, regionId, null));
|
|
|
- List<UserArchivesAllocationResult> crmAllocation = serviceAnalyseService.findCrmAllocation(serviceUnitId, regionId, supplierId);
|
|
|
+ List<UserArchivesAllocationResult> crmAllocation = serviceAnalyseService.findCrmAllocation(serviceUnitId, regionId, null);
|
|
|
map.put("projectWait", crmAllocation.stream().filter(e -> e.getDistributed() < e.getQuota()).count());
|
|
|
map.put("regionCities", crmAllocation.stream().filter(e -> e.getCity() != null).collect(Collectors.groupingBy(UserArchivesAllocationResult::getCity)).size());
|
|
|
return ResultUtil.ok(map);
|
|
@@ -158,9 +158,7 @@ public class ServiceAnalyseController {
|
|
|
// 使用DecimalFormat格式化浮点数结果,得到字符串形式的结果
|
|
|
String formattedResult = decimalFormat.format(result);
|
|
|
// 输出格式化后的结果
|
|
|
- System.out.println(formattedResult);
|
|
|
return ResultUtil.success(formattedResult);
|
|
|
-// return ResultUtil.ok(crmAllocation.isEmpty() ? 0.00 : crmAllocation.stream().filter(e -> e.getUnDistributed()<=0).count() / crmAllocation.size());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -179,7 +177,6 @@ public class ServiceAnalyseController {
|
|
|
// 使用DecimalFormat格式化浮点数结果,得到字符串形式的结果
|
|
|
String formattedResult = decimalFormat.format(result);
|
|
|
// 输出格式化后的结果
|
|
|
- System.out.println(formattedResult);
|
|
|
return ResultUtil.success(formattedResult);
|
|
|
}
|
|
|
|