Browse Source

修改获取钢联指标

tuoling805 1 year ago
parent
commit
d70f755ab9
2 changed files with 6 additions and 2 deletions
  1. 4 0
      controllers/base_from_mysteel_chemical.go
  2. 2 2
      models/base_from_mysteel_chemical.go

+ 4 - 0
controllers/base_from_mysteel_chemical.go

@@ -684,6 +684,8 @@ func (this *MySteelChemicalController) GetIndexCountByFrequency() {
 		pars = append(pars, req.EndDate)
 	}
 
+	condition += ` AND is_stop = 0 `
+
 	indexObj := new(models.BaseFromMysteelChemicalIndex)
 	// 获取未合并的指标总数量
 	indexTotal, err := indexObj.GetIndexCountByFrequency(condition, pars)
@@ -760,6 +762,8 @@ func (this *MySteelChemicalController) GetIndexPageByFrequency() {
 		pars = append(pars, req.EndDate)
 	}
 
+	condition += ` AND is_stop = 0 `
+
 	indexObj := new(models.BaseFromMysteelChemicalIndex)
 	// 获取未合并的指标总数量
 	indexTotal, err := indexObj.GetIndexPageByFrequency(condition, pars, req.StartSize, req.PageSize)

+ 2 - 2
models/base_from_mysteel_chemical.go

@@ -454,7 +454,7 @@ type GetIndexDetailReq struct {
 func (m *BaseFromMysteelChemicalIndex) GetIndexCountByFrequency(condition string, pars []interface{}) (total int64, err error) {
 	o := orm.NewOrm()
 
-	sql := `SELECT count(1) AS total FROM base_from_mysteel_chemical_index WHERE 1=1 AND index_name NOT LIKE "%停%"  `
+	sql := `SELECT count(1) AS total FROM base_from_mysteel_chemical_index WHERE 1=1  `
 	if condition != "" {
 		sql += condition
 	}
@@ -481,7 +481,7 @@ type GetIndexPageByFrequencyPageReq struct {
 // GetNoMergeIndexByFrequencyPage 获取未合并的指标列表
 func (m *BaseFromMysteelChemicalIndex) GetIndexPageByFrequency(condition string, pars []interface{}, startSize, pageSize int) (items []*BaseFromMysteelChemicalIndex, err error) {
 	o := orm.NewOrm()
-	sql := `SELECT * FROM base_from_mysteel_chemical_index WHERE 1=1 AND index_name NOT LIKE "%停%" `
+	sql := `SELECT * FROM base_from_mysteel_chemical_index WHERE 1=1 `
 	if condition != "" {
 		sql += condition
 	}