Browse Source

trying go.mod

Dasflugen 5 năm trước cách đây
mục cha
commit
24a685c681
2 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 3 3
      go.modWIP
  2. 1 1
      schedule/xlsx.go

+ 3 - 3
go.modWIP

@@ -3,8 +3,8 @@ module github.com/Fistim/Schedule
 go 1.14
 
 require (
-	github.com/jinzhu/gorm
-	github.com/jtblin/go-ldap-client
-	github.com/tealeg/xlsx
+	github.com/jinzhu/gorm v1.9.12
+	github.com/jtblin/go-ldap-client 0.0.3
+	github.com/tealeg/xlsx v2.0.0
 	github.com/jinzhu/gorm/dialects/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
 )

+ 1 - 1
schedule/xlsx.go

@@ -29,7 +29,7 @@ func ImportXLSX(filename string) []*PlanXLSX {
 
         sheet.ForEachRow(func(row *Row) error {
             splited := strings.Split(row.GetCell(1).Value.String(), ".")
-            if i >= 20 && len(row.Cells) >= 20 && len(row.Cells)>=20 && !(row.GetCell(2).Value.String() == "" || row.GetCell(2).Value.String() == "ИТОГО") && !(strings.HasPrefix(row.GetCell(1).Value.String(), "Консультации") || strings.HasPrefix(row.GetCell(1).Value.String(), "Государственная")) && len(splited) == 2{
+            if len(row.Cells) >= 20 && len(row.Cells)>=20 && !(row.GetCell(2).Value.String() == "" || row.GetCell(2).Value.String() == "ИТОГО") && !(strings.HasPrefix(row.GetCell(1).Value.String(), "Консультации") || strings.HasPrefix(row.GetCell(1).Value.String(), "Государственная")) && len(splited) == 2{
                 typerow := TypeRow(IsSubTR)
             switch {
             case strings.Contains(row.GetCell(2).Value.String(), "цикл"):