|
@@ -28,26 +28,11 @@ func ImportXLSX(filename string) []*PlanXLSX {
|
|
|
plan.GroupNumber = strings.Split(splited[len(splited)-1], "-")[0]
|
|
|
|
|
|
sheet.ForEachRow(func(row *Row) error {
|
|
|
- if i < 20 {
|
|
|
- continue
|
|
|
- }
|
|
|
- if len(row.Cells) < 20 {
|
|
|
- continue
|
|
|
- }
|
|
|
- if row.Cells[2].String() == "" || row.Cells[2].String() == "ИТОГО" {
|
|
|
- continue
|
|
|
- }
|
|
|
-
|
|
|
- if strings.HasPrefix(row.Cells[1].String(), "Консультации") || strings.HasPrefix(row.Cells[1].String(), "Государственная") {
|
|
|
- continue
|
|
|
- }
|
|
|
-
|
|
|
splited := strings.Split(row.Cells[1].String(), ".")
|
|
|
- if len(splited) != 2 {
|
|
|
- continue
|
|
|
- }
|
|
|
-
|
|
|
- typerow := TypeRow(IsSubTR)
|
|
|
+ if i >= 20 && len(row.Cells) >= 20 && len(row.Cells)>=20 && !(row.Cells[2].String() == "" || row.Cells[2].String() == "ИТОГО")
|
|
|
+ && !(strings.HasPrefix(row.Cells[1].String(), "Консультации") || strings.HasPrefix(row.Cells[1].String(), "Государственная"))
|
|
|
+ && len(splited) == 2{
|
|
|
+ typerow := TypeRow(IsSubTR)
|
|
|
switch {
|
|
|
case strings.Contains(row.Cells[2].String(), "цикл"):
|
|
|
typerow = IsCycleTR
|
|
@@ -113,6 +98,24 @@ func ImportXLSX(filename string) []*PlanXLSX {
|
|
|
},
|
|
|
TypeRow: typerow,
|
|
|
})
|
|
|
+ }
|
|
|
+ // if len(row.Cells) < 20 {
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
+ // if row.Cells[2].String() == "" || row.Cells[2].String() == "ИТОГО" {
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if strings.HasPrefix(row.Cells[1].String(), "Консультации") || strings.HasPrefix(row.Cells[1].String(), "Государственная") {
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
+
|
|
|
+ // splited := strings.Split(row.Cells[1].String(), ".")
|
|
|
+ // if len(splited) != 2 {
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
listOfPlans = append(listOfPlans, plan)
|
|
|
|