|
@@ -1,10 +1,15 @@
|
|
|
package cn.com.qmth.examcloud.task.api.controller;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+import java.util.stream.Stream;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import cn.com.qmth.examcloud.api.commons.exchange.PageInfo;
|
|
@@ -55,5 +60,12 @@ public class ReportsComputeController extends ControllerSupport {
|
|
|
User user=getAccessUser();
|
|
|
return reportsComputeService.queryPage(projectId, pageNo, pageSize,user.getRootOrgId());
|
|
|
}
|
|
|
-
|
|
|
+ @ApiOperation(value="批量获取")
|
|
|
+ @GetMapping("/getList")
|
|
|
+ public List<ReportsComputeBean> getList(@RequestParam(required = true) String ids) {
|
|
|
+ List<Long> pids = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ User user = getAccessUser();
|
|
|
+ return reportsComputeService.getList(pids, user.getRootOrgId());
|
|
|
+ }
|
|
|
}
|