|
@@ -29,6 +29,7 @@ namespace BlankApp1.ViewModels
|
|
|
private readonly IMapper _mapper;
|
|
|
private List<SchDtlWithResultModel> allConfigList = new List<SchDtlWithResultModel>();//所有方案
|
|
|
private List<SchDtlWithResultModel> conditionConfig = new List<SchDtlWithResultModel>();//符合条件的方案
|
|
|
+ private int allSchCount = 0; //所有测试项
|
|
|
public StatisticsViewModel(IDialogService dialog, IMenuService menuService, IOptionConfigService optionConfigService, IBasicPlcTestSchemeService basicPlcTestSchemeService, IBasicPlcTestSchemeDtlService basicPlcTestSchemeDtlService, IBizTestRecordDtlService iBizTestRecordDtlService, IMapper mapper, ILogger logger)
|
|
|
{
|
|
|
_dialog = dialog;
|
|
@@ -59,6 +60,7 @@ namespace BlankApp1.ViewModels
|
|
|
/// </summary>
|
|
|
private void GetContent()
|
|
|
{
|
|
|
+ allSchCount = 0;
|
|
|
//所有测试方案
|
|
|
var schlist = _basicPlcTestSchemeService.QueryList();
|
|
|
var configList = _mapper.Map<List<bas_plc_test_scheme>, List<BasicPlcTestSchemeDto>>(schlist);
|
|
@@ -125,7 +127,8 @@ namespace BlankApp1.ViewModels
|
|
|
conditionConfig.Add(basicPlcTestSchemeDto);
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+ //统计所有测试项个数
|
|
|
+ allSchCount++;
|
|
|
}
|
|
|
//默认显示的第一页
|
|
|
Getpage();
|
|
@@ -160,13 +163,13 @@ namespace BlankApp1.ViewModels
|
|
|
private void GetPieSeriesDone()
|
|
|
{
|
|
|
PieSeriesCollectionDone.Clear();
|
|
|
- var findNoTest = allConfigList.FindAll(x => string.IsNullOrEmpty(x.TestStatus));
|
|
|
- int tesDone = TotalCount - findNoTest.Count;
|
|
|
+
|
|
|
+ int tesNoDone = allSchCount-TotalCount;
|
|
|
|
|
|
ChartValues<int> chartvalue = new ChartValues<int>();
|
|
|
- chartvalue.Add(tesDone);
|
|
|
+ chartvalue.Add(TotalCount);
|
|
|
ChartValues<int> noChartvalue = new ChartValues<int>();
|
|
|
- noChartvalue.Add(findNoTest.Count);
|
|
|
+ noChartvalue.Add(tesNoDone);
|
|
|
|
|
|
PieSeries series = new PieSeries();
|
|
|
series.DataLabels = true;
|