|
@@ -14,7 +14,7 @@ import (
|
|
|
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())
|
|
|
+ //fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
|
|
|
utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
|
|
|
}
|
|
|
}()
|
|
@@ -41,13 +41,13 @@ func HandleYongyiExcelWeekly1(f *excelize.File, sheetName string) (indexList []*
|
|
|
return
|
|
|
}
|
|
|
for i, row := range rows {
|
|
|
- fmt.Printf("当前第%d行 \n", i)
|
|
|
+ //fmt.Printf("当前第%d行 \n", i)
|
|
|
currentMergeCells, mergeOk := mergeCellMap[i]
|
|
|
|
|
|
// 首行,表示时间
|
|
|
if i == 0 {
|
|
|
for k, text := range row {
|
|
|
- fmt.Printf("当前第%d列 \n", k)
|
|
|
+ //fmt.Printf("当前第%d列 \n", k)
|
|
|
if k > 1 && text != "" {
|
|
|
text = strings.TrimSpace(text)
|
|
|
if mergeOk {
|
|
@@ -62,7 +62,7 @@ func HandleYongyiExcelWeekly1(f *excelize.File, sheetName string) (indexList []*
|
|
|
} else if i == 1 { //表示表头
|
|
|
// 处理 index指标表
|
|
|
for k, text := range row {
|
|
|
- fmt.Printf("当前第%d列 \n", k)
|
|
|
+ //fmt.Printf("当前第%d列 \n", k)
|
|
|
if text != "" {
|
|
|
provinceMap[k] = text
|
|
|
}
|
|
@@ -70,7 +70,7 @@ func HandleYongyiExcelWeekly1(f *excelize.File, sheetName string) (indexList []*
|
|
|
} else { //数据列
|
|
|
date := ""
|
|
|
for k, text := range row {
|
|
|
- fmt.Printf("当前第%d列 \n", k)
|
|
|
+ //fmt.Printf("当前第%d列 \n", k)
|
|
|
if k == 0 {
|
|
|
continue
|
|
|
} else if k == 1 {
|
|
@@ -108,7 +108,7 @@ func HandleYongyiExcelWeekly1(f *excelize.File, sheetName string) (indexList []*
|
|
|
err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
|
|
|
return
|
|
|
}
|
|
|
- fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
|
|
|
+ //fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
|
|
|
// 处理指标名称
|
|
|
fullIndexName := fmt.Sprintf("%s/%s/%s", namePrefix, area, province)
|
|
|
provincePingyin := utils.GetFullPingYin(province)
|
|
@@ -136,7 +136,7 @@ func HandleYongyiExcelWeekly1(f *excelize.File, sheetName string) (indexList []*
|
|
|
indexItem.ExcelDataMap = make(map[string]string)
|
|
|
sort++
|
|
|
}
|
|
|
- fmt.Printf("indexItem%s", indexItem.IndexCode)
|
|
|
+ //fmt.Printf("indexItem%s", indexItem.IndexCode)
|
|
|
|
|
|
indexItem.ExcelDataMap[date] = text
|
|
|
indexMap[fullIndexName] = indexItem
|
|
@@ -154,7 +154,7 @@ func HandleYongyiExcelWeekly1(f *excelize.File, sheetName string) (indexList []*
|
|
|
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())
|
|
|
+ //fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
|
|
|
utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
|
|
|
}
|
|
|
}()
|
|
@@ -183,7 +183,7 @@ func HandleYongyiExcelWeekly2(f *excelize.File, sheetName string) (indexList []*
|
|
|
return
|
|
|
}
|
|
|
for i, row := range rows {
|
|
|
- fmt.Printf("当前第%d行 \n", i)
|
|
|
+ //fmt.Printf("当前第%d行 \n", i)
|
|
|
currentMergeCells, mergeOk := mergeCellMap[i]
|
|
|
|
|
|
if i == 0 { // 首行,表示时间
|
|
@@ -213,7 +213,7 @@ func HandleYongyiExcelWeekly2(f *excelize.File, sheetName string) (indexList []*
|
|
|
date := ""
|
|
|
name := ""
|
|
|
for k, text := range row {
|
|
|
- fmt.Printf("当前第%d列 \n", k)
|
|
|
+ //fmt.Printf("当前第%d列 \n", k)
|
|
|
if k == 0 {
|
|
|
continue
|
|
|
} else if k == 1 {
|
|
@@ -256,7 +256,7 @@ func HandleYongyiExcelWeekly2(f *excelize.File, sheetName string) (indexList []*
|
|
|
err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
|
|
|
return
|
|
|
}
|
|
|
- fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
|
|
|
+ //fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
|
|
|
// 处理指标名称
|
|
|
fullIndexName := fmt.Sprintf("%s/%s/%s/%s", namePrefix, area, province, name)
|
|
|
provincePingyin := utils.GetFullPingYin(province)
|
|
@@ -286,7 +286,7 @@ func HandleYongyiExcelWeekly2(f *excelize.File, sheetName string) (indexList []*
|
|
|
indexItem.ExcelDataMap = make(map[string]string)
|
|
|
sort++
|
|
|
}
|
|
|
- fmt.Printf("indexItem%s", indexItem.IndexCode)
|
|
|
+ //fmt.Printf("indexItem%s", indexItem.IndexCode)
|
|
|
|
|
|
indexItem.ExcelDataMap[date] = text
|
|
|
indexMap[fullIndexName] = indexItem
|
|
@@ -304,7 +304,7 @@ func HandleYongyiExcelWeekly2(f *excelize.File, sheetName string) (indexList []*
|
|
|
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())
|
|
|
+ //fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
|
|
|
utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
|
|
|
}
|
|
|
}()
|
|
@@ -331,7 +331,7 @@ func HandleYongyiExcelWeekly3(f *excelize.File, sheetName string) (indexList []*
|
|
|
return
|
|
|
}
|
|
|
for i, row := range rows {
|
|
|
- fmt.Printf("当前第%d行 \n", i)
|
|
|
+ //fmt.Printf("当前第%d行 \n", i)
|
|
|
currentMergeCells, mergeOk := mergeCellMap[i]
|
|
|
|
|
|
if i < 2 {
|
|
@@ -362,7 +362,7 @@ func HandleYongyiExcelWeekly3(f *excelize.File, sheetName string) (indexList []*
|
|
|
|
|
|
date := ""
|
|
|
for k, text := range row {
|
|
|
- fmt.Printf("当前第%d列 \n", k)
|
|
|
+ //fmt.Printf("当前第%d列 \n", k)
|
|
|
if k == 0 {
|
|
|
continue
|
|
|
} else if k == 1 {
|
|
@@ -403,7 +403,7 @@ func HandleYongyiExcelWeekly3(f *excelize.File, sheetName string) (indexList []*
|
|
|
} else if province == "全国平均" {
|
|
|
province = "全国"
|
|
|
}
|
|
|
- fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
|
|
|
+ //fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
|
|
|
// 处理指标名称
|
|
|
fullIndexName := fmt.Sprintf("%s/%s", namePrefix, province)
|
|
|
provincePingyin := utils.GetFullPingYin(province)
|
|
@@ -423,7 +423,7 @@ func HandleYongyiExcelWeekly3(f *excelize.File, sheetName string) (indexList []*
|
|
|
indexItem.ExcelDataMap = make(map[string]string)
|
|
|
sort++
|
|
|
}
|
|
|
- fmt.Printf("indexItem%s", indexItem.IndexCode)
|
|
|
+ //fmt.Printf("indexItem%s", indexItem.IndexCode)
|
|
|
|
|
|
indexItem.ExcelDataMap[date] = text
|
|
|
indexMap[fullIndexName] = indexItem
|
|
@@ -441,7 +441,7 @@ func HandleYongyiExcelWeekly3(f *excelize.File, sheetName string) (indexList []*
|
|
|
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())
|
|
|
+ //fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
|
|
|
utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
|
|
|
}
|
|
|
}()
|
|
@@ -469,7 +469,7 @@ func HandleYongyiExcelWeekly4(f *excelize.File, sheetName string) (indexList []*
|
|
|
return
|
|
|
}
|
|
|
for i, row := range rows {
|
|
|
- fmt.Printf("当前第%d行 \n", i)
|
|
|
+ //fmt.Printf("当前第%d行 \n", i)
|
|
|
currentMergeCells, mergeOk := mergeCellMap[i]
|
|
|
|
|
|
if i == 0 {
|
|
@@ -493,7 +493,7 @@ func HandleYongyiExcelWeekly4(f *excelize.File, sheetName string) (indexList []*
|
|
|
date := ""
|
|
|
name := ""
|
|
|
for k, text := range row {
|
|
|
- fmt.Printf("当前第%d列 \n", k)
|
|
|
+ //fmt.Printf("当前第%d列 \n", k)
|
|
|
if k == 0 {
|
|
|
continue
|
|
|
} else if k == 1 {
|
|
@@ -566,8 +566,8 @@ func HandleYongyiExcelWeekly4(f *excelize.File, sheetName string) (indexList []*
|
|
|
}
|
|
|
}
|
|
|
for _, v := range indexMap {
|
|
|
- fmt.Printf("IndexName: %s \n", v.IndexName)
|
|
|
- fmt.Printf("IndexCode: %s \n", v.IndexCode)
|
|
|
+ //fmt.Printf("IndexName: %s \n", v.IndexName)
|
|
|
+ //fmt.Printf("IndexCode: %s \n", v.IndexCode)
|
|
|
indexList = append(indexList, v)
|
|
|
}
|
|
|
return
|
|
@@ -577,7 +577,7 @@ func HandleYongyiExcelWeekly4(f *excelize.File, sheetName string) (indexList []*
|
|
|
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())
|
|
|
+ //fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
|
|
|
utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
|
|
|
}
|
|
|
}()
|
|
@@ -605,7 +605,7 @@ func HandleYongyiExcelWeekly5(f *excelize.File, sheetName string) (indexList []*
|
|
|
return
|
|
|
}
|
|
|
for i, row := range rows {
|
|
|
- fmt.Printf("当前第%d行 \n", i)
|
|
|
+ //fmt.Printf("当前第%d行 \n", i)
|
|
|
currentMergeCells, mergeOk := mergeCellMap[i]
|
|
|
|
|
|
if i == 0 {
|
|
@@ -635,7 +635,7 @@ func HandleYongyiExcelWeekly5(f *excelize.File, sheetName string) (indexList []*
|
|
|
|
|
|
date := ""
|
|
|
for k, text := range row {
|
|
|
- fmt.Printf("当前第%d列 \n", k)
|
|
|
+ //fmt.Printf("当前第%d列 \n", k)
|
|
|
if k == 0 {
|
|
|
continue
|
|
|
} else if k == 1 {
|
|
@@ -672,7 +672,7 @@ func HandleYongyiExcelWeekly5(f *excelize.File, sheetName string) (indexList []*
|
|
|
if province == "全 国1" || province == "全 国2" || province == "全国1" || province == "全国2" {
|
|
|
province = strings.ReplaceAll(province, " ", "")
|
|
|
}
|
|
|
- fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
|
|
|
+ //fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, province)
|
|
|
// 处理指标名称
|
|
|
fullIndexName := fmt.Sprintf("%s/%s", namePrefix, province)
|
|
|
provincePingyin := utils.GetFullPingYin(province)
|
|
@@ -692,7 +692,7 @@ func HandleYongyiExcelWeekly5(f *excelize.File, sheetName string) (indexList []*
|
|
|
indexItem.ExcelDataMap = make(map[string]string)
|
|
|
sort++
|
|
|
}
|
|
|
- fmt.Printf("IndexCode: %s", indexItem.IndexCode)
|
|
|
+ //fmt.Printf("IndexCode: %s", indexItem.IndexCode)
|
|
|
|
|
|
indexItem.ExcelDataMap[date] = text
|
|
|
indexMap[fullIndexName] = indexItem
|
|
@@ -711,7 +711,7 @@ func HandleYongyiExcelWeekly6(f *excelize.File, sheetName string) (indexList []*
|
|
|
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
- fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
|
|
|
+ //fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
|
|
|
utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
|
|
|
}
|
|
|
}()
|
|
@@ -739,7 +739,7 @@ func HandleYongyiExcelWeekly6(f *excelize.File, sheetName string) (indexList []*
|
|
|
return
|
|
|
}
|
|
|
for i, row := range rows {
|
|
|
- fmt.Printf("当前第%d行 \n", i)
|
|
|
+ //fmt.Printf("当前第%d行 \n", i)
|
|
|
currentMergeCells, mergeOk := mergeCellMap[i]
|
|
|
|
|
|
if i == 0 {
|
|
@@ -762,7 +762,7 @@ func HandleYongyiExcelWeekly6(f *excelize.File, sheetName string) (indexList []*
|
|
|
|
|
|
date := ""
|
|
|
for k, text := range row {
|
|
|
- fmt.Printf("当前第%d列 \n", k)
|
|
|
+ //fmt.Printf("当前第%d列 \n", k)
|
|
|
if k == 0 {
|
|
|
text = strings.TrimSpace(text)
|
|
|
var dateT time.Time
|
|
@@ -797,7 +797,7 @@ func HandleYongyiExcelWeekly6(f *excelize.File, sheetName string) (indexList []*
|
|
|
err = fmt.Errorf("找不到对应的列名,第%d行,第%d列", i, k)
|
|
|
return
|
|
|
}
|
|
|
- fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, area)
|
|
|
+ //fmt.Printf("当前第%d行第%d列, 当前省份%s \n", i, k, area)
|
|
|
// 处理指标名称
|
|
|
fullIndexName := fmt.Sprintf("%s/%s", namePrefix, area)
|
|
|
areaPingyin := utils.GetFirstPingYin(area)
|
|
@@ -820,7 +820,7 @@ func HandleYongyiExcelWeekly6(f *excelize.File, sheetName string) (indexList []*
|
|
|
indexItem.ExcelDataMap = make(map[string]string)
|
|
|
sort++
|
|
|
}
|
|
|
- fmt.Printf("IndexCode: %s", indexItem.IndexCode)
|
|
|
+ //fmt.Printf("IndexCode: %s", indexItem.IndexCode)
|
|
|
|
|
|
indexItem.ExcelDataMap[date] = text
|
|
|
indexMap[fullIndexName] = indexItem
|
|
@@ -838,7 +838,7 @@ func HandleYongyiExcelWeekly6(f *excelize.File, sheetName string) (indexList []*
|
|
|
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())
|
|
|
+ //fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
|
|
|
utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
|
|
|
}
|
|
|
}()
|
|
@@ -867,7 +867,7 @@ func HandleYongyiExcelWeekly7(f *excelize.File, sheetName string) (indexList []*
|
|
|
return
|
|
|
}
|
|
|
for i, row := range rows {
|
|
|
- fmt.Printf("当前第%d行 \n", i)
|
|
|
+ //fmt.Printf("当前第%d行 \n", i)
|
|
|
currentMergeCells, mergeOk := mergeCellMap[i]
|
|
|
|
|
|
if i == 0 {
|
|
@@ -898,7 +898,7 @@ func HandleYongyiExcelWeekly7(f *excelize.File, sheetName string) (indexList []*
|
|
|
|
|
|
date := ""
|
|
|
for k, text := range row {
|
|
|
- fmt.Printf("当前第%d列 \n", k)
|
|
|
+ //fmt.Printf("当前第%d列 \n", k)
|
|
|
if k == 0 {
|
|
|
text = strings.TrimSpace(text)
|
|
|
var dateT time.Time
|
|
@@ -937,7 +937,7 @@ func HandleYongyiExcelWeekly7(f *excelize.File, sheetName string) (indexList []*
|
|
|
if province == "本月计划较上月实际销售" {
|
|
|
continue
|
|
|
}
|
|
|
- fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, province)
|
|
|
+ //fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, province)
|
|
|
// 处理指标名称
|
|
|
fullIndexName := fmt.Sprintf("%s/%s", namePrefix, province)
|
|
|
provincePingyin := utils.GetFullPingYin(province)
|
|
@@ -968,7 +968,7 @@ func HandleYongyiExcelWeekly7(f *excelize.File, sheetName string) (indexList []*
|
|
|
indexItem.ExcelDataMap = make(map[string]string)
|
|
|
sort++
|
|
|
}
|
|
|
- fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
|
|
|
+ //fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
|
|
|
|
|
|
indexItem.ExcelDataMap[date] = text
|
|
|
indexMap[fullIndexName] = indexItem
|
|
@@ -986,7 +986,7 @@ func HandleYongyiExcelWeekly7(f *excelize.File, sheetName string) (indexList []*
|
|
|
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())
|
|
|
+ //fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
|
|
|
utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
|
|
|
}
|
|
|
}()
|
|
@@ -1014,7 +1014,7 @@ func HandleYongyiExcelWeekly8(f *excelize.File, sheetName string) (indexList []*
|
|
|
return
|
|
|
}
|
|
|
for i, row := range rows {
|
|
|
- fmt.Printf("当前第%d行 \n", i)
|
|
|
+ //fmt.Printf("当前第%d行 \n", i)
|
|
|
currentMergeCells, mergeOk := mergeCellMap[i]
|
|
|
|
|
|
if i <= 2 {
|
|
@@ -1038,7 +1038,7 @@ func HandleYongyiExcelWeekly8(f *excelize.File, sheetName string) (indexList []*
|
|
|
|
|
|
date := ""
|
|
|
for k, text := range row {
|
|
|
- fmt.Printf("当前第%d列 \n", k)
|
|
|
+ //fmt.Printf("当前第%d列 \n", k)
|
|
|
if k == 0 {
|
|
|
text = strings.TrimSpace(text)
|
|
|
var dateT time.Time
|
|
@@ -1077,7 +1077,7 @@ func HandleYongyiExcelWeekly8(f *excelize.File, sheetName string) (indexList []*
|
|
|
if area == "环比" || area == "日期" || area == "同比" {
|
|
|
continue
|
|
|
}
|
|
|
- fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, area)
|
|
|
+ //fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, area)
|
|
|
// 处理指标名称
|
|
|
fullIndexName := fmt.Sprintf("%s/%s", namePrefix, area)
|
|
|
areaPingyin := utils.GetFirstPingYin(area)
|
|
@@ -1097,7 +1097,7 @@ func HandleYongyiExcelWeekly8(f *excelize.File, sheetName string) (indexList []*
|
|
|
indexItem.ExcelDataMap = make(map[string]string)
|
|
|
sort++
|
|
|
}
|
|
|
- fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
|
|
|
+ //fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
|
|
|
|
|
|
indexItem.ExcelDataMap[date] = text
|
|
|
indexMap[fullIndexName] = indexItem
|
|
@@ -1115,7 +1115,7 @@ func HandleYongyiExcelWeekly8(f *excelize.File, sheetName string) (indexList []*
|
|
|
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())
|
|
|
+ //fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
|
|
|
utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
|
|
|
}
|
|
|
}()
|
|
@@ -1143,7 +1143,7 @@ func HandleYongyiExcelWeekly9(f *excelize.File, sheetName string) (indexList []*
|
|
|
return
|
|
|
}
|
|
|
for i, row := range rows {
|
|
|
- fmt.Printf("当前第%d行 \n", i)
|
|
|
+ //fmt.Printf("当前第%d行 \n", i)
|
|
|
currentMergeCells, mergeOk := mergeCellMap[i]
|
|
|
|
|
|
if i <= 1 {
|
|
@@ -1167,7 +1167,7 @@ func HandleYongyiExcelWeekly9(f *excelize.File, sheetName string) (indexList []*
|
|
|
|
|
|
date := ""
|
|
|
for k, text := range row {
|
|
|
- fmt.Printf("当前第%d列 \n", k)
|
|
|
+ //fmt.Printf("当前第%d列 \n", k)
|
|
|
if k == 0 {
|
|
|
text = strings.TrimSpace(text)
|
|
|
var dateT time.Time
|
|
@@ -1206,7 +1206,7 @@ func HandleYongyiExcelWeekly9(f *excelize.File, sheetName string) (indexList []*
|
|
|
if area == "环比" || area == "日期" || area == "同比" {
|
|
|
continue
|
|
|
}
|
|
|
- fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, area)
|
|
|
+ //fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, area)
|
|
|
// 处理指标名称
|
|
|
fullIndexName := fmt.Sprintf("%s/%s", namePrefix, area)
|
|
|
areaPingyin := utils.GetFirstPingYin(area)
|
|
@@ -1226,7 +1226,7 @@ func HandleYongyiExcelWeekly9(f *excelize.File, sheetName string) (indexList []*
|
|
|
indexItem.ExcelDataMap = make(map[string]string)
|
|
|
sort++
|
|
|
}
|
|
|
- fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
|
|
|
+ //fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
|
|
|
|
|
|
indexItem.ExcelDataMap[date] = text
|
|
|
indexMap[fullIndexName] = indexItem
|
|
@@ -1244,7 +1244,7 @@ func HandleYongyiExcelWeekly9(f *excelize.File, sheetName string) (indexList []*
|
|
|
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())
|
|
|
+ //fmt.Printf("HandleYongyiExcelWeekly1 周度-商品猪出栏价 ErrMsg: %s\n", err.Error())
|
|
|
utils.FileLog.Info(fmt.Sprintf("HandleYongyiExcelWeekly1 周度-商品猪出栏价ErrMsg: %s", err.Error()))
|
|
|
}
|
|
|
}()
|
|
@@ -1272,7 +1272,7 @@ func HandleYongyiExcelWeekly10(f *excelize.File, sheetName string) (indexList []
|
|
|
return
|
|
|
}
|
|
|
for i, row := range rows {
|
|
|
- fmt.Printf("当前第%d行 \n", i)
|
|
|
+ //fmt.Printf("当前第%d行 \n", i)
|
|
|
currentMergeCells, mergeOk := mergeCellMap[i]
|
|
|
if i == 0 {
|
|
|
continue
|
|
@@ -1294,7 +1294,7 @@ func HandleYongyiExcelWeekly10(f *excelize.File, sheetName string) (indexList []
|
|
|
|
|
|
date := ""
|
|
|
for k, text := range row {
|
|
|
- fmt.Printf("当前第%d列 \n", k)
|
|
|
+ //fmt.Printf("当前第%d列 \n", k)
|
|
|
if k == 0 {
|
|
|
text = strings.TrimSpace(text)
|
|
|
var dateT time.Time
|
|
@@ -1333,7 +1333,7 @@ func HandleYongyiExcelWeekly10(f *excelize.File, sheetName string) (indexList []
|
|
|
if area == "环比" || area == "日期" || area == "同比" || area == "较非瘟前" {
|
|
|
continue
|
|
|
}
|
|
|
- fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, area)
|
|
|
+ //fmt.Printf("当前第%d行第%d列, 当前省份: %s \n", i, k, area)
|
|
|
// 处理指标名称
|
|
|
fullIndexName := fmt.Sprintf("%s/%s", namePrefix, area)
|
|
|
areaPingyin := utils.GetFirstPingYin(area)
|
|
@@ -1353,7 +1353,7 @@ func HandleYongyiExcelWeekly10(f *excelize.File, sheetName string) (indexList []
|
|
|
indexItem.ExcelDataMap = make(map[string]string)
|
|
|
sort++
|
|
|
}
|
|
|
- fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
|
|
|
+ //fmt.Printf("IndexCode: %s\n", indexItem.IndexCode)
|
|
|
|
|
|
indexItem.ExcelDataMap[date] = text
|
|
|
indexMap[fullIndexName] = indexItem
|