瀏覽代碼

Merge branch 'feature/yongyi_download' of eta_server/eta_data_analysis into master

xyxie 1 年之前
父節點
當前提交
d521f8d7f5

+ 2 - 2
controllers/yongyi.go

@@ -32,7 +32,7 @@ func (this *YongyiController) Analysis() {
 	weekFlag, _ := this.GetInt("WeekFlag")
 	var err error
 	if dayFlag == 1 {
-		err = services.HandleYongyiExcelDaily(context.TODO())
+		err = services.YongyiDownloadDaily(context.TODO())
 		if err != nil {
 			fmt.Println(err)
 			br.Msg = "操作异常"
@@ -42,7 +42,7 @@ func (this *YongyiController) Analysis() {
 	}
 
 	if weekFlag == 1 {
-		err = services.HandleYongyiExcelWeekly(context.TODO())
+		err = services.YongyiDownloadWeekyly(context.TODO())
 		if err != nil {
 			fmt.Println(err)
 			br.Msg = "操作异常"

+ 9 - 1
go.mod

@@ -8,17 +8,18 @@ require (
 	github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b
 	github.com/mozillazg/go-pinyin v0.20.0
 	github.com/patrickmn/go-cache v2.1.0+incompatible
-	github.com/rdlucklib/rdluck_tools v1.0.3
 	github.com/robfig/cron/v3 v3.0.1
 	github.com/shakinm/xlsReader v0.9.12
 	github.com/shopspring/decimal v1.3.1
 	github.com/tealeg/xlsx v1.0.5
+	github.com/tealeg/xlsx/v3 v3.3.5
 	github.com/xuri/excelize/v2 v2.8.0
 )
 
 require (
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cespare/xxhash/v2 v2.2.0 // indirect
+	github.com/frankban/quicktest v1.14.6 // indirect
 	github.com/golang/protobuf v1.5.3 // indirect
 	github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac // indirect
 	github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82 // indirect
@@ -26,12 +27,16 @@ require (
 	github.com/gonum/internal v0.0.0-20181124074243-f884aa714029 // indirect
 	github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9 // indirect
 	github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9 // indirect
+	github.com/google/btree v1.0.0 // indirect
+	github.com/google/go-cmp v0.5.9 // indirect
 	github.com/hashicorp/golang-lru v0.5.4 // indirect
+	github.com/kr/pretty v0.3.1 // indirect
 	github.com/kr/text v0.2.0 // indirect
 	github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
 	github.com/metakeule/fmtdate v1.1.2 // indirect
 	github.com/mitchellh/mapstructure v1.5.0 // indirect
 	github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
+	github.com/peterbourgon/diskv/v3 v3.0.1 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
 	github.com/prometheus/client_golang v1.16.0 // indirect
 	github.com/prometheus/client_model v0.3.0 // indirect
@@ -39,6 +44,9 @@ require (
 	github.com/prometheus/procfs v0.10.1 // indirect
 	github.com/richardlehane/mscfb v1.0.4 // indirect
 	github.com/richardlehane/msoleps v1.0.3 // indirect
+	github.com/rogpeppe/fastuuid v1.2.0 // indirect
+	github.com/rogpeppe/go-internal v1.10.0 // indirect
+	github.com/shabbyrobe/xmlwriter v0.0.0-20200208144257-9fca06d00ffa // indirect
 	github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect
 	github.com/xuri/efp v0.0.0-20230802181842-ad255f2331ca // indirect
 	github.com/xuri/nfp v0.0.0-20230819163627-dc951e3ffe1a // indirect

+ 18 - 141
go.sum

@@ -1,68 +1,23 @@
-github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
-github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
-github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
-github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
-github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
-github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
-github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk=
-github.com/astaxie/beego v1.12.3/go.mod h1:p3qIm0Ryx7zeBHLljmd7omloyca1s4yu1a8kM1FkpIA=
 github.com/beego/bee/v2 v2.1.0 h1:4WngbAnkvVOyKy74WXcRH3clon76wkjhuzrV2mx2fQU=
 github.com/beego/bee/v2 v2.1.0/go.mod h1:wDhKy5TNxv46LHKsK2gyxo38ObCOm9PbCN89lWHK3EU=
 github.com/beego/beego/v2 v2.1.4 h1:99d8+sUmQyfaArQIjjzWGE+KYU9M1GkfWec74nXQxFY=
 github.com/beego/beego/v2 v2.1.4/go.mod h1:0J0RQVIpepnRUfu6ax+kLVVB1FcdYryHK9lpRl5wvbY=
-github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ=
-github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU=
-github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
-github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
 github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
 github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
-github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60=
-github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE=
-github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
 github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
 github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
-github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
-github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U=
-github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c=
-github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs=
 github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
-github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
-github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI=
-github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
 github.com/elazarl/go-bindata-assetfs v1.0.1 h1:m0kkaHRKEu7tUIUFVwhGGGYClXvyl4RE03qmvRTNfbw=
-github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/garyburd/redigo v1.6.3/go.mod h1:rTb6epsqigu3kYKBnaF028A7Tf/Aw5s0cqA47doKKqw=
-github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw=
-github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
-github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
-github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
-github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
-github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
-github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
-github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
-github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
-github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
+github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
-github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
-github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
-github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
-github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
-github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
-github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
 github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
 github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
 github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
 github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac h1:Q0Jsdxl5jbxouNs1TQYt0gxesYMU4VXRbsTlgDloZ50=
 github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac/go.mod h1:P32wAyui1PQ58Oce/KYkOqQv8cVw1zAapXOl+dRFGbc=
 github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82 h1:EvokxLQsaaQjcWVWSV38221VAK7qc2zhaO17bKys/18=
@@ -77,82 +32,48 @@ github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9 h1:V2IgdyerlBa/MxaEFR
 github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9/go.mod h1:0EXg4mc1CNP0HCqCz+K4ts155PXIlUywf0wqN+GfPZw=
 github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b h1:fbskpz/cPqWH8VqkQ7LJghFkl2KPAiIFUHrTJ2O3RGk=
 github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b/go.mod h1:Z4GIJBJO3Wa4gD4vbwQxXXZ+WHmW6E9ixmNrwvs0iZs=
-github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
+github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
 github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
 github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
 github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
-github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
-github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
-github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
-github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
 github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
 github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
 github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
 github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ=
-github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
-github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
-github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
-github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
 github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
 github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
 github.com/metakeule/fmtdate v1.1.2 h1:n9M7H9HfAqp+6OA98wXGMdcAr6omshSNVct65Bks1lQ=
 github.com/metakeule/fmtdate v1.1.2/go.mod h1:2JyMFlKxeoGy1qS6obQukT0AL0Y4iNANQL8scbSdT4E=
 github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
 github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
-github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
 github.com/mozillazg/go-pinyin v0.20.0 h1:BtR3DsxpApHfKReaPO1fCqF4pThRwH9uwvXzm+GnMFQ=
 github.com/mozillazg/go-pinyin v0.20.0/go.mod h1:iR4EnMMRXkfpFVV5FMi4FNB6wGq9NV6uDWbUuPhP4Yc=
-github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
-github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
-github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
-github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
 github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
 github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
-github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
-github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
-github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc=
-github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/peterbourgon/diskv/v3 v3.0.1 h1:x06SQA46+PKIUftmEujdwSEpIx8kR+M9eLYsUxeYveU=
+github.com/peterbourgon/diskv/v3 v3.0.1/go.mod h1:kJ5Ny7vLdARGU3WUuy6uzO6T0nb/2gWcT1JiBvRmb5o=
+github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
 github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
 github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/profile v1.5.0 h1:042Buzk+NhDI+DeSAA62RwJL8VAuZUMQZUjCsRz1Mug=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
-github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
-github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
 github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8=
 github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc=
-github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
-github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
 github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4=
 github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w=
-github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
-github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
 github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM=
 github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc=
-github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
-github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
 github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg=
 github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM=
-github.com/rdlucklib/rdluck_tools v1.0.3 h1:iOtK2QPlPQ6CL6c1htCk5VnFCHzyG6DCfJtunrMswK0=
-github.com/rdlucklib/rdluck_tools v1.0.3/go.mod h1:9Onw9o4w19C8KE5lxb8GyxgRBbZweRVkQSc79v38EaA=
 github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
 github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
 github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
@@ -160,47 +81,36 @@ github.com/richardlehane/msoleps v1.0.3 h1:aznSZzrwYRl3rLKRT3gUk9am7T/mLNSnJINvN
 github.com/richardlehane/msoleps v1.0.3/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
 github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
 github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
+github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s=
+github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
+github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
 github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
+github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
+github.com/shabbyrobe/xmlwriter v0.0.0-20200208144257-9fca06d00ffa h1:2cO3RojjYl3hVTbEvJVqrMaFmORhL6O06qdW42toftk=
+github.com/shabbyrobe/xmlwriter v0.0.0-20200208144257-9fca06d00ffa/go.mod h1:Yjr3bdWaVWyME1kha7X0jsz3k2DgXNa1Pj3XGyUAbx8=
 github.com/shakinm/xlsReader v0.9.12 h1:F6GWYtCzfzQqdIuqZJ0MU3YJ7uwH1ofJtmTKyWmANQk=
 github.com/shakinm/xlsReader v0.9.12/go.mod h1:ME9pqIGf+547L4aE4YTZzwmhsij+5K9dR+k84OO6WSs=
-github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=
 github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 h1:DAYUYH5869yV94zvCES9F51oYtN5oGlwjxJJz7ZCnik=
 github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=
 github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
 github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
-github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw=
-github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s=
-github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA=
-github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
-github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
-github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
 github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
-github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
-github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
 github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE=
 github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCnORM=
-github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
-github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc=
+github.com/tealeg/xlsx/v3 v3.3.5 h1:dzmns01jRf0SveBe7VqkcO2LCLOcypcDI6H66PiZycQ=
+github.com/tealeg/xlsx/v3 v3.3.5/go.mod h1:KV4FTFtvGy0TBlOivJLZu/YNZk6e0Qtk7eOSglWksuA=
 github.com/xuri/efp v0.0.0-20230802181842-ad255f2331ca h1:uvPMDVyP7PXMMioYdyPH+0O+Ta/UO1WFfNYMO3Wz0eg=
 github.com/xuri/efp v0.0.0-20230802181842-ad255f2331ca/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
 github.com/xuri/excelize/v2 v2.8.0 h1:Vd4Qy809fupgp1v7X+nCS/MioeQmYVVzi495UCTqB7U=
 github.com/xuri/excelize/v2 v2.8.0/go.mod h1:6iA2edBTKxKbZAa7X5bDhcCg51xdOn1Ar5sfoXRGrQg=
 github.com/xuri/nfp v0.0.0-20230819163627-dc951e3ffe1a h1:Mw2VNrNNNjDtw68VsEj2+st+oCSn4Uz7vZw6TbhcV1o=
 github.com/xuri/nfp v0.0.0-20230819163627-dc951e3ffe1a/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
-github.com/ylywyn/jpush-api-go-client v0.0.0-20190906031852-8c4466c6e369/go.mod h1:Nv7wKD2/bCdKUFNKcJRa99a+1+aSLlCRJFriFYdjz/I=
 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU=
-golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
 golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
@@ -208,10 +118,6 @@ golang.org/x/image v0.11.0 h1:ds2RoQvBvYTiJkwpSFDwCcDFNX7DqjL2WsUgTNk0Ooo=
 golang.org/x/image v0.11.0/go.mod h1:bglhjqbqVuEb9e9+eNR45Jfu7D+T4Qan+NhQk8Ck2P8=
 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
-golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
@@ -219,22 +125,11 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
 golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
 golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
 golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -262,31 +157,13 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
 golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
-google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
-google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
-google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
-google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
-google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
 google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
 google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
 google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
-gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
-gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
-gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
-gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
-gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
-gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

+ 9 - 0
services/base.go

@@ -49,3 +49,12 @@ func HttpPost(url, postData string, params ...string) ([]byte, error) {
 	}
 	return b, err
 }
+
+func HttpGet(url string) ([]byte, error) {
+	res, err := http.Get(url)
+	if err != nil {
+		return nil, err
+	}
+	defer res.Body.Close()
+	return ioutil.ReadAll(res.Body)
+}

+ 407 - 21
services/base_from_yongyi.go

@@ -4,11 +4,16 @@ import (
 	"context"
 	"encoding/json"
 	"eta/eta_data_analysis/models"
-	"eta/eta_data_analysis/services/base_from_yongyi"
+	"eta/eta_data_analysis/services/base_from_yongyi_v2"
 	"eta/eta_data_analysis/utils"
 	"fmt"
-	"github.com/rdlucklib/rdluck_tools/http"
-	"github.com/tealeg/xlsx"
+	"github.com/xuri/excelize/v2"
+	"io/fs"
+	"os"
+	"path"
+	"path/filepath"
+	"strings"
+	"sync"
 	"time"
 )
 
@@ -35,16 +40,16 @@ import (
 月度-大猪存栏(2020年5月新增)
 月度-商品猪出栏量
 */
-func HandleYongyiExcelDaily(cont context.Context) (err error) {
-	filePath := fmt.Sprintf("%s/%s_day.xlsx", utils.YongyiFilePath, time.Now().Format(utils.FormatDate))
-	xlFile, err := xlsx.OpenFile(filePath)
+func HandleYongyiExcelDaily(filePath string) (err error) {
+	//filePath := fmt.Sprintf("%s/%s_day.xlsx", utils.YongyiFilePath, time.Now().Format(utils.FormatDate))
+	/*xlFile, err := xlsx.OpenFile(filePath)
 	if err != nil {
 		err = fmt.Errorf("打开文件失败, Err: %s", err)
 		utils.FileLog.Info(fmt.Sprintf("打开文件:%s 失败, Err: %s", filePath, err))
 		return
 	}
 	terminalCode := utils.TerminalCode
-	for _, sheet := range xlFile.Sheet {
+	for _, sheet := range xlFile.Sheets {
 		var indexList []*models.YongyiExcelIndex
 		switch sheet.Name {
 		case "出栏价":
@@ -82,21 +87,21 @@ func HandleYongyiExcelDaily(cont context.Context) (err error) {
 				continue
 			}
 		}
-	}
+	}*/
 
 	return
 }
 
-func HandleYongyiExcelWeekly(cont context.Context) (err error) {
-	filePath := fmt.Sprintf("%s/%s_week.xlsx", utils.YongyiFilePath, time.Now().Format(utils.FormatDate))
-	xlFile, err := xlsx.OpenFile(filePath)
+func HandleYongyiExcelWeekly(filePath string) (err error) {
+	// filePath := fmt.Sprintf("%s/%s_week.xlsx", utils.YongyiFilePath, time.Now().Format(utils.FormatDate))
+	/*xlFile, err := xlsx.OpenFile(filePath)
 	if err != nil {
 		err = fmt.Errorf("打开文件失败, Err: %s", err)
 		utils.FileLog.Info(fmt.Sprintf("打开文件:%s 失败, Err: %s", filePath, err))
 		return
 	}
 	terminalCode := utils.TerminalCode
-	for _, sheet := range xlFile.Sheet {
+	for _, sheet := range xlFile.Sheets {
 		var indexList []*models.YongyiExcelIndex
 		switch sheet.Name {
 		case "周度-商品猪出栏价":
@@ -146,7 +151,7 @@ func HandleYongyiExcelWeekly(cont context.Context) (err error) {
 				continue
 			}
 		}
-	}
+	}*/
 	return
 }
 
@@ -158,9 +163,30 @@ const (
 // @Description: 调用python服务去涌益咨询官网下载日度excel文件
 // @datetime 2023-12-19 09:39:05
 func YongyiDownloadDaily(cont context.Context) (err error) {
+	// 2023年12月19日涌益咨询日度数据
+	now := time.Now()
+	weekday := int(now.Weekday())
+	if weekday == 0 {
+		weekday = 7
+	}
+	// 计算与周一的天数差
+	// 如果当天是周五,差值为0;周六为1,以此类推,直到下个周四为6
+	offset := (weekday - 5) % 7 // 加7是为了处理weekday为0(周日)的情况
+	if offset == 1 || offset == 2 {
+		// 获取周一的日期
+		now = now.AddDate(0, 0, -offset)
+	}
+
+	filePath := fmt.Sprintf("%s%s", now.Format("2006年1月2日"), "涌益咨询日度数据.xlsx")
+	filePath = filepath.Join(utils.YongyiReadFilePath, filePath)
+	fmt.Println("YongyiDownloadDaily: " + filePath)
+	_, e := os.Stat(filePath)
+	if e == nil { //文件或者目录存在
+		return
+	}
 	url := fmt.Sprintf("%s?dayFlag=1&weekFlag=0", YongyiDownloadUrl)
 	fmt.Println("YongyiDownload URL:" + url)
-	body, err := http.Get(url)
+	body, err := HttpGet(url)
 	if err != nil {
 		utils.FileLog.Info("YongyiDownload Err:" + err.Error())
 		return
@@ -169,22 +195,382 @@ func YongyiDownloadDaily(cont context.Context) (err error) {
 	return
 }
 
-// YongyiDownloadWeeyly
+// YongyiDownloadWeekyly
 // @Description: 调用python服务去涌益咨询官网下载周度excel文件
 // @datetime 2023-12-19 09:39:05
-func YongyiDownloadWeeyly(cont context.Context) (err error) {
-	weekFlag := 1
-	week := time.Now().Weekday()
-	if week != time.Thursday { //每周四,处理周度文件
+func YongyiDownloadWeekyly(cont context.Context) (err error) {
+	// 2023.11.10-2023.11.16涌益咨询 周度数据.xlsx
+	// 获取本周的时间范围, 即当前时间
+	now := time.Now()
+	weekday := int(now.Weekday())
+	if weekday == 0 {
+		weekday = 7
+	}
+	// 计算与周一的天数差
+	// 如果当天是周五,差值为0;周六为1,以此类推,直到下个周四为6
+	offset := (weekday - 5) % 7 // 加7是为了处理weekday为0(周日)的情况
+	// 获取周一的日期
+	startDateT := now.AddDate(0, 0, -offset)
+	startDate := startDateT.Format("2006.1.2")
+	fmt.Printf("startDate: %s\n", startDate)
+	endDate := startDateT.AddDate(0, 0, 6).Format("2006.1.2")
+	fmt.Printf("endDate: %s\n", endDate)
+	dataFileExsit := false
+	chartFileExist := false
+	filePath := fmt.Sprintf("%s-%s%s", startDate, endDate, "涌益咨询 周度数据.xlsx")
+	filePath = filepath.Join(utils.YongyiReadFilePath, filePath)
+
+	fmt.Println("YongyiDownloadWeekyly: " + filePath)
+
+	// 从已处理的表格中查询是否已存在,如果已存在,也无需下载
+	_, e := os.Stat(filePath)
+	if e == nil { //文件或者目录存在
+		dataFileExsit = true
+	} else if os.IsNotExist(e) { //文件或者目录不存在
+		filePath = filepath.Join(utils.YongyiFilePath, filePath)
+
+		fmt.Println("YongyiDownloadWeekyly: " + filePath)
+
+		// 从已处理的表格中查询是否已存在,如果已存在,也无需下载
+		_, e = os.Stat(filePath)
+		if e == nil { //文件或者目录存在
+			dataFileExsit = true
+		}
+	}
+	filePath = fmt.Sprintf("%s-%s%s", utils.YongyiReadFilePath, startDate, endDate, "周度图表版图.xlsx")
+	filePath = filepath.Join(utils.YongyiReadFilePath, filePath)
+	fmt.Println("YongyiDownloadWeekyly: " + filePath)
+	_, e = os.Stat(filePath)
+	if e == nil { //文件或者目录存在
+		chartFileExist = true
+	} else if os.IsNotExist(e) { //文件或者目录不存在
+		filePath = filepath.Join(utils.YongyiFilePath, filePath)
+		fmt.Println("YongyiDownloadWeekyly: " + filePath)
+		// 从已处理的表格中查询是否已存在,如果已存在,也无需下载
+		_, e = os.Stat(filePath)
+		if e == nil { //文件或者目录存在
+			chartFileExist = true
+		}
+	}
+
+	if dataFileExsit && chartFileExist {
 		return
 	}
-	url := fmt.Sprintf("%s?dayFlag=0&weekFlag=%d", YongyiDownloadUrl, weekFlag)
+	url := fmt.Sprintf("%s?dayFlag=0&weekFlag=1", YongyiDownloadUrl)
 	fmt.Println("YongyiDownload URL:" + url)
-	body, err := http.Get(url)
+	body, err := HttpGet(url)
 	if err != nil {
 		utils.FileLog.Info("YongyiDownload Err:" + err.Error())
 		return
 	}
+
 	utils.FileLog.Debug("YongyiDownload Result:" + string(body))
 	return
 }
+
+var HandlezYongyiFilePathMutex sync.Mutex
+
+// 监听涌溢咨询文件夹是否有新增的excel文件
+func ReadWatchYongyiFile(cont context.Context) (err error) {
+	fmt.Println("ReadWatchYongyiFile start")
+	defer func() {
+		if err != nil {
+			fmt.Println("ReadWatchYongyiFile Err:" + err.Error())
+		}
+	}()
+	if utils.YongyiFilePath == "" {
+		utils.FileLog.Info("文件目录未配置")
+		return
+	}
+	// 上一个监听未结束时不执行
+	HandlezYongyiFilePathMutex.Lock()
+	defer HandlezYongyiFilePathMutex.Unlock()
+
+	err = filepath.Walk(utils.YongyiFilePath, func(path string, info fs.FileInfo, err error) error {
+		if err != nil {
+			err = fmt.Errorf("ReadWatchYongyiFile walk err: %s", err.Error())
+			return err
+		}
+		if info.IsDir() {
+			return nil
+		}
+		if path == "" {
+			return nil
+		}
+		moveFlag := false
+		//fmt.Println("path", path)
+		if strings.Contains(path, "日度数据") {
+			err = HandleYongyiExcelDailyV2(path)
+			if err == nil {
+				moveFlag = true
+			}
+			// todo 移动文件到新目录下
+		} else if strings.Contains(path, "周度图表版图") {
+			err = HandleYongyiExcelWeeklyChart(path)
+			if err == nil {
+				moveFlag = true
+			}
+		} else if strings.Contains(path, "周度数据") {
+			err = HandleYongyiExcelWeeklyV2(path)
+			if err == nil {
+				moveFlag = true
+			}
+		}
+		if err != nil {
+			err = fmt.Errorf("file name: %s, handlerYongyi err: %s", path, err.Error())
+			return err
+		}
+
+		if moveFlag {
+			// 移动文件至已处理目录
+			err = utils.CreateDirIfNotExists(utils.YongyiReadFilePath)
+			if err != nil {
+				err = fmt.Errorf("CreateDirIfNotExists err: %s", err.Error())
+				fmt.Printf("ReadWatchYongyiFile CreateDirIfNotExists err: %s\n", err.Error())
+				return err
+			}
+			destPath := filepath.Join(utils.YongyiReadFilePath, info.Name())
+			err = os.Rename(path, destPath)
+			if err != nil {
+				err = fmt.Errorf("file move err: %s", err.Error())
+				fmt.Printf("ReadWatchYongyiFile file move err: %s\n", err.Error())
+				return err
+			}
+		}
+		return nil
+	})
+	return
+}
+
+var YongyiDailyHandlers = map[string]func(f *excelize.File, sheetName string) ([]*models.YongyiExcelIndex, error){
+	"出栏价":       base_from_yongyi_v2.HandleYongyiExcelDaily1,
+	"标肥价差":      base_from_yongyi_v2.HandleYongyiExcelDaily2,
+	"价格+宰量":     base_from_yongyi_v2.HandleYongyiExcelDaily3,
+	"屠宰企业日度屠宰量": base_from_yongyi_v2.HandleYongyiExcelDaily4,
+}
+
+var YongyiWeeklyHandlers = map[string]func(f *excelize.File, sheetName string) ([]*models.YongyiExcelIndex, error){
+	"周度-商品猪出栏价":            base_from_yongyi_v2.HandleYongyiExcelWeekly1,
+	"周度-体重":                base_from_yongyi_v2.HandleYongyiExcelWeekly2,
+	"周度-屠宰厂宰前活猪重":          base_from_yongyi_v2.HandleYongyiExcelWeekly3,
+	"周度-各体重段价差":            base_from_yongyi_v2.HandleYongyiExcelWeekly4,
+	"周度-50公斤二元母猪价格":        base_from_yongyi_v2.HandleYongyiExcelWeekly5,
+	"周度-规模场15公斤仔猪出栏价":      base_from_yongyi_v2.HandleYongyiExcelWeekly5,
+	"周度-宰后结算价":             base_from_yongyi_v2.HandleYongyiExcelWeekly5,
+	"周度-冻品库存":              base_from_yongyi_v2.HandleYongyiExcelWeekly5,
+	"周度-猪肉价(前三等级白条均价)":     base_from_yongyi_v2.HandleYongyiExcelWeekly5,
+	"周度-冻品库存多样本":           base_from_yongyi_v2.HandleYongyiExcelWeekly6,
+	"月度出栏完成率":              base_from_yongyi_v2.HandleYongyiExcelWeekly6,
+	"月度计划出栏量":              base_from_yongyi_v2.HandleYongyiExcelWeekly7,
+	"月度-能繁母猪存栏(2020年2月新增)": base_from_yongyi_v2.HandleYongyiExcelWeekly8,
+	"月度-小猪存栏(2020年5月新增)":   base_from_yongyi_v2.HandleYongyiExcelWeekly9,
+	"月度-中猪存栏(2020年5月新增)":   base_from_yongyi_v2.HandleYongyiExcelWeekly9,
+	"月度-大猪存栏(2020年5月新增)":   base_from_yongyi_v2.HandleYongyiExcelWeekly9,
+	"月度-商品猪出栏量":            base_from_yongyi_v2.HandleYongyiExcelWeekly10,
+	"历史猪价":                 base_from_yongyi_v2.HandleYongyiExcelWeekly12,
+	"二育成本":                 base_from_yongyi_v2.HandleYongyiExcelWeekly13,
+	"二育销量":                 base_from_yongyi_v2.HandleYongyiExcelWeekly14,
+	"育肥栏舍利用率":              base_from_yongyi_v2.HandleYongyiExcelWeekly15,
+	"周度-养殖利润最新":            base_from_yongyi_v2.HandleYongyiExcelWeekly16,
+	"周度-当期、预期成本":           base_from_yongyi_v2.HandleYongyiExcelWeekly17,
+	"育肥全价料出厂价":             base_from_yongyi_v2.HandleYongyiExcelWeekly18,
+	"周度-成本计算附件":            base_from_yongyi_v2.HandleYongyiExcelWeekly19,
+	"周度-毛白价差":              base_from_yongyi_v2.HandleYongyiExcelWeekly20,
+	"仔猪、母猪":                base_from_yongyi_v2.HandleYongyiExcelWeekly21,
+	"周度-河南屠宰白条成本":          base_from_yongyi_v2.HandleYongyiExcelWeekly22,
+	"周度-淘汰母猪价格":            base_from_yongyi_v2.HandleYongyiExcelWeekly23, //todo 少两个指标,云南和贵州,数据都不符合规范
+	"鲜销率":                  base_from_yongyi_v2.HandleYongyiExcelWeekly24, //todo 等待解析(正月初六-二月初四)2022.2.6-3.6
+	"周度-猪肉产品价格":            base_from_yongyi_v2.HandleYongyiExcelWeekly25,
+	"周度-屠宰企业日度屠宰量":         base_from_yongyi_v2.HandleYongyiExcelWeekly26,
+	"周度-屠宰新2022.10.28":     base_from_yongyi_v2.HandleYongyiExcelWeekly27,
+	"月度-淘汰母猪屠宰厂宰杀量":        base_from_yongyi_v2.HandleYongyiExcelWeekly28,
+	"月度-猪料销量":              base_from_yongyi_v2.HandleYongyiExcelWeekly29,
+	"月度-屠宰企业开工率":           base_from_yongyi_v2.HandleYongyiExcelWeekly30,
+	"月度-屠宰厂公母比例":           base_from_yongyi_v2.HandleYongyiExcelWeekly31,
+	"月度-生产指标(2021.5.7新增)":  base_from_yongyi_v2.HandleYongyiExcelWeekly32,
+	"月度-生产指标2":             base_from_yongyi_v2.HandleYongyiExcelWeekly33,
+	"月度-二元三元能繁比例":          base_from_yongyi_v2.HandleYongyiExcelWeekly34, //todo 2019年1-6月
+	"月度-能繁母猪存栏量":           base_from_yongyi_v2.HandleYongyiExcelWeekly35,
+	"月度-原种场二元后备母猪销量及出栏日龄":  base_from_yongyi_v2.HandleYongyiExcelWeekly11,
+}
+var YongyiWeeklyChartHandlers = map[string]func(f *excelize.File, sheetName string) ([]*models.YongyiExcelIndex, error){
+	"涌益样本测算": base_from_yongyi_v2.HandleYongyiExcelWeekly36,
+}
+
+func HandleYongyiExcelDailyV2(filePath string) (err error) {
+	//filePath = fmt.Sprintf("/Users/xiexiaoyuan/Downloads/2024年2月2日涌益咨询日度数据.xlsx")
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelDailyV2 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelDailyV2 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	_ = path.Base(filePath)
+	f, e := excelize.OpenFile(filePath)
+	if e != nil {
+		err = fmt.Errorf("open file err: %s", e.Error())
+		return
+	}
+	defer func() {
+		if e = f.Close(); e != nil {
+			err = fmt.Errorf("f close err: %s", e.Error())
+		}
+	}()
+	terminalCode := utils.TerminalCode
+	for _, sheetName := range f.GetSheetMap() {
+		// 检查是否有对应的处理函数
+		handler, ok := YongyiDailyHandlers[sheetName]
+		if !ok {
+			continue // 如果没有,则跳过当前sheet
+		}
+		utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelDailyV2 %s start", sheetName))
+		// 调用处理函数,并处理可能发生的错误
+		indexList, e := handler(f, sheetName)
+		utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelDailyV2 %s end", sheetName))
+		if e != nil {
+			utils.FileLog.Info(fmt.Sprintf("解析sheet:%s 失败, Err: %s", sheetName, err))
+			continue
+		}
+		if len(indexList) > 0 {
+			params := make(map[string]interface{})
+			params["List"] = indexList
+			params["TerminalCode"] = terminalCode
+			result, e := PostEdbLib(params, utils.LIB_ROUTE_YONGYI_HANDLE)
+			if e != nil {
+				b, _ := json.Marshal(params)
+				utils.FileLog.Info(fmt.Sprintf("sheet :%s PostEdbLib err: %s, params: %s", sheetName, e.Error(), string(b)))
+				continue
+			}
+			resp := new(models.BaseEdbLibResponse)
+			if e := json.Unmarshal(result, &resp); e != nil {
+				utils.FileLog.Info(fmt.Sprintf("sheet :%s json.Unmarshal err: %s", sheetName, e))
+				continue
+			}
+			if resp.Ret != 200 {
+				utils.FileLog.Info(fmt.Sprintf("sheet :%s Msg: %s, ErrMsg: %s", sheetName, resp.Msg, resp.ErrMsg))
+				continue
+			}
+		}
+	}
+	return
+}
+
+func HandleYongyiExcelWeeklyV2(filePath string) (err error) {
+	//filePath = fmt.Sprintf("/Users/xiexiaoyuan/Downloads/涌益生猪项目数据库-3/2024.1.26-2024.2.1涌益咨询周度数据.xlsx")
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeeklyV2 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeeklyV2 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	_ = path.Base(filePath)
+	f, e := excelize.OpenFile(filePath)
+	if e != nil {
+		err = fmt.Errorf("open file err: %s", e.Error())
+		return
+	}
+	defer func() {
+		if e = f.Close(); e != nil {
+			err = fmt.Errorf("f close err: %s", e.Error())
+		}
+	}()
+	terminalCode := utils.TerminalCode
+	for _, sheetName := range f.GetSheetMap() {
+		// 检查是否有对应的处理函数
+		handler, ok := YongyiWeeklyHandlers[sheetName]
+		if !ok {
+			continue // 如果没有,则跳过当前sheet
+		}
+
+		// 调用处理函数,并处理可能发生的错误
+		utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeeklyV2 %s start", sheetName))
+		indexList, e := handler(f, sheetName)
+		utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeeklyV2 %s end", sheetName))
+		if e != nil {
+			utils.FileLog.Info(fmt.Sprintf("解析sheet:%s 失败, Err: %s", sheetName, err))
+			continue
+		}
+		if len(indexList) > 0 {
+			params := make(map[string]interface{})
+			params["List"] = indexList
+			params["TerminalCode"] = terminalCode
+			result, e := PostEdbLib(params, utils.LIB_ROUTE_YONGYI_HANDLE)
+			if e != nil {
+				b, _ := json.Marshal(params)
+				utils.FileLog.Info(fmt.Sprintf("sheet :%s PostEdbLib err: %s, params: %s", sheetName, e.Error(), string(b)))
+				continue
+			}
+			resp := new(models.BaseEdbLibResponse)
+			if e := json.Unmarshal(result, &resp); e != nil {
+				utils.FileLog.Info(fmt.Sprintf("sheet :%s json.Unmarshal err: %s", sheetName, e))
+				continue
+			}
+			if resp.Ret != 200 {
+				utils.FileLog.Info(fmt.Sprintf("sheet :%s Msg: %s, ErrMsg: %s", sheetName, resp.Msg, resp.ErrMsg))
+				continue
+			}
+		}
+	}
+	return
+}
+
+func HandleYongyiExcelWeeklyChart(filePath string) (err error) {
+	//filePath = fmt.Sprintf("/Users/xiexiaoyuan/Downloads/涌益生猪项目数据库-3/2024.1.26-2024.2.1周度图表版图.xlsx")
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeeklyChart ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeeklyChart ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	_ = path.Base(filePath)
+	f, e := excelize.OpenFile(filePath)
+	if e != nil {
+		err = fmt.Errorf("open file err: %s", e.Error())
+		return
+	}
+	defer func() {
+		if e = f.Close(); e != nil {
+			err = fmt.Errorf("f close err: %s", e.Error())
+		}
+	}()
+	terminalCode := utils.TerminalCode
+	for _, sheetName := range f.GetSheetMap() {
+		// 检查是否有对应的处理函数
+		handler, ok := YongyiWeeklyChartHandlers[sheetName]
+		if !ok {
+			continue // 如果没有,则跳过当前sheet
+		}
+		utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeeklyChart %s start", sheetName))
+		// 调用处理函数,并处理可能发生的错误
+		indexList, e := handler(f, sheetName)
+		utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeeklyChart %s end", sheetName))
+		if e != nil {
+			utils.FileLog.Info(fmt.Sprintf("解析sheet:%s 失败, Err: %s", sheetName, err))
+			continue
+		}
+		if len(indexList) > 0 {
+			params := make(map[string]interface{})
+			params["List"] = indexList
+			params["TerminalCode"] = terminalCode
+			result, e := PostEdbLib(params, utils.LIB_ROUTE_YONGYI_HANDLE)
+			if e != nil {
+				b, _ := json.Marshal(params)
+				utils.FileLog.Info(fmt.Sprintf("sheet :%s PostEdbLib err: %s, params: %s", sheetName, e.Error(), string(b)))
+				continue
+			}
+			resp := new(models.BaseEdbLibResponse)
+			if e := json.Unmarshal(result, &resp); e != nil {
+				utils.FileLog.Info(fmt.Sprintf("sheet :%s json.Unmarshal err: %s", sheetName, e))
+				continue
+			}
+			if resp.Ret != 200 {
+				utils.FileLog.Info(fmt.Sprintf("sheet :%s Msg: %s, ErrMsg: %s", sheetName, resp.Msg, resp.ErrMsg))
+				continue
+			}
+		}
+	}
+	return
+}

+ 55 - 32
services/base_from_yongyi/daily.go

@@ -4,7 +4,7 @@ import (
 	"eta/eta_data_analysis/models"
 	"eta/eta_data_analysis/utils"
 	"fmt"
-	"github.com/tealeg/xlsx"
+	"github.com/tealeg/xlsx/v3"
 	"strconv"
 	"strings"
 	"time"
@@ -25,6 +25,7 @@ func HandleYongyiExcelDaily1(sheet *xlsx.Sheet) (indexList []*models.YongyiExcel
 	dateMap := make(map[int]string)
 	nameMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -33,13 +34,18 @@ func HandleYongyiExcelDaily1(sheet *xlsx.Sheet) (indexList []*models.YongyiExcel
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if stopFlag {
 			break
 		}
+
 		if i == 0 { // 首行,表示时间
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if k > 1 && text != "" {
 					if cell.IsTime() {
@@ -57,18 +63,16 @@ func HandleYongyiExcelDaily1(sheet *xlsx.Sheet) (indexList []*models.YongyiExcel
 				}
 			}
 		} else if i == 1 { //表示表头
-			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				nameMap[k] = text
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			province := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				fmt.Printf("当前第%d列,内容为%s \n", k, text)
 				if k == 0 {
@@ -167,6 +171,7 @@ func HandleYongyiExcelDaily2(sheet *xlsx.Sheet) (indexList []*models.YongyiExcel
 	dateMap := make(map[int]string)
 	nameMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -175,13 +180,18 @@ func HandleYongyiExcelDaily2(sheet *xlsx.Sheet) (indexList []*models.YongyiExcel
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if stopFlag {
 			break
 		}
 		if i == 0 { // 首行,表示时间
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" {
 					if cell.IsTime() {
@@ -200,17 +210,17 @@ func HandleYongyiExcelDaily2(sheet *xlsx.Sheet) (indexList []*models.YongyiExcel
 			}
 		} else if i == 1 { //表示表头
 			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				nameMap[k] = text
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			province := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {
@@ -312,6 +322,7 @@ func HandleYongyiExcelDaily3(sheet *xlsx.Sheet) (indexList []*models.YongyiExcel
 	indexList = make([]*models.YongyiExcelIndex, 0)
 	nameMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -323,18 +334,24 @@ func HandleYongyiExcelDaily3(sheet *xlsx.Sheet) (indexList []*models.YongyiExcel
 			break
 		}
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
+
 		if i == 0 { // 首行,名称
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				nameMap[k] = text
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			date := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {
@@ -424,6 +441,7 @@ func HandleYongyiExcelDaily4(sheet *xlsx.Sheet) (indexList []*models.YongyiExcel
 	indexList = make([]*models.YongyiExcelIndex, 0)
 	dateMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -432,13 +450,18 @@ func HandleYongyiExcelDaily4(sheet *xlsx.Sheet) (indexList []*models.YongyiExcel
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if stopFlag {
 			break
 		}
 		if i == 0 { // 首行,表示时间
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" && text != "省份" {
 					if cell.IsTime() {
@@ -461,10 +484,10 @@ func HandleYongyiExcelDaily4(sheet *xlsx.Sheet) (indexList []*models.YongyiExcel
 				}
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			province := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {

+ 136 - 76
services/base_from_yongyi/week.go

@@ -4,7 +4,7 @@ import (
 	"eta/eta_data_analysis/models"
 	"eta/eta_data_analysis/utils"
 	"fmt"
-	"github.com/tealeg/xlsx"
+	"github.com/tealeg/xlsx/v3"
 	"strconv"
 	"strings"
 	"time"
@@ -56,6 +56,7 @@ func HandleYongyiExcelWeekly1(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	areaMap := make(map[int]string)
 	provinceMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -63,10 +64,15 @@ func HandleYongyiExcelWeekly1(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if i == 0 { // 首行,表示时间
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if k > 1 && text != "" {
 					// 检查单元格是否为合并单元格
@@ -83,19 +89,19 @@ func HandleYongyiExcelWeekly1(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 			}
 		} else if i == 1 { //表示表头
 			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" {
 					provinceMap[k] = text
 				}
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			date := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {
@@ -190,6 +196,7 @@ func HandleYongyiExcelWeekly2(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	areaMap := make(map[int]string)
 	provinceMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -197,10 +204,15 @@ func HandleYongyiExcelWeekly2(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if i == 0 { // 首行,表示时间
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if k > 2 && text != "" {
 					// 检查单元格是否为合并单元格
@@ -217,20 +229,20 @@ func HandleYongyiExcelWeekly2(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 			}
 		} else if i == 1 { //表示表头
 			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" {
 					provinceMap[k] = text
 				}
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			date := ""
 			name := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {
@@ -331,6 +343,7 @@ func HandleYongyiExcelWeekly3(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexList = make([]*models.YongyiExcelIndex, 0)
 	provinceMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -338,13 +351,18 @@ func HandleYongyiExcelWeekly3(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if i < 2 {
 			continue
 		}
 		if i == 2 { // 首行,表示时间
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if k > 2 && text != "" {
 					// 检查单元格是否为合并单元格
@@ -355,19 +373,19 @@ func HandleYongyiExcelWeekly3(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 			}
 		} else if i == 3 { //表示表头
 			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" {
 					provinceMap[k] = text
 				}
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			date := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {
@@ -456,6 +474,7 @@ func HandleYongyiExcelWeekly4(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexList = make([]*models.YongyiExcelIndex, 0)
 	provinceMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -463,24 +482,29 @@ func HandleYongyiExcelWeekly4(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if i == 0 {
 			continue
 		} else if i == 1 { //表示表头
 			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" {
 					provinceMap[k] = text
 				}
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			date := ""
 			name := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {
@@ -591,6 +615,7 @@ func HandleYongyiExcelWeekly5(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexList = make([]*models.YongyiExcelIndex, 0)
 	provinceMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -598,10 +623,15 @@ func HandleYongyiExcelWeekly5(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if i == 0 {
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if k > 1 && text != "" {
 					if cell.VMerge > 0 {
@@ -612,19 +642,19 @@ func HandleYongyiExcelWeekly5(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 			continue
 		} else if i == 1 { //表示表头
 			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" {
 					provinceMap[k] = text
 				}
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			date := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {
@@ -719,6 +749,7 @@ func HandleYongyiExcelWeekly6(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexList = make([]*models.YongyiExcelIndex, 0)
 	areaMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -726,23 +757,28 @@ func HandleYongyiExcelWeekly6(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if i == 0 {
 			continue
 		} else if i == 1 { //表示表头
 			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" {
 					areaMap[k] = text
 				}
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			date := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {
@@ -827,6 +863,7 @@ func HandleYongyiExcelWeekly7(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	provinceMap := make(map[int]string)
 	firstMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -834,11 +871,16 @@ func HandleYongyiExcelWeekly7(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if i == 0 {
 			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" {
 					firstMap[k] = text
@@ -847,19 +889,19 @@ func HandleYongyiExcelWeekly7(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 			continue
 		} else if i == 1 { //表示表头
 			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" {
 					provinceMap[k] = text
 				}
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			date := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {
@@ -958,6 +1000,7 @@ func HandleYongyiExcelWeekly8(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexList = make([]*models.YongyiExcelIndex, 0)
 	areaMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -965,23 +1008,28 @@ func HandleYongyiExcelWeekly8(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if i <= 2 {
 			continue
 		} else if i == 3 { //表示表头
 			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" {
 					areaMap[k] = text
 				}
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			date := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {
@@ -1073,6 +1121,7 @@ func HandleYongyiExcelWeekly9(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexList = make([]*models.YongyiExcelIndex, 0)
 	areaMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -1080,23 +1129,28 @@ func HandleYongyiExcelWeekly9(sheet *xlsx.Sheet) (indexList []*models.YongyiExce
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if i <= 1 {
 			continue
 		} else if i == 2 { //表示表头
 			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" {
 					areaMap[k] = text
 				}
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			date := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {
@@ -1184,6 +1238,7 @@ func HandleYongyiExcelWeekly10(sheet *xlsx.Sheet) (indexList []*models.YongyiExc
 	indexList = make([]*models.YongyiExcelIndex, 0)
 	areaMap := make(map[int]string)
 	maxRow := sheet.MaxRow
+	maxCell := sheet.MaxCol
 	sort := 0
 	fmt.Println("最大行")
 	fmt.Println(maxRow)
@@ -1191,23 +1246,28 @@ func HandleYongyiExcelWeekly10(sheet *xlsx.Sheet) (indexList []*models.YongyiExc
 	indexMap := make(map[string]*models.YongyiExcelIndex)
 	for i := 0; i < maxRow; i++ {
 		fmt.Printf("当前第%d行 \n", i)
+		row, e := sheet.Row(i)
+		if e != nil {
+			err = fmt.Errorf("读取行失败")
+			return
+		}
 		if i == 0 {
 			continue
 		} else if i == 1 { //表示表头
 			// 处理 index指标表
-			row := sheet.Row(i)
-			cells := row.Cells
-			for k, cell := range cells {
+
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				text := cell.String()
 				if text != "" {
 					areaMap[k] = text
 				}
 			}
 		} else { //数据列
-			row := sheet.Row(i)
-			cells := row.Cells
+
 			date := ""
-			for k, cell := range cells {
+			for k := 0; k < maxCell; k++ {
+				cell := row.GetCell(k)
 				fmt.Printf("当前第%d列 \n", k)
 				text := cell.String()
 				if k == 0 {

+ 240 - 0
services/base_from_yongyi_v2/base.go

@@ -0,0 +1,240 @@
+package base_from_yongyi_v2
+
+import (
+	"eta/eta_data_analysis/models"
+	"eta/eta_data_analysis/utils"
+	"fmt"
+	"github.com/xuri/excelize/v2"
+	"strings"
+)
+
+func getClassifySortMap() map[string]int {
+	classifyMap := map[string]int{
+		"日度-商品猪出栏价":            1,
+		"日度-商品猪标肥价差":           2,
+		"日度-商品猪全国均价和宰量":        3,
+		"日度-屠宰企业屠宰量":           4,
+		"历史猪价":                 5,
+		"周度-商品猪出栏价":            6,
+		"周度-体重":                7,
+		"周度-屠宰厂宰前活猪重":          8,
+		"周度-各体重段价差":            9,
+		"二育成本":                 10,
+		"二育销量":                 11,
+		"育肥栏舍利用率":              12,
+		"周度-养殖利润最新":            13,
+		"周度-当期、预期成本":           14,
+		"周度-育肥全价料出厂价":          15,
+		"周度-成本计算附件":            16,
+		"周度-毛白价差":              17,
+		"周度-50公斤二元母猪价格":        18,
+		"周度-规模场15公斤仔猪出栏价":      19,
+		"仔猪、母猪":                20,
+		"周度-河南屠宰白条成本":          21,
+		"周度-淘汰母猪价格":            22,
+		"周度-宰后结算价":             23,
+		"周度-冻品库存":              24,
+		"周度-冻品库存多样本":           25,
+		"周度-鲜销率":               26,
+		"周度-猪肉价(前三等级白条均价)":     27,
+		"周度-猪肉产品价格":            28,
+		"周度-屠宰企业日度屠宰量":         29,
+		"周度-屠宰新2022.10.28":     30,
+		"月度出栏完成率":              31,
+		"月度计划出栏量":              32,
+		"月度-淘汰母猪屠宰厂宰杀量":        33,
+		"月度-猪料销量":              34,
+		"月度-屠宰企业开工率":           35,
+		"月度-屠宰厂公母比例":           36,
+		"月度-生产指标(2021.5.7新增)":  37,
+		"月度-生产指标2":             38,
+		"月度-二元三元能繁比例":          39,
+		"月度-能繁母猪存栏(2020年2月新增)": 40,
+		"月度-小猪存栏(2020年5月新增)":   41,
+		"月度-中猪存栏(2020年5月新增)":   42,
+		"月度-大猪存栏(2020年5月新增)":   43,
+		"月度-商品猪出栏量":            44,
+		"月度-能繁母猪存栏量":           45,
+		"月度-原种场二元后备母猪销量及出栏日龄":  46,
+		"涌益样本测算":               47,
+	}
+	return classifyMap
+}
+
+var YongyiWeeklySheetMap5 map[string]*models.YongyiSheet
+var YongyiWeeklySheetMap6 map[string]*models.YongyiSheet
+var YongyiWeeklySheetMap9 map[string]*models.YongyiSheet
+
+var YongyiBaseInfoMap map[string]*models.YongyiSheet
+
+func init() {
+	YongyiWeeklySheetMap5 = map[string]*models.YongyiSheet{
+		"周度-50公斤二元母猪价格":    {"50公斤二元母猪价格", "周度-50公斤二元母猪价格", "周度", "元/头"},
+		"周度-规模场15公斤仔猪出栏价":  {"规模场15公斤仔猪出栏价", "周度-规模场15公斤仔猪出栏价", "周度", "元/头"},
+		"周度-宰后结算价":         {"宰后结算价", "周度-宰后结算价", "周度", "元/公斤"},
+		"周度-冻品库存":          {"冻品库存", "周度-冻品库存", "周度", "%"},
+		"周度-猪肉价(前三等级白条均价)": {"前三等级白条均价", "周度-猪肉价(前三等级白条均价)", "周度", "元/公斤"},
+	}
+	YongyiWeeklySheetMap6 = map[string]*models.YongyiSheet{
+		"周度-冻品库存多样本": {"冻品库存多样本", "周度-冻品库存多样本", "周度", "%"},
+		"月度出栏完成率":    {"出栏完成率", "月度出栏完成率", "旬度", "%"},
+	}
+	YongyiWeeklySheetMap9 = map[string]*models.YongyiSheet{
+		"月度-小猪存栏(2020年5月新增)": {"50kg以下小猪存栏量", "月度-小猪存栏(2020年5月新增)", "月度", "头"},
+		"月度-中猪存栏(2020年5月新增)": {"中猪存栏量", "月度-中猪存栏(2020年5月新增)", "月度", "头"},
+		"月度-大猪存栏(2020年5月新增)": {"大猪存栏量", "月度-大猪存栏(2020年5月新增)", "月度", "头"},
+	}
+
+	YongyiBaseInfoMap = map[string]*models.YongyiSheet{
+		"出栏价":                  {"商品猪出栏价", "日度-商品猪出栏价", "日度", "元/公斤"},
+		"标肥价差":                 {"", "日度-商品猪标肥价差", "日度", "元/公斤"},
+		"价格+宰量":                {"", "日度-商品猪全国均价和宰量", "日度", "元/公斤"},
+		"屠宰企业日度屠宰量":            {"商品猪日屠宰量", "日度-屠宰企业屠宰量", "日度", "头"},
+		"周度-商品猪出栏价":            {"商品猪出栏价", "周度-商品猪出栏价", "周度", "元/公斤"},
+		"周度-体重":                {"商品猪出栏体重", "周度-体重", "周度", "公斤"},
+		"周度-屠宰厂宰前活猪重":          {"商品猪宰前活猪重", "周度-屠宰厂宰前活猪重", "周度", "公斤"},
+		"周度-各体重段价差":            {"", "周度-各体重段价差", "周度", "元/斤"},
+		"周度-50公斤二元母猪价格":        {"50公斤二元母猪价格", "周度-50公斤二元母猪价格", "周度", "元/头"},
+		"周度-规模场15公斤仔猪出栏价":      {"规模场15公斤仔猪出栏价", "周度-规模场15公斤仔猪出栏价", "周度", "元/头"},
+		"周度-宰后结算价":             {"宰后结算价", "周度-宰后结算价", "周度", "元/公斤"},
+		"周度-冻品库存":              {"冻品库存", "周度-冻品库存", "周度", "%"},
+		"周度-冻品库存多样本":           {"冻品库存多样本", "周度-冻品库存多样本", "周度", "%"},
+		"周度-猪肉价(前三等级白条均价)":     {"前三等级白条均价", "周度-猪肉价(前三等级白条均价)", "周度", "元/公斤"},
+		"月度出栏完成率":              {"出栏完成率", "月度出栏完成率", "旬度", "%"},
+		"月度计划出栏量":              {"月度计划出栏量环比", "月度计划出栏量", "月度", "%"},
+		"月度-能繁母猪存栏(2020年2月新增)": {"能繁母猪存栏量", "月度-能繁母猪存栏(2020年2月新增)", "月度", "头"},
+		"月度-小猪存栏(2020年5月新增)":   {"50kg以下小猪存栏量", "月度-小猪存栏(2020年5月新增)", "月度", "头"},
+		"月度-中猪存栏(2020年5月新增)":   {"中猪存栏量", "月度-中猪存栏(2020年5月新增)", "月度", "头"},
+		"月度-大猪存栏(2020年5月新增)":   {"大猪存栏量", "月度-大猪存栏(2020年5月新增)", "月度", "头"},
+		"月度-商品猪出栏量":            {"商品猪出栏量", "月度-商品猪出栏量", "月度", "头"},
+		"历史猪价":                 {"历史猪价", "历史猪价", "月度", "元/公斤"},
+		"二育成本":                 {"", "二育成本", "周度", "kg"}, //单位有四种kg、无, 元/kg, 元
+		"二育销量":                 {"二育销量", "二育销量", "周度", "%"},
+		"育肥栏舍利用率":              {"育肥栏舍利用率", "育肥栏舍利用率", "旬度", "%"},
+		"周度-养殖利润最新":            {"出栏肥猪利润", "周度-养殖利润最新", "周度", "元/头"},
+		"周度-当期、预期成本":           {"", "周度-当期、预期成本", "周度", "元/kg"},
+		"育肥全价料出厂价":             {"育肥全价料出厂均价参考", "周度-育肥全价料出厂价", "周度", "元/吨"},
+		"周度-成本计算附件":            {"", "周度-成本计算附件", "周度", "元/头"}, //多个单位:元/头,%,kg,元
+		"周度-毛白价差":              {"毛白价差", "周度-毛白价差", "周度", "元/公斤"},
+		"仔猪、母猪":                {"", "仔猪、母猪", "周度", "元/头"},                //多个前缀,仔猪价,二元母猪价
+		"周度-河南屠宰白条成本":          {"河南屠宰白条成本", "周度-河南屠宰白条成本", "周度", "元/kg"}, //多个单位:kg,元/kg,元/头
+		"周度-淘汰母猪价格":            {"淘汰母猪价格", "周度-淘汰母猪价格", "周度", "元/斤"},
+		"鲜销率":                  {"鲜销率", "周度-鲜销率", "周度", "%"},
+		"周度-猪肉产品价格":            {"猪肉产品价格", "周度-猪肉产品价格", "周度", "元/公斤"},
+		"周度-屠宰企业日度屠宰量":         {"屠宰企业日度屠宰量", "周度-屠宰企业日度屠宰量", "周度", "头"},
+		"周度-屠宰新2022.10.28":     {"不同规模屠宰厂宰杀量", "周度-屠宰新2022.10.28", "周度", "头"},
+		"月度-淘汰母猪屠宰厂宰杀量":        {"淘汰母猪屠宰厂宰杀量", "月度-淘汰母猪屠宰厂宰杀量", "月度", "头"},
+		"月度-猪料销量":              {"饲料销量(环比)", "月度-猪料销量", "月度", "头"}, //todo 单位有问题
+		"月度-屠宰企业开工率":           {"", "月度-屠宰企业开工率", "月度", "%"},
+		"月度-屠宰厂公母比例":           {"屠宰厂", "月度-屠宰厂公母比例", "月度", "头"},           //多个单位:头,%
+		"月度-生产指标(2021.5.7新增)":  {"生产指标", "月度-生产指标(2021.5.7新增)", "月度", "头"}, //多个单位:头,%
+		"月度-生产指标2":             {"生产指标", "月度-生产指标2", "月度", "头"},            //多个单位:头,%
+		"月度-二元三元能繁比例":          {"能繁母猪存栏量", "月度-二元三元能繁比例", "月度", "%"},      //多个单位:头,%
+		"月度-能繁母猪存栏量":           {"月度能繁母猪存栏量", "月度-能繁母猪存栏量", "月度", "头"},
+		"月度-原种场二元后备母猪销量及出栏日龄":  {"原种场二元后备母猪销量及出栏日龄", "月度-原种场二元后备母猪销量及出栏日龄", "月度", "头"},
+		"涌益样本测算":               {"涌益样本测算", "涌益样本测算", "月度", "窝"}, //多个单位:头,%,窝,公斤,元/公斤
+	}
+}
+
+func GetBaseInfo(sheetName string) (classifyName string, classifySort int, frequency string, unit string, namePrefix string, namePrefixPingin string) {
+	// 获取指标分类
+	info, ok := YongyiBaseInfoMap[sheetName]
+	if !ok {
+		return
+	}
+	classifyName = info.ClassifyName
+	classifyMap := getClassifySortMap()
+	classifySort, _ = classifyMap[classifyName]
+	frequency = info.Frequency
+	unit = info.Unit
+	namePrefix = info.NamePrefix
+	namePrefixPingin = "yyzx" + utils.GetFirstPingYin(namePrefix)
+	return
+}
+
+func GetMergeCells(f *excelize.File, sheet string) (mergeCellMap map[int]map[int]string, err error) {
+	mergedCells, err := f.GetMergeCells(sheet)
+	if err != nil {
+		fmt.Println(err)
+		return
+	}
+
+	mergeCellMap = make(map[int]map[int]string)
+	// 遍历所有合并单元格范围
+	for _, cellRange := range mergedCells {
+		fmt.Println("Merged Cell Range:", cellRange)
+		cellVal := cellRange.GetCellValue()
+		// 解析合并单元格范围,例如 "A1:B2"
+		startCell, endCell := cellRange.GetStartAxis(), cellRange.GetEndAxis()
+		if err != nil {
+			fmt.Println(err)
+			continue
+		}
+
+		// 解析起始单元格的下标
+		startCol, startRow, err := excelize.CellNameToCoordinates(startCell)
+		if err != nil {
+			fmt.Println(err)
+			continue
+		}
+
+		// 解析结束单元格的下标
+		endCol, endRow, err := excelize.CellNameToCoordinates(endCell)
+		if err != nil {
+			fmt.Println(err)
+			continue
+		}
+
+		// 打印合并单元格的起始和结束下标
+		fmt.Printf("Start: Row %d, Col %d\n", startRow, startCol)
+		fmt.Printf("End: Row %d, Col %d\n", endRow, endCol)
+		//把合并的单元格整理成单个单元格,用于计算
+		for i := startRow; i <= endRow; i++ {
+			cellMap, ok := mergeCellMap[i-1]
+			if !ok {
+				cellMap = make(map[int]string)
+			}
+			for j := startCol; j <= endCol; j++ {
+				cellMap[j-1] = strings.TrimSpace(cellVal)
+			}
+			mergeCellMap[i-1] = cellMap
+		}
+	}
+	return
+}
+
+// GetWeekly13IndexName 二育成本指标名称处理
+func GetWeekly13IndexName(name, level string) string {
+	switch {
+	case strings.Contains(name, "二育主流采购体重段"):
+		return fmt.Sprintf("二育主流%s采购体重段", level)
+	case strings.Contains(name, "计划出栏体重"):
+		return fmt.Sprintf("计划%s出栏体重", level)
+	case strings.Contains(name, "料肉比"):
+		return fmt.Sprintf("%s料肉比", level)
+	case strings.Contains(name, "采购成本"):
+		return fmt.Sprintf("%s采购成本", level)
+	case strings.Contains(name, "运费+损耗"):
+		return fmt.Sprintf("%s运费+损耗", level)
+	case strings.Contains(name, "增重饲料成本"):
+		return fmt.Sprintf("%s增重饲料成本", level)
+	case strings.Contains(name, "二育成本"):
+		return fmt.Sprintf("%s二育成本", level)
+	}
+	return name
+}
+
+// GetWeekly13IndexUnit 二育成本指标名称处理
+func GetWeekly13IndexUnit(name string) string {
+	switch {
+	case strings.Contains(name, "二育主流采购体重段") || strings.Contains(name, "计划出栏体重"):
+		return "kg"
+	case strings.Contains(name, "料肉比"):
+		return "无"
+	case strings.Contains(name, "采购成本") || strings.Contains(name, "运费+损耗") || strings.Contains(name, "二育成本"):
+		return "元/kg"
+	case strings.Contains(name, "增重饲料成本"):
+		return "元"
+	}
+	return name
+}

+ 144 - 0
services/base_from_yongyi_v2/chartWeek.go

@@ -0,0 +1,144 @@
+package base_from_yongyi_v2
+
+import (
+	"eta/eta_data_analysis/models"
+	"eta/eta_data_analysis/utils"
+	"fmt"
+	"github.com/xuri/excelize/v2"
+	"strconv"
+	"strings"
+	"time"
+)
+
+// HandleYongyiExcelWeekly36 涌溢样本测算
+func HandleYongyiExcelWeekly36(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly36 涌溢样本测算 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly36 涌溢样本测算 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	sort := 0
+	nameMap := make(map[int]string)
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 {
+			continue
+		} else if i == 1 {
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					// 查询当月的最后一天
+					monthDate := dateT.Format(utils.FormatYearMonthDate)
+					firstDayStr := monthDate + "-01"
+					tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+					date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, name)
+				if strings.Contains(name, "时间") || name == "肉产量(吨)" || name == "肉产量(万吨)" || name == "断奶仔猪量" {
+					continue
+				}
+				switch {
+				case strings.Contains(name, "分娩母猪窝数"):
+					unit = "窝"
+				case strings.Contains(name, "窝均健仔数"):
+					unit = "头"
+				case strings.Contains(name, "次月断奶成活率"):
+					unit = "%"
+				case strings.Contains(name, "育肥出栏成活率"):
+					unit = "%"
+				case strings.Contains(name, "出栏量"):
+					name = "出栏量"
+					unit = "头"
+				case strings.Contains(name, "出栏体重(公斤)"):
+					name = "出栏体重"
+					unit = "公斤"
+				case strings.Contains(name, "出肉率"):
+					unit = "%"
+				case strings.Contains(name, "肉产量(公斤)"):
+					name = "肉产量"
+					unit = "公斤"
+				case strings.Contains(name, "猪价(元/公斤)"):
+					name = "猪价"
+					unit = "元/公斤"
+				}
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, name)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + namePingin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}

+ 564 - 0
services/base_from_yongyi_v2/daily.go

@@ -0,0 +1,564 @@
+package base_from_yongyi_v2
+
+import (
+	"eta/eta_data_analysis/models"
+	"eta/eta_data_analysis/utils"
+	"fmt"
+	"github.com/xuri/excelize/v2"
+	"strconv"
+	"strings"
+	"time"
+)
+
+// HandleYongyiExcelDaily1 日度-商品猪出栏价
+func HandleYongyiExcelDaily1(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelDaily1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelDaily1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	dateMap := make(map[int]string)
+	nameMap := make(map[int]string)
+	sort := 0
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+
+		// 首行,表示时间
+		if i == 0 {
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k > 1 && text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							// 日期
+							v = strings.TrimSpace(v)
+							var dateT time.Time
+							dateT, e = time.ParseInLocation("01-2-06", v, time.Local)
+							if e != nil {
+								utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+								continue
+							}
+							dateMap[j] = dateT.Format(utils.FormatDate)
+						}
+					}
+					// 日期
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("01-2-06", text, time.Local)
+					if e != nil {
+						//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					dateMap[k] = dateT.Format(utils.FormatDate)
+				}
+			}
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if text != "" {
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			province := ""
+			for k, text := range row {
+				text = strings.TrimSpace(text)
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					province = text
+					continue
+				} else if k == 1 {
+					continue
+				} else {
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+				date, ok1 := dateMap[k]
+				if !ok1 {
+					utils.FileLog.Info(fmt.Sprintf("找不到对应的日期,第%d行,第%d列, text:%s", i, k, text))
+					continue
+				}
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if name == "全国均价" {
+					name = "全国"
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s/%s", namePrefix, province, name)
+
+				if name != "规模场" && name != "小散户" && name != "均价" {
+					// 只处理以上三个类型,其余过滤
+					continue
+				}
+
+				if fullIndexName == "商品猪出栏价/全国/均价" {
+					continue
+				}
+
+				provincePingyin := utils.GetFullPingYin(province)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := fmt.Sprintf("%s%s%s", namePrefixPingin, provincePingyin, namePingin)
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		fmt.Printf("IndexName: %s \n", v.IndexName)
+		fmt.Printf("IndexCode: %s \n", v.IndexCode)
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelDaily2 日度-商品猪标肥价差
+func HandleYongyiExcelDaily2(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelDaily2 日度-商品猪标肥价差 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelDaily2 日度-商品猪标肥价差 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, _, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	dateMap := make(map[int]string)
+	nameMap := make(map[int]string)
+	sort := 0
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+
+		// 首行,表示时间
+		if i == 0 {
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							// 日期
+							v = strings.TrimSpace(v)
+							var dateT time.Time
+							dateT, e = time.ParseInLocation("01-2-06", v, time.Local)
+							if e != nil {
+								utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+								continue
+							}
+							dateMap[j] = dateT.Format(utils.FormatDate)
+						}
+					}
+					// 日期
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("01-2-06", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					dateMap[k] = dateT.Format(utils.FormatDate)
+				}
+			}
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if text != "" {
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			province := ""
+			for k, text := range row {
+				text = strings.TrimSpace(text)
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					province = text
+					continue
+				} else {
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				date, ok1 := dateMap[k]
+				if !ok1 {
+					utils.FileLog.Info(fmt.Sprintf("找不到对应的日期,第%d行,第%d列, text:%s", i, k, text))
+					continue
+				}
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if province == "全国均价" {
+					province = "全国"
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+
+				// 过滤特殊的指标 放到对应的指标名称的下方
+
+				if name != "市场标重猪" && name != "150公斤左右较标猪" && name != "175公斤左右较标猪" {
+					// 只处理以上三个类型,其余过滤
+					continue
+				}
+
+				if name == "150公斤左右较标猪" {
+					name = "150公斤较标猪价差"
+				} else if name == "175公斤左右较标猪" {
+					name = "175公斤较标猪价差"
+				} else if name == "市场标重猪" {
+					name = "市场标重猪价"
+				} else if name == "全国均价" {
+					name = "全国"
+				}
+				fullIndexName := fmt.Sprintf("%s/%s", name, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := fmt.Sprintf("%s%s%s", namePrefixPingin, namePingin, provincePingyin)
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		fmt.Printf("IndexName: %s \n", v.IndexName)
+		fmt.Printf("IndexCode: %s \n", v.IndexCode)
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelDaily3 日度-商品猪全国均价和宰量
+func HandleYongyiExcelDaily3(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelDaily3 日度-商品猪全国均价和宰量 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelDaily3 日度-商品猪全国均价和宰量 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, _, _ := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	nameMap := make(map[int]string)
+	sort := 0
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		// 首行,表示时间
+		if i == 0 {
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				text = strings.TrimSpace(text)
+				if text != "" {
+					// 日期
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				text = strings.TrimSpace(text)
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("01-2-06", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					continue
+				} else {
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if name != "全国均价" && name != "日屠宰量" {
+					// 只处理以上三个类型,其余过滤
+					continue
+				}
+				var fullIndexNamePingyin string
+				if name == "全国均价" {
+					name = "商品猪出拦价/全国/均价"
+					fullIndexNamePingyin = "yyzxspzcljquanguojj"
+					unit = "元/公斤"
+				} else if name == "日屠宰量" {
+					name = "商品猪日屠宰量/全国"
+					fullIndexNamePingyin = "yyzxspzrtzlquanguo"
+					unit = "头/日"
+				}
+				fullIndexName := name
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		fmt.Printf("IndexName: %s \n", v.IndexName)
+		fmt.Printf("IndexCode: %s \n", v.IndexCode)
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelDaily4 日度-屠宰企业屠宰量
+func HandleYongyiExcelDaily4(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelDaily4 日度-屠宰企业屠宰量 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelDaily4 日度-屠宰企业屠宰量 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	dateMap := make(map[int]string)
+	sort := 0
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		// 首行,表示时间
+		if i == 0 {
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if text != "" {
+					// 日期
+					text = strings.TrimSpace(text)
+					dateSlice := strings.Split(text, "(")
+					if len(dateSlice) > 1 {
+						text = dateSlice[0]
+					}
+					var dateT time.Time
+					//判断是否是数字,如果是数字,另外单独处理
+					if dateFloat, e := strconv.ParseFloat(text, 64); e == nil {
+						dateT, e = excelize.ExcelDateToTime(dateFloat, false)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+					} else {
+						dateT, e = time.ParseInLocation("01-2-06", text, time.Local)
+						if e != nil {
+							dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+							if e != nil {
+								utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+								continue
+							}
+						}
+					}
+					dateMap[k] = dateT.Format(utils.FormatDate)
+				}
+			}
+		} else { //数据列
+			province := ""
+			for k, text := range row {
+				text = strings.TrimSpace(text)
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					province = text
+					continue
+				} else {
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				date, ok1 := dateMap[k]
+				if !ok1 {
+					utils.FileLog.Info(fmt.Sprintf("找不到对应的日期,第%d行,第%d列, text:%s", i, k, text))
+					continue
+				}
+				if province == "合计(单位:头)" {
+					continue
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+
+				// 过滤特殊的指标 放到对应的指标名称的下方
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, province)
+
+				provincePingyin := utils.GetFullPingYin(province)
+				fullIndexNamePingyin := fmt.Sprintf("%s%s", namePrefixPingin, provincePingyin)
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		fmt.Printf("IndexName: %s \n", v.IndexName)
+		fmt.Printf("IndexCode: %s \n", v.IndexCode)
+		indexList = append(indexList, v)
+	}
+	return
+}

+ 1368 - 0
services/base_from_yongyi_v2/week10.go

@@ -0,0 +1,1368 @@
+package base_from_yongyi_v2
+
+import (
+	"eta/eta_data_analysis/models"
+	"eta/eta_data_analysis/utils"
+	"fmt"
+	"github.com/xuri/excelize/v2"
+	"strconv"
+	"strings"
+	"time"
+)
+
+// HandleYongyiExcelWeekly1 周度-商品猪出栏价
+func HandleYongyiExcelWeekly1(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	areaMap := make(map[int]string)
+	provinceMap := make(map[int]string)
+	sort := 0
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+
+		// 首行,表示时间
+		if i == 0 {
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k > 1 && text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							areaMap[j] = v
+							provinceMap[j] = v
+						}
+					}
+					areaMap[k] = text
+				}
+			}
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if text != "" {
+					provinceMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					continue
+				} else if k == 1 {
+					// 日期
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+				area, ok1 := areaMap[k]
+				if !ok1 {
+					err = fmt.Errorf("找不到对应的区域,第%d行,第%d列", i, k)
+					return
+				}
+				province, ok2 := provinceMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s/%s", namePrefix, area, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				areaPingin := utils.GetFirstPingYin(area)
+				fullIndexNamePingyin := namePrefixPingin + areaPingin + provincePingyin
+
+				if province == "全  国1" || province == "全  国2" || province == "全国1" || province == "全国2" {
+					province = strings.ReplaceAll(province, " ", "")
+					fullIndexName = fmt.Sprintf("%s/%s", namePrefix, province)
+					provincePingyin = utils.GetFullPingYin(province)
+					fullIndexNamePingyin = namePrefixPingin + provincePingyin
+				}
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("indexItem%s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly2 周度-体重
+func HandleYongyiExcelWeekly2(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	areaMap := make(map[int]string)
+	provinceMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+
+		if i == 0 { // 首行,表示时间
+
+			for k, text := range row {
+				if k > 2 && text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							areaMap[j] = v
+							provinceMap[j] = v
+						}
+					}
+					areaMap[k] = text
+				}
+			}
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+
+			for k, text := range row {
+				if text != "" {
+					provinceMap[k] = text
+				}
+			}
+		} else { //数据列
+
+			date := ""
+			name := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					continue
+				} else if k == 1 {
+					// 日期
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else if k == 2 {
+					name = text
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				area, ok1 := areaMap[k]
+				if !ok1 {
+					err = fmt.Errorf("找不到对应的区域,第%d行,第%d列", i, k)
+					return
+				}
+				province, ok2 := provinceMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s/%s/%s", namePrefix, area, province, name)
+				provincePingyin := utils.GetFullPingYin(province)
+				areaPingin := utils.GetFirstPingYin(area)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + areaPingin + provincePingyin + namePingin
+
+				if province == "全  国1" || province == "全  国2" || province == "全国1" || province == "全国2" {
+					province = strings.ReplaceAll(province, " ", "")
+					fullIndexName = fmt.Sprintf("%s/%s/%s", namePrefix, province, name)
+					fullIndexNamePingyin = namePrefixPingin + provincePingyin + namePingin
+				}
+				if name == "90kg以下" || name == "150kg以上" {
+					unit = "%"
+				}
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("indexItem%s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly3 周度-屠宰厂宰前活猪重
+func HandleYongyiExcelWeekly3(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	provinceMap := make(map[int]string)
+
+	sort := 0
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+
+		if i < 2 {
+			continue
+		}
+		if i == 2 { // 首行,表示时间
+
+			for k, text := range row {
+				if k > 2 && text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							provinceMap[j] = v
+						}
+					}
+					provinceMap[k] = text
+				}
+			}
+		} else if i == 3 { //表示表头
+			// 处理 index指标表
+
+			for k, text := range row {
+				if text != "" {
+					provinceMap[k] = text
+				}
+			}
+		} else { //数据列
+
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					continue
+				} else if k == 1 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else if k == 2 {
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				province, ok2 := provinceMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if province == "较上周" {
+					continue
+				} else if province == "全国平均" {
+					province = "全国"
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("indexItem%s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly4 周度-各体重段价差
+func HandleYongyiExcelWeekly4(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, _, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	provinceMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+
+		if i == 0 {
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							provinceMap[j] = v
+						}
+					}
+					provinceMap[k] = text
+				}
+			}
+		} else { //数据列
+
+			date := ""
+			name := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					continue
+				} else if k == 1 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else if k == 2 {
+					name = text
+					if name == "标猪" {
+						name += "价格"
+					} else {
+						name += "猪价格"
+					}
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				province, ok2 := provinceMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if name != "标猪价格" && name != "150kg猪价格" && name != "175kg猪价格" && name != "200kg猪价格" {
+					continue
+				}
+
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", name, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + namePingin + provincePingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		fmt.Printf("IndexName: %s \n", v.IndexName)
+		fmt.Printf("IndexCode: %s \n", v.IndexCode)
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly5 周度-50公斤二元母猪价格
+func HandleYongyiExcelWeekly5(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	provinceMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+
+		if i == 0 {
+
+			for k, text := range row {
+				if k > 1 && text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							provinceMap[j] = v
+						}
+					}
+					provinceMap[k] = text
+				}
+			}
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+
+			for k, text := range row {
+
+				if text != "" {
+					provinceMap[k] = text
+				}
+			}
+		} else { //数据列
+
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					continue
+				} else if k == 1 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				province, ok2 := provinceMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if province == "全  国1" || province == "全  国2" || province == "全国1" || province == "全国2" {
+					province = strings.ReplaceAll(province, " ", "")
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly6 周度-冻品库存多样本
+func HandleYongyiExcelWeekly6(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	areaMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+
+		if i == 0 {
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							areaMap[j] = v
+						}
+					}
+					areaMap[k] = text
+				}
+			}
+		} else { //数据列
+
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("01-02-06", text, time.Local)
+					if e != nil {
+						dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				area, ok2 := areaMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, area)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, area)
+				areaPingyin := utils.GetFirstPingYin(area)
+				if sheetName == "月度出栏完成率" {
+					areaPingyin = utils.GetFullPingYin(area)
+				}
+				fullIndexNamePingyin := namePrefixPingin + areaPingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly7 月度计划出栏量
+func HandleYongyiExcelWeekly7(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	provinceMap := make(map[int]string)
+	firstMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+
+		if i == 0 {
+			// 处理 index指标表
+
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							firstMap[j] = v
+						}
+					}
+					firstMap[k] = text
+				}
+			}
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+
+			for k, text := range row {
+
+				if text != "" {
+					provinceMap[k] = text
+				}
+			}
+		} else { //数据列
+
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					// 查询当月的最后一天
+					monthDate := dateT.Format(utils.FormatYearMonthDate)
+					firstDayStr := monthDate + "-01"
+					tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+					date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				province, ok1 := provinceMap[k]
+				if !ok1 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if province == "本月计划较上月实际销售" {
+					continue
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin
+
+				if province == "数量" {
+					first, ok2 := firstMap[k]
+					if !ok2 {
+						continue
+					}
+					fullIndexName = first
+					firstPingyin := utils.GetFirstPingYin(first)
+					fullIndexNamePingyin = "yyzx" + firstPingyin
+					unit = "万头"
+				}
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly8 月度-能繁母猪存栏(2020年2月新增)
+func HandleYongyiExcelWeekly8(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	areaMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+
+		if i <= 2 {
+			continue
+		} else if i == 3 { //表示表头
+			// 处理 index指标表
+
+			for k, text := range row {
+
+				if text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							areaMap[j] = v
+						}
+					}
+					areaMap[k] = text
+				}
+			}
+		} else { //数据列
+
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					// 查询当月的最后一天
+					monthDate := dateT.Format(utils.FormatYearMonthDate)
+					firstDayStr := monthDate + "-01"
+					tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+					date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				area, ok1 := areaMap[k]
+				if !ok1 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if area == "环比" || area == "日期" || area == "同比" {
+					continue
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, area)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, area)
+				areaPingyin := utils.GetFirstPingYin(area)
+				fullIndexNamePingyin := namePrefixPingin + areaPingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly9 月度-小猪存栏(2020年5月新增)
+func HandleYongyiExcelWeekly9(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	areaMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+
+		if i <= 1 {
+			continue
+		} else if i == 2 { //表示表头
+			// 处理 index指标表
+
+			for k, text := range row {
+
+				if text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							areaMap[j] = v
+						}
+					}
+					areaMap[k] = text
+				}
+			}
+		} else { //数据列
+
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					// 查询当月的最后一天
+					monthDate := dateT.Format(utils.FormatYearMonthDate)
+					firstDayStr := monthDate + "-01"
+					tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+					date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				area, ok1 := areaMap[k]
+				if !ok1 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if area == "环比" || area == "日期" || area == "同比" {
+					continue
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, area)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, area)
+				areaPingyin := utils.GetFirstPingYin(area)
+				fullIndexNamePingyin := namePrefixPingin + areaPingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly10 月度-商品猪出栏量
+func HandleYongyiExcelWeekly10(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	areaMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+		if i == 0 {
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							areaMap[j] = v
+						}
+					}
+					areaMap[k] = text
+				}
+			}
+		} else { //数据列
+
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					// 查询当月的最后一天
+					monthDate := dateT.Format(utils.FormatYearMonthDate)
+					firstDayStr := monthDate + "-01"
+					tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+					date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				area, ok1 := areaMap[k]
+				if !ok1 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if area == "环比" || area == "日期" || area == "同比" || area == "较非瘟前" {
+					continue
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, area)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, area)
+				areaPingyin := utils.GetFirstPingYin(area)
+				fullIndexNamePingyin := namePrefixPingin + areaPingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}

+ 1308 - 0
services/base_from_yongyi_v2/week20.go

@@ -0,0 +1,1308 @@
+package base_from_yongyi_v2
+
+import (
+	"eta/eta_data_analysis/models"
+	"eta/eta_data_analysis/utils"
+	"fmt"
+	"github.com/xuri/excelize/v2"
+	"strconv"
+	"strings"
+	"time"
+)
+
+// HandleYongyiExcelWeekly11 月度-原种场二元后备母猪销量及出栏日龄
+func HandleYongyiExcelWeekly11(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly11 月度-原种场二元后备母猪销量及出栏日龄 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly11 月度-原种场二元后备母猪销量及出栏日龄 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	nameMap := make(map[int]string)
+	sort := 0
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		// 首行,表示时间
+		if i == 0 {
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k >= 7 && text != "" {
+					text = strings.TrimSpace(text)
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k <= 6 {
+					continue
+				} else if k == 7 {
+					// 日期
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					if i <= 6 {
+						continue
+					}
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				name, ok3 := nameMap[k]
+				if !ok3 {
+					err = fmt.Errorf("找不到对应的指标名称,第%d行,第%d列", i, k)
+					return
+				}
+				if name != "数量" {
+					continue
+				}
+				name = "二元母猪销量"
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, name)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, name)
+				areaPingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + areaPingin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("indexItem%s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly12 历史猪价
+func HandleYongyiExcelWeekly12(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly12 月度-历史猪价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly12 月度-历史猪价 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	yearMap := make(map[int]string)
+	sort := 0
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		// 首行,表示时间
+		if i == 0 {
+			continue
+		} else if i == 1 {
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if text != "" {
+					text = strings.TrimSpace(text)
+					yearMap[k] = text
+				}
+			}
+		} else { //数据列
+			month := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					// 日期
+					month = strings.TrimSpace(text)
+					continue
+				} else {
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+				year, ok := yearMap[k]
+				if !ok {
+					utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, "年份不存在"))
+					continue
+				}
+				var dateT time.Time
+				dateT, e = time.ParseInLocation("2006年1月", fmt.Sprintf("%s%s", year, month), time.Local)
+				if e != nil {
+					utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+					continue
+				}
+				date := dateT.Format(utils.FormatDate)
+				fmt.Println(date)
+
+				// 处理指标名称
+				fullIndexName := namePrefix
+				fullIndexNamePingyin := namePrefixPingin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("indexItem%s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly13 二育成本
+func HandleYongyiExcelWeekly13(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly13 二育成本 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly13 二育成本 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, _, _, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	nameMap := make(map[int]string)
+	dateMap := make(map[int]string)
+	dateNameMap := make(map[string]string)
+	finalNameMap := make(map[string]string)
+	unitMap := make(map[string]string)
+	sort := 0
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		// 首行,表示时间
+		if i == 0 || i == 1 {
+			continue
+		} else if i == 2 {
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if text != "" {
+					text = strings.TrimSpace(text)
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			weight := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					// 日期
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					if dateFloat, e := strconv.ParseFloat(text, 64); e == nil {
+						dateT, e = excelize.ExcelDateToTime(dateFloat, false)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+					} else {
+						dateT, e = time.ParseInLocation("2006年1月2日", text, time.Local)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+					}
+					date = dateT.Format(utils.FormatDate)
+					dateMap[i] = date
+					fmt.Println(date)
+					continue
+				} else {
+					if k == 1 {
+						// 体重
+						weight = strings.TrimSpace(text)
+					}
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+				name, ok := nameMap[k]
+				if !ok {
+					utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取 名称失败 Err:%s", sheetName, i, k, "名称不存在"))
+					continue
+				}
+				dateName := fmt.Sprintf("%s_%s", date, name)
+				dateNameWeight := fmt.Sprintf("%s_%s_%s", date, name, weight)
+				fmt.Println(dateNameWeight)
+				unitMap[dateNameWeight] = GetWeekly13IndexUnit(name)
+				if v, ok1 := dateNameMap[dateName]; ok1 {
+					vf, _ := strconv.ParseFloat(v, 64)
+					wf, _ := strconv.ParseFloat(weight, 64)
+					if vf > wf {
+						dateNameWeightPrev := fmt.Sprintf("%s_%s_%s", date, name, v)
+						finalNameMap[dateNameWeightPrev] = GetWeekly13IndexName(name, "高")
+						finalNameMap[dateNameWeight] = GetWeekly13IndexName(name, "低")
+					} else {
+						finalNameMap[dateNameWeight] = GetWeekly13IndexName(name, "高")
+					}
+				} else {
+					dateNameMap[dateName] = weight
+					//默认是低
+					finalNameMap[dateNameWeight] = GetWeekly13IndexName(name, "低")
+				}
+			}
+		}
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		// 首行,表示时间
+		if i == 0 || i == 1 || i == 2 {
+			continue
+		} else { //数据列
+			date := dateMap[i]
+			weight := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					continue
+				} else {
+					if k == 1 {
+						// 体重
+						weight = strings.TrimSpace(text)
+					}
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+				name, ok := nameMap[k]
+				if !ok {
+					utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取 名称失败 Err:%s", sheetName, i, k, "名称不存在"))
+					continue
+				}
+				finalName, ok := finalNameMap[fmt.Sprintf("%s_%s_%s", date, name, weight)]
+				if !ok {
+					utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取 名称失败 Err:%s", sheetName, i, k, "最终名称不存在"))
+					continue
+				}
+				unitNew, ok := unitMap[fmt.Sprintf("%s_%s_%s", date, name, weight)]
+				if !ok {
+					utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取 名称失败 Err:%s", sheetName, i, k, "最终名称不存在"))
+					continue
+				}
+				// 处理指标名称
+				fullIndexName := finalName
+				fullIndexNamePingyin := namePrefixPingin + utils.GetFirstPingYin(fullIndexName)
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unitNew
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("indexItem%s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		fmt.Printf("IndexName:%s\n", v.IndexName)
+		fmt.Printf("IndexCode:%s\n", v.IndexCode)
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly14 二育销量
+func HandleYongyiExcelWeekly14(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly14 二育销量 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly14 二育销量ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i <= 2 {
+			continue
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					if text != "" {
+						text = strings.TrimSpace(text)
+						var dateT time.Time
+						dateSlice := strings.Split(text, "-")
+						if len(dateSlice) <= 1 {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, text))
+							continue
+						}
+						dateT, e = time.ParseInLocation("2006年1月2日", dateSlice[0]+"日", time.Local)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+						date = dateT.Format("2006年1月") + dateSlice[1]
+						dateT, e = time.ParseInLocation("2006年1月2日", date, time.Local)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+						date = dateT.Format(utils.FormatDate)
+						fmt.Println("date: " + date)
+					}
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				name := "二育占实际销量(十天)"
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, name)
+				provincePingyin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly15 育肥栏舍利用率
+func HandleYongyiExcelWeekly15(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly15 育肥栏舍利用率 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly15 育肥栏舍利用率ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	dateMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 {
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("01-2-06", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					dateMap[k] = dateT.Format(utils.FormatDate)
+					fmt.Println("date: " + dateMap[k])
+				}
+			}
+		} else { //数据列
+			province := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 || k == 2 || k == 3 {
+					continue
+				} else if k == 1 {
+					province = strings.TrimSpace(text)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				date, ok2 := dateMap[k]
+				if !ok2 {
+					utils.FileLog.Info(fmt.Sprintf("找不到对应的时间,第%d行,第%d列", i, k))
+					continue
+				}
+
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly16 周度-养殖利润最新
+func HandleYongyiExcelWeekly16(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly16 周度-养殖利润最新 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly16 周度-养殖利润最新ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	nameMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+
+		if i == 0 {
+			continue
+		} else if i <= 1 || i == 2 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+
+				if text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							nameMap[j] = v
+						}
+					}
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 || k == 2 {
+					continue
+				} else if k == 1 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				name, ok1 := nameMap[k]
+				if !ok1 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if name != "外购仔猪育肥" && name != "合同农户\n(放养部分)" {
+					if !strings.Contains(name, "母猪") {
+						name = fmt.Sprintf("母猪%s", name)
+					}
+				}
+				if name == "合同农户\n(放养部分)" {
+					name = "合同农户(放养部分)"
+				}
+
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, name)
+				areaPingyin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + areaPingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly17 周度-当期、预期成本
+func HandleYongyiExcelWeekly17(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly17 周度-当期、预期成本 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly17 周度-当期、预期成本 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	dateMap := make(map[int]string)
+
+	sort := 0
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i > 22 {
+			break
+		}
+		if i == 0 {
+			namePrefix = "出栏肥猪成本"
+			namePrefixPingin = "yyzx" + utils.GetFirstPingYin(namePrefix)
+			continue
+		} else if i == 11 {
+			namePrefix = "断奶仔猪对应育肥至标猪出栏成本"
+			namePrefixPingin = "yyzx" + utils.GetFirstPingYin(namePrefix)
+			continue
+		} else if i == 1 || i == 12 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text) //2024.1.12-2024.1.18
+					dateSlice := strings.Split(text, "-")
+					if len(dateSlice) <= 1 {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006.1.2", dateSlice[1], time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					dateMap[k] = dateT.Format(utils.FormatDate)
+					fmt.Println("date: " + dateMap[k])
+				}
+			}
+		} else { //数据列
+			name := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					continue
+				} else if k == 1 || k == 2 {
+					text = strings.TrimSpace(text)
+					if text != "" {
+						name = text
+					}
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				date, ok2 := dateMap[k]
+				if !ok2 {
+					utils.FileLog.Info(fmt.Sprintf("找不到对应的时间,第%d行,第%d列", i, k))
+					continue
+				}
+				if name != "外购仔猪育肥" && name != "合同农户(放养部分)" {
+					if !strings.Contains(name, "母猪") {
+						name = fmt.Sprintf("母猪%s", name)
+					}
+				}
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, name)
+				provincePingyin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly18 育肥全价料出厂价
+func HandleYongyiExcelWeekly18(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly18 育肥全价料出厂价 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly18 育肥全价料出厂价ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	provinceMap := make(map[int]string)
+	sort := 0
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		// 首行,表示时间
+		if i <= 2 {
+			continue
+		} else if i == 3 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if text != "" {
+					provinceMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					// 日期
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("01-2-06", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+				province, ok2 := provinceMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin
+
+				if province == "均价" {
+					province = "全国均价"
+					fullIndexName = fmt.Sprintf("%s/%s", namePrefix, province)
+					provincePingyin = utils.GetFirstPingYin(province)
+					fullIndexNamePingyin = namePrefixPingin + provincePingyin
+				}
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("indexItem%s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly19 周度-成本计算附件
+func HandleYongyiExcelWeekly19(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly19 周度-成本计算附件 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly19 周度-成本计算附件 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, _, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	dateMap := make(map[int]string)
+	areaMap := make(map[int]string)
+	valNameMap := make(map[int]string)
+	sort := 0
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	name := ""
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+		if i == 0 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if k > 9 && text != "" {
+					var dateT time.Time
+					text = strings.TrimSpace(text) //2024.1.12-2024.1.18
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							if v == "" {
+								continue
+							}
+							dateSlice := strings.Split(v, "-")
+							if len(dateSlice) <= 1 {
+								utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败", sheetName, i, k))
+								continue
+							}
+
+							dateT, e = time.ParseInLocation("2006.1.2", dateSlice[1], time.Local)
+							if e != nil {
+								utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+								continue
+							}
+							dateMap[j] = dateT.Format(utils.FormatDate)
+						}
+					}
+					dateSlice := strings.Split(text, "-")
+					if len(dateSlice) <= 1 {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+
+					dateT, e = time.ParseInLocation("2006.1.2", dateSlice[1], time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					dateMap[k] = dateT.Format(utils.FormatDate)
+					fmt.Println("date: " + dateMap[k])
+				}
+			}
+		} else if i == 1 {
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							areaMap[j] = v
+						}
+					}
+					areaMap[k] = text
+				}
+			}
+		} else if i == 2 {
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					valNameMap[k] = text
+				}
+			}
+		} else { //数据列
+
+			subName := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 || (k >= 5 && k <= 11) {
+					continue
+				} else if k == 1 || k == 2 {
+					text = strings.TrimSpace(text)
+					if text != "" {
+						name = text
+					}
+					fmt.Printf("name: %s \n", name)
+					continue
+				} else if k == 3 || k == 4 {
+					text = strings.TrimSpace(text)
+					if text != "" {
+						subName = text
+					}
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+				valName, ok1 := valNameMap[k]
+				if !ok1 {
+					utils.FileLog.Info(fmt.Sprintf("找不到对应的时间,第%d行,第%d列", i, k))
+					continue
+				}
+
+				area, ok2 := areaMap[k]
+				if !ok2 {
+					utils.FileLog.Info(fmt.Sprintf("找不到对应的地区,第%d行,第%d列", i, k))
+					continue
+				}
+				area = strings.Replace(area, "本周", "", 1)
+				date, ok2 := dateMap[k]
+				if !ok2 {
+					utils.FileLog.Info(fmt.Sprintf("找不到对应的时间,第%d行,第%d列", i, k))
+					continue
+				}
+				if strings.Contains(name, "-") && !strings.Contains(name, "母猪") {
+					name = "母猪" + name
+				}
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", area, name)
+				provincePingyin := utils.GetFirstPingYin(area + name)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin
+				if strings.Contains(valName, "成本") {
+					if strings.Contains(area, "出栏肥猪") || name == "料肉比" || name == "上市均重(公斤)" || name == "育肥成活率(中高水平)" || name == "1周" {
+						continue
+					} else {
+						fullIndexName = fmt.Sprintf("%s/%s/%s", area, name, "成本")
+						provincePingyin = utils.GetFirstPingYin(area + name + "成本")
+						fullIndexNamePingyin = namePrefixPingin + provincePingyin
+					}
+				} else {
+					if subName != "" {
+						fullIndexName = fmt.Sprintf("%s/%s/%s", area, name, subName)
+						provincePingyin = utils.GetFirstPingYin(area + name + subName)
+						fullIndexNamePingyin = namePrefixPingin + provincePingyin
+					}
+				}
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				//fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		fmt.Printf("IndexName: %s \n", v.IndexName)
+		fmt.Printf("IndexCode: %s \n", v.IndexCode)
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly20 周度-毛白价差
+func HandleYongyiExcelWeekly20(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly20 周度-毛白价差 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly20 周度-毛白价差 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	nameMap := make(map[int]string)
+	sort := 0
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		// 首行,表示时间
+		if i == 0 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if text != "" {
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					// 日期
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if name != "前三级别白条价" && name != "生猪出栏价" {
+					continue
+				}
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, name)
+				provincePingyin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("indexItem%s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}

+ 1188 - 0
services/base_from_yongyi_v2/week30.go

@@ -0,0 +1,1188 @@
+package base_from_yongyi_v2
+
+import (
+	"eta/eta_data_analysis/models"
+	"eta/eta_data_analysis/utils"
+	"fmt"
+	"github.com/xuri/excelize/v2"
+	"strconv"
+	"strings"
+	"time"
+)
+
+// HandleYongyiExcelWeekly21 仔猪、母猪
+func HandleYongyiExcelWeekly21(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly21 仔猪、母猪 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly21 仔猪、母猪 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, _, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	provinceMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 {
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					provinceMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			name := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else if k == 1 {
+					name = text
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						//	utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				province, ok2 := provinceMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s/%s", "仔猪价", name, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + utils.GetFirstPingYin("仔猪价") + namePingin + provincePingyin
+				if strings.Contains(name, "二元母猪价") {
+					fullIndexName = fmt.Sprintf("%s/%s", name, province)
+					fullIndexNamePingyin = "yyzx" + namePingin + provincePingyin
+				}
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly22 周度-河南屠宰白条成本
+func HandleYongyiExcelWeekly22(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly22 周度-河南屠宰白条成本 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly22 周度-河南屠宰白条成本 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	nameMap := make(map[int]string)
+
+	sort := 0
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 {
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				nameSlice := strings.Split(name, "(")
+				unitNew := unit
+				if len(nameSlice) > 1 {
+					name = nameSlice[0]
+				}
+				nameSlice = strings.Split(name, "\n")
+				if len(nameSlice) > 1 {
+					name = nameSlice[0]
+				}
+				switch name {
+				case "生猪重量", "净白条重":
+					unitNew = "kg"
+				case "生猪结算", "白条成本", "6个等级白条均价":
+					unitNew = "元/kg"
+				case "副产品回", "屠宰费用", "白条头均利润":
+					unitNew = "元/头"
+				}
+				if name == "预冷损耗" {
+					continue
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, name)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, name)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + namePingin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unitNew
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly23 周度-淘汰母猪价格
+func HandleYongyiExcelWeekly23(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly23 周度-淘汰母猪价格 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly23 周度-淘汰母猪价格 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	provinceMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 {
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					provinceMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					continue
+				} else if k == 1 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				province, ok2 := provinceMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly24 鲜销率
+func HandleYongyiExcelWeekly24(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly24 鲜销率 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly24 鲜销率 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	provinceMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i <= 1 || i > 2 && i <= 5 {
+			continue
+		} else if i == 2 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					provinceMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					continue
+				} else if k == 1 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				province, ok2 := provinceMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly25 周度-猪肉产品价格
+func HandleYongyiExcelWeekly25(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly25 周度-猪肉产品价格 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly25 周度-猪肉产品价格 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	provinceMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 {
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					provinceMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			name := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					continue
+				} else if k == 1 {
+					text = strings.TrimSpace(text)
+					dateSlice := strings.Split(text, "(")
+					if len(dateSlice) > 1 {
+						text = dateSlice[0]
+					}
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						dateT, e = time.ParseInLocation("01-02-06", text, time.Local)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else if k == 2 {
+					name = text
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				province, ok2 := provinceMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if strings.Contains(name, "二元母猪价") {
+					continue
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s/%s", namePrefix, name, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + namePingin + provincePingyin
+				if strings.Contains(name, "二元母猪价") {
+					fullIndexName = fmt.Sprintf("%s/%s", name, province)
+					fullIndexNamePingyin = "yyzx" + namePingin + provincePingyin
+				}
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		fmt.Printf("IndexName: %s \n", v.IndexName)
+		fmt.Printf("IndexCode: %s \n", v.IndexCode)
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly26 周度-淘汰母猪价格
+func HandleYongyiExcelWeekly26(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly26 周度-屠宰企业日度屠宰量 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly26 周度-屠宰企业日度屠宰量 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	provinceMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					provinceMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006/1/2", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				province, ok2 := provinceMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, province)
+				provincePingyin := utils.GetFullPingYin(province)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin
+				if strings.Contains(province, "合计") {
+					province = "合计"
+					fullIndexName = fmt.Sprintf("%s/%s", namePrefix, province)
+					provincePingyin = utils.GetFirstPingYin(province)
+					fullIndexNamePingyin = namePrefixPingin + provincePingyin
+				}
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly27 周度-屠宰新2022.10.28
+func HandleYongyiExcelWeekly27(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly27 周度-屠宰新2022.10.28 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly27 周度-屠宰新2022.10.28 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	nameMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 {
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					continue
+				} else if k == 1 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					//判断是否是数字,如果是数字,另外单独处理
+					if dateFloat, e := strconv.ParseFloat(text, 64); e == nil {
+						dateT, e = excelize.ExcelDateToTime(dateFloat, false)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+					} else {
+						dateT, e = time.ParseInLocation("2006年1月2日", text, time.Local)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+					}
+					date = dateT.Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if name != "规模屠宰厂全国前10家" && name != "各省规模屠宰厂100家" && name != "县区+乡镇宰杀 70家" {
+					continue
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, name)
+				// 处理指标名称不同规模屠宰厂宰杀量/县区+乡镇宰杀 70家
+				name = strings.Replace(name, " ", "", -1)
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, name)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + namePingin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly28 月度-淘汰母猪屠宰厂宰杀量
+func HandleYongyiExcelWeekly28(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly28 月度-淘汰母猪屠宰厂宰杀量 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly28 月度-淘汰母猪屠宰厂宰杀量 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	provinceMap := make(map[int]string)
+	nameMap := make(map[int]string)
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+		if i == 0 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							provinceMap[j] = v
+							nameMap[j] = v
+						}
+					}
+					provinceMap[k] = text
+				}
+			}
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					// 查询当月的最后一天
+					monthDate := dateT.Format(utils.FormatYearMonthDate)
+					firstDayStr := monthDate + "-01"
+					tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+					date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else if k == 1 {
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+				province, ok2 := provinceMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				name, ok1 := nameMap[k]
+				if !ok1 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if strings.Contains(name, "环比") {
+					continue
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, province)
+				// 处理指标名称
+				fullIndexName := fmt.Sprintf("%s/%s%s", namePrefix, province, name)
+				provincePingyin := utils.GetFullPingYin(province)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin + namePingin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly29 月度-猪料销量
+func HandleYongyiExcelWeekly29(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly29 月度-猪料销量 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly29 月度-猪料销量 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	nameMap := make(map[int]string)
+
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 {
+			continue
+		} else if i == 1 { //表示表头
+			// 处理 index指标表
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					//判断是否是数字,如果是数字,另外单独处理
+					if dateFloat, e := strconv.ParseFloat(text, 64); e == nil {
+						dateT, e = excelize.ExcelDateToTime(dateFloat, false)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+					} else {
+						dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+					}
+					// 查询当月的最后一天
+					monthDate := dateT.Format(utils.FormatYearMonthDate)
+					firstDayStr := monthDate + "-01"
+					tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+					date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, name)
+
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, name)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + namePingin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly30 月度-屠宰企业开工率
+func HandleYongyiExcelWeekly30(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly30 月度-屠宰企业开工率 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly30 月度-屠宰企业开工率 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	sort := 0
+	fmt.Println("最大行")
+
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i > 0 { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					// 查询当月的最后一天
+					monthDate := dateT.Format(utils.FormatYearMonthDate)
+					firstDayStr := monthDate + "-01"
+					tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+					date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				name := "屠宰企业开工率全国平均"
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, name)
+
+				fullIndexName := fmt.Sprintf("%s%s", namePrefix, name)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + namePingin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}

+ 630 - 0
services/base_from_yongyi_v2/week40.go

@@ -0,0 +1,630 @@
+package base_from_yongyi_v2
+
+import (
+	"eta/eta_data_analysis/models"
+	"eta/eta_data_analysis/utils"
+	"fmt"
+	"github.com/xuri/excelize/v2"
+	"strconv"
+	"strings"
+	"time"
+)
+
+// HandleYongyiExcelWeekly31 月度-屠宰厂公母比例
+func HandleYongyiExcelWeekly31(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly31 月度-屠宰厂公母比例 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly31 月度-屠宰厂公母比例 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	sort := 0
+	nameMap := make(map[int]string)
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 {
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+					if e != nil {
+						text = strings.TrimSpace(text)
+						dateSlice := strings.Split(text, "-")
+						if len(dateSlice) <= 1 {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, text))
+							continue
+						}
+						dateT, e = time.ParseInLocation("2006年1月2日", dateSlice[0], time.Local)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+						date = dateT.Format("2006年1月") + dateSlice[1]
+						dateT, e = time.ParseInLocation("2006年1月2日", date, time.Local)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+						date = dateT.Format(utils.FormatDate)
+					} else {
+						// 查询当月的最后一天
+						monthDate := dateT.Format(utils.FormatYearMonthDate)
+						firstDayStr := monthDate + "-01"
+						tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+						date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					}
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, name)
+				unit = "头"
+				if strings.Contains(name, "占比") {
+					unit = "%"
+				}
+				fullIndexName := fmt.Sprintf("%s%s", namePrefix, name)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + namePingin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly32 月度-生产指标(2021.5.7新增)
+func HandleYongyiExcelWeekly32(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly32 月度-生产指标(2021.5.7新增) ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly32 月度-生产指标(2021.5.7新增) ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	sort := 0
+	nameMap := make(map[int]string)
+	provinceMap := make(map[int]string)
+	mergeCellMap, err := GetMergeCells(f, sheetName)
+	if err != nil {
+		err = fmt.Errorf("获取合并单元格失败, sheetName: %s", sheetName)
+		return
+	}
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		currentMergeCells, mergeOk := mergeCellMap[i]
+		if i == 0 {
+			for k, text := range row {
+				if text != "" {
+					if mergeOk {
+						for j, v := range currentMergeCells {
+							provinceMap[j] = v
+						}
+					}
+					provinceMap[k] = text
+				}
+			}
+		} else if i == 1 {
+			for k, text := range row {
+				if text != "" {
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					// 查询当月的最后一天
+					monthDate := dateT.Format(utils.FormatYearMonthDate)
+					firstDayStr := monthDate + "-01"
+					tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+					date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+				province, ok1 := provinceMap[k]
+				if !ok1 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if strings.Contains(name, "环比") {
+					continue
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, name)
+				unit = "头"
+				if strings.Contains(name, "率") {
+					unit = "%"
+				}
+				fullIndexName := fmt.Sprintf("%s/%s/%s", namePrefix, province, name)
+				provincePingyin := utils.GetFullPingYin(province)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + provincePingyin + namePingin
+
+				if province == "五省合计数量" || province == "五省平均水平" {
+					provincePingyin = utils.GetFirstPingYin(province)
+					fullIndexNamePingyin = namePrefixPingin + provincePingyin + namePingin
+				}
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly33 月度-生产指标2
+func HandleYongyiExcelWeekly33(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly33 月度-生产指标2ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly33 月度-生产指标2 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	sort := 0
+	nameMap := make(map[int]string)
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 {
+			continue
+		} else if i == 1 {
+			for k, text := range row {
+				if text != "" {
+					text = strings.TrimSpace(text)
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					// 查询当月的最后一天
+					monthDate := dateT.Format(utils.FormatYearMonthDate)
+					firstDayStr := monthDate + "-01"
+					tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+					date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, name)
+
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, name)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + namePingin
+				unit = "头"
+				if strings.Contains(name, "率") {
+					unit = "%"
+				}
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly34 月度-二元三元能繁比例
+func HandleYongyiExcelWeekly34(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly34 月度-二元三元能繁比例ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly34 月度-二元三元能繁比例 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	sort := 0
+	year := ""
+	nameMap := make(map[int]string)
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 {
+			for k, text := range row {
+				if k > 3 && text != "" {
+					text = strings.TrimSpace(text)
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k <= 3 || k > 8 {
+					continue
+				} else if k == 4 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					//判断是否是数字,如果是数字,另外单独处理
+					if dateFloat, e := strconv.ParseFloat(text, 64); e == nil {
+						dateT, e = excelize.ExcelDateToTime(dateFloat, false)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+					} else {
+						dateSlice := strings.Split(text, "年")
+						if len(dateSlice) >= 2 {
+							year = dateSlice[0]
+						} else {
+							text = fmt.Sprintf("%s年%s", year, text)
+						}
+						fmt.Println(text)
+
+						dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+						if e != nil {
+							utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+							continue
+						}
+					}
+
+					// 查询当月的最后一天
+					monthDate := dateT.Format(utils.FormatYearMonthDate)
+					firstDayStr := monthDate + "-01"
+					tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+					date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+				if date == "" {
+					continue
+				}
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, name)
+				name += "比例"
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, name)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + namePingin
+
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}
+
+// HandleYongyiExcelWeekly35 月度-能繁母猪存栏量
+func HandleYongyiExcelWeekly35(f *excelize.File, sheetName string) (indexList []*models.YongyiExcelIndex, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Printf("HandleYongyiExcelWeekly35 月度-能繁母猪存栏量 ErrMsg: %s\n", err.Error())
+			utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly35 月度-能繁母猪存栏量 ErrMsg: %s", err.Error()))
+		}
+	}()
+
+	rows, e := f.GetRows(sheetName)
+	if e != nil {
+		err = fmt.Errorf("f GetRows err: %s", e.Error())
+		return
+	}
+
+	// 获取指标分类
+	classifyName, classifySort, frequency, unit, namePrefix, namePrefixPingin := GetBaseInfo(sheetName)
+	// 遍历行读取
+	indexList = make([]*models.YongyiExcelIndex, 0)
+	sort := 0
+	nameMap := make(map[int]string)
+	// 指标名称
+	indexMap := make(map[string]*models.YongyiExcelIndex)
+	for i, row := range rows {
+		fmt.Printf("当前第%d行 \n", i)
+		if i == 0 {
+			continue
+		} else if i == 1 {
+			for k, text := range row {
+				if text != "" {
+					nameMap[k] = text
+				}
+			}
+		} else { //数据列
+			date := ""
+			for k, text := range row {
+				fmt.Printf("当前第%d列 \n", k)
+				if k == 0 {
+					text = strings.TrimSpace(text)
+					var dateT time.Time
+					dateT, e = time.ParseInLocation("2006年1月", text, time.Local)
+					if e != nil {
+						utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 读取行,时间列失败 Err:%s", sheetName, i, k, e))
+						continue
+					}
+					// 查询当月的最后一天
+					monthDate := dateT.Format(utils.FormatYearMonthDate)
+					firstDayStr := monthDate + "-01"
+					tmpT, _ := time.ParseInLocation(utils.FormatDate, firstDayStr, time.Local)
+					date = tmpT.AddDate(0, 1, -1).Format(utils.FormatDate)
+					fmt.Println(date)
+					continue
+				} else {
+					// 判断出不是字符的,则过滤
+					if text == "" {
+						continue
+					}
+					if strings.Contains(text, "%") {
+						text = strings.Replace(text, "%", "", 1)
+					}
+					_, e := strconv.ParseFloat(text, 64)
+					if e != nil {
+						//utils.FileLog.Info(fmt.Sprintf("sheet:%s 第%d行, 第%d列 strconv.ParseFloat Err:%s", sheetName, i, k, e))
+						continue
+					}
+				}
+				name, ok2 := nameMap[k]
+				if !ok2 {
+					err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
+					return
+				}
+				if strings.Contains(name, "环比") || strings.Contains(name, "同比") || strings.Contains(name, "日期") {
+					continue
+				}
+				fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, name)
+
+				fullIndexName := fmt.Sprintf("%s/%s", namePrefix, name)
+				namePingin := utils.GetFirstPingYin(name)
+				fullIndexNamePingyin := namePrefixPingin + namePingin
+				unit = "头"
+				if name == "较非瘟前" {
+					area, ok3 := nameMap[k-3]
+					if !ok3 {
+						err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k-3)
+						return
+					}
+					fullIndexName = fmt.Sprintf("%s/%s%s", namePrefix, area, name)
+					namePingin = utils.GetFirstPingYin(area + name)
+					fullIndexNamePingyin = namePrefixPingin + namePingin
+					unit = "%"
+				}
+				indexItem, okIndex := indexMap[fullIndexName]
+				if !okIndex {
+					// 新增指标
+					indexItem = new(models.YongyiExcelIndex)
+					indexItem.IndexName = fullIndexName
+					indexItem.ClassifyName = classifyName
+					indexItem.ClassifySort = classifySort
+					indexItem.IndexCode = fullIndexNamePingyin
+					indexItem.Frequency = frequency
+					indexItem.Sort = sort
+					indexItem.Unit = unit
+					indexItem.ExcelDataMap = make(map[string]string)
+					sort++
+				}
+				fmt.Printf("IndexCode: %s", indexItem.IndexCode)
+
+				indexItem.ExcelDataMap[date] = text
+				indexMap[fullIndexName] = indexItem
+				continue
+			}
+		}
+	}
+	for _, v := range indexMap {
+		indexList = append(indexList, v)
+	}
+	return
+}

+ 5 - 9
services/task.go

@@ -17,18 +17,14 @@ import (
 func Task() {
 	fmt.Println("task start")
 	if utils.YongyiOpen == "1" {
-		handleYongyiExcelDaily := task.NewTask("handleYongyiExcelDaily", "0 35 13,23 * * *", HandleYongyiExcelDaily)
-		task.AddTask("涌益咨询日度指标处理", handleYongyiExcelDaily)
+		// 每隔两分钟检测文件是否变动,如果发生变动,则自动解析数据到库里
+		readWatchYongyiFile := task.NewTask("ReadWatchYongyiFile", "0 */2 * * * *", ReadWatchYongyiFile)
+		task.AddTask("监听涌溢咨询文件夹并解析Excel", readWatchYongyiFile)
 
-		handleYongyiExcelWeekly := task.NewTask("handleYongyiExcelWeekly", "0 5 17,23 * * *", HandleYongyiExcelWeekly)
-		task.AddTask("涌益咨询周度指标处理", handleYongyiExcelWeekly)
-		//HandleYongyiExcelDaily("/Users/xiexiaoyuan/Downloads/2023年11月21日涌益咨询日度数据 (1).xlsx")
-		//HandleYongyiExcelWeekly()
-
-		yongyiDownloadDaily := task.NewTask("YongyiDownloadDaily", "0 30 13,23 * * *", YongyiDownloadDaily)
+		yongyiDownloadDaily := task.NewTask("YongyiDownloadDaily", "0 */25 13-23 * * *", YongyiDownloadDaily)
 		task.AddTask("涌益咨询日度指标下载", yongyiDownloadDaily)
 
-		yongyiDownloadWeekly := task.NewTask("YongyiDownloadWeekly", "0 0 17,23 * * *", YongyiDownloadWeeyly)
+		yongyiDownloadWeekly := task.NewTask("YongyiDownloadWeekly", "0 */30 16-23 * * 4,5,6,0", YongyiDownloadWeekyly)
 		task.AddTask("涌益咨询周度指标下载", yongyiDownloadWeekly)
 	}
 

+ 2 - 0
utils/common.go

@@ -30,6 +30,8 @@ import (
 
 // GetFirstPingYin 拼音首字母
 func GetFirstPingYin(name string) string {
+	name = strings.ReplaceAll(name, "(", "(")
+	name = strings.ReplaceAll(name, ")", ")")
 	a := pinyin.NewArgs()
 	a.Separator = ""
 	a.Style = pinyin.FirstLetter

+ 4 - 3
utils/config.go

@@ -38,8 +38,9 @@ var (
 
 // 涌益生猪
 var (
-	YongyiFilePath string //excel文件地址
-	YongyiOpen     string //是否配置涌益生猪数据源,1已配置
+	YongyiFilePath     string //excel文件地址
+	YongyiReadFilePath string //已读的excel文件地址
+	YongyiOpen         string //是否配置涌益生猪数据源,1已配置
 )
 
 // 中国煤炭网
@@ -52,7 +53,6 @@ var (
 	CoalMailAttachmentPythonVersion string // 获取邮件附件功能python版本
 )
 
-
 // 汾渭煤炭
 var (
 	FenweiFileDir    string // excel文件目录
@@ -108,6 +108,7 @@ func init() {
 	//涌益咨询文件夹配置
 	{
 		YongyiFilePath = config["yongyi_file_path"]
+		YongyiReadFilePath = config["yongyi_read_file_path"]
 		YongyiOpen = config["yongyi_open"]
 	}
 

+ 5 - 3
utils/constants.go

@@ -15,6 +15,8 @@ const (
 	FormatYearMonthUnSpace     = "200601"                  //年月的日期格式
 	PageSize15                 = 15                        //列表页每页数据量
 	FormatDate1                = "2006/1/02"               //日期格式
+	FormatDateYearMonthDay     = "2006年01月02日"             //日期格式
+	FormatDatePoint            = "2006.01.02"              //日期格式
 	PageSize5                  = 5
 	PageSize10                 = 10
 	PageSize20                 = 20
@@ -234,9 +236,9 @@ const (
 	LIB_ROUTE_COAL_MINE_JSM_HISTORY     = "/coal_mine/jsm/history"     //jsm三省煤炭网历史数据处理excel数据并入库 数据地址
 	LIB_ROUTE_COAL_MINE_COASTAL_HISTORY = "/coal_mine/coastal/history" //沿海煤炭网历史数据处理excel数据并入库 数据地址
 	LIB_ROUTE_COAL_MINE_INLAND_HISTORY  = "/coal_mine/inland/history"  //内陆三省煤炭网历史数据处理excel数据并入库 数据地址
-	LIB_ROUTE_COAL_MINE_JSM             = "/coal_mine/jsm"             //jsm三省煤炭网数据处理excel数据并入库 数据地址
-	LIB_ROUTE_COAL_MINE_COASTAL         = "/coal_mine/coastal"         //沿海煤炭网数据处理excel数据并入库 数据地址
-	LIB_ROUTE_COAL_MINE_INLAND          = "/coal_mine/inland"          //内陆三省煤炭网数据处理excel数据并入库 数据地址
+	LIB_ROUTE_COAL_MINE_JSM             = "/coal_mine/jsm"             //jsm三省煤炭网历史数据处理excel数据并入库 数据地址
+	LIB_ROUTE_COAL_MINE_COASTAL         = "/coal_mine/coastal"         //沿海煤炭网历史数据处理excel数据并入库 数据地址
+	LIB_ROUTE_COAL_MINE_INLAND          = "/coal_mine/inland"          //内陆三省煤炭网历史数据处理excel数据并入库 数据地址
 	LIB_ROUTE_COAL_MINE_FIRM            = "/coal_mine/firm"            //分公司旬度煤炭网数据处理excel数据并入库 数据地址
 	LIB_ROUTE_FENWEI_HANDLE             = "fenwei/handle/excel_data"   // 汾渭煤炭excel数据入库接口地址
 	LIB_ROUTE_FENWEI_CLASSIFY           = "fenwei/classify_tree"       // 汾渭煤炭分类接口地址