Commit 4cdefc23 authored by 李腾威's avatar 李腾威

机构修改

parent d5f76f9c
......@@ -29,10 +29,10 @@ public interface CommonConstant {
/**
* 未被删除
*/
public final static String IS_DELETE_00 = "0";
public final static boolean IS_DELETE_00 = false;
/**
* 已被删除
*/
public final static String IS_DELETE_01 = "1";
public final static boolean IS_DELETE_01 = true;
}
......@@ -18,16 +18,16 @@ public class OrgMenuVo {
public Long key;
public String title;
public Long parentId;
public boolean isLeaf;
public boolean leaf = true;
public List<OrgMenuVo> children;
public String bizOrgType;
public OrgMenuVo(Long key, String title, Long parentId, String bizOrgType, boolean isLeaf) {
public OrgMenuVo(Long key, String title, Long parentId, String bizOrgType, boolean leaf) {
super();
this.key = key;
this.title = title;
this.parentId = parentId;
this.bizOrgType = bizOrgType;
this.isLeaf = isLeaf;
this.leaf = leaf;
}
public OrgMenuVo(Long key, String title, Long parentId, String bizOrgType) {
......@@ -37,4 +37,5 @@ public class OrgMenuVo {
this.children = children;
this.bizOrgType = bizOrgType;
}
}
......@@ -39,23 +39,6 @@ public class OrgUsrFormVo {
@ApiModelProperty(value = "单位人员信息值")
private List<OrgPersonFormVo> children;
public OrgUsrFormVo(String currentUnit, String parentId, Integer personNum, List<FormValue> dynamicFormAlert, List<OrgPersonFormVo> children) {
this.currentUnit = currentUnit;
this.parentId = parentId;
this.personNum = personNum;
this.dynamicFormAlert = dynamicFormAlert;
this.children = children;
}
public OrgUsrFormVo(Long id, String currentUnit, String parentId, Integer personNum, List<FormValue> dynamicFormAlert, List<OrgPersonFormVo> children) {
this.id = id;
this.currentUnit = currentUnit;
this.parentId = parentId;
this.personNum = personNum;
this.dynamicFormAlert = dynamicFormAlert;
this.children = children;
}
public OrgUsrFormVo() {
}
}
......@@ -50,15 +50,4 @@ public class OrgUsrVo {
@ApiModelProperty(value = "单位动态表单值")
private List<AlertFormValue> alertFormValue;
public OrgUsrVo(String bizOrgName, String bizOrgCode, String amosOrgId, String amosOrgCode, String bizOrgType, String buildName, String buildId, String parentId, List<AlertFormValue> alertFormValue) {
this.bizOrgName = bizOrgName;
this.bizOrgCode = bizOrgCode;
this.amosOrgId = amosOrgId;
this.amosOrgCode = amosOrgCode;
this.bizOrgType = bizOrgType;
this.buildName = buildName;
this.buildId = buildId;
this.parentId = parentId;
this.alertFormValue = alertFormValue;
}
}
......@@ -78,8 +78,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe
//获取每个顶层元素的子数据集合
for (OrgMenuVo entity : resultList) {
entity.setChildren(getSub(entity.getKey(), entityList, packageURL, IDMethodName, IDHierarchy, NAMEMethodName, PARENTIDMethodName, OrgTypeMethodName));
entity.setLeaf(false);
}
return resultList;
}
......@@ -89,7 +89,6 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe
List<OrgMenuVo> childList=new ArrayList<>();
@SuppressWarnings("rawtypes")
Class clazz= Class.forName(packageURL);
Method IDMethodNameme = null;
switch (IDHierarchy) {
case 1:
......@@ -118,12 +117,12 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe
if (parentId == null) {
if (topId == parentId) {
OrgMenuVo menu = new OrgMenuVo(Long.valueOf(String.valueOf(IDMethodNameme.invoke(entity))), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId, String.valueOf(OrgTypeMethodNameme.invoke(entity)), false);
OrgMenuVo menu = new OrgMenuVo(Long.valueOf(String.valueOf(IDMethodNameme.invoke(entity))), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId, String.valueOf(OrgTypeMethodNameme.invoke(entity)));
childList.add(menu);
}
} else {
if (topId.longValue() == parentId.longValue()) {
OrgMenuVo menu = new OrgMenuVo(Long.valueOf(String.valueOf(IDMethodNameme.invoke(entity))), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId, String.valueOf(OrgTypeMethodNameme.invoke(entity)), true);
OrgMenuVo menu = new OrgMenuVo(Long.valueOf(String.valueOf(IDMethodNameme.invoke(entity))), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId, String.valueOf(OrgTypeMethodNameme.invoke(entity)));
childList.add(menu);
}
}
......@@ -133,6 +132,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe
//子集的间接子对象
for (OrgMenuVo entity : childList) {
entity.setChildren(getSub(entity.getKey(), entityList, packageURL, IDMethodName, IDHierarchy, NAMEMethodName, PARENTIDMethodName, OrgTypeMethodName));
}
//递归退出条件
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment