Browse Source

完善细节

ltwork 1 year ago
parent
commit
1aece4dcc5

+ 2 - 2
BlankApp1/BlankApp1/ViewModels/BasicConfigViewModel/ReadSchViewModel.cs

@@ -41,7 +41,7 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
         private long globalSchDetailId = 0; //测试方案明细ID
         private long globalDeviceId = 0; //设备ID
         private BizTestRecordDtlDto bizTestRecordDtlDto = new BizTestRecordDtlDto(); //测试方案明细表
-        private const string TestMode = "方案详情";
+        
 
         private int delayTime = 20;
         public ReadSchViewModel(IDialogService dialog, IEventAggregator aggregator, IOptionConfigService optionConfigService, IBasicPlcTestSchemeService basicPlcTestSchemeService, IBasicPlcTestSchemeDtlService basicPlcTestSchemeDtlService, IBizTestRecordService iBizTestRecordService, IBizTestRecordDtlService iBizTestRecordDtlService, IMapper mapper, ILogger logger)
@@ -83,7 +83,7 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
 
 
         #region idialog接口实现
-        public string Title { set; get; } = "手动测试";
+        public string Title { set; get; } = "方案详情";
 
         public event Action<IDialogResult> RequestClose;
 

+ 28 - 1
BlankApp1/BlankApp1/ViewModels/BusinessManageViewModel/DeviceTestViewModel.cs

@@ -56,6 +56,7 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
             ManualTestCommand = new DelegateCommand<object>(ManualTest);
             DgSelectChangeCommand = new DelegateCommand<object>(DgSelect);
             GoBackCommand =new DelegateCommand<object>(GoBack);
+            ReadDetailCommand = new DelegateCommand<object>(ReadDetail);
         }
 
        
@@ -109,6 +110,32 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
           
         }
         /// <summary>
+        /// 查看详情
+        /// </summary>
+        /// <param name="obj"></param>
+
+        private void ReadDetail(object obj)
+        {
+
+
+            //测试方案明细主键ID
+            long schid = (long)obj;
+
+            DialogParameters parm = new DialogParameters();
+            parm.Add("Key", schid);
+            //弹出详情对话框
+            //弹出详情对话框
+            _dialog.ShowDialog("ReadSchView", parm, async callback =>
+            {
+                if (callback.Result == ButtonResult.OK)
+                {
+                    //更新表格,重新获取
+
+                }
+
+            });
+        }
+        /// <summary>
         /// 返回界面
         /// </summary>
         /// <param name="obj"></param>
@@ -377,8 +404,8 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
         public DelegateCommand<object> ManualTestCommand { set; get; }
         public DelegateCommand<object> DgSelectChangeCommand { set; get; }
         public DelegateCommand<object> GoBackCommand { set; get; }
-        
 
+        public DelegateCommand<object> ReadDetailCommand { set; get; }
         #endregion
 
         #region 数据绑定

+ 19 - 4
BlankApp1/BlankApp1/ViewModels/BusinessManageViewModel/ProjectTestResultViewModel.cs

@@ -29,6 +29,7 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
         private readonly IBasicPlcTestSchemeDtlService _iBasicPlcTestSchemeDtlService;
         private readonly IBizTestRecordDtlService _iBizTestRecordDtlService;
         private ObservableCollection<DeviceResultCardView> allProjectResultPicList = new ObservableCollection<DeviceResultCardView>();
+        private int eachColumNum = 3; //每行展示卡片个数
         public ProjectTestResultViewModel(IBasicDeviceService iBasicDeviceService, IBasicDeviceKindService iBasicDeviceKindService, IBasicProjectService iBasicProjectService, IBasicPlcTestSchemeService basicPlcTestSchemeService, IBizTestRecordService iBizTestRecordService, IBasicPlcTestSchemeDtlService iBasicPlcTestSchemeDtlService, IBizTestRecordDtlService iBizTestRecordDtlService,IMapper mapper, IDialogService dialog, ILogger logger)
         {
             _iBasicDeviceService = iBasicDeviceService;
@@ -153,7 +154,7 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                     //这里不添加方案名称
                     allDeviceList.Add(new DeviceDtlWithResultModel()
                     {
-
+                        ProjectId= deviceMsg.project_id,
                         DeviceId = deviceMsg.device_id,
                         DeviceNo = deviceMsg.device_no,
                         DeviceName = deviceMsg.device_name,
@@ -171,10 +172,24 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
             List<string> projectNames = allDeviceList.Select(x => x.ProjectName).Distinct().ToList();
             foreach (var project in projectNames)
             {
+                int projectId =(int) allDeviceList?.FirstOrDefault(x => x.ProjectName == project)?.ProjectId;
+                //总设备
+                int totalDevice=(int)_iBasicDeviceService.QueryList()?.FindAll(x=>x.project_id== projectId).Count();
+                //已测试设备数
+                int deviceTestCount =(int)allDeviceList?.FindAll(x => x.ProjectName == project)?.Select(x => x.DeviceId)?.Distinct().Count();
+
+                int passCount=(int)allDeviceList?.FindAll(x => (x.ProjectName == project)&&(x.TestResult=="通过")).Count;
+                int noPassCount = (int)allDeviceList?.FindAll(x => (x.ProjectName == project) && (x.TestResult == "不通过")).Count;
+                //添加卡片
                 DeviceResultCardView deviceCard = new DeviceResultCardView();
                 deviceCard.txtName.Text = project;
                 deviceCard.txtProjectNo.Text = _iBasicProjectService.FindByProjectName(project)?.project_no;
                 deviceCard.txtProjectLeader.Text = _iBasicProjectService.FindByProjectName(project)?.project_leader;
+                //总设备数量
+                deviceCard.txtDeviceCount.Text = totalDevice.ToString()+" 台";
+                deviceCard.txtTestCount.Text = deviceTestCount.ToString()+" 台";
+                deviceCard.txtPassCount.Text = passCount.ToString()+" 台";
+                deviceCard.txtNoPassCount.Text = noPassCount.ToString() + " 台";
                 //赋值
                 allProjectResultPicList.Add(deviceCard);
             }
@@ -183,13 +198,13 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                 ProjectResultPicList.Add(item);
             }
             //计算行数
-            if (projectNames.Count % 4 == 0)
+            if (projectNames.Count % eachColumNum == 0)
             {
-                RowsCount = projectNames.Count / 4;
+                RowsCount = projectNames.Count / eachColumNum;
             }
             else
             {
-                RowsCount = projectNames.Count / 4 + 1;
+                RowsCount = projectNames.Count / eachColumNum + 1;
             }
             if (RowsCount < 2)
             {

+ 35 - 32
BlankApp1/BlankApp1/ViewModels/BusinessManageViewModel/ProjectTestViewModel.cs

@@ -24,18 +24,18 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
         private readonly IBasicDeviceService _iBasicDeviceService;
         private readonly IBasicDeviceKindService _iBasicDeviceKindService;
         private readonly IBasicProjectService _iBasicProjectService;
-        private readonly IBasicPlcTestSchemeService _basicPlcTestSchemeService;
+        private readonly IBizTestRecordService _iBizTestRecordService;
         private readonly IMapper _mapper;
         private readonly IDialogService _dialog;
         private readonly ILogger _logger;
-        
         private ObservableCollection<DeviceTestCardView> allProjectePicList = new ObservableCollection<DeviceTestCardView>();
-        public ProjectTestViewModel(IBasicDeviceService iBasicDeviceService, IBasicDeviceKindService iBasicDeviceKindService, IBasicProjectService iBasicProjectService, IBasicPlcTestSchemeService basicPlcTestSchemeService, IMapper mapper, IDialogService dialog, ILogger logger)
+        private int eachColumNum = 3; //每行展示卡片个数
+        public ProjectTestViewModel(IBasicDeviceService iBasicDeviceService, IBasicDeviceKindService iBasicDeviceKindService, IBasicProjectService iBasicProjectService, IBizTestRecordService iBizTestRecordService, IMapper mapper, IDialogService dialog, ILogger logger)
         {
             _iBasicDeviceService = iBasicDeviceService;
             _iBasicDeviceKindService = iBasicDeviceKindService;
             _iBasicProjectService = iBasicProjectService;
-            _basicPlcTestSchemeService = basicPlcTestSchemeService;
+            _iBizTestRecordService = iBizTestRecordService;
             _mapper = mapper;
             _dialog = dialog;
             _logger = logger;
@@ -79,45 +79,48 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
             List<BasDeviceWithSchModel> allDeviceList = new List<BasDeviceWithSchModel>();//所有方案
             var devicelist = _iBasicDeviceService.QueryList();
             var allDeviceKinds = _mapper.Map<List<bas_device>, List<BasDeviceDto>>(devicelist);
-            //所有测试方案
-            var schlist = _basicPlcTestSchemeService.QueryList();
-            var schDtoList = _mapper.Map<List<bas_plc_test_scheme>, List<BasicPlcTestSchemeDto>>(schlist);
-
-
+           
+            //遍历设备类型
             foreach (var item in allDeviceKinds)
             {
                 string deviceKind = _iBasicDeviceKindService.Find((int)item.DeviceKindId)?.devicekind_name;
-                //在测试方案中查找此设备类型的所有方案
-                var schs = schDtoList.FindAll(x => x.DeviceKindName == deviceKind);
-                //设备方案
-                foreach (var sch in schs)
+                allDeviceList.Add(new BasDeviceWithSchModel()
                 {
-                    allDeviceList.Add(new BasDeviceWithSchModel()
-                    {
-                        ProjectId=item.ProjectId,
-                        DeviceId = item.DeviceId,
-                        DeviceNo = item.DeviceNo,
-                        DeviceName = item.DeviceName,
-                        DeviceKindName = _iBasicDeviceKindService.Find((int)item.DeviceKindId)?.devicekind_name,
-                        ProjectName = _iBasicProjectService.Find((int)item.ProjectId)?.project_name,
-                        SchemeName = sch.SchemeName,
-                        SchemeId = sch.SchemeId,
-                    });
-
-                }
+                    ProjectId = item.ProjectId,
+                    DeviceId = item.DeviceId,
+                    DeviceNo = item.DeviceNo,
+                    DeviceName = item.DeviceName,
+                    DeviceKindName = _iBasicDeviceKindService.Find((int)item.DeviceKindId)?.devicekind_name,
+                    ProjectName = _iBasicProjectService.Find((int)item.ProjectId)?.project_name,
+                
+                });
+               
 
             }
             //所有的项目
             List<string> projectNames = allDeviceList.Select(x => x.ProjectName).Distinct().ToList();
             foreach (var project in projectNames)
             {
-                int deviceCount = (int)allDeviceList.FindAll(x => x.ProjectName == project).Select(x => x.DeviceNo)?.Distinct().Count();
+                int noTestCount = 0;
+             
+                var devices=allDeviceList?.FindAll(x => x.ProjectName == project)?.Select(x => x.DeviceId)?.Distinct();
+                //计算未测试的数量
+                foreach (var deviceid in devices)
+                {
+                    var findResult = _iBizTestRecordService.FindRecordByDeviceId(deviceid);
+                    if(findResult.Count==0)
+                    {
+                        noTestCount++;
+                    }
+                }
+                int deviceCount = devices.Count();
+                //添加卡片
                 DeviceTestCardView deviceCard = new DeviceTestCardView();
                 deviceCard.txtName.Text = project;
                 deviceCard.txtProjectNo.Text = _iBasicProjectService.FindByProjectName(project)?.project_no;
                 deviceCard.txtPProjectLeader.Text = _iBasicProjectService.FindByProjectName(project)?.project_leader;
-                deviceCard.txtDeviceCount.Text = deviceCount.ToString();
-                deviceCard.txtNoTestCount.Text = deviceCount.ToString();
+                deviceCard.txtDeviceCount.Text = deviceCount.ToString() + " 台"; ;
+                deviceCard.txtNoTestCount.Text = noTestCount.ToString() + " 台";
                 //赋值
                 allProjectePicList.Add(deviceCard);
             }
@@ -126,13 +129,13 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                 ProjectePicList.Add(item);
             }
             //计算行数
-            if (projectNames.Count % 4 == 0)
+            if (projectNames.Count % eachColumNum == 0)
             {
-                RowsCount = projectNames.Count / 4;
+                RowsCount = projectNames.Count / eachColumNum;
             }
             else
             {
-                RowsCount = projectNames.Count / 4 + 1;
+                RowsCount = projectNames.Count / eachColumNum + 1;
             }
             if (RowsCount < 2)
             {

+ 18 - 3
BlankApp1/BlankApp1/ViewModels/BusinessManageViewModel/ResultQueryViewModel.cs

@@ -262,6 +262,7 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
             foreach (var deviceId in deviceIds)
             {
                 List<DateTime> startDateTimes = new List<DateTime>();
+                List<DateTime> endDateTimes = new List<DateTime>();
                 var deviceMsg = _iBasicDeviceService.Find(((int)deviceId));
                 if(deviceMsg != null)
                 {
@@ -275,7 +276,7 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                     var recordMsgs=_iBizTestRecordService.FindRecordByDeviceId(deviceId);
                     foreach ( var sch in recordMsgs)
                     {
-                   
+                        string testStatus = "已完成";
                         long schId=(long)_basicPlcTestSchemeService.FindByNameAndType(sch.scheme_name, deviceKind)?.scheme_id;
                         //计算测试结果
                         string testResult = string.Empty;
@@ -302,7 +303,14 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                                     countResult++;
                                 }
                             }
-                           
+                            //如果在测试记录中没有找到这个测试项,表示没有测试完所有的测试项)
+                            var findSchDtl = records.FirstOrDefault(x => x.scheme_dtl_id == schDtId);
+                            if(findSchDtl==null)
+                            {
+                                testStatus = "未完成";
+                            }
+
+
                         }
                         //测试结果
                         if(countResult== schDtls.Count)
@@ -317,6 +325,7 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                         }
                         //加入时间集合
                         startDateTimes.Add(sch.start_test_time.Value);
+                        endDateTimes.Add(sch.finish_test_time.Value);
                         //把
                         allDeviceAndSchResultList.Add(new DeviceDtlWithResultModel()
                         {
@@ -326,13 +335,15 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                             DeviceName = deviceMsg.device_name,
                             DeviceKindName = deviceKind,
                             ProjectName = projectName,
-                            // StartTestTime = startDateTimes.Min(),//取最小时间
+                            StartTestTime =(DateTime) startDateTimes?.Min(),//取最小时间
+                            FinishTestTime = (DateTime)endDateTimes?.Max(),//取最大时间
                             TestResult = testResult,
                             SchemeName = sch.scheme_name,
                             SchemeId = schId,
                             CreateTime = sch.start_test_time.Value,
                             CreateBy=sch.create_by,
                             Remark=sch.remark,
+                            TestStatus=testStatus,
 
                         });
                     }
@@ -358,6 +369,8 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                             DeviceKindName = deviceKind,
                             ProjectName = projectName,
                             StartTestTime = startDateTimes.Min(),//取最小时间
+                            CreateTime=deviceMsg.create_time,
+                            CreateBy=deviceMsg.create_by,
                             TestResult = deviceTestResult
                         });
                         conditionDevices.Add(new DeviceDtlWithResultModel()
@@ -369,6 +382,8 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                             DeviceKindName = deviceKind,
                             ProjectName = projectName,
                             StartTestTime = startDateTimes.Min(),//取最小时间
+                            CreateTime = deviceMsg.create_time,
+                            CreateBy = deviceMsg.create_by,
                             TestResult = deviceTestResult
                         });
                     }

