123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364 |
- package utils
- const (
- FormatTime = "15:04:05"
- FormatDate = "2006-01-02"
- FormatDateCN = "2006年01月02日"
- FormatDateUnSpace = "20060102"
- FormatDateTime = "2006-01-02 15:04:05"
- HlbFormatDateTime = "2006-01-02_15:04:05.999"
- FormatDateTimeUnSpace = "20060102150405"
- PageSize15 = 15
- PageSize5 = 5
- PageSize10 = 10
- PageSize20 = 20
- PageSize30 = 30
- )
- const DateTypeNYears = 20
- const (
- RegularMobile = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0-9])|(17[0-9])|(16[0-9])|(19[0-9]))\\d{8}$"
- RegularEmail = `\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*`
- )
- const (
- APPNAME = "弘则研报"
- EmailSendToUsers = "317699326@qq.com;984198890@qq.com;hsun@hzinsights.com;xyxie@hzinsights.com"
- )
- var (
- JhGnTplId = "65692"
- JhGjTplId = "10054"
- JhGnAppKey = "4c8504c49dd335e99cfd7b6a3a9e2415"
- JhGjAppKey = "3326ad2c1047a4cd92ace153e6044ca3"
- )
- const (
- key = "zDeESsxsXuionhqSLZYHWcDJ"
- )
- const (
- DATA_SOURCE_THS = iota + 1
- DATA_SOURCE_WIND
- DATA_SOURCE_PB
- DATA_SOURCE_CALCULATE
- DATA_SOURCE_CALCULATE_LJZZY
- DATA_SOURCE_CALCULATE_TBZ
- DATA_SOURCE_CALCULATE_TCZ
- DATA_SOURCE_CALCULATE_NSZYDPJJS
- DATA_SOURCE_MANUAL
- DATA_SOURCE_LZ
- DATA_SOURCE_YS
- DATA_SOURCE_CALCULATE_HBZ
- DATA_SOURCE_CALCULATE_HCZ
- DATA_SOURCE_CALCULATE_BP
- DATA_SOURCE_GL
- DATA_SOURCE_ZZ
- DATA_SOURCE_DL
- DATA_SOURCE_SH
- DATA_SOURCE_CFFEX
- DATA_SOURCE_SHFE
- DATA_SOURCE_GIE
- DATA_SOURCE_CALCULATE_TIME_SHIFT
- DATA_SOURCE_CALCULATE_ZJPJ
- DATA_SOURCE_CALCULATE_LJZTBPJ
- DATA_SOURCE_LT
- DATA_SOURCE_COAL
- DATA_SOURCE_PYTHON
- DATA_SOURCE_PB_FINANCE
- DATA_SOURCE_GOOGLE_TRAVEL
- DATA_SOURCE_PREDICT
- DATA_SOURCE_PREDICT_CALCULATE
- DATA_SOURCE_PREDICT_CALCULATE_TBZ
- DATA_SOURCE_PREDICT_CALCULATE_TCZ
- DATA_SOURCE_MYSTEEL_CHEMICAL
- DATA_SOURCE_CALCULATE_CJJX
- DATA_SOURCE_EIA_STEO
- DATA_SOURCE_CALCULATE_NHCC
- DATA_SOURCE_COM_TRADE
- DATA_SOURCE_PREDICT_CALCULATE_NSZYDPJJS
- DATA_SOURCE_CALCULATE_ADJUST
- DATA_SOURCE_SCI
- DATA_SOURCE_PREDICT_CALCULATE_LJZZY
- DATA_SOURCE_PREDICT_CALCULATE_HBZ
- DATA_SOURCE_PREDICT_CALCULATE_HCZ
- DATA_SOURCE_PREDICT_CALCULATE_BP
- DATA_SOURCE_PREDICT_CALCULATE_TIME_SHIFT
- DATA_SOURCE_PREDICT_CALCULATE_ZJPJ
- DATA_SOURCE_PREDICT_CALCULATE_LJZTBPJ
- DATA_SOURCE_PREDICT_CALCULATE_CJJX
- DATA_SOURCE_PREDICT_CALCULATE_NHCC
- DATA_SOURCE_CALCULATE_JP
- DATA_SOURCE_CALCULATE_NH
- DATA_SOURCE_CALCULATE_KSZS
- DATA_SOURCE_PREDICT_CALCULATE_JP
- DATA_SOURCE_PREDICT_CALCULATE_NH
- DATA_SOURCE_PREDICT_CALCULATE_KSZS
- DATA_SOURCE_BAIINFO
- DATA_SOURCE_STOCK_PLANT
- DATA_SOURCE_CALCULATE_CORRELATION
- DATA_SOURCE_NATIONAL_STATISTICS
- DATA_SOURCE_CALCULATE_LJZZJ
- DATA_SOURCE_CALCULATE_LJZ
- DATA_SOURCE_CALCULATE_LJZNCZJ
- DATA_SOURCE_PREDICT_CALCULATE_LJZZJ
- DATA_SOURCE_PREDICT_CALCULATE_LJZ
- DATA_SOURCE_PREDICT_CALCULATE_LJZNCZJ
- DATA_SOURCE_CALCULATE_STANDARD_DEVIATION
- DATA_SOURCE_CALCULATE_PERCENTILE
- DATA_SOURCE_PREDICT_CALCULATE_STANDARD_DEVIATION
- DATA_SOURCE_PREDICT_CALCULATE_PERCENTILE
- DATA_SOURCE_FUBAO
- DATA_SOURCE_CALCULATE_ZSXY
- DATA_SOURCE_PREDICT_CALCULATE_ZSXY
- DATA_SOURCE_CALCULATE_ZDYFX
- DATA_SOURCE_CALCULATE_RJZ
- DATA_SOURCE_BUSINESS = 84
- )
- const (
- HZ_CHART_LIB_DETAIL = "HZ_CHART_LIB_DETAIL_"
- HONGZEYB_ = "hongze_yb:"
- HONGZEYB_EBD_SOURCE = "hongze_yb:edb_source:"
- )
- const (
- DATA_PREFIX = "hz_data"
- CHART_PREFIX = "hz_chart"
- )
- const (
- DATA_REFRESH = 7
- DATA_START_REFRESH_LIMIT = 7
- DATA_END_DATE_LIMIT = 4
- )
- const (
- Hz_Data_Url = "http://datawind.hzinsights.com:8040/"
- Hz_Data_PB_Url = "http://datapb.hzinsights.com:8040/"
- Hz_Data_LT_Url = "http://dataek.hzinsights.com:8040/"
- EDB_DATA_LIMIT = 10
- )
- var PermissionFiccClassifyArr = [...]string{"宏观经济", "化工产业", "建材产业", "有色产业", "新能源"}
- const (
- CACHE_KEY_USER_VIEW = "user_view_record"
- )
- const (
- ES_INDEX_RDDP_REPORT = "research_report_v1"
- )
- var (
- APP_EDB_LIB_NAME_EN = "hongze_edb_lib"
- EDB_LIB_Md5_KEY = "GuRaB6dY1bXOJcwG"
- )
- const ALIYUN_YBIMG_HOST = "https://hzstatic.hzinsights.com/static/yb_wx/"
- const HZ_DEFAULT_AVATAR = "https://hzstatic.hzinsights.com/static/yb_wx/hz_default_avatar.png"
- const HZPHONE = "057187186319"
- const HZ_ADMIN_WX_ACCESS_TOEKN = "hz_admin:wx:access_token:"
- const (
- TEMPLATE_MSG_YB_COMMUNITY_QUESTION = 11
- TEMPLATE_MSG_YB_VOICE_BROADCAST = 20
- )
- const (
- USER_RECORD_PLATFORM_RDDP = iota + 1
- USER_RECORD_PLATFORM_BACKSTAGE
- USER_RECORD_PLATFORM_PC
- USER_RECORD_PLATFORM_CYGX
- _
- USER_RECORD_PLATFORM_YB
- )
- const (
- DEFAULT_HONGZE_USER_LOGO = "https://hzstatic.hzinsights.com/static/icon/hzyb/default_avatar.png"
- DEFAULT_HONGZE_USER_LOGO_GRAY = "https://hzstatic.hzinsights.com/static/icon/hzyb/default_avatar_gray.png"
- DEFAULT_HONGZE_SYS_LOGO = "https://hzstatic.hzinsights.com/static/yb_wx/hongze_sys_default_head.png"
- )
- const (
- AdminId = 11
- RealName = "超级管理员"
- HzCompanyId = 16
- )
- const (
- CHART_TYPE_RADAR = 11
- CHART_TYPE_SECTION_COMBINE = 14
- )
- const (
- DEFAULT_REPORT_SHARE_BG_IMG = "https://hzstatic.hzinsights.com/static/icon/hzyb/rddp-share-bg.png"
- )
- var SystemSourceList = []int{
- DATA_SOURCE_CALCULATE,
- DATA_SOURCE_CALCULATE_LJZZY,
- DATA_SOURCE_CALCULATE_TBZ,
- DATA_SOURCE_CALCULATE_TCZ,
- DATA_SOURCE_CALCULATE_NSZYDPJJS,
- DATA_SOURCE_MANUAL,
- DATA_SOURCE_CALCULATE_HBZ,
- DATA_SOURCE_CALCULATE_HCZ,
- DATA_SOURCE_CALCULATE_BP,
- DATA_SOURCE_CALCULATE_TIME_SHIFT,
- DATA_SOURCE_CALCULATE_ZJPJ,
- DATA_SOURCE_CALCULATE_LJZTBPJ,
- DATA_SOURCE_PYTHON,
- DATA_SOURCE_PREDICT,
- DATA_SOURCE_PREDICT_CALCULATE,
- DATA_SOURCE_PREDICT_CALCULATE_TBZ,
- DATA_SOURCE_PREDICT_CALCULATE_TCZ,
- DATA_SOURCE_MYSTEEL_CHEMICAL,
- DATA_SOURCE_CALCULATE_CJJX,
- DATA_SOURCE_CALCULATE_NHCC,
- DATA_SOURCE_PREDICT_CALCULATE_NSZYDPJJS,
- DATA_SOURCE_CALCULATE_ADJUST,
- DATA_SOURCE_PREDICT_CALCULATE_LJZZY,
- DATA_SOURCE_PREDICT_CALCULATE_HBZ,
- DATA_SOURCE_PREDICT_CALCULATE_HCZ,
- DATA_SOURCE_PREDICT_CALCULATE_BP,
- DATA_SOURCE_PREDICT_CALCULATE_TIME_SHIFT,
- DATA_SOURCE_PREDICT_CALCULATE_ZJPJ,
- DATA_SOURCE_PREDICT_CALCULATE_LJZTBPJ,
- DATA_SOURCE_PREDICT_CALCULATE_CJJX,
- DATA_SOURCE_PREDICT_CALCULATE_NHCC,
- DATA_SOURCE_CALCULATE_JP,
- DATA_SOURCE_CALCULATE_NH,
- DATA_SOURCE_CALCULATE_KSZS,
- DATA_SOURCE_PREDICT_CALCULATE_JP,
- DATA_SOURCE_PREDICT_CALCULATE_NH,
- DATA_SOURCE_PREDICT_CALCULATE_KSZS,
- DATA_SOURCE_STOCK_PLANT,
- DATA_SOURCE_CALCULATE_CORRELATION,
- DATA_SOURCE_NATIONAL_STATISTICS,
- DATA_SOURCE_CALCULATE_LJZZJ,
- DATA_SOURCE_CALCULATE_LJZ,
- DATA_SOURCE_CALCULATE_LJZNCZJ,
- DATA_SOURCE_PREDICT_CALCULATE_LJZZJ,
- DATA_SOURCE_PREDICT_CALCULATE_LJZ,
- DATA_SOURCE_PREDICT_CALCULATE_LJZNCZJ,
- DATA_SOURCE_CALCULATE_STANDARD_DEVIATION,
- DATA_SOURCE_CALCULATE_PERCENTILE,
- DATA_SOURCE_PREDICT_CALCULATE_STANDARD_DEVIATION,
- DATA_SOURCE_PREDICT_CALCULATE_PERCENTILE,
- }
- const (
- SendTemplateMsgAuthorization = "dc855fce962a639faa779cbdd4cd332f"
- )
- var (
- REPORT_TYPE_DAY = "day"
- REPORT_TYPE_WEEK = "week"
- )
- var REPORT_CHAPTER_TYPE_NAME_MAP = map[string]string{
- REPORT_TYPE_DAY: "晨报",
- REPORT_TYPE_WEEK: "周报",
- }
- const ALIYUN_OSS_HOST = "https://hzstatic.hzinsights.com"
- const (
- CHART_SOURCE_DEFAULT = 1
- CHART_SOURCE_FUTURE_GOOD = 2
- CHART_SOURCE_CORRELATION = 3
- CHART_SOURCE_ROLLING_CORRELATION = 4
- CHART_SOURCE_FUTURE_GOOD_PROFIT = 5
- CHART_SOURCE_LINE_EQUATION = 6
- CHART_SOURCE_LINE_FEATURE_STANDARD_DEVIATION = 7
- CHART_SOURCE_LINE_FEATURE_PERCENTILE = 8
- CHART_SOURCE_LINE_FEATURE_FREQUENCY = 9
- CHART_SOURCE_CROSS_HEDGING = 10
- CHART_SOURCE_BALANCE_EXCEL = 11
- )
- const (
- CHART_MULTIPLE_GRAPH_CURVE = 1
- CHART_MULTIPLE_GRAPH_CORRELATION = 2
- CHART_MULTIPLE_GRAPH_ROLLING_CORRELATION_ONE = 3
- CHART_MULTIPLE_GRAPH_ROLLING_CORRELATION_TWO = 4
- CHART_MULTIPLE_GRAPH_LINE_EQUATION_ONE = 5
- CHART_MULTIPLE_GRAPH_LINE_EQUATION_TWO = 6
- CHART_MULTIPLE_GRAPH_LINE_EQUATION_THREE = 7
- )
- const (
- CHART_TYPE_CURVE = 1
- CHART_TYPE_BAR = 7
- CHART_TYPE_SECTION_SCATTER = 10
- )
- var FrequencyDaysMap = map[string]int{
- "天": 1, "周": 7, "月": 30, "季": 90, "年": 365,
- }
- var DataSourceEnMap = map[int]string{
- DATA_SOURCE_WIND: "Wind",
- DATA_SOURCE_THS: "iFind",
- DATA_SOURCE_PB: "Bloomberg",
- DATA_SOURCE_PB_FINANCE: "Bloomberg Finance",
- DATA_SOURCE_LT: "Reuters",
- DATA_SOURCE_MANUAL: "Horizon Insights",
- DATA_SOURCE_LZ: "OilChem",
- DATA_SOURCE_YS: "SMM",
- DATA_SOURCE_GL: "MySteel",
- DATA_SOURCE_ZZ: "Zhengzhou Commodity Exchange",
- DATA_SOURCE_DL: "Dalian Commodity Exchange",
- DATA_SOURCE_SH: "Shanghai Futures Exchange",
- DATA_SOURCE_CFFEX: "China Financial Futures Exchange",
- DATA_SOURCE_SHFE: "Shanghai International Energy Exchange",
- DATA_SOURCE_GIE: "Eurostat",
- DATA_SOURCE_COAL: "China Coal Transport & Distribution Association",
- DATA_SOURCE_GOOGLE_TRAVEL: "Our World in Data",
- DATA_SOURCE_EIA_STEO: "Energy Information Administration",
- DATA_SOURCE_COM_TRADE: "United Nations",
- DATA_SOURCE_SCI: "Sublime China Information",
- DATA_SOURCE_BAIINFO: "BAIINFO",
- DATA_SOURCE_MYSTEEL_CHEMICAL: "Horizon Insights",
- }
- const (
- DATA_SUB_SOURCE_EDB = iota
- DATA_SUB_SOURCE_DATE
- DATA_SUB_SOURCE_HIGH_FREQUENCY
- )
- const APPLY_VARIETY_IMG_DEFAULT = "https://hzstatic.hzinsights.com/static/yb_variety/default_permission.png"
- const (
- FiccProductId = 1
- )
|