Bladeren bron

update

add_mode
DengBiao 1 jaar geleden
bovenliggende
commit
485cb5a08c
3 gewijzigde bestanden met toevoegingen van 50 en 44 verwijderingen
  1. +9
    -8
      app/admin/md/md_enterprise_manage.go
  2. +40
    -36
      app/admin/svc/enterprise_manage/svc_enterprise_manage.go
  3. +1
    -0
      app/db/model/central_kitchen_for_school_package_ord_for_reserve.go

+ 9
- 8
app/admin/md/md_enterprise_manage.go Bestand weergeven

@@ -21,14 +21,15 @@ type EnterpriseUserListByCentralKitchenForSchoolStruct struct {
IsTeacher int `json:"is_teacher" label:"是否教师"`
CreateAt string `json:"create_at" label:"创建时间"`
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 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"`
} `json:"user_identities" label:"身份列表"`
}



+ 40
- 36
app/admin/svc/enterprise_manage/svc_enterprise_manage.go Bestand weergeven

@@ -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)


+ 1
- 0
app/db/model/central_kitchen_for_school_package_ord_for_reserve.go Bestand weergeven

@@ -11,6 +11,7 @@ type CentralKitchenForSchoolPackageOrdForReserve struct {
ReserveMonth string `json:"reserve_month" xorm:"not null default '' comment('预定月份') CHAR(50)"`
MealTimeStart string `json:"meal_time_start" xorm:"not null default '0000-00-00' comment('就餐时间-开始') CHAR(50)"`
MealTimeEnd string `json:"meal_time_end" xorm:"not null default '0000-00-00' comment('就餐时间-截止') CHAR(50)"`
TotalPrice string `json:"total_price" xorm:"not null default 0.00 comment('总金额') DECIMAL(8,2)"`
CreateAt string `json:"create_at" xorm:"not null pk default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

Laden…
Annuleren
Opslaan