Răsfoiți Sursa

Merge branch 'bug/5664' into custom

Roc 6 luni în urmă
părinte
comite
7b54c7c8d5
2 a modificat fișierele cu 14 adăugiri și 5 ștergeri
  1. 9 0
      controllers/data_manage/manual_edb.go
  2. 5 5
      controllers/target.go

+ 9 - 0
controllers/data_manage/manual_edb.go

@@ -120,6 +120,7 @@ func (c *ManualEdbController) EdbDetail() {
 // ClassifyEdbList
 // @Title 分类指标列表
 // @Description 指标列表
+// @Param   Frequency   query   string  false       "频度;枚举值:日度、周度、月度、季度、半年度、年度"
 // @Param   ClassifyId   query   string  true       "分类id"
 // @Success 200 {object} models.TargetDetailResp
 // @router /target/classify/edb/list [get]
@@ -144,6 +145,9 @@ func (c *ManualEdbController) ClassifyEdbList() {
 		br.IsSendEmail = false
 	}
 
+	// 频度
+	frequency := c.GetString("Frequency")
+
 	var condition string
 	var pars []interface{}
 
@@ -170,6 +174,11 @@ func (c *ManualEdbController) ClassifyEdbList() {
 	condition += ` AND a.classify_id = ? `
 	pars = append(pars, classifyId)
 
+	if frequency != "" {
+		condition += ` AND a.frequency = ?`
+		pars = append(pars, frequency)
+	}
+
 	tmpList, err := models.GetEdbInfoList(condition, pars, 0, 0)
 	if err != nil {
 		br.Msg = "获取失败"

+ 5 - 5
controllers/target.go

@@ -946,7 +946,7 @@ func (this *TargetController) ExportDataList() {
 	keyWord := this.GetString("KeyWord")
 	startDate := this.GetString("StartDate")
 	endDate := this.GetString("EndDate")
-	//frequency := this.GetString("Frequency")
+	frequency := this.GetString("Frequency")
 	classifyId, _ := this.GetInt("ClassifyId") //分类
 	mobile := this.GetString("Mobile")         //分类
 	tradeCode := this.GetString("TradeCode")   //指标唯一编码
@@ -971,10 +971,10 @@ func (this *TargetController) ExportDataList() {
 		condition += ` AND c.DT <= ? `
 		pars = append(pars, endDate)
 	}
-	//if frequency != "" {
-	//	condition += ` AND a.frequency = ? `
-	//	pars = append(pars, frequency)
-	//}
+	if frequency != "" {
+		condition += ` AND a.frequency = ? `
+		pars = append(pars, frequency)
+	}
 	permissionUserId := sysUser.AdminId
 	if sysUser.RoleTypeCode == utils.ROLE_TYPE_CODE_ADMIN {
 		permissionUserId = 0