+ 3 - 3
BlankApp1/BlankApp1/Views/BusinessManageView/DeviceResultCardView.xaml

@@ -25,8 +25,8 @@
 
             <Grid Grid.Row="1" Margin="0,0,0,10">
                 <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="2*"/>
-                    <ColumnDefinition Width="3*"/>
+                    <ColumnDefinition />
+                    <ColumnDefinition />
                 </Grid.ColumnDefinitions>
                 <Grid.RowDefinitions>
                     <RowDefinition/>
@@ -48,7 +48,7 @@
                 <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtDeviceCount" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left"/>
                 <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtTestCount" Grid.Row="3" Grid.Column="1"  HorizontalAlignment="Left"/>
                 <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtPassCount" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left"/>
-                <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtNoPassCount" Grid.Row="5" Grid.Column="1"  HorizontalAlignment="Left"/>
+                <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtNoPassCount" Grid.Row="5" Grid.Column="1" Foreground="Red" HorizontalAlignment="Left"/>
             </Grid>
 
         </Grid>

+ 3 - 3
BlankApp1/BlankApp1/Views/BusinessManageView/DeviceTestCardView.xaml

@@ -25,8 +25,8 @@
 
             <Grid Grid.Row="1">
                 <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="2*"/>
-                    <ColumnDefinition Width="3*"/>
+                    <ColumnDefinition />
+                    <ColumnDefinition />
                 </Grid.ColumnDefinitions>
                 <Grid.RowDefinitions>
                     <RowDefinition/>
