index

package
v0.0.0-...-1aeafd4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 14 Imported by: 0

README

指标

宏观指标

1、工业增加值增长
2、社会消费品零售总额
3、货币供应量
4、居民消费价格指数(CPI)
5、国内生产总值(GDP)
6、采购经理人指数(PMI)
7、工业品出厂价格指数(PPI)

行业指标

1、波罗的海指数
2、物流业景气指数
3、中国大宗商品指数
4、上海银行间同业拆放利率
5、造纸行业价格指数
6、原油价格指数
7、人民币汇率
8、美元指数
9、国债指数
10、贷款基准利率

Documentation

Index

Constants

View Source
const (
	PeriodTypeYear      = "10"
	PeriodNameYear      = "年"
	PeriodTypeSeason    = "20"
	PeriodNameSeason    = "季"
	PeriodTypeMonth     = "30"
	PeriodNameMonth     = "月"
	PeriodTypeWeek      = "40"
	PeriodNameWeek      = "周"
	PeriodTypeDay       = "50"
	PeriodNameDay       = "日"
	PeriodTypeReal      = "60"
	PeriodNameReal      = "实时"
	PeriodTypeUnCertain = "90"
	PeriodNameUnCertain = "不定期"
)

指标周期

View Source
const (
	UnitTypeG = "10"
	UnitNameG = "个"
	UnitTypeR = "20"
	UnitNameR = "人"
	UnitTypeY = "30"
	UnitNameY = "元"
	UnitTypeW = "31"
	UnitNameW = "万元"
	UnitTypeE = "32"
	UnitNameE = "亿元"
	UnitTypeJ = "40"
	UnitNameJ = "家"
	UnitTypeP = "50"
	UnitNameP = "%"
)

指标计量单位 UnitTypeX:代表指标类型代码 UnitNameX:代表指标类型名字

Variables

View Source
var ConfigString = `` /* 24937-byte string literal not displayed */

ConfigString 指标配置信息 一个指标的同比和累计可能来自于一个api,即它们的SourceTargetCode是一致的 为了区分同比和累计,增加字段SourceTargetCodeTable,最后将其写入数据库的SourceTargetCode字段 对于无区分的指标,SourceTargetCode和SourceTargetCodeTable一致 对于有区分的指标,SourceTargetCode和SourceTargetCodeTable不一致

View Source
var FieldNum int
View Source
var FieldSVS string
View Source
var FieldStr string
View Source
var Table = "T_DMAA_BASE_TARGET_VALUE"

Functions

func RunIndex

func RunIndex()

func RunIndex24

func RunIndex24()

RunIndex24 24小时刷新的数据不录入内部服务器,直接发送到生产机

Types

type Config

type Config struct {
	Name                  string `json:"Name"`
	Case                  string `json:"Case"`
	TargetNameEN          string `json:"TargetNameEN"`
	TargetCode            string `json:"TargetCode"`
	DataSourceCode        string `json:"DataSourceCode"`
	DataSourceName        string `json:"DataSourceName"`
	SourceTargetCode      string `json:"SourceTargetCode"`
	SourceTargetCodeTable string `json:"SourceTargetCodeTable"`
	IsQuantity            string `json:"IsQuantity"`
	UnitType              string `json:"UnitType"`
	UnitName              string `json:"UnitName"`
	PeriodType            string `json:"PeriodType"`
	PeriodName            string `json:"PeriodName"`
	HY                    string `json:"HY"`
	Level                 string `json:"Level"`
	Path1                 string `json:"Path1"`
	Path2                 string `json:"Path2"`
	Path3                 string `json:"Path3"`
	Path4                 string `json:"Path4"`
	Type                  string `json:"Type"`
	RunTime               string `json:"RunTime"`
}

type Configs

type Configs []Config

type Field

type Field struct {
	ValueGUID        string `db:"VALUE_GUID" json:"valueGuid"`                // 指标值ID
	TargetGUID       string `db:"TARGET_GUID" json:"targetGuid"`              // 指标ID
	TargetCode       string `db:"TARGET_CODE" json:"targetCode"`              // 指标代码
	TargetName       string `db:"TARGET_NAME" json:"targetName"`              // 指标名称
	TargetNameEN     string `db:"TARGET_NAME_EN" json:"targetNameEn"`         // 指标英文名称
	DataSourceCode   string `db:"DATA_SOURCE_CODE" json:"dataSourceCode"`     // 数据来源代码
	DataSourceName   string `db:"DATA_SOURCE_NAME" json:"dataSourceName"`     // 数据来源名称
	SourceTargetCode string `db:"SOURCE_TARGET_CODE" json:"sourceTargetCode"` // 来源系统指标代码
	RegionCode       string `db:"REGION_CODE" json:"regionCode"`              // 统计地区
	RegionName       string `db:"REGION_NAME" json:"regionName"`              // 统计地区说明
	IsQuantity       string `db:"IS_QUANTITY" json:"isQuantity"`              // 是否定量
	UnitType         string `db:"UNIT_TYPE" json:"unitType"`                  // 计量单位类型
	UnitName         string `db:"UNIT_NAME" json:"unitName"`                  // 计量单位名称
	PeriodType       string `db:"PERIOD_TYPE" json:"periodType"`              // 计量单位类型
	PeriodName       string `db:"PERIOD_NAME" json:"periodName"`              // 计量单位名称
	AcctYear         string `db:"ACCT_YEAR" json:"acctYear"`                  // 年
	AcctSeason       string `db:"ACCT_QUARTOR" json:"acctQuartor"`            // 季
	AcctMonth        string `db:"ACCT_MONTH" json:"acctMonth"`                // 月
	AcctDate         string `db:"ACCT_DATE" json:"acctDate"`                  // 日
	TargetValue      string `db:"TARGET_VALUE" json:"targetValue"`            // 指标值
}

func (Field) GetFields

func (f Field) GetFields() (fields []string)

func (Field) GetNumFields

func (f Field) GetNumFields() int

func (Field) GetValues

func (f Field) GetValues() (values []interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL