|
|
|
@ -266,7 +266,7 @@ func ExportStudentInfoExcel(targetPath string, bureauId string, ExportExcelStatu
|
|
|
|
|
func ImportStudentInfoExcel(excelPath string, bureauId string,actionPersonId string,actionIp string) (bool, string, error) {
|
|
|
|
|
//判断文件是不是存在
|
|
|
|
|
if !FileUtil.PathExists(excelPath) {
|
|
|
|
|
return false, "文件没有找到", nil
|
|
|
|
|
return false, "03", nil //03:文件没有找到
|
|
|
|
|
}
|
|
|
|
|
//模板是不是系统提供的
|
|
|
|
|
var templateSuccess = true
|
|
|
|
@ -295,7 +295,7 @@ func ImportStudentInfoExcel(excelPath string, bureauId string,actionPersonId str
|
|
|
|
|
//1、对模板的合法性进行检查
|
|
|
|
|
templateSuccess = ExcelUtil.IsValidTemplate(excelPath, s1)
|
|
|
|
|
if !templateSuccess {
|
|
|
|
|
return false, "不是系统提供的模板,无法完成导入!", nil
|
|
|
|
|
return false, "01", nil //01:不是系统提供的模板,无法完成导入!
|
|
|
|
|
}
|
|
|
|
|
//2、对excel的合法性进行检查
|
|
|
|
|
excelSuccess = checkExcel(excelPath, s1, MapClass, MapStage)
|
|
|
|
@ -310,7 +310,7 @@ func ImportStudentInfoExcel(excelPath string, bureauId string,actionPersonId str
|
|
|
|
|
|
|
|
|
|
//两个有一个不成功,则提示
|
|
|
|
|
if !excelSuccess || !mysqlSuccess {
|
|
|
|
|
return false, "在excel检测中,发现问题,请检查后重新上传!", nil
|
|
|
|
|
return false, "02", nil //02:在excel检测中,发现问题,请检查后重新上传!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//4、获取所有单位的一些属性,用于一会维护人员信息时使用
|
|
|
|
|