From f2ed9b2feddbd3458110172e9fe0a4635e5237ce Mon Sep 17 00:00:00 2001 From: youys <1272586223@qq.com> Date: Thu, 13 Jan 2022 17:04:22 +0800 Subject: [PATCH] test --- .../ecsonar/controller/MainController.java | 2 +- .../ecsonar/services/SonarService.java | 8 +-- src/main/resources/application.properties | 8 +-- src/main/resources/template1.xlsx | Bin 10746 -> 13450 bytes .../ecsonar/EcsonarApplicationTests.java | 66 +++++++++++++++++- 5 files changed, 69 insertions(+), 15 deletions(-) diff --git a/src/main/java/net/educoder/ecsonar/controller/MainController.java b/src/main/java/net/educoder/ecsonar/controller/MainController.java index 0eb6f6f..0dd3c39 100644 --- a/src/main/java/net/educoder/ecsonar/controller/MainController.java +++ b/src/main/java/net/educoder/ecsonar/controller/MainController.java @@ -41,7 +41,7 @@ public class MainController { } - @PostMapping(value = "/scanExcel") + @RequestMapping(value = "/scanExcel", method = RequestMethod.POST) public String scanExcel(@RequestParam String excelPath) throws Exception { ecsonarService.scanExcel(excelPath); return "success"; diff --git a/src/main/java/net/educoder/ecsonar/services/SonarService.java b/src/main/java/net/educoder/ecsonar/services/SonarService.java index 8c307a7..e430e5b 100644 --- a/src/main/java/net/educoder/ecsonar/services/SonarService.java +++ b/src/main/java/net/educoder/ecsonar/services/SonarService.java @@ -190,21 +190,15 @@ public class SonarService { Map> collect = personList.stream().collect(Collectors.groupingBy(Person::getUid)); - - List list= new ArrayList<>(collect.size()); collect.forEach((k,v)->{ SonarRequest request = new SonarRequest(); request.setHomeworkId(homeworkId); request.setPersonList(v); // 开始调用sonar分析代码 - Future submit = executorService.submit(new ReadExcelRunnable(request, this)); - list.add(submit); + executorService.execute(new ReadExcelRunnable(request, this)); }); - for (Future future : list) { - System.out.println(future.get()); - } } catch (Exception e) { e.printStackTrace(); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 0b02acd..07d38f3 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,7 +1,7 @@ -spring.datasource.url=jdbc:postgresql://127.0.0.1:5432/sonar7.7 -#spring.datasource.url=jdbc:postgresql://117.50.14.123:5432/sonar -spring.datasource.username=root -spring.datasource.password=root +#spring.datasource.url=jdbc:postgresql://127.0.0.1:5432/sonar7.7 +spring.datasource.url=jdbc:postgresql://117.50.14.123:5432/sonar +spring.datasource.username=sonar +spring.datasource.password=sonar spring.datasource.driver-class-name=org.postgresql.Driver diff --git a/src/main/resources/template1.xlsx b/src/main/resources/template1.xlsx index 85e6407bc11a1246cefbd732db2b4d836a15ed1b..6e80e04fd60022f9299b7bdb2d705d1726fa699b 100644 GIT binary patch delta 9076 zcmaKSWl&vB7A@{_ahHo<++BhOcZVRsgG+EYxcj}h1PvsF;K3nSg1eL8?(T$_Z|1$4 zn)&hi$2rxzSM}Mos;f_}z1M?IoI_0~JYWFTQ09V%gA+u6gTsS^gR^$E()4h3^W?H} z^|0aeb#_Wj9aZn;21T4Iw##k>ycG+@FjDe|yGFvtm#1~f=uo5IpjqT}SfOTyFrwj5 z9%ny$dpDWV=w$|mTvkmI6_ZJ$+gn;!=3+>=3hiSn2d)`kjM-OAz)@En4##U70!#_v zukF~IC&D!7lmeKXB5%NkQMDuin!oHOi%OdL)Xza5zIJEC`>eo?p&MBuhpJEuQ-^+% zAecml^piQ@e$9o`w%B_WibFk}u;JM2S`Jv*xA zLn`h8O}`68nf(gzbEe+rk|db%$*d^MB|p?2J{4^s`y2zYUj2&Qah1sDn3|b)^JRw` z^&rGpcp#HY#R47$4h|rIgCqURtFIH6kE@5Hr@f7hmnYZ1UOfNMTV<%`x+zE6NqF>* zA8(OswEG+dFnK~!2&yKDm*A>bCOe({_ z+c!l&>5)DdIknCXgN>6Qs|Yw17;EM^J6XID;-BeRnvxMLQlPZ{jC9rJX|;|5%(>W^ zEar+FVEiE8i&b=*%$O)(DZes`+OZ%xWGJ^(DV&-rVaMEF5a!^pVX>-XpKUSYEC^pm z#yXke#`f67&8*gYf=~*}RPpjzkheE(QkELrw^o=Ah_6Xny(>(o@Y{{?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poS6tY&`cxtNw}VfGOhqGA3_VhO0Lm4e3hr4T5G^Y1t4?Z6jvKhX6zH1+k+XUu zS0|kwS6DbYxGq=XN>tBDm=;`s6h0wiL&CwhOi4hltu(yFWeg&Y#gZa3>oc-oGaGOh z2|ZrK1Qx8z$)hxa(FQw1u(1v^tMItUj7fipOTr9c5foWBxiXExRJ+iPte%F)4JB;{@a6evflNcjU6rU!;B6iFaAuhL>rgT z1uO}nN_Q8NWGCX?!hg^qIFvXZ^8DCw^%D~1d-|!xzlAy@#g6ph6q>BfYv=()MO&o^ zE!pT1AivHE&pUSdL9r~FUZ*uLc=*D0vAXINNA~gy5)VfY|7C~$i0*4{Cie@(fMX=H z$F50asHy*UTyAy8Qp5m%u1m{&^Sd?g1sI#a?LBVrNRt~ag2K1oZykF3I}63LZ++$r zc>zDnIBL_NGt%wx`9GQNO)M>=@?WOQ`&Y&MhyVUVn(QpxZLGCD-R)i8{V#WNPF_*( z=OzAfs`eqW9Pvp2{oQD*s= zE2j@@#&>b;6y`T!KX+88tCf%>qe|&$&X#-3&p!`Ry&(94uWPd@28RSP_{u zDyXWvyOdBmt(BArhnSt~R8rAh&YGObCW9bhJowlEH9k=tDWyI%PK=#F_A}v64fE9B-C3 z-;|xx)vs66`l$sz(#N_&uvoQMyRg3?z-#rF^jJcKqOvA=YjNAtI}cnH%m`cI-vfbi z6Bh-)@kojy3?2-D!xGgnEfl9lx0KBNsqImSR?LMXvkbO zOk@pGj%vXHdFaX@K5xctQt3nif(qSQ#@IS10VBo2Fuo#9)Zn)^%=Mms_$ky8lb0KYPj39= zE4yzJKL!#k2xK|r58!@@T*ajfUpm^pyE6Q=0KN|q2L8f?GxG5R39#UA`IxExc@IAS_o;yQ5B6{S zm%m0@cs8FXk{NuSkDl`13ON7({uk>1V6kwbS1+jkzkc personList = ExcelUtil.readExcel("/Users/youyongsheng/Desktop/res.xls"); + + Map> collect = personList.stream().collect(Collectors.groupingBy(Person::getUid)); + + + int i=1; + for (File file1 : files) { + String uid = file1.getName(); + String projectName = String.format("%d-%s", homeworkId, uid); + + Metrics metrics = reportService.getMetrics(projectName); + + String templatePath = this.getClass().getClassLoader().getResource("template1.xlsx").getPath(); + String outPath = "/Users/youyongsheng/Desktop/20210101.xlsx"; + + System.out.println("第"+(i++)+"个学生," + uid); + if (CollectionUtils.isEmpty(collect.get(uid))) { + + System.out.println(uid+"为空"); + continue; + } + + reportService.writeToExcel(uid, + collect.get(uid).get(0).getName(), + metrics, + outPath, + outPath, + 1); + + + } + + System.out.println("---------end------------"); + } }