|
@@ -413,31 +413,42 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
|
|
if vv.Type == "middleman" {
|
|
if vv.Type == "middleman" {
|
|
tempId = fmt.Sprint(vv.Id)
|
|
tempId = fmt.Sprint(vv.Id)
|
|
}
|
|
}
|
|
- myChildIds := ""
|
|
|
|
|
|
+ myChildIds, myChildTypes := "", ""
|
|
if in.Id == "" && v.Name == "甲方" {
|
|
if in.Id == "" && v.Name == "甲方" {
|
|
for _, vvv := range firstpartyChild[vv.CompanyId] {
|
|
for _, vvv := range firstpartyChild[vv.CompanyId] {
|
|
if id != "" {
|
|
if id != "" {
|
|
id += ","
|
|
id += ","
|
|
}
|
|
}
|
|
id += vvv.CompanyId
|
|
id += vvv.CompanyId
|
|
|
|
+ if pType != "" {
|
|
|
|
+ pType += ","
|
|
|
|
+ }
|
|
|
|
+ pType += vv.Type
|
|
if myChildIds != "" {
|
|
if myChildIds != "" {
|
|
myChildIds += ","
|
|
myChildIds += ","
|
|
}
|
|
}
|
|
myChildIds += vvv.CompanyId
|
|
myChildIds += vvv.CompanyId
|
|
|
|
+ if myChildTypes != "" {
|
|
|
|
+ myChildTypes += ","
|
|
|
|
+ }
|
|
|
|
+ myChildTypes += vv.Type
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if id != "" {
|
|
if id != "" {
|
|
id += ","
|
|
id += ","
|
|
}
|
|
}
|
|
id += tempId
|
|
id += tempId
|
|
|
|
+ if pType != "" {
|
|
|
|
+ pType += ","
|
|
|
|
+ }
|
|
|
|
+ pType += vv.Type
|
|
}
|
|
}
|
|
- if pType != "" {
|
|
|
|
- pType += ","
|
|
|
|
- }
|
|
|
|
- pType += vv.Type
|
|
|
|
if myChildIds == "" {
|
|
if myChildIds == "" {
|
|
myChildIds = tempId
|
|
myChildIds = tempId
|
|
}
|
|
}
|
|
|
|
+ if myChildTypes == "" {
|
|
|
|
+ myChildTypes = vv.Type
|
|
|
|
+ }
|
|
cm := map[string]interface{}{
|
|
cm := map[string]interface{}{
|
|
"NAME": vv.CompanyName,
|
|
"NAME": vv.CompanyName,
|
|
"ID": myChildIds,
|
|
"ID": myChildIds,
|
|
@@ -448,7 +459,7 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
|
|
"DATACOUNT": vv.Count,
|
|
"DATACOUNT": vv.Count,
|
|
"SZ_LEVEL": 1,
|
|
"SZ_LEVEL": 1,
|
|
"SZ_LEAF": 1,
|
|
"SZ_LEAF": 1,
|
|
- "TYPE": vv.Type,
|
|
|
|
|
|
+ "TYPE": myChildTypes,
|
|
"MYID": tempId,
|
|
"MYID": tempId,
|
|
}
|
|
}
|
|
convList = append(convList, cm)
|
|
convList = append(convList, cm)
|