|
@@ -95,6 +95,12 @@ public class AnalyzeService {
|
|
|
|
|
|
private String serverPort="8090";
|
|
|
|
|
|
+ @Value("${main.site}")
|
|
|
+ private String mainSite;
|
|
|
+
|
|
|
+ @Value("${main.userInfoApi}")
|
|
|
+ private String mainUserInfoApi;
|
|
|
+
|
|
|
private static String[] radarInfo = {"发现bug能力","描述bug能力","经验值","bug有效率","众测平均得分"};
|
|
|
private static int[] radarValueStart = {70,80,60,50,70};
|
|
|
private static List<String> mockLabels = Arrays.asList("移动应用","Android","ios","鸿蒙os","华为","MacOS","Windows10",
|
|
@@ -828,16 +834,8 @@ public class AnalyzeService {
|
|
|
|
|
|
|
|
|
public AnalyseVO2 getReviewAnalyseVO2(String caseId, String taskId){
|
|
|
-
|
|
|
-// Cache<String,String> cache = CacheBuilder.newBuilder().build();
|
|
|
-// cache.put("word","Hello Guava Cache");
|
|
|
-// System.out.println(cache.getIfPresent("word"));
|
|
|
-
|
|
|
Exam exam = examDao.findById(caseId);
|
|
|
Task task=taskDao.findById(taskId);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
long startTime=0;
|
|
|
long endTime=0;
|
|
|
String taskName="";
|
|
@@ -889,11 +887,14 @@ public class AnalyzeService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ System.out.println("bugWorkerMap.toString() " + bugWorkerMap.toString());
|
|
|
Map<Integer,Integer>gradeDistribution=new HashMap<>();
|
|
|
Map<String,Integer>workerDistribution=new HashMap<>();
|
|
|
List<BugScore>bugScores=bsdao.findByIds(bugIds);
|
|
|
+ // 有分数的
|
|
|
for(BugScore bugScore:bugScores){
|
|
|
+ // 从bugIds中移除
|
|
|
+ bugIds.remove(bugScore.getId());
|
|
|
int grade = bugScore.getGrade();
|
|
|
String workerId=bugWorkerMap.get(bugScore.getId());
|
|
|
if(workerId!=null){
|
|
@@ -910,6 +911,23 @@ public class AnalyzeService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ System.out.println("去重后: " + bugIds.toString());
|
|
|
+ for(String bugId:bugIds){
|
|
|
+ String workerId=bugWorkerMap.get(bugId);
|
|
|
+ if(workerId!=null){
|
|
|
+ if (workerDistribution.containsKey(workerId)) {
|
|
|
+ workerDistribution.replace(workerId, workerDistribution.get(workerId) + -1);
|
|
|
+ } else {
|
|
|
+ workerDistribution.put(workerId, -1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (gradeDistribution.containsKey(-1)) {
|
|
|
+ gradeDistribution.replace(-1, gradeDistribution.get(-1) + 1);
|
|
|
+ } else {
|
|
|
+ gradeDistribution.put(-1, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
int forkNum=0;
|
|
|
List<BugHistory>bugHistories=bugHistoryDao.findBugHistoryList(bugIds);
|
|
|
for(BugHistory bugHistory:bugHistories){
|
|
@@ -933,7 +951,8 @@ public class AnalyzeService {
|
|
|
for(int i=0;i<list.size();i++) {
|
|
|
String workerId = list.get(i).getKey();
|
|
|
int grade=list.get(i).getValue();
|
|
|
- String result = HTTP.sendGet("http://114.55.91.83:8191/api/user/" + workerId, "");
|
|
|
+ String result = HTTP.sendGet(mainSite + mainUserInfoApi + workerId, "");
|
|
|
+ System.out.println("主站人员信息: " + result);
|
|
|
String name = "";
|
|
|
String school = "";
|
|
|
String province="";
|
|
@@ -1061,6 +1080,9 @@ public class AnalyzeService {
|
|
|
endTime = task.getEnd_time();
|
|
|
}
|
|
|
long pieceTime=(endTime-startTime)/piece;
|
|
|
+ if(pieceTime == 0){
|
|
|
+ pieceTime = 10;
|
|
|
+ }
|
|
|
String caseTakeId=caseId+"-"+taskId;
|
|
|
List<Bug>bugs=bdao.findByCaseid(caseTakeId);
|
|
|
map.put(0,0);
|