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