XMLWAN hace 4 años
padre
commit
add6069754
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      service/patientmanage_service.go

+ 1 - 1
service/patientmanage_service.go Ver fichero

985
 
985
 
986
 func GetAllProjectName(date int64, orgid int64, patientid int64) (inspection []*models.XtInspection, err error) {
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
 	return inspection, err
990
 	return inspection, err
991
 }
991
 }