Browse Source

提交代码

陈少旭 1 week ago
parent
commit
725bc617ff
1 changed files with 2 additions and 1 deletions
  1. 2 1
      service/statistis_qc_service.go

+ 2 - 1
service/statistis_qc_service.go View File

438
 		if orgid > 0 {
438
 		if orgid > 0 {
439
 			db = db.Where("o.user_org_id = ?", orgid)
439
 			db = db.Where("o.user_org_id = ?", orgid)
440
 		}
440
 		}
441
+		db = db.Where("o.stage = 2")
441
 		if mode_id == 0 {
442
 		if mode_id == 0 {
442
-			err = db.Select("s.mode_id,count(s.mode_id) as count").Joins("join xt_dialysis_prescription as s on s.patient_id = o.patient_id and s.record_date = o.dialysis_date and s.status= 1 AND s.record_date >= ? AND s.record_date <= ? AND  s.mode_id > 0 ", starttime, endtime).Group("s.mode_id").Scan(&counts).Error
443
+			err = db.Select("s.mode_id,count(s.mode_id) as count").Joins("join xt_dialysis_prescription as s on s.patient_id = o.patient_id and s.record_date = o.dialysis_date and s.status= 1 AND s.record_date >= ? AND s.record_date <= ? AND  s.mode_id > 0", starttime, endtime).Group("s.mode_id").Scan(&counts).Error
443
 
444
 
444
 		} else {
445
 		} else {
445
 
446