陈少旭 1 year ago
parent
commit
7eec92fc2e

+ 1 - 1
controllers/pc_index_evaluation_api_controller.go View File

@@ -139,7 +139,7 @@ func (this *PCIndexEvaluationApiController) GetInspectionChartData() {
139 139
 		count, _ := statistics_service.FindOrgInspectionCount(adminUserInfo.CurrentOrgId)
140 140
 
141 141
 		if count <= 0 {
142
-			qcs, _ := statistics_service.FindOrgConfigRangeTypeValue(0, project_id, item_id)
142
+			qcs, _ := statistics_service.FindOrgConfigRangeTypeValueTwo(0, project_id, item_id)
143 143
 			range_value = qcs.RangeMin + "," + qcs.RangeMax
144 144
 
145 145
 		} else {

+ 6 - 0
service/statistics_service/index_evaluation_service.go View File

@@ -1624,6 +1624,12 @@ func FindOrgConfigRangeTypeValue(user_org_id int64, project_id int64, item_id in
1624 1624
 	return
1625 1625
 }
1626 1626
 
1627
+func FindOrgConfigRangeTypeValueTwo(user_org_id int64, project_id int64, item_id int64) (qcs models.InspectionReference, err error) {
1628
+	db := service.XTReadDB()
1629
+	err = db.Model(&models.InspectionReference{}).Where("status = 1 AND org_id = ? AND project_id = ? AND id = ?", user_org_id, project_id, item_id).First(&qcs).Error
1630
+	return
1631
+}
1632
+
1627 1633
 func GetInspectionChartData(user_org_id int64, start_time int64, end_time int64, project_id int64, item_id int64, range_type int, range_value string) (item []*otherItemAmount, err error) {
1628 1634
 	db := service.XTReadDB()
1629 1635
 	var items []*otherItemAmount