diff --git a/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/NdKqZzsfwMenuController.java b/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/NdKqZzsfwMenuController.java index 60916aa..afd3b87 100644 --- a/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/NdKqZzsfwMenuController.java +++ b/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/NdKqZzsfwMenuController.java @@ -63,6 +63,11 @@ public class NdKqZzsfwMenuController { return matterManage.matterList(zoneName,windowName,department,type); } + @GetMapping("/matter/{id}") + public MattersVO matter(@PathVariable Long id) { + return matterManage.matter(id); + } + @GetMapping("/top10") public List topTen() { return matterManage.topTen(); diff --git a/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/entity/vo/MattersVO.java b/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/entity/vo/MattersVO.java index a634f82..30a965e 100644 --- a/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/entity/vo/MattersVO.java +++ b/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/entity/vo/MattersVO.java @@ -20,6 +20,9 @@ public class MattersVO implements Serializable { private static final long serialVersionUID = 1L; + @ApiModelProperty("id主键") + private Long id; + @ApiModelProperty("id") private String rowguid; diff --git a/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/MatterManage.java b/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/MatterManage.java index 57c2e05..77a3e1b 100644 --- a/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/MatterManage.java +++ b/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/MatterManage.java @@ -163,11 +163,23 @@ public class MatterManage { .map(m -> { MattersVO mattersVO = BeanUtil.copyProperties(m, MattersVO.class); mattersVO.setMatterName(m.getItemName()); + mattersVO.setId(m.getId()); return mattersVO; }) .collect(Collectors.toList()); } + public MattersVO matter(Long id) { + NdKqZzsfwMenu matter = menuService.getById(id); + if(Objects.isNull(matter)){ + return null; + } + MattersVO mattersVO = BeanUtil.copyProperties(matter, MattersVO.class); + mattersVO.setMatterName(matter.getItemName()); + mattersVO.setId(matter.getId()); + return mattersVO; + } + private List generateWindows(NdKqZzsfwMenu menu, List matters) { Set windowSet = new HashSet<>(); return matters.stream().filter(m -> StringUtils.isNotBlank(m.getZoneName()) && m.getZoneName().equals(menu.getZoneName())