|
@@ -7,14 +7,13 @@ import (
|
|
|
"eta/eta_data_analysis/services/base_from_yongyi_v2"
|
|
|
"eta/eta_data_analysis/utils"
|
|
|
"fmt"
|
|
|
- "github.com/patrickmn/go-cache"
|
|
|
"github.com/xuri/excelize/v2"
|
|
|
"io/fs"
|
|
|
"os"
|
|
|
"path"
|
|
|
"path/filepath"
|
|
|
"strings"
|
|
|
- "syscall"
|
|
|
+ "sync"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -164,17 +163,12 @@ const (
|
|
|
// @Description: 调用python服务去涌益咨询官网下载日度excel文件
|
|
|
// @datetime 2023-12-19 09:39:05
|
|
|
func YongyiDownloadDaily(cont context.Context) (err error) {
|
|
|
- // todo 判断文件是否已经下载,如果已经下载到则无需重复下载
|
|
|
- var cacheClient *cache.Cache
|
|
|
- if cacheClient == nil {
|
|
|
- cacheClient = cache.New(365*24*time.Hour, 365*24*time.Hour)
|
|
|
- }
|
|
|
// 2023年12月19日涌益咨询日度数据
|
|
|
- path := fmt.Sprintf("%s/%s%s", utils.YongyiFilePath, time.Now().Format(utils.FormatDateYearMonthDay), "涌益咨询日度数据.xlsx")
|
|
|
- _, ok := cacheClient.Get(path)
|
|
|
- fmt.Println("YongyiDownloadDaily: " + path)
|
|
|
- if ok {
|
|
|
- utils.FileLog.Info("YongyiDownloadDaily: 文件已存在无需再下载")
|
|
|
+ filePath := fmt.Sprintf("%s/%s%s", utils.YongyiReadFilePath, time.Now().Format("2006年1月2日"), "涌益咨询日度数据.xlsx")
|
|
|
+
|
|
|
+ fmt.Println("YongyiDownloadDaily: " + filePath)
|
|
|
+ _, e := os.Stat(filePath)
|
|
|
+ if e == nil { //文件或者目录存在
|
|
|
return
|
|
|
}
|
|
|
url := fmt.Sprintf("%s?dayFlag=1&weekFlag=0", YongyiDownloadUrl)
|
|
@@ -192,49 +186,43 @@ func YongyiDownloadDaily(cont context.Context) (err error) {
|
|
|
// @Description: 调用python服务去涌益咨询官网下载周度excel文件
|
|
|
// @datetime 2023-12-19 09:39:05
|
|
|
func YongyiDownloadWeekyly(cont context.Context) (err error) {
|
|
|
- weekFlag := 1
|
|
|
- // 判断文件是否已经下载,如果已经下载到则无需重复下载
|
|
|
- var cacheClient *cache.Cache
|
|
|
- if cacheClient == nil {
|
|
|
- cacheClient = cache.New(365*24*time.Hour, 365*24*time.Hour)
|
|
|
- }
|
|
|
// 2023.11.10-2023.11.16涌益咨询 周度数据.xlsx
|
|
|
// 获取本周的时间范围, 即当前时间
|
|
|
- endDate := time.Now().Format(utils.FormatDatePoint)
|
|
|
- startDate := time.Now().AddDate(0, 0, -6).Format(utils.FormatDatePoint)
|
|
|
+ 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
|
|
|
- path := fmt.Sprintf("%s/%s-%s%s", utils.YongyiFilePath, startDate, endDate, "涌益咨询周度数据.xlsx")
|
|
|
- fmt.Println("YongyiDownloadWeekyly: " + path)
|
|
|
- _, ok := cacheClient.Get(path)
|
|
|
- if ok {
|
|
|
- utils.FileLog.Info("YongyiDownloadWeekyly: 文件已存在无需再下载")
|
|
|
+ filePath := fmt.Sprintf("%s/%s-%s%s", utils.YongyiReadFilePath, startDate, endDate, "涌益咨询周度数据.xlsx")
|
|
|
+ fmt.Println("YongyiDownloadWeekyly: " + filePath)
|
|
|
+
|
|
|
+ // 从已处理的表格中查询是否已存在,如果已存在,也无需下载
|
|
|
+ _, e := os.Stat(filePath)
|
|
|
+ if e == nil { //文件或者目录存在
|
|
|
dataFileExsit = true
|
|
|
- } else {
|
|
|
- // 从已处理的表格中查询是否已存在,如果已存在,也无需下载
|
|
|
- _, err = os.Stat(path)
|
|
|
- if err == nil { //文件或者目录存在
|
|
|
- dataFileExsit = true
|
|
|
- }
|
|
|
}
|
|
|
-
|
|
|
- path = fmt.Sprintf("%s/%s-%s%s", utils.YongyiFilePath, startDate, endDate, "周度图表版图.xlsx")
|
|
|
- fmt.Println("YongyiDownloadWeekyly: " + path)
|
|
|
- _, ok = cacheClient.Get(path)
|
|
|
- if ok {
|
|
|
- utils.FileLog.Info("YongyiDownloadWeekyly: 文件已存在无需再下载")
|
|
|
+ filePath = fmt.Sprintf("%s/%s-%s%s", utils.YongyiReadFilePath, startDate, endDate, "周度图表版图.xlsx")
|
|
|
+ fmt.Println("YongyiDownloadWeekyly: " + filePath)
|
|
|
+ _, e = os.Stat(filePath)
|
|
|
+ if e == nil { //文件或者目录存在
|
|
|
chartFileExist = true
|
|
|
- } else {
|
|
|
- // 从已处理的表格中查询是否已存在,如果已存在,也无需下载
|
|
|
- _, err = os.Stat(path)
|
|
|
- if err == 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 := HttpGet(url)
|
|
|
if err != nil {
|
|
@@ -246,6 +234,8 @@ func YongyiDownloadWeekyly(cont context.Context) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+var HandlezYongyiFilePathMutex sync.Mutex
|
|
|
+
|
|
|
// 监听涌溢咨询文件夹是否有新增的excel文件
|
|
|
func ReadWatchYongyiFile(cont context.Context) (err error) {
|
|
|
fmt.Println("ReadWatchYongyiFile start")
|
|
@@ -254,89 +244,64 @@ func ReadWatchYongyiFile(cont context.Context) (err error) {
|
|
|
fmt.Println("ReadWatchYongyiFile Err:" + err.Error())
|
|
|
}
|
|
|
}()
|
|
|
- var cacheClient *cache.Cache
|
|
|
- if cacheClient == nil {
|
|
|
- cacheClient = cache.New(365*24*time.Hour, 365*24*time.Hour)
|
|
|
+ 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() {
|
|
|
- fmt.Println("ReadWatchYongyiFile path" + path)
|
|
|
- fileInfo, e := os.Stat(path)
|
|
|
- if e != nil {
|
|
|
- fmt.Println("ReadWatchYongyiFile os.Stat:", e.Error())
|
|
|
+ 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
|
|
|
}
|
|
|
- winFileAttr := fileInfo.Sys().(*syscall.Win32FileAttributeData)
|
|
|
- modifyTimeStr := utils.SecondToTime(winFileAttr.LastWriteTime.Nanoseconds() / 1e9).Format(utils.FormatDateTime)
|
|
|
- fmt.Println("ReadWatchYongyiFile modifyTimeStr" + modifyTimeStr)
|
|
|
- existModifyTime, ok := cacheClient.Get(path)
|
|
|
- moveFlag := false
|
|
|
- if ok {
|
|
|
- // 更新
|
|
|
- fmt.Println("ReadWatchYongyiFile existModifyTime" + existModifyTime.(string))
|
|
|
- existModifyTimeStr := existModifyTime.(string)
|
|
|
- if existModifyTimeStr != modifyTimeStr {
|
|
|
- if strings.Contains(path, "涌益咨询") && strings.Contains(path, "日度") {
|
|
|
- time.Sleep(time.Second * 10)
|
|
|
- err = HandleYongyiExcelDailyV2(path)
|
|
|
- if err == nil {
|
|
|
- moveFlag = true
|
|
|
- }
|
|
|
- // todo 移动文件到新目录下
|
|
|
- } else if strings.Contains(path, "涌益咨询") && strings.Contains(path, "周度图表版图") {
|
|
|
- time.Sleep(time.Second * 10)
|
|
|
- err = HandleYongyiExcelWeeklyChart(path)
|
|
|
- if err == nil {
|
|
|
- moveFlag = true
|
|
|
- }
|
|
|
- } else if strings.Contains(path, "涌益咨询") && strings.Contains(path, "周度数据") {
|
|
|
- time.Sleep(time.Second * 10)
|
|
|
- err = HandleYongyiExcelWeeklyV2(path)
|
|
|
- if err == nil {
|
|
|
- moveFlag = true
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- // 新增
|
|
|
- if strings.Contains(path, "涌益咨询") && strings.Contains(path, "日度") {
|
|
|
- time.Sleep(time.Second * 10)
|
|
|
- err = HandleYongyiExcelDailyV2(path)
|
|
|
- if err == nil {
|
|
|
- moveFlag = true
|
|
|
- }
|
|
|
- } else if strings.Contains(path, "涌益咨询") && strings.Contains(path, "周度图表版图") {
|
|
|
- time.Sleep(time.Second * 10)
|
|
|
- err = HandleYongyiExcelWeeklyChart(path)
|
|
|
- if err == nil {
|
|
|
- moveFlag = true
|
|
|
- }
|
|
|
- } else if strings.Contains(path, "涌益咨询") && strings.Contains(path, "周度数据") {
|
|
|
- time.Sleep(time.Second * 10)
|
|
|
- err = HandleYongyiExcelWeeklyV2(path)
|
|
|
- if err == nil {
|
|
|
- moveFlag = true
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ if err != nil {
|
|
|
+ err = fmt.Errorf("handlerYongyi err: %s", 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
|
|
|
}
|
|
|
- if moveFlag {
|
|
|
- // 移动文件至已处理目录
|
|
|
- e = utils.CreateDirIfNotExists(utils.YongyiReadFilePath)
|
|
|
- if e != nil {
|
|
|
- //err = fmt.Errorf("CreateDirIfNotExists err: %s", e.Error())
|
|
|
- fmt.Printf("ReadWatchYongyiFile CreateDirIfNotExists err: %s\n", e.Error())
|
|
|
- }
|
|
|
- destPath := filepath.Join(utils.YongyiReadFilePath, info.Name())
|
|
|
- e = os.Rename(path, destPath)
|
|
|
- if e != nil {
|
|
|
- //err = fmt.Errorf("file move err: %s", e.Error())
|
|
|
- fmt.Printf("ReadWatchYongyiFile file move err: %s\n", e.Error())
|
|
|
- }
|
|
|
+ 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
|
|
|
}
|
|
|
- cacheClient.Delete(path)
|
|
|
- cacheClient.Set(path, modifyTimeStr, 24*time.Hour)
|
|
|
}
|
|
|
return nil
|
|
|
})
|
|
@@ -344,55 +309,55 @@ func ReadWatchYongyiFile(cont context.Context) (err error) {
|
|
|
}
|
|
|
|
|
|
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.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,
|
|
|
+ "周度-商品猪出栏价": 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,
|