diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/ProjectService.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/ProjectService.java index 2a35f1e..48d1c54 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/ProjectService.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/ProjectService.java @@ -48,5 +48,5 @@ public interface ProjectService extends BaseService{ * @param emCodes 设备编号(逗号分隔) * @return Map key-emCode value-projectVO */ - Map getProjectAndContentByEmCodes(String emCodes); + List getProjectAndContentByEmCodes(String emCodes); } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java index ab8b620..18b78ca 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java @@ -133,15 +133,10 @@ public class ProjectServiceImpl extends BaseServiceImpl getProjectAndContentByEmCodes(String emCodes) { + public List getProjectAndContentByEmCodes(String emCodes) { Query query = new Query(); query.setCurrent(1); query.setSize(-1); - Map result = new HashMap<>(); - Stream.of(emCodes.split(",")).forEach(emCode -> { - ProjectVO project = this.getProjectAndContentByEmCode(emCode,new ContentDTO(),query); - result.put(emCode,project); - }); - return result; + return Stream.of(emCodes.split(",")).map(emCode -> this.getProjectAndContentByEmCode(emCode, new ContentDTO(), query)).collect(Collectors.toList()); } } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java index 5962c07..be62bfc 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java @@ -165,7 +165,7 @@ public class ProjectController { @GetMapping("/getProjectAndContentByEmCodes") @ApiOperation(value = "根据多个设备编号(逗号分隔)获取项目以及内容列表(分页展示)") @ApiOperationSupport(order = 8) - public R> getProjectAndContentByEmCodes(@RequestParam String emCodes) { + public R> getProjectAndContentByEmCodes(@RequestParam String emCodes) { return R.data(projectService.getProjectAndContentByEmCodes(emCodes)); } }