@@ -51,7 +51,7 @@
                 <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtProjectNo"  Grid.Row="0" Grid.Column="1" />
                 <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtPProjectLeader" Grid.Row="1" Grid.Column="1"  HorizontalAlignment="Left"/>
                 <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtDeviceCount" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left"/>
-                <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtNoTestCount" Grid.Row="3" Grid.Column="1"  HorizontalAlignment="Left"/>
+                <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtNoTestCount" Foreground="Red" Grid.Row="3" Grid.Column="1"  HorizontalAlignment="Left"/>
             </Grid>
 
         </Grid>

+ 9 - 3
BlankApp1/BlankApp1/Views/BusinessManageView/DeviceTestView.xaml

@@ -120,12 +120,18 @@
                 <DataGridTextColumn Header="测试状态" Binding="{Binding Remark}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
                 <DataGridTextColumn Header="创建者" Binding="{Binding CreateBy}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
                  <DataGridTextColumn Header="创建时间" Binding="{Binding CreateTime,StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
-                <DataGridTemplateColumn Header="操作" Width="180" CellStyle="{StaticResource MyDataGridCellStyle}">
+                <DataGridTemplateColumn Header="操作" Width="200" CellStyle="{StaticResource MyDataGridCellStyle}">
                     <DataGridTemplateColumn.CellTemplate>
                         <DataTemplate>
                             <StackPanel Orientation="Horizontal">
                                 <Button  Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
