|
@@ -591,7 +591,7 @@ func GetWeekDayScheduleById(orgid int64, scheduleDate int64, scheduleType int64,
|
591
|
591
|
|
592
|
592
|
func GetWeekDayScheduleByIdThee(orgid int64, scheduleDate int64, scheduleType int64, zone []string) (list []*models.VmSchedulesRemind, err error) {
|
593
|
593
|
|
594
|
|
- db := XTReadDB().Table("xt_schedule as x").Where("x.status = 1")
|
|
594
|
+ db := readDb2.Table("xt_schedule as x").Where("x.status = 1")
|
595
|
595
|
if orgid > 0 {
|
596
|
596
|
db = db.Where("x.user_org_id = ?", orgid)
|
597
|
597
|
}
|
|
@@ -618,7 +618,7 @@ func GetWeekDayScheduleByIdThee(orgid int64, scheduleDate int64, scheduleType in
|
618
|
618
|
|
619
|
619
|
func GetWeekDayScheduleByIdTwo(orgid int64, scheduleDate int64, scheduleType int64, startDate int64, zone []string) (list []*models.VmSchedulesRemind, err error) {
|
620
|
620
|
|
621
|
|
- db := XTReadDB().Table("xt_schedule as x").Where("x.status = 1")
|
|
621
|
+ db := readDb2.Table("xt_schedule as x").Where("x.status = 1")
|
622
|
622
|
if orgid > 0 {
|
623
|
623
|
db = db.Where("x.user_org_id = ?", orgid)
|
624
|
624
|
}
|
|
@@ -991,7 +991,7 @@ func GetDataPrint(orgid int64) (models.XtDataPrint, error) {
|
991
|
991
|
|
992
|
992
|
func GetNextWeekPanels(startime int64, endtime int64, orgid int64) (schedule []*models.XtSchedule, err error) {
|
993
|
993
|
|
994
|
|
- err = XTReadDB().Model(&schedule).Where("schedule_date >=? and schedule_date<=? and status = 1 and user_org_id = ?", startime, endtime, orgid).Preload("LastAfterWeight", func(db *gorm.DB) *gorm.DB {
|
|
994
|
+ err = readDb2.Model(&schedule).Where("schedule_date >=? and schedule_date<=? and status = 1 and user_org_id = ?", startime, endtime, orgid).Preload("LastAfterWeight", func(db *gorm.DB) *gorm.DB {
|
995
|
995
|
return db.Where("user_org_id = ? and status = 1 and assessment_date < ?", orgid, endtime)
|
996
|
996
|
}).Find(&schedule).Error
|
997
|
997
|
return schedule, err
|