|
@@ -272,6 +272,7 @@ func (m *BaseFromMysteelChemicalIndex) GetNoMergeIndexByFrequencyCount(frequency
|
|
|
// GetMaxFileIndexReq 获取最大文件数请求
|
|
|
type GetMaxFileIndexReq struct {
|
|
|
Frequency string
|
|
|
+ EndDate string
|
|
|
}
|
|
|
|
|
|
// GetMaxFileIndex 获取最大文件的
|
|
@@ -450,10 +451,14 @@ type GetIndexDetailReq struct {
|
|
|
}
|
|
|
|
|
|
// GetIndexCountByFrequency 获取未合并的指标总数量
|
|
|
-func (m *BaseFromMysteelChemicalIndex) GetIndexCountByFrequency(frequency string) (total int64, err error) {
|
|
|
+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 frequency = ? AND index_name NOT LIKE "%停%" `
|
|
|
- err = o.Raw(sql, frequency).QueryRow(&total)
|
|
|
+
|
|
|
+ sql := `SELECT count(1) AS total FROM base_from_mysteel_chemical_index WHERE 1=1 AND index_name NOT LIKE "%停%" `
|
|
|
+ if condition != "" {
|
|
|
+ sql += condition
|
|
|
+ }
|
|
|
+ err = o.Raw(sql, pars).QueryRow(&total)
|
|
|
|
|
|
return
|
|
|
}
|
|
@@ -476,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 `
|
|
|
+ sql := `SELECT * FROM base_from_mysteel_chemical_index WHERE 1=1 AND index_name NOT LIKE "%停%" `
|
|
|
if condition != "" {
|
|
|
sql += condition
|
|
|
}
|