From a8df3b604994633d2bd879669aafe0330956d2f2 Mon Sep 17 00:00:00 2001 From: huanghai <10402852@qq.com> Date: Wed, 30 Sep 2020 16:40:25 +0800 Subject: [PATCH] 'commit' --- .../BaseStudent/BaseStudentDao/BaseStudentDao.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go b/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go index 6d42ad9a..f0346513 100644 --- a/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go +++ b/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go @@ -419,7 +419,7 @@ func checkExcel(excelPath string, s1 ExcelUtil.TemplateStruct, MapClass map[stri CurrentYear := time.Now().Year() RedStyle, _ := f.GetCellStyle(s1.Title, Const.RedCell) WhiteStyle, _ := f.GetCellStyle(s1.Title, Const.WhiteCell) - + for i, row := range rows { //放过表头 if i < ExcelUtil.HiddenRows+1 { @@ -573,12 +573,18 @@ func checkExcel(excelPath string, s1 ExcelUtil.TemplateStruct, MapClass map[stri //标红 cName, _ := excelize.ColumnNumberToName(j + 1) cell := cName + CommonUtil.ConvertIntToString(i+1) + + nowStyle, _ := f.GetCellStyle(s1.Title, cell) if !pass { //红色 - _ = f.SetCellStyle(s1.Title, cell, cell, RedStyle) + if nowStyle != RedStyle { + _ = f.SetCellStyle(s1.Title, cell, cell, RedStyle) + } firstSuccess = false } else { - _ = f.SetCellStyle(s1.Title, cell, cell, WhiteStyle) + if nowStyle != WhiteStyle { + _ = f.SetCellStyle(s1.Title, cell, cell, WhiteStyle) + } } } }