From 32f57d531674006845a51e3a33d29940244cceb7 Mon Sep 17 00:00:00 2001 From: huanghai <10402852@qq.com> Date: Wed, 30 Sep 2020 17:16:48 +0800 Subject: [PATCH] 'commit' --- .../BaseStudent/BaseStudentDao/BaseStudentDao.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go b/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go index f0346513..ab935bd4 100644 --- a/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go +++ b/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go @@ -496,6 +496,13 @@ func checkExcel(excelPath string, s1 ExcelUtil.TemplateStruct, MapClass map[stri if !DateUtil.CheckDateStr(row[j]) { pass = false } + //是合法日期 + //尝试转一下整数 + s := row[j] + _, err := strconv.Atoi(s) + if err == nil { //如果可以转为整数,那么可能是距离1900-01-01的天数 + row[j] = DateUtil.ConvertToFormatDay(row[j]) //转为合法日期格式 + } } //(6)民族