@@ -68,6 +68,10 @@ func (this *ReportOpenController) ClassifyTree() {
adminObj := new(models.Admin)
admin, e := adminObj.GetAdminByOutId(outId)
if e != nil {
+ if utils.IsErrNoRow(e) {
+ br.Msg = "工号不存在"
+ return
+ }
br.Msg = "获取失败"
br.ErrMsg = fmt.Sprintf("获取管理员信息失败,%v", e)
return
@@ -22,6 +22,7 @@ func GetReportClassifyTreeRecursive(list []*models.Classify, parentId int) []*mo
t.Sort = v.Sort
t.Level = v.Level
t.ClassifyType = v.ClassifyType
+ t.HasChild = v.HasChild
t.Children = GetReportClassifyTreeRecursive(list, v.Id)
res = append(res, t)
}