Browse Source

查询详情

master
PoffyZhang 8 months ago
parent
commit
cb180c5fba
3 changed files with 20 additions and 0 deletions
  1. +5
    -0
      kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/NdKqZzsfwMenuController.java
  2. +3
    -0
      kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/entity/vo/MattersVO.java
  3. +12
    -0
      kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/MatterManage.java

+ 5
- 0
kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/NdKqZzsfwMenuController.java View File

@@ -63,6 +63,11 @@ public class NdKqZzsfwMenuController {
return matterManage.matterList(zoneName,windowName,department,type); return matterManage.matterList(zoneName,windowName,department,type);
} }


@GetMapping("/matter/{id}")
public MattersVO matter(@PathVariable Long id) {
return matterManage.matter(id);
}

@GetMapping("/top10") @GetMapping("/top10")
public List<MatterTopVO> topTen() { public List<MatterTopVO> topTen() {
return matterManage.topTen(); return matterManage.topTen();


+ 3
- 0
kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/entity/vo/MattersVO.java View File

@@ -20,6 +20,9 @@ public class MattersVO implements Serializable {


private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;


@ApiModelProperty("id主键")
private Long id;

@ApiModelProperty("id") @ApiModelProperty("id")
private String rowguid; private String rowguid;




+ 12
- 0
kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/MatterManage.java View File

@@ -163,11 +163,23 @@ public class MatterManage {
.map(m -> { .map(m -> {
MattersVO mattersVO = BeanUtil.copyProperties(m, MattersVO.class); MattersVO mattersVO = BeanUtil.copyProperties(m, MattersVO.class);
mattersVO.setMatterName(m.getItemName()); mattersVO.setMatterName(m.getItemName());
mattersVO.setId(m.getId());
return mattersVO; return mattersVO;
}) })
.collect(Collectors.toList()); .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<TreeVO> generateWindows(NdKqZzsfwMenu menu, List<NdKqZzsfwMenu> matters) { private List<TreeVO> generateWindows(NdKqZzsfwMenu menu, List<NdKqZzsfwMenu> matters) {
Set<String> windowSet = new HashSet<>(); Set<String> windowSet = new HashSet<>();
return matters.stream().filter(m -> StringUtils.isNotBlank(m.getZoneName()) && m.getZoneName().equals(menu.getZoneName()) return matters.stream().filter(m -> StringUtils.isNotBlank(m.getZoneName()) && m.getZoneName().equals(menu.getZoneName())


Loading…
Cancel
Save