对树构造函数添加类型转换
This commit is contained in:
parent
d4123947bf
commit
76d497aebf
|
|
@ -20,7 +20,7 @@ public class TreeSelect implements Serializable
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 节点ID */
|
/** 节点ID */
|
||||||
private String id;
|
private Integer id;
|
||||||
|
|
||||||
/** 节点名称 */
|
/** 节点名称 */
|
||||||
private String label;
|
private String label;
|
||||||
|
|
@ -32,7 +32,7 @@ public class TreeSelect implements Serializable
|
||||||
*/
|
*/
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
private String parentId;
|
private Integer parentId;
|
||||||
|
|
||||||
private String companyId;
|
private String companyId;
|
||||||
|
|
||||||
|
|
@ -43,17 +43,17 @@ public class TreeSelect implements Serializable
|
||||||
private List<SysUser> userList;
|
private List<SysUser> userList;
|
||||||
|
|
||||||
public TreeSelect(SysDeptTree dept) {
|
public TreeSelect(SysDeptTree dept) {
|
||||||
this.id = dept.getDeptId();
|
this.id = Integer.valueOf(dept.getDeptId());
|
||||||
this.parentId = dept.getParentId();
|
this.parentId = Integer.valueOf(dept.getParentId());
|
||||||
this.label = dept.getDeptName();
|
this.label = dept.getDeptName();
|
||||||
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public TreeSelect(MaType maType) {
|
public TreeSelect(MaType maType) {
|
||||||
this.parentId = maType.getParentId();
|
this.parentId = Integer.valueOf(maType.getParentId());
|
||||||
this.code = maType.getCode();
|
this.code = maType.getCode();
|
||||||
this.level = Integer.valueOf(maType.getLevel());
|
this.level = Integer.valueOf(maType.getLevel());
|
||||||
this.id = maType.getId();
|
this.id = Integer.valueOf(maType.getId());
|
||||||
this.label = maType.getName();
|
this.label = maType.getName();
|
||||||
this.companyId = maType.getCompanyId();
|
this.companyId = maType.getCompanyId();
|
||||||
this.children = maType.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
this.children = maType.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue