|
@@ -916,6 +916,19 @@ func SelfSupportForSchoolImportTeacher(c *gin.Context) { |
|
|
e.OutErr(c, e.ERR_NO_DATA, "未查询到对应记录") |
|
|
e.OutErr(c, e.ERR_NO_DATA, "未查询到对应记录") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
selfSupportForSchoolInfoDb := db.SelfSupportForSchoolInfoDb{} |
|
|
|
|
|
selfSupportForSchoolInfoDb.Set(enterpriseId) |
|
|
|
|
|
selfSupportForSchoolInfo, err1 := selfSupportForSchoolInfoDb.GetSelfSupportForSchoolInfo() |
|
|
|
|
|
if err1 != nil { |
|
|
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if selfSupportForSchoolInfo == nil { |
|
|
|
|
|
e.OutErr(c, e.ERR, "当前学校暂未完成《一脸通行入驻》") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
files, _ := c.FormFile("file") |
|
|
files, _ := c.FormFile("file") |
|
|
dst := "./static/upload/" + files.Filename |
|
|
dst := "./static/upload/" + files.Filename |
|
|
err = c.SaveUploadedFile(files, dst) |
|
|
err = c.SaveUploadedFile(files, dst) |
|
@@ -982,17 +995,6 @@ func SelfSupportForSchoolImportTeacher(c *gin.Context) { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if info == nil { |
|
|
if info == nil { |
|
|
selfSupportForSchoolInfoDb := db.SelfSupportForSchoolInfoDb{} |
|
|
|
|
|
selfSupportForSchoolInfoDb.Set(enterpriseId) |
|
|
|
|
|
selfSupportForSchoolInfo, err1 := selfSupportForSchoolInfoDb.GetSelfSupportForSchoolInfo() |
|
|
|
|
|
if err1 != nil { |
|
|
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if selfSupportForSchoolInfo == nil { |
|
|
|
|
|
e.OutErr(c, e.ERR, "当前学校暂未完成《一脸通行入驻》") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
info = &model.SelfSupportForUserFaceInfo{ |
|
|
info = &model.SelfSupportForUserFaceInfo{ |
|
|
EnterpriseId: enterpriseId, |
|
|
EnterpriseId: enterpriseId, |
|
|
UserIdentityId: insertAffected, |
|
|
UserIdentityId: insertAffected, |
|
@@ -1058,7 +1060,7 @@ func ImportV2(c *gin.Context) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func SelfSupportForSchoolDownloadTemplateExcel(c *gin.Context) { |
|
|
func SelfSupportForSchoolDownloadTemplateExcel(c *gin.Context) { |
|
|
e.OutSuc(c, "/template/自营学校(教师信息导入模板).xls", nil) |
|
|
|
|
|
|
|
|
e.OutSuc(c, "/template/自营学校(教师信息导入模板).xlsx", nil) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|