|
@@ -220,6 +220,23 @@ func SetMysteelChemicalEdbInfoUpdateStat(needStat bool) (err error) {
|
|
|
tmp.CreateTime = nowTime
|
|
|
addList = append(addList, tmp)
|
|
|
}
|
|
|
+ if len(addList) >= 500 {
|
|
|
+ err = logStat.Add(addList)
|
|
|
+ if err != nil {
|
|
|
+ err = fmt.Errorf("新增钢联化工明细记录报错,err: %s", err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ addList = addList[:0]
|
|
|
+ }
|
|
|
+
|
|
|
+ if len(modifyList) >= 500 {
|
|
|
+ err = data_stat.UpdateEdbUpdateStatMulti(modifyList)
|
|
|
+ if err != nil {
|
|
|
+ err = fmt.Errorf("更新钢联化工明细记录报错,err: %s", err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ modifyList = modifyList[:0]
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -371,6 +388,23 @@ func SetEdbSourceStat(needStat bool) (err error) {
|
|
|
tmp.CreateTime = nowTime
|
|
|
addList = append(addList, tmp)
|
|
|
}
|
|
|
+ if len(addList) >= 500 {
|
|
|
+ err = logStat.Add(addList)
|
|
|
+ if err != nil {
|
|
|
+ err = fmt.Errorf("新增钢联化工统计表报错,err: %s", err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ addList = addList[:0]
|
|
|
+ }
|
|
|
+
|
|
|
+ if len(modifyList) >= 500 {
|
|
|
+ err = data_stat.UpdateEdbSourceStatMulti(modifyList)
|
|
|
+ if err != nil {
|
|
|
+ err = fmt.Errorf("更新钢联化工统计表报错,err: %s", err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ modifyList = modifyList[:0]
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//判断当日指标统计数据是否存在,如果存在则更新,不存在则新增
|