-                                 Command="{Binding DataContext.ManualTestCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" Cursor="Hand" Margin="0,0,10,0" >
+Command="{Binding DataContext.ReadDetailCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding SchemeId}" Cursor="Hand" Margin="0,0,2,0" >
+                                    <StackPanel Orientation="Horizontal">
+                                        <TextBlock  Text="查看详情" VerticalAlignment="Center" Foreground="Blue"/>
+                                    </StackPanel>
+                                </Button>
+                                <Button  Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
+                                 Command="{Binding DataContext.ManualTestCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" Cursor="Hand" Margin="0,0,2,0" >
 
                                     <StackPanel Orientation="Horizontal">
                                         <TextBlock  Text="手动测试" VerticalAlignment="Center" Foreground="Blue"/>
@@ -138,7 +144,7 @@
                                     </Button.CommandParameter>
                                 </Button>
                                 <Button  Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
-                                 Command="{Binding DataContext.AutoTestCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}"  Cursor="Hand" Margin="0,0,10,0">
+                                 Command="{Binding DataContext.AutoTestCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}"  Cursor="Hand" Margin="0,0,2,0">
 
                                     <StackPanel Orientation="Horizontal">
                                         <TextBlock  Text="自动测试" VerticalAlignment="Center" Foreground="Blue"/>

+ 3 - 3
BlankApp1/BlankApp1/Views/BusinessManageView/ResultQueryView.xaml

@@ -117,13 +117,13 @@ ItemsSource="{Binding SchItemResultList}" IsReadOnly="True" Padding="0"  Horizon
                     <DataGridTextColumn Header="设备名称" Binding="{Binding DeviceName}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
                     <DataGridTextColumn Header="设备类型" Binding="{Binding DeviceKindName}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
                     <DataGridTextColumn Header="测试方案名称" Binding="{Binding SchemeName}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
-                    <DataGridTextColumn Header="状态" Binding="{Binding TestResult}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
+                    <DataGridTextColumn Header="状态" Binding="{Binding TestStatus}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
 
                     <DataGridTextColumn Header="测试结果" Binding="{Binding TestResult}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
-                    <DataGridTextColumn Header="测试人员" Binding="{Binding TestResult}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
+                    <DataGridTextColumn Header="测试人员" Binding="{Binding CreateBy}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
 
                     <DataGridTextColumn Header="开始测试时间" Width="120" Binding="{Binding StartTestTime,StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
-                    <DataGridTextColumn Header="测试完成时间" Width="120" Binding="{Binding EndTestTime,StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
+                    <DataGridTextColumn Header="测试完成时间" Width="120" Binding="{Binding FinishTestTime,StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
                     <DataGridTemplateColumn Header="操作" Width="280"  CellStyle="{StaticResource MyDataGridCellStyle}">
                         <DataGridTemplateColumn.CellTemplate>
                             <DataTemplate>

+ 1 - 1
BlankApp1/Model/Dto/DeviceDtlWithResultModel.cs

@@ -25,7 +25,7 @@ namespace Model.Dto
         public string TestResult { get; set; }
 
         /// <summary>
-        /// Desc:测试记录明细状态。0:未测试。99:已测试。
+        /// Desc:测试记录明细状态。0:未测试。99:已测试。1 测试完成,2:测试未完成
         /// Default:
         /// Nullable:True
         /// </summary>