|
@@ -3,6 +3,7 @@ package services
|
|
|
import (
|
|
|
"eta/eta_index_lib/models"
|
|
|
"eta/eta_index_lib/models/data_stat"
|
|
|
+ "eta/eta_index_lib/services/alarm_msg"
|
|
|
"eta/eta_index_lib/utils"
|
|
|
"fmt"
|
|
|
"time"
|
|
@@ -56,8 +57,14 @@ func AddEdbInfoUpdateLog(edbInfoId int, updateResult int, updateFailedReason str
|
|
|
|
|
|
// SetMysteelChemicalEdbInfoUpdateStat 定时统计钢联化工的数据源明细表
|
|
|
func SetMysteelChemicalEdbInfoUpdateStat() (err error) {
|
|
|
+ defer func() {
|
|
|
+ if err != nil {
|
|
|
+ tips := fmt.Sprintf("钢联数据刷新-ETA指标刷新统计异常 Err: %s", err.Error())
|
|
|
+ alarm_msg.SendAlarmMsg(tips, 3)
|
|
|
+ }
|
|
|
+ }()
|
|
|
//查询钢联的所有指标信息
|
|
|
- condition := " and source = ? and edb_info_id=101838"
|
|
|
+ condition := " and source = ? "
|
|
|
var pars []interface{}
|
|
|
pars = append(pars, utils.DATA_SOURCE_MYSTEEL_CHEMICAL)
|
|
|
edbList, err := models.GetEdbInfoByCondition(condition, pars, 0)
|
|
@@ -206,6 +213,12 @@ func checkMySteelEdbInfoNeedRefresh(frequency string) (needRefresh int, err erro
|
|
|
|
|
|
// SetEdbSourceStat 定时统计数据源汇总表
|
|
|
func SetEdbSourceStat() (err error) {
|
|
|
+ defer func() {
|
|
|
+ if err != nil {
|
|
|
+ tips := fmt.Sprintf("钢联数据刷新-ETA指标刷新统计异常 Err: %s", err.Error())
|
|
|
+ alarm_msg.SendAlarmMsg(tips, 3)
|
|
|
+ }
|
|
|
+ }()
|
|
|
//查询钢联的所有指标信息
|
|
|
nowTime := time.Now()
|
|
|
today := time.Now().Format(utils.FormatDate)
|