Browse Source

update

add_mode
DengBiao 1 year ago
parent
commit
dc68f5ea48
1 changed files with 14 additions and 2 deletions
  1. +14
    -2
      app/admin/hdl/hdl_enterprise.go

+ 14
- 2
app/admin/hdl/hdl_enterprise.go View File

@@ -120,9 +120,21 @@ func SchoolBelowGrade(c *gin.Context) {

func PeriodBelowGrade(c *gin.Context) {
periodId := c.DefaultQuery("period_id", "")
periodDb := db.PeriodDb{}
periodDb.Set(0)
period, err1 := periodDb.GetPeriod(utils.StrToInt(periodId))
if err1 != nil {
e.OutErr(c, e.ERR_DB_ORM, err1.Error())
return
}
if period == nil {
e.OutErr(c, e.ERR_NO_DATA, "未查询到相关学段信息")
return
}

gradeDb := db.GradeDb{}
gradeDb.Set(0)
gradeList, err := gradeDb.FindGradeByPeriodId(utils.StrToInt(periodId))
gradeDb.Set(period.EnterpriseId)
gradeList, err := gradeDb.FindGradeByPeriodId(period.Id)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return


Loading…
Cancel
Save