|
@@ -985,7 +985,7 @@ func GetInspectionByOrgId(orgid int64) (*models.XtInspectionReference, error) {
|
985
|
985
|
|
986
|
986
|
func GetAllProjectName(date int64, orgid int64, patientid int64) (inspection []*models.XtInspection, err error) {
|
987
|
987
|
|
988
|
|
- err = XTReadDB().Model(&inspection).Where("inspect_date = ? and org_id = ? and patient_id = ? and status = 1", date, orgid, patientid).Group("project_name").Find(&inspection).Error
|
|
988
|
+ err = XTReadDB().Model(&inspection).Where("inspect_date = ? and org_id = ? and patient_id = ? and status = 1", date, orgid, patientid).Order("inspect_date desc").Group("project_name").Find(&inspection).Error
|
989
|
989
|
|
990
|
990
|
return inspection, err
|
991
|
991
|
}
|