|
@@ -411,7 +411,7 @@ func GetInspectionGroupByRecordDate(patient_id int64, project_id int64, org_id i
|
411
|
411
|
|
412
|
412
|
func GetInspectionByProject(patient_id int64, project_id int64, org_id int64, record_date int64) (inspection []*models.Inspection, err error) {
|
413
|
413
|
|
414
|
|
- err = XTReadDB().Where("patient_id = ? and project_id = ? and org_id = ? and status=1 and inspect_date =?", patient_id, project_id, org_id, record_date).Order("id desc").Find(&inspection).Error
|
|
414
|
+ err = XTReadDB().Where("patient_id = ? and project_id = ? and org_id = ? and status=1 and inspect_date =?", patient_id, project_id, org_id, record_date).Order("id desc").Group("item_id").Find(&inspection).Error
|
415
|
415
|
|
416
|
416
|
return inspection, err
|
417
|
417
|
}
|