@@ -350,9 +350,8 @@ func GetLastInspectionDetail(patientid int64, date int64, projectid int64, orgid
}
func GetInsepctionConfigurationList(orgid int64) (standard []*models.QualityControlStandard, err error) {
-
db := XTReadDB().Table("xt_quality_control_standard as x").Where("x.status =1")
- db = db.Where("(x.user_org_id = ? and x.is_status =1", orgid)
+ db = db.Where("x.user_org_id = ? and x.is_status =1", orgid)
err = db.Order("x.sort asc,x.created_time desc").Group("x.id").Select("x.id,x.inspection_major,x.inspection_minor,x.min_range,x.large_range,x.sort,x.user_org_id,x.range_value,x.range_type,s.unit,s.project_name,s.item_name,x.is_status").
Joins("left join xt_inspection_reference as s on s.item_id = x.inspection_minor and s.project_id = x.inspection_major").Where("s.org_id = ? and s.status = 1", orgid).Scan(&standard).Error
return standard, err