瀏覽代碼

修改icpi bug

tuoling805 1 年之前
父節點
當前提交
4ee9512353
共有 3 個文件被更改,包括 9 次插入3 次删除
  1. 1 1
      controllers/data_manage/edb_info.go
  2. 7 2
      controllers/data_source/icpi.go
  3. 1 0
      models/data_source/icpi.go

+ 1 - 1
controllers/data_manage/edb_info.go

@@ -1667,7 +1667,7 @@ func (this *EdbInfoController) EdbInfoSearch() {
 
 			if indexInfo != nil {
 				searchItem.Frequency = "日度"
-				//searchItem.Unit = "手"
+				searchItem.Unit = "%"
 				searchItem.EdbName = indexInfo.IndexName
 			}
 		} else {

+ 7 - 2
controllers/data_source/icpi.go

@@ -97,7 +97,7 @@ func (this *DataSourceController) IcpiData() {
 	var condition string
 	var pars []interface{}
 
-	if baseFromIcpiClassifyId >= 0 {
+	if baseFromIcpiClassifyId > 0 {
 		condition += ` AND base_from_icpi_classify_id=? `
 		pars = append(pars, baseFromIcpiClassifyId)
 	}
@@ -216,6 +216,7 @@ func (this *DataSourceController) ExportIcpiDataList() {
 	secNameRow := sheetNew.AddRow()
 	indexCodeRow := sheetNew.AddRow()
 	frequencyRow := sheetNew.AddRow()
+	unitRow := sheetNew.AddRow()
 	lastModifyDateRow := sheetNew.AddRow()
 	//获取分类下指标最大数据量
 	dataMax, err := icpiObj.GetIcpiDataMaxCount(baseFromIcpiClassifyId)
@@ -238,12 +239,13 @@ func (this *DataSourceController) ExportIcpiDataList() {
 			secNameRow.AddCell().SetValue("指标名称")
 			indexCodeRow.AddCell().SetValue("指标ID")
 			frequencyRow.AddCell().SetValue("频率")
+			unitRow.AddCell().SetValue("单位")
 			lastModifyDateRow.AddCell().SetValue("更新时间")
 
 			secNameRow.AddCell().SetValue(sv.IndexName)
 			indexCodeRow.AddCell().SetValue(sv.IndexCode)
 			frequencyRow.AddCell().SetValue(sv.Frequency)
-
+			unitRow.AddCell().SetValue(sv.Unit)
 			lastModifyDateRow.AddCell().SetValue(sv.ModifyTime)
 
 			windRow.AddCell()
@@ -251,6 +253,7 @@ func (this *DataSourceController) ExportIcpiDataList() {
 			secNameRow.AddCell()
 			indexCodeRow.AddCell()
 			frequencyRow.AddCell()
+			unitRow.AddCell()
 			lastModifyDateRow.AddCell()
 			min := k * 3
 			sheetNew.SetColWidth(min, min, 15)
@@ -262,6 +265,7 @@ func (this *DataSourceController) ExportIcpiDataList() {
 					row.AddCell()
 					row.AddCell()
 					row.AddCell()
+					row.AddCell()
 				}
 			} else {
 				endRowIndex := 0
@@ -288,6 +292,7 @@ func (this *DataSourceController) ExportIcpiDataList() {
 						row.AddCell()
 						row.AddCell()
 						row.AddCell()
+						row.AddCell()
 					}
 				}
 			}

+ 1 - 0
models/data_source/icpi.go

@@ -60,6 +60,7 @@ type BaseFromIcpiIndexView struct {
 	IndexCode              string `description:"指标编码"`
 	IndexName              string `description:"指标名称"`
 	Frequency              string `description:"频度"`
+	Unit                   string `description:"单位"`
 	StartDate              string `description:"开始日期"`
 	EndDate                string `description:"结束日期"`
 	CreateTime             string `description:"创建时间"`