|
|
@@ -68,15 +68,16 @@ func EnterpriseUserListByCentralKitchenForSchool(req md.EnterpriseUserListReq) ( |
|
|
|
//TODO::判断是否为老师 |
|
|
|
if v1.Identity == enum2.UserIdentityForCentralKitchenForTeacher { |
|
|
|
temp.UserIdentities = append(temp.UserIdentities, struct { |
|
|
|
Id int `json:"id" label:"身份id"` |
|
|
|
IdNo string `json:"id_no" label:"身份证号"` |
|
|
|
SchoolName string `json:"school_name" label:"学校名"` |
|
|
|
Name string `json:"name" label:"姓名"` |
|
|
|
Grade string `json:"grade" label:"年级"` |
|
|
|
GradeId int `json:"grade_id" label:"年级id"` |
|
|
|
Class string `json:"class" label:"班级"` |
|
|
|
ClassId int `json:"class_id" label:"班级id"` |
|
|
|
}{Id: v1.Id, IdNo: v1.IdNo, SchoolName: "教师", Name: v1.Name, Grade: "教师", Class: "教师", GradeId: 0, ClassId: 0}) |
|
|
|
Id int `json:"id" label:"身份id"` |
|
|
|
EnterpriseId int `json:"enterprise_id" label:"企业id"` |
|
|
|
IdNo string `json:"id_no" label:"身份证号"` |
|
|
|
SchoolName string `json:"school_name" label:"学校名"` |
|
|
|
Name string `json:"name" label:"姓名"` |
|
|
|
Grade string `json:"grade" label:"年级"` |
|
|
|
GradeId int `json:"grade_id" label:"年级id"` |
|
|
|
Class string `json:"class" label:"班级"` |
|
|
|
ClassId int `json:"class_id" label:"班级id"` |
|
|
|
}{Id: v1.Id, EnterpriseId: v1.EnterpriseId, IdNo: v1.IdNo, SchoolName: "教师", Name: v1.Name, Grade: "教师", Class: "教师", GradeId: 0, ClassId: 0}) |
|
|
|
temp.IsTeacher = 1 |
|
|
|
} else { |
|
|
|
data, err2 := classWithUserDb.GetInfoByUserIdentityId(v1.Id) |
|
|
@@ -87,15 +88,16 @@ func EnterpriseUserListByCentralKitchenForSchool(req md.EnterpriseUserListReq) ( |
|
|
|
continue |
|
|
|
} |
|
|
|
temp.UserIdentities = append(temp.UserIdentities, struct { |
|
|
|
Id int `json:"id" label:"身份id"` |
|
|
|
IdNo string `json:"id_no" label:"身份证号"` |
|
|
|
SchoolName string `json:"school_name" label:"学校名"` |
|
|
|
Name string `json:"name" label:"姓名"` |
|
|
|
Grade string `json:"grade" label:"年级"` |
|
|
|
GradeId int `json:"grade_id" label:"年级id"` |
|
|
|
Class string `json:"class" label:"班级"` |
|
|
|
ClassId int `json:"class_id" label:"班级id"` |
|
|
|
}{Id: v1.Id, IdNo: data.UserIdentity.IdNo, SchoolName: data.Enterprise.Name, Name: data.UserIdentity.Name, Grade: data.Grade.Name, Class: data.Class.Name, GradeId: data.Grade.Id, ClassId: data.Class.Id}) |
|
|
|
Id int `json:"id" label:"身份id"` |
|
|
|
EnterpriseId int `json:"enterprise_id" label:"企业id"` |
|
|
|
IdNo string `json:"id_no" label:"身份证号"` |
|
|
|
SchoolName string `json:"school_name" label:"学校名"` |
|
|
|
Name string `json:"name" label:"姓名"` |
|
|
|
Grade string `json:"grade" label:"年级"` |
|
|
|
GradeId int `json:"grade_id" label:"年级id"` |
|
|
|
Class string `json:"class" label:"班级"` |
|
|
|
ClassId int `json:"class_id" label:"班级id"` |
|
|
|
}{Id: v1.Id, EnterpriseId: v1.EnterpriseId, IdNo: data.UserIdentity.IdNo, SchoolName: data.Enterprise.Name, Name: data.UserIdentity.Name, Grade: data.Grade.Name, Class: data.Class.Name, GradeId: data.Grade.Id, ClassId: data.Class.Id}) |
|
|
|
} |
|
|
|
} |
|
|
|
resp.List = append(resp.List, temp) |
|
|
@@ -212,28 +214,30 @@ func EnterpriseUserListByCentralKitchenForSchoolV2(req md.EnterpriseUserListReq) |
|
|
|
//TODO::判断是否为老师 |
|
|
|
if v1.Identity == enum2.UserIdentityForCentralKitchenForTeacher { |
|
|
|
temp.UserIdentities = append(temp.UserIdentities, struct { |
|
|
|
Id int `json:"id" label:"身份id"` |
|
|
|
IdNo string `json:"id_no" label:"身份证号"` |
|
|
|
SchoolName string `json:"school_name" label:"学校名"` |
|
|
|
Name string `json:"name" label:"姓名"` |
|
|
|
Grade string `json:"grade" label:"年级"` |
|
|
|
GradeId int `json:"grade_id" label:"年级id"` |
|
|
|
Class string `json:"class" label:"班级"` |
|
|
|
ClassId int `json:"class_id" label:"班级id"` |
|
|
|
}{Id: v1.UserIdentity.Id, IdNo: v1.IdNo, SchoolName: "教师", Name: v1.UserIdentity.Name, Grade: "教师", Class: "教师", GradeId: 0, ClassId: 0}) |
|
|
|
Id int `json:"id" label:"身份id"` |
|
|
|
EnterpriseId int `json:"enterprise_id" label:"企业id"` |
|
|
|
IdNo string `json:"id_no" label:"身份证号"` |
|
|
|
SchoolName string `json:"school_name" label:"学校名"` |
|
|
|
Name string `json:"name" label:"姓名"` |
|
|
|
Grade string `json:"grade" label:"年级"` |
|
|
|
GradeId int `json:"grade_id" label:"年级id"` |
|
|
|
Class string `json:"class" label:"班级"` |
|
|
|
ClassId int `json:"class_id" label:"班级id"` |
|
|
|
}{Id: v1.UserIdentity.Id, EnterpriseId: v1.UserIdentity.EnterpriseId, IdNo: v1.IdNo, SchoolName: "教师", Name: v1.UserIdentity.Name, Grade: "教师", Class: "教师", GradeId: 0, ClassId: 0}) |
|
|
|
temp.IsTeacher = 1 |
|
|
|
} |
|
|
|
if v1.Identity == enum2.UserIdentityForCentralKitchenForStudent { |
|
|
|
temp.UserIdentities = append(temp.UserIdentities, struct { |
|
|
|
Id int `json:"id" label:"身份id"` |
|
|
|
IdNo string `json:"id_no" label:"身份证号"` |
|
|
|
SchoolName string `json:"school_name" label:"学校名"` |
|
|
|
Name string `json:"name" label:"姓名"` |
|
|
|
Grade string `json:"grade" label:"年级"` |
|
|
|
GradeId int `json:"grade_id" label:"年级id"` |
|
|
|
Class string `json:"class" label:"班级"` |
|
|
|
ClassId int `json:"class_id" label:"班级id"` |
|
|
|
}{Id: v1.UserIdentity.Id, IdNo: v1.UserIdentity.IdNo, SchoolName: v1.Enterprise.Name, Name: v1.UserIdentity.Name, Grade: v1.Grade.Name, Class: v1.Class.Name, GradeId: v1.Grade.Id, ClassId: v1.Class.Id}) |
|
|
|
Id int `json:"id" label:"身份id"` |
|
|
|
EnterpriseId int `json:"enterprise_id" label:"企业id"` |
|
|
|
IdNo string `json:"id_no" label:"身份证号"` |
|
|
|
SchoolName string `json:"school_name" label:"学校名"` |
|
|
|
Name string `json:"name" label:"姓名"` |
|
|
|
Grade string `json:"grade" label:"年级"` |
|
|
|
GradeId int `json:"grade_id" label:"年级id"` |
|
|
|
Class string `json:"class" label:"班级"` |
|
|
|
ClassId int `json:"class_id" label:"班级id"` |
|
|
|
}{Id: v1.UserIdentity.Id, EnterpriseId: v1.UserIdentity.EnterpriseId, IdNo: v1.UserIdentity.IdNo, SchoolName: v1.Enterprise.Name, Name: v1.UserIdentity.Name, Grade: v1.Grade.Name, Class: v1.Class.Name, GradeId: v1.Grade.Id, ClassId: v1.Class.Id}) |
|
|
|
} |
|
|
|
} |
|
|
|
resp.List = append(resp.List, temp) |
|
|
|