Browse Source

提交代码

陈少旭 1 month 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,8 +438,9 @@ func GetNewDialysisCountMode(starttime int64, endtime int64, orgid int64, origin
438 438
 		if orgid > 0 {
439 439
 			db = db.Where("o.user_org_id = ?", orgid)
440 440
 		}
441
+		db = db.Where("o.stage = 2")
441 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 445
 		} else {
445 446