The prevalence of diabetes has risen fast with a considerable weighted prevalence of undiagnosed diabetes or uncontrolled diabetes. Then it becomes more necessary to timely screen out and monitor high-risk populations who are likely to be ignored during the COVID-19 pandemic. To classify and find the common risks of undiagnosed diabetes and uncontrolled diabetes, it's beneficial to put specific risk control measures into effect for comprehensive primary care. Especially, there is a need for accurate yet accessible prediction models. Based on a cross-sectional study and secondary analysis on the health examination held in Changchun City (2016), we aimed to evaluate the factors associated with hyperglycemia, analyze the management status of T2DM, and determine the best cutoff value of incidence of diabetes in the first-degree relatives to suggest the necessity of early diagnosis of diabetes after first screening. A total of 5658 volunteers were analyzed. Prevalence of T2DM and impaired fasting glucose were 8.4% (n=477) and 11.5% (n=648), respectively. There were 925 participants (16.3%) with a family history of T2DM in their first-degree relatives. Multivariable analysis demonstrated that family history was associated with hyperglycemia. Among the 477 patients with T2DM, 40.9% had not been previously diagnosed. The predictive equation was calculated with the following logistic regression parameters with 0.71 (95% CI: 0.67-0.76) of the area under the ROC curve, 64.0% of sensitivity and 29% of specificity (P < 0.001): P = \frac{1}{1 + e^{-z}}, where z = -3.08 + [0.89 (Family history-group) + 0.69 (age-group)+ 0.25 (BMI-group)]. Positive family history was associated with the diagnosis of T2DM, but not glucose level in the diagnosed patients. The best cutoff value of incidence of diabetes in the first-degree relatives was 9.55% (P < 0.001). Family history of diabetes was independently associated with glucose dysfunction. Classification by the first-degree relatives with diabetes is prominent for targeting high-risk population. Meanwhile, positive family history of diabetes was associated with diabetes being diagnosed rather than the glycemic control in patients who had been diagnosed. It's necessary to emphasize the linkage between early diagnosis and positive family history for high proportions of undiagnosed T2DM.