master
黄海 3 years ago
parent ddcfacb5b7
commit fce9db85f7

@ -22,8 +22,8 @@ import (
"dsBaseRpc/models"
"errors"
"fmt"
"github.com/360EntSecGroup-Skylar/excelize/v2"
"github.com/xormplus/builder"
"github.com/xuri/excelize/v2"
"regexp"
"strconv"
"strings"

@ -19,10 +19,10 @@ import (
"dsBaseRpc/Utils/SqlKit"
"dsBaseRpc/models"
"fmt"
"github.com/360EntSecGroup-Skylar/excelize/v2"
"github.com/pkg/errors"
"github.com/xormplus/builder"
"github.com/xormplus/xorm"
"github.com/xuri/excelize/v2"
"strconv"
)
@ -346,13 +346,13 @@ func ExportTeacherInfoExcel(targetPath string, bureauId string, ExportExcelStatu
//学段限定
dvRange := excelize.NewDataValidation(true)
dvRange.Sqref = "M" + CommonUtil.ConvertIntToString(ExcelUtil.HiddenRows+2) + ":M" + CommonUtil.ConvertIntToString(ExcelUtil.RowsCount+ExcelUtil.HiddenRows)
_ = dvRange.SetSqrefDropList("$"+startDictCName+"$1:$"+stopDictCName+"$1", true)
dvRange.SetSqrefDropList("$" + startDictCName + "$1:$" + stopDictCName + "$1")
_ = f.AddDataValidation(SheetName, dvRange)
//学科级联绑定
dvRange = excelize.NewDataValidation(true)
dvRange.Sqref = "N" + CommonUtil.ConvertIntToString(2+ExcelUtil.HiddenRows) + ":N" + CommonUtil.ConvertIntToString(ExcelUtil.RowsCount+ExcelUtil.HiddenRows)
_ = dvRange.SetSqrefDropList("INDIRECT($M"+CommonUtil.ConvertIntToString(ExcelUtil.HiddenRows+2)+")", true)
dvRange.SetSqrefDropList("INDIRECT($M" + CommonUtil.ConvertIntToString(ExcelUtil.HiddenRows+2) + ")")
_ = f.AddDataValidation(SheetName, dvRange)
//部门
@ -370,7 +370,7 @@ func ExportTeacherInfoExcel(targetPath string, bureauId string, ExportExcelStatu
dvRange := excelize.NewDataValidation(true)
dvRange.Sqref = "A" + CommonUtil.ConvertIntToString(2+ExcelUtil.HiddenRows) + ":A" + CommonUtil.ConvertIntToString(ExcelUtil.RowsCount+ExcelUtil.HiddenRows)
c := "$" + dictCName + "$1:" + dictCName + "$" + CommonUtil.ConvertIntToString(ExcelUtil.RowsCount)
_ = dvRange.SetSqrefDropList(c, true)
dvRange.SetSqrefDropList(c)
_ = f.AddDataValidation(SheetName, dvRange)
}
}

@ -4,7 +4,6 @@ import (
"dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao"
"dsBaseRpc/Utils/CommonUtil"
"fmt"
"github.com/360EntSecGroup-Skylar/excelize/v2"
)
func main() {

@ -6,7 +6,7 @@ import (
"dsBaseRpc/Utils/CommonUtil"
"dsBaseRpc/models"
"fmt"
"github.com/360EntSecGroup-Skylar/excelize/v2"
"github.com/xuri/excelize/v2"
)
func main() {

@ -7,7 +7,7 @@ import (
"dsBaseRpc/Utils/FileUtil"
"encoding/json"
"fmt"
"github.com/360EntSecGroup-Skylar/excelize/v2"
"github.com/xuri/excelize/v2"
"strconv"
"strings"
)
@ -197,7 +197,7 @@ const HiddenRows = 200
2020-06-06
*/
func GenerateTemplate(jsonTemplate string, excelPath string) () {
func GenerateTemplate(jsonTemplate string, excelPath string) {
var f *excelize.File
var s1 TemplateStruct
var SheetName string
@ -346,7 +346,7 @@ func TemplateAddDict(excelPath string, jsonTemplate string) (*excelize.File, Tem
dvRange := excelize.NewDataValidation(true)
dvRange.Sqref = cName + CommonUtil.ConvertIntToString(2) + ":" + cName + CommonUtil.ConvertIntToString(RowsCount)
c := "$" + dictCName + "$1:$" + dictCName + "$" + CommonUtil.ConvertIntToString(len(list))
dvRange.SetSqrefDropList(c, true)
dvRange.SetSqrefDropList(c)
f.AddDataValidation(SheetName, dvRange)
}
}

@ -6,7 +6,6 @@ import (
"time"
)
// Check IdCard number valid.
func IsValidIdCardNo(IdCardNo *[]byte) bool {
var id = IdNumber.New(string(*IdCardNo))

@ -1,88 +1,63 @@
module dsBaseRpc
go 1.14
go 1.18
require (
github.com/0x5010/grpcp v0.0.0-20180912032145-6d4772332891
github.com/360EntSecGroup-Skylar/excelize/v2 v2.2.0
github.com/Chronokeeper/anyxml v0.0.0-20160530174208-54457d8e98c6 // indirect
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect
github.com/CloudyKit/jet v2.1.2+incompatible // indirect
github.com/Shopify/sarama v1.26.1 // indirect
github.com/agrison/go-tablib v0.0.0-20160310143025-4930582c22ee // indirect
github.com/agrison/mxj v0.0.0-20160310142625-1269f8afb3b4 // indirect
github.com/aliyun/alibaba-cloud-sdk-go v1.61.109 // indirect
github.com/anacrolix/sync v0.2.0 // indirect
github.com/apache/thrift v0.13.0 // indirect
github.com/armon/go-metrics v0.3.3 // indirect
github.com/bluesky335/IDCheck v0.0.0-20200319021444-08ee85bfcb7b
github.com/bndr/gotabulate v1.1.2 // indirect
github.com/buger/jsonparser v0.0.0-20200322175846-f7e751efca13 // indirect
github.com/cao-guang/pinyin v0.0.0-20190927081849-38872b67965d
github.com/clbanning/mxj v1.8.4 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/edwingeng/doublejump v0.0.0-20200330080233-e4ea8bd1cbed // indirect
github.com/fatih/color v1.9.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/fullstorydev/grpcurl v1.5.1 // indirect
github.com/go-redis/redis/v7 v7.4.0
github.com/go-sql-driver/mysql v1.5.0
github.com/go-xorm/cmd/xorm v0.0.0-20190426080617-f87981e709a1 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.4.2
github.com/google/uuid v1.1.1 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.14.4 // indirect
github.com/hashicorp/go-hclog v0.12.2 // indirect
github.com/hashicorp/go-immutable-radix v1.2.0 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/serf v0.9.0 // indirect
github.com/huandu/xstrings v1.3.1 // indirect
github.com/iancoleman/strcase v0.1.1 // indirect
github.com/jmespath/go-jmespath v0.3.0 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/kavu/go_reuseport v1.5.0 // indirect
github.com/klauspost/compress v1.10.2 // indirect
github.com/klauspost/cpuid v1.2.3 // indirect
github.com/klauspost/reedsolomon v1.9.3 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
github.com/malisit/kolpa v0.0.0-20171128201422-10c4658a62cb // indirect
github.com/marten-seemann/quic-conn v0.0.0-20191204020628-6e719687462b // indirect
github.com/mattn/go-colorable v0.1.6 // indirect
github.com/miekg/dns v1.1.29 // indirect
github.com/golang/protobuf v1.5.2
github.com/iancoleman/strcase v0.1.1
github.com/mitchellh/mapstructure v1.2.2
github.com/mritd/chinaid v1.0.2
github.com/nacos-group/nacos-sdk-go v0.3.0 // indirect
github.com/pkg/errors v0.9.1
github.com/pkg/sftp v1.11.0
github.com/robfig/cron/v3 v3.0.0
github.com/rocket049/gostructcopy v0.0.1
github.com/rogierlommers/logrus-redis-hook v0.0.0-20181024192841-95adf3b7d27b // indirect
github.com/satori/go.uuid v1.2.0
github.com/sndnvaps/CheckID_card v0.5.0 // indirect
github.com/syndtr/goleveldb v1.0.0 // indirect
github.com/tealeg/xlsx v1.0.5
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b // indirect
github.com/tidwall/gjson v1.6.0 // indirect
github.com/tidwall/pretty v1.0.1 // indirect
github.com/tjfoc/gmsm v1.3.0 // indirect
github.com/tidwall/gjson v1.6.0
github.com/xormplus/builder v0.0.0-20200331055651-240ff40009be
github.com/xormplus/core v0.0.0-20200308074340-f3bce19d5f31
github.com/xormplus/xorm v0.0.0-20200410045938-f6b4c1cd3b8b
github.com/xtaci/kcp-go v5.4.20+incompatible // indirect
github.com/xuri/efp v0.0.0-20200605144744-ba689101faaf // indirect
go.opencensus.io v0.22.3 // indirect
go.opentelemetry.io/otel v0.9.0 // indirect
golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72
google.golang.org/appengine v1.6.5 // indirect
google.golang.org/genproto v0.0.0-20200429120912-1f37eeb960b2 // indirect
google.golang.org/grpc v1.30.0
google.golang.org/protobuf v1.23.0
gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4 // indirect
github.com/xormplus/xorm v0.0.0-20210822100304-4e1d4fcc1e67
golang.org/x/crypto v0.0.0-20220408190544-5352b0902921
google.golang.org/grpc v1.36.0
google.golang.org/protobuf v1.27.1
gopkg.in/ini.v1 v1.55.0
gopkg.in/urfave/cli.v1 v1.20.0 // indirect
honnef.co/go/tools v0.0.1-2020.1.3 // indirect
sigs.k8s.io/yaml v1.1.0 // indirect
)
require (
github.com/Chronokeeper/anyxml v0.0.0-20160530174208-54457d8e98c6 // indirect
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect
github.com/CloudyKit/jet v2.1.2+incompatible // indirect
github.com/agrison/go-tablib v0.0.0-20160310143025-4930582c22ee // indirect
github.com/agrison/mxj v0.0.0-20160310142625-1269f8afb3b4 // indirect
github.com/bndr/gotabulate v1.1.2 // indirect
github.com/clbanning/mxj v1.8.4 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-sqlite3 v1.14.14 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.1 // indirect
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect
github.com/stretchr/testify v1.7.0 // indirect
github.com/syndtr/goleveldb v1.0.0 // indirect
github.com/tidwall/match v1.0.1 // indirect
github.com/tidwall/pretty v1.0.1 // indirect
github.com/xuri/efp v0.0.0-20220407160117-ad0f7a785be8 // indirect
github.com/xuri/excelize/v2 v2.6.0 // indirect
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 // indirect
golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3 // indirect
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98 // indirect
google.golang.org/grpc/examples v0.0.0-20220629191424-423cd8e3ad5f // indirect
gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,7 @@
当go.mod升级到 1.18时提示需要执行go Mod tidy,真正执行时报错。
解决办法:
删除go.mod中所有相关xorm的引用然后执行下面的语句即可正常运行
go get -u github.com/xormplus/xorm
go get github.com/xuri/excelize/v2
go get github.com/bluesky335/IDCheck
Loading…
Cancel
Save