修改
This commit is contained in:
parent
7e4e183993
commit
9fecec238a
@ -68,7 +68,7 @@ public class AgencyController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:agency:add')")
|
@PreAuthorize("@ss.hasPermi('system:agency:add')")
|
||||||
@Log(title = "机构信息", businessType = BusinessType.INSERT)
|
@Log(title = "机构信息", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/add")
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody Agency agency) {
|
public AjaxResult add(@RequestBody Agency agency) {
|
||||||
return toAjax(agencyService.insertAgency(agency));
|
return toAjax(agencyService.insertAgency(agency));
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ public class AgencyController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:agency:edit')")
|
@PreAuthorize("@ss.hasPermi('system:agency:edit')")
|
||||||
@Log(title = "机构信息", businessType = BusinessType.UPDATE)
|
@Log(title = "机构信息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/edit")
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody Agency agency) {
|
public AjaxResult edit(@RequestBody Agency agency) {
|
||||||
return toAjax(agencyService.updateAgency(agency));
|
return toAjax(agencyService.updateAgency(agency));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -114,6 +114,9 @@ public class AgencyCategoryServiceImpl implements IAgencyCategoryService {
|
|||||||
@Override
|
@Override
|
||||||
public List<AgencyCategoryTreeVO> agencyCategoryList() {
|
public List<AgencyCategoryTreeVO> agencyCategoryList() {
|
||||||
List<AgencyCategoryVO> agencyCategoryList = agencyCategoryMapper.selectAgencyCategoryVOList(null);
|
List<AgencyCategoryVO> agencyCategoryList = agencyCategoryMapper.selectAgencyCategoryVOList(null);
|
||||||
|
for (AgencyCategoryVO agencyCategory : agencyCategoryList) {
|
||||||
|
agencyCategory.setValue(agencyCategory.getId());
|
||||||
|
}
|
||||||
List<AgencyCategoryVO> agencyTree = buildDeptTree(agencyCategoryList);
|
List<AgencyCategoryVO> agencyTree = buildDeptTree(agencyCategoryList);
|
||||||
return agencyTree.stream().map(AgencyCategoryTreeVO::new).collect(Collectors.toList());
|
return agencyTree.stream().map(AgencyCategoryTreeVO::new).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@ public class AgencyCategoryTreeVO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String label;
|
private String label;
|
||||||
|
|
||||||
private String value;
|
private Long value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 子节点
|
* 子节点
|
||||||
@ -51,11 +51,11 @@ public class AgencyCategoryTreeVO implements Serializable {
|
|||||||
this.label = label;
|
this.label = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getValue() {
|
public Long getValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValue(String value) {
|
public void setValue(Long value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
public class AgencyCategoryVO extends AgencyCategory {
|
public class AgencyCategoryVO extends AgencyCategory {
|
||||||
|
|
||||||
private String value;
|
private Long value;
|
||||||
|
|
||||||
private List<AgencyCategoryVO> children = new ArrayList<AgencyCategoryVO>();
|
private List<AgencyCategoryVO> children = new ArrayList<AgencyCategoryVO>();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user