Browse Source

耗材参数

XMLWAN 3 years ago
parent
commit
6a44fbbbba
2 changed files with 3 additions and 3 deletions
  1. 1 1
      main.go
  2. 2 2
      service/schedule_service.go

+ 1 - 1
main.go View File

17
 	//service.AutoClearSchedules()
17
 	//service.AutoClearSchedules()
18
 	//service.BeginAutoCreateStaffScheduleJob()
18
 	//service.BeginAutoCreateStaffScheduleJob()
19
 	//service.BeginAutoCreateDrugJob()
19
 	//service.BeginAutoCreateDrugJob()
20
-	service.BeginAutoCreateStockJob()
20
+	//service.BeginAutoCreateStockJob()
21
 	beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 60
21
 	beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 60
22
 	beego.Run()
22
 	beego.Run()
23
 }
23
 }

+ 2 - 2
service/schedule_service.go View File

608
 	err = db.Select("x.id,x.user_org_id,x.partition_id,x.bed_id,x.patient_id,x.schedule_date,x.schedule_type,x.schedule_week,x.mode_id,x.is_export").Preload("XtPatients", "status = 1").Preload("DeviceZone", "status = 1").Preload("DeviceNumber", "status = 1").Preload("DialysisOrder", "status = 1").Preload("XtAssessmentBeforeDislysis", "status = 1").Preload("DoctorAdvice", func(db *gorm.DB) *gorm.DB {
608
 	err = db.Select("x.id,x.user_org_id,x.partition_id,x.bed_id,x.patient_id,x.schedule_date,x.schedule_type,x.schedule_week,x.mode_id,x.is_export").Preload("XtPatients", "status = 1").Preload("DeviceZone", "status = 1").Preload("DeviceNumber", "status = 1").Preload("DialysisOrder", "status = 1").Preload("XtAssessmentBeforeDislysis", "status = 1").Preload("DoctorAdvice", func(db *gorm.DB) *gorm.DB {
609
 		return db.Where("status =1 and parent_id = 0").Preload("ChildDoctorAdvice", "status = 1")
609
 		return db.Where("status =1 and parent_id = 0").Preload("ChildDoctorAdvice", "status = 1")
610
 	}).Preload("HisDoctorAdviceInfo", "status = 1").Preload("DialysisPrescription", "status = 1").Preload("DialysisSolution", func(db *gorm.DB) *gorm.DB {
610
 	}).Preload("HisDoctorAdviceInfo", "status = 1").Preload("DialysisPrescription", "status = 1").Preload("DialysisSolution", func(db *gorm.DB) *gorm.DB {
611
-		return db.Where("status =1").Order("id asc")
611
+		return db.Where("status =1").Group("mode_id").Order("id asc")
612
 	}).Find(&list).Error
612
 	}).Find(&list).Error
613
 
613
 
614
 	return list, err
614
 	return list, err
633
 	err = db.Select("x.id,x.user_org_id,x.partition_id,x.bed_id,x.patient_id,x.schedule_date,x.schedule_type,x.schedule_week,x.mode_id,x.is_export").Preload("XtPatients", "status = 1").Preload("DeviceZone", "status = 1").Preload("DeviceNumber", "status = 1").Preload("DialysisOrder", "status = 1").Preload("XtAssessmentBeforeDislysis", "status = 1").Preload("DoctorAdvice", func(db *gorm.DB) *gorm.DB {
633
 	err = db.Select("x.id,x.user_org_id,x.partition_id,x.bed_id,x.patient_id,x.schedule_date,x.schedule_type,x.schedule_week,x.mode_id,x.is_export").Preload("XtPatients", "status = 1").Preload("DeviceZone", "status = 1").Preload("DeviceNumber", "status = 1").Preload("DialysisOrder", "status = 1").Preload("XtAssessmentBeforeDislysis", "status = 1").Preload("DoctorAdvice", func(db *gorm.DB) *gorm.DB {
634
 		return db.Where("status =1 and parent_id = 0").Preload("ChildDoctorAdvice", "status = 1")
634
 		return db.Where("status =1 and parent_id = 0").Preload("ChildDoctorAdvice", "status = 1")
635
 	}).Preload("HisDoctorAdviceInfo", "status = 1").Preload("DialysisPrescription", "status = 1").Preload("DialysisSolution", func(db *gorm.DB) *gorm.DB {
635
 	}).Preload("HisDoctorAdviceInfo", "status = 1").Preload("DialysisPrescription", "status = 1").Preload("DialysisSolution", func(db *gorm.DB) *gorm.DB {
636
-		return db.Where("status =1").Order("id asc")
636
+		return db.Where("status =1").Group("mode_id").Order("id asc")
637
 	}).Find(&list).Error
637
 	}).Find(&list).Error
638
 
638
 
639
 	return list, err
639
 	return list, err