master
huanghai 5 years ago
parent 4d320ab526
commit cf90b32f42

@ -26,6 +26,7 @@ import (
"github.com/xormplus/builder"
"regexp"
"strconv"
"strings"
"time"
)
@ -193,7 +194,7 @@ func ExportStudentInfoExcel(targetPath string, bureauId string, ExportExcelStatu
for k := 2 + ExcelUtil.HiddenRows; k <= 5000+ExcelUtil.HiddenRows; k++ {
//设置单元格格式
cName:="B"+CommonUtil.ConvertIntToString(k)
cName := "B" + CommonUtil.ConvertIntToString(k)
f.SetCellStyle(SheetName, cName, cName, tableStyleIntStyle)
//入学年份
@ -204,7 +205,7 @@ func ExportStudentInfoExcel(targetPath string, bureauId string, ExportExcelStatu
_ = f.AddDataValidation(SheetName, dvRange)
//设置单元格格式
cName="C"+CommonUtil.ConvertIntToString(k)
cName = "C" + CommonUtil.ConvertIntToString(k)
f.SetCellStyle(SheetName, cName, cName, tableStyleIntStyle)
//班号
@ -525,36 +526,42 @@ func checkExcel(excelPath string, s1 ExcelUtil.TemplateStruct, MapClass map[stri
}
//(10)独生子女
if j == 10 {
row[j] = strings.Replace(row[j], " ", "", -1)
if _, ok := SysDictKit.MapTrueOrFalseNameToValue[row[j]]; !ok {
pass = false
}
}
//(11)随迁子女
if j == 11 {
row[j] = strings.Replace(row[j], " ", "", -1)
if _, ok := SysDictKit.MapTrueOrFalseNameToValue[row[j]]; !ok {
pass = false
}
}
//(12)务工子女
if j == 12 {
row[j] = strings.Replace(row[j], " ", "", -1)
if _, ok := SysDictKit.MapTrueOrFalseNameToValue[row[j]]; !ok {
pass = false
}
}
//(13)孤儿
if j == 13 {
row[j] = strings.Replace(row[j], " ", "", -1)
if _, ok := SysDictKit.MapTrueOrFalseNameToValue[row[j]]; !ok {
pass = false
}
}
//(14)留守儿童
if j == 14 {
row[j] = strings.Replace(row[j], " ", "", -1)
if _, ok := SysDictKit.MapTrueOrFalseNameToValue[row[j]]; !ok {
pass = false
}
}
//(15)残疾儿童
if j == 15 {
row[j] = strings.Replace(row[j], " ", "", -1)
if _, ok := SysDictKit.MapTrueOrFalseNameToValue[row[j]]; !ok {
pass = false
}

Loading…
Cancel
Save