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 ¶
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 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) GetNumFields ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.