瀏覽代碼

添加测试记录

ltwork 1 年之前
父節點
當前提交
7dee9bb7e9

+ 4 - 1
BlankApp1/BizService/BizTestRecordService.cs

@@ -14,6 +14,9 @@ namespace BizService
             return base.GetFirst(x => ((x.device_id == deviceId) &&(x.scheme_name == schName)));
         }
 
-     
+        public List<biz_test_record> FindRecordByDeviceId(long deviceId)
+        {
+            return base.GetList(x => ((x.device_id == deviceId)));
+        }
     }
 }

+ 2 - 0
BlankApp1/BizService/IBizTestRecordService.cs

@@ -14,5 +14,7 @@ namespace BizService
         /// <param name="schemeId"></param>
         /// <returns></returns>
         public biz_test_record FindRecorddByDeviceIdAndSchname(long deviceId,string schName);
+
+        public List<biz_test_record> FindRecordByDeviceId(long deviceId);
     }
 }

+ 1 - 0
BlankApp1/BlankApp1/App.xaml.cs

@@ -67,6 +67,7 @@ namespace BlankApp1
             containerRegistry.RegisterForNavigation<DeviceView, DeviceViewModel>();
             containerRegistry.RegisterForNavigation<ProjectView, ProjectViewModel>();
             containerRegistry.RegisterForNavigation<DeviceTestView, DeviceTestViewModel>();
+            containerRegistry.RegisterForNavigation<ResultQueryView, ResultQueryViewModel>();
             containerRegistry.RegisterDialog<AddOrEditSchView, AddOrEditSchViewModel>();
             containerRegistry.RegisterDialog<AddDetailView, AddDetailViewModel>();
             containerRegistry.RegisterDialog<AutoTestView, AutoTestViewModel>();

+ 6 - 6
BlankApp1/BlankApp1/ViewModels/BusinessManageViewModel/DeviceTestViewModel.cs

@@ -68,7 +68,7 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
         {
             DeviceKindNameList = _iBasicDeviceKindService.FindAllDeviceKind();
             ProjectNameList = _iBasicProjectService.FindAllProject();
-            GetPprojectConfig();
+            GetProjectConfig();
         }
         private void Reset(object obj)
         {
@@ -189,7 +189,7 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
         /// <summary>
         /// 获取所有项目
         /// </summary>
-        private void GetPprojectConfig()
+        private void GetProjectConfig()
         {
             allDeviceList.Clear();
             conditionDevices.Clear();
@@ -213,8 +213,8 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                         DeviceId = item.DeviceId,
                         DeviceNo = item.DeviceNo,
                         DeviceName = item.DeviceName,
-                        DeviceKindId = item.DeviceKindId,
-                        ProjectId = item.ProjectId,
+                        DeviceKindName = _iBasicDeviceKindService.Find((int)item.DeviceKindId)?.devicekind_name,
+                        ProjectName = _iBasicProjectService.Find((int)item.ProjectId)?.project_name,
                         SchemeName = sch.SchemeName,
                         SchemeId=sch.SchemeId,
                     }) ;
@@ -223,8 +223,8 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                         DeviceId = item.DeviceId,
                         DeviceNo = item.DeviceNo,
                         DeviceName = item.DeviceName,
-                        DeviceKindId = item.DeviceKindId,
-                        ProjectId = item.ProjectId,
+                        DeviceKindName = _iBasicDeviceKindService.Find((int)item.DeviceKindId)?.devicekind_name,
+                        ProjectName = _iBasicProjectService.Find((int)item.ProjectId)?.project_name,
                         SchemeName = sch.SchemeName,
                         SchemeId = sch.SchemeId,
                     });

+ 326 - 0
BlankApp1/BlankApp1/ViewModels/BusinessManageViewModel/ResultQueryViewModel.cs

@@ -0,0 +1,326 @@
+using AutoMapper;
+using BizService;
+using Microsoft.Extensions.Logging;
+using MiniExcelLibs;
+using Model.Dto;
+using Model.Entities;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PLCTool.ViewModels.BusinessManageViewModel
+{
+ 
+
+    public class ResultQueryViewModel : BindableBase
+    {
+        private readonly IBasicDeviceService _iBasicDeviceService;
+        private readonly IBasicDeviceKindService _iBasicDeviceKindService;
+        private readonly IBasicProjectService _iBasicProjectService;
+        private readonly IBasicPlcTestSchemeService _basicPlcTestSchemeService;
+        private readonly IBizTestRecordDtlService _iBizTestRecordDtlService;
+        private readonly IBizTestRecordService _iBizTestRecordService;
+        private readonly IMapper _mapper;
+        private readonly IDialogService _dialog;
+        private readonly ILogger _logger;
+        private List<DeviceDtlWithResultModel> allDeviceList = new List<DeviceDtlWithResultModel>();//所有方案
+        private List<DeviceDtlWithResultModel> conditionDevices = new List<DeviceDtlWithResultModel>();//符合条件的方案
+        public ResultQueryViewModel(IBasicDeviceService iBasicDeviceService, IBasicDeviceKindService iBasicDeviceKindService, IBasicProjectService iBasicProjectService, IBasicPlcTestSchemeService basicPlcTestSchemeService, IBizTestRecordDtlService iBizTestRecordDtlService, IBizTestRecordService iBizTestRecordService, IMapper mapper, IDialogService dialog, ILogger logger)
+        {
+            _iBasicDeviceService = iBasicDeviceService;
+            _iBasicDeviceKindService = iBasicDeviceKindService;
+            _iBasicProjectService = iBasicProjectService;
+            _basicPlcTestSchemeService = basicPlcTestSchemeService;
+            _iBizTestRecordService= iBizTestRecordService;
+            _iBizTestRecordDtlService= iBizTestRecordDtlService;
+            _mapper = mapper;
+            _dialog = dialog;
+            _logger = logger;
+            QueryCommand = new DelegateCommand<object>(Query);
+
+            ExportCommand = new DelegateCommand<string>(Export);
+            ;
+            ResetCommand = new DelegateCommand<object>(Reset);
+            OnLoadCommand = new DelegateCommand(OnLoad);
+      
+
+        }
+
+
+
+
+
+
+
+
+        #region 私有方法
+        /// <summary>
+        /// 加载页面
+        /// </summary>
+        private void OnLoad()
+        {
+            DeviceKindNameList = _iBasicDeviceKindService.FindAllDeviceKind();
+            ProjectNameList = _iBasicProjectService.FindAllProject();
+            GetProjectConfig();
+        }
+        private void Reset(object obj)
+        {
+            DeviceNo = string.Empty;
+            DeviceName = string.Empty;
+
+
+        }
+
+
+    
+
+        /// <summary>
+        /// 查询
+        /// </summary>
+        /// <param name="obj"></param>
+        private void Query(object obj)
+        {
+            conditionDevices = (from a in allDeviceList
+                                where (string.IsNullOrEmpty(DeviceName) ? true : (a.DeviceName == DeviceName))
+                                && (string.IsNullOrEmpty(DeviceNo) ? true : (a.DeviceNo == DeviceNo))
+                                //&& (string.IsNullOrEmpty(DeviceKindName) ? true : (a.DeviceKindId == DeviceKindName))
+                                // && (string.IsNullOrEmpty(ProjectName) ? true : (a.ProjectId == ProjectName))
+                                select a).ToList();
+            //默认显示的第一页
+            conditionDevices = conditionDevices.OrderBy(x => x.DeviceId).ToList();
+            Getpage();
+        }
+
+        private void Export(string obj)
+        {
+            using (System.Windows.Forms.SaveFileDialog saveFileDialog = new System.Windows.Forms.SaveFileDialog()
+            {
+                //设置文件类型
+                //书写规则例如:txt files(*.txt)|*.txt
+                Filter = "Excel files(*.xlsx)|*.xlsx|All files(*.*)|*.*",
+                //设置默认文件名(可以不设置)
+                FileName = "项目配置表",
+
+                //获取或设置一个值,该值指示如果用户省略扩展名,文件对话框是否自动在文件名中添加扩展名。(可以不设置)
+                AddExtension = true,
+
+                //保存对话框是否记忆上次打开的目录
+                RestoreDirectory = true
+            })
+            {
+                // Show save file dialog box
+
+                //点了保存按钮进入
+                if (saveFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+                {
+                    try
+                    {
+                        //获得文件路径
+                        string localFilePath = saveFileDialog.FileName.ToString();
+
+                        //获取文件内容
+                        MiniExcel.SaveAs(localFilePath, DeviceResultItemList);
+                    }
+                    catch (Exception ex)
+                    {
+                        _logger.LogError(ex.ToString());
+                    }
+
+
+                }
+
+            }
+        }
+
+        /// <summary>
+        /// 获取所有项目
+        /// </summary>
+        private void GetProjectConfig()
+        {
+            allDeviceList.Clear();
+            conditionDevices.Clear();
+            //所有测试方案
+            var schlist = _basicPlcTestSchemeService.QueryList();
+            var schDtoList = _mapper.Map<List<bas_plc_test_scheme>, List<BasicPlcTestSchemeDto>>(schlist);
+            //测试记录中的所有设备
+            var deviceIds=_iBizTestRecordService.QueryList().Select(X => X.device_id).Distinct();
+
+         
+
+
+            foreach (var deviceId in deviceIds)
+            {
+                var deviceMsg = _iBasicDeviceService.Find(((int)deviceId));
+                if(deviceMsg != null)
+                {
+                    //查找哦记录有的方案
+
+                    var recordMsgs=_iBizTestRecordService.FindRecordByDeviceId(deviceId);
+                    foreach ( var sch in recordMsgs)
+                    {
+                        allDeviceList.Add(new DeviceDtlWithResultModel()
+                        {
+                            DeviceId = deviceMsg.device_id,
+                            DeviceNo = deviceMsg.device_no,
+                            DeviceName = deviceMsg.device_name,
+                            DeviceKindName = _iBasicDeviceKindService.Find((int)deviceMsg.device_kind_id)?.devicekind_name,
+                            ProjectName = _iBasicProjectService.Find((int)deviceMsg.project_id)?.project_name,
+                            SchemeName = sch.scheme_name,
+                            StartTestTime = sch.start_test_time.Value,
+                        }); ;
+                        conditionDevices.Add(new DeviceDtlWithResultModel()
+                        {
+                            DeviceId = deviceMsg.device_id,
+                            DeviceNo = deviceMsg.device_no,
+                            DeviceName = deviceMsg.device_name,
+                            DeviceKindName =_iBasicDeviceKindService.Find((int) deviceMsg.device_kind_id)?.devicekind_name,
+                            ProjectName = _iBasicProjectService.Find((int)deviceMsg.project_id)?.project_name,
+                            SchemeName = sch.scheme_name,
+                            StartTestTime = sch.start_test_time.Value,
+                        });
+                    }
+                  
+                }
+              
+    
+               
+
+            }
+            conditionDevices = conditionDevices.OrderBy(x => x.DeviceId).ToList();
+            Getpage();
+        }
+        /// <summary>
+        /// 获取页面
+        /// </summary>
+        private void Getpage()
+        {
+            CurrentPage = 1;
+            TotalCount = conditionDevices.Count;
+            CurrentPageChanged();
+
+
+        }
+        /// <summary>
+        /// 页面变化
+        /// </summary>
+        private void CurrentPageChanged()
+        {
+
+            DeviceResultItemList.Clear();
+
+            foreach (var i in conditionDevices.Skip((CurrentPage - 1) * CountPerPage).Take(CountPerPage))
+            {
+                DeviceResultItemList.Add(i);
+            }
+        }
+
+        #endregion
+        #region 命令绑定
+
+        public DelegateCommand<object> QueryCommand { set; get; }
+
+        public DelegateCommand<string> ExportCommand { set; get; }
+
+
+        public DelegateCommand<object> ResetCommand { set; get; }
+
+        public DelegateCommand OnLoadCommand { set; get; }
+
+        #endregion
+
+        #region 数据绑定
+        private ObservableCollection<DeviceDtlWithResultModel> deviceResultItemList = new ObservableCollection<DeviceDtlWithResultModel>();
+        public ObservableCollection<DeviceDtlWithResultModel> DeviceResultItemList
+        {
+            get { return deviceResultItemList; }
+            set { deviceResultItemList = value; RaisePropertyChanged(); }
+        }
+
+        /// <summary>
+        /// 设备编号
+        /// </summary>
+        private string devicedNo;
+        public string DeviceNo
+        {
+            get { return devicedNo; }
+            set { devicedNo = value; RaisePropertyChanged(); }
+        }
+
+        /// <summary>
+        /// 设备类型名称
+        /// </summary>
+        private string deviceName;
+        public string DeviceName
+        {
+            get { return deviceName; }
+            set { deviceName = value; RaisePropertyChanged(); }
+        }
+
+        private string projectName;
+        public string ProjectName
+        {
+            get { return projectName; }
+            set { projectName = value; RaisePropertyChanged(); }
+        }
+        private string deviceKindName;
+        public string DeviceKindName
+        {
+            get { return deviceKindName; }
+            set { deviceKindName = value; RaisePropertyChanged(); }
+        }
+
+        /// <summary>
+        /// 项目名称
+        /// </summary>
+        private List<string> projectNameList;
+        public List<string> ProjectNameList
+        {
+            get { return projectNameList; }
+            set { projectNameList = value; RaisePropertyChanged(); }
+        }
+        /// <summary>
+        /// 设备类型
+        /// </summary>
+        private List<string> deviceKindNameList;
+        public List<string> DeviceKindNameList
+        {
+            get { return deviceKindNameList; }
+            set { deviceKindNameList = value; RaisePropertyChanged(); }
+        }
+        /// <summary>
+        /// 总条数
+        /// </summary>
+        private int totalCount;
+        public int TotalCount
+        {
+            get { return totalCount; }
+            set { totalCount = value; RaisePropertyChanged(); CurrentPageChanged(); }
+        }
+        /// <summary>
+        /// 每页数量
+        /// </summary>
+        private int countPerPage = 15;
+        public int CountPerPage
+        {
+            get { return countPerPage; }
+            set { countPerPage = value; RaisePropertyChanged(); CurrentPageChanged(); }
+        }
+        /// <summary>
+        /// 单前页
+        /// </summary>
+        private int currentPage = 1;
+        public int CurrentPage
+        {
+            get { return currentPage; }
+            set { currentPage = value; RaisePropertyChanged(); CurrentPageChanged(); }
+        }
+
+        #endregion
+    }
+}

+ 128 - 0
BlankApp1/BlankApp1/Views/BusinessManageView/ResultQueryView.xaml

@@ -0,0 +1,128 @@
+<UserControl x:Class="PLCTool.Views.BusinessManageView.ResultQueryView"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:PLCTool.Views.BusinessManageView"
+                          xmlns:hc="https://handyorg.github.io/handycontrol"
+             xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
+             xmlns:myContr="clr-namespace:BlankApp1.Controls"
+             xmlns:wpfdev="https://github.com/WPFDevelopersOrg/WPFDevelopers"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <Grid >
+        <b:Interaction.Triggers>
+            <b:EventTrigger EventName="Loaded">
+                <b:InvokeCommandAction Command="{Binding OnLoadCommand}"/>
+            </b:EventTrigger>
+        </b:Interaction.Triggers>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="40"/>
+            <RowDefinition Height="40"/>
+            <RowDefinition/>
+            <RowDefinition Height="40"/>
+
+        </Grid.RowDefinitions>
+        <UniformGrid Grid.Row="0" Columns="4">
+            <StackPanel Orientation="Horizontal">
+                <TextBlock Text="设备编号:"  Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
+                <TextBox  Height="28" Width="120" Text="{Binding DeviceNo}" />
+            </StackPanel>
+            <StackPanel Orientation="Horizontal">
+                <TextBlock Text="设备名称:"  Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
+                <TextBox  Height="28" Width="120" Text="{Binding DeviceName}"/>
+            </StackPanel>
+            <StackPanel Orientation="Horizontal"  Grid.Row="3" HorizontalAlignment="Center">
+                <TextBlock Text="所属项目:"  Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0" TextAlignment="Right" Width="80"/>
+                <ComboBox  Height="28" Width="120" ItemsSource="{Binding ProjectNameList}" SelectedItem="{Binding ProjectName}" />
+            </StackPanel>
+            <StackPanel Orientation="Horizontal"  Grid.Row="4" HorizontalAlignment="Center">
+                <TextBlock Text="所属设备类型:"  Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0" TextAlignment="Right" Width="80"/>
+                <ComboBox  Height="28" Width="120" ItemsSource="{Binding DeviceKindNameList}" SelectedItem="{Binding DeviceKindName}" />
+            </StackPanel>
+
+
+
+        </UniformGrid>
+        <Grid Grid.Row="1">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition/>
+                <ColumnDefinition/>
+            </Grid.ColumnDefinitions>
+            <StackPanel Grid.Column="0" Orientation="Horizontal">
+                <StackPanel Orientation="Horizontal">
+                    <TextBlock Text="创建时间:"  Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
+                    <hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" Height="25" Width="160" SelectedDateTime="{Binding StartTime}"/>
+                </StackPanel>
+                <StackPanel Orientation="Horizontal">
+                    <TextBlock Text="至:"  Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
+                    <hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" Height="25" Width="160" SelectedDateTime="{Binding EndTime}"/>
+                </StackPanel>
+            </StackPanel>
+            <StackPanel Grid.Column="1" Orientation="Horizontal">
+
+                <Button  Content="查询" Width="80"  Margin="5,0"  Command="{Binding QueryCommand}" Style="{StaticResource NormalButtonStyle}" />
+                <Button  Content="重置" Width="80"  Margin="5,0"  Command="{Binding ResetCommand}" Style="{StaticResource NormalButtonStyle}" />
+                <Button  Content="新增" Width="80"  Margin="5,0"  Command="{Binding AddCommand}" Style="{StaticResource NormalButtonStyle}"/>
+
+                <Button Content="导出Excel" Width="80"  Margin="5,0"  Command="{Binding ExportCommand}" Style="{StaticResource NormalButtonStyle}" />
+            </StackPanel>
+        </Grid>
+        <DataGrid  Grid.Row="2"  ColumnWidth="*" AutoGenerateColumns="False" HeadersVisibility="All" CanUserAddRows="False"  SelectionUnit="FullRow" SelectionMode="Single"   RowHeaderWidth="0"
+       ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}"  RowHeaderStyle="{StaticResource RowHeaderStyle}" RowStyle="{StaticResource DataGridRowtyle}"  AlternationCount="2"
+      ItemsSource="{Binding DeviceResultItemList}" IsReadOnly="True" Padding="0"  >
+            <DataGrid.Columns >
+                <DataGridTextColumn Header="序号" Width="50" Binding="{Binding DeviceId}" CellStyle="{StaticResource MyDataGridCellStyle}" />
+                <DataGridTextColumn Header="设备编号" Binding="{Binding DeviceNo}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
+                <DataGridTextColumn Header="设备名称" Binding="{Binding DeviceName}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
+                <DataGridTextColumn Header="项目名称" Binding="{Binding ProjectName}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
+                <DataGridTextColumn Header="设备类型" Binding="{Binding DeviceKindName}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
+                <DataGridTextColumn Header="测试方案名称" Binding="{Binding SchemeName}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
+                <DataGridTextColumn Header="测试时间" Binding="{Binding StartTestTime}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
+                <DataGridTextColumn Header="测试结果" Binding="{Binding TestResult}" 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.CellTemplate>
+                        <DataTemplate>
+                            <UniformGrid Columns="2">
+                                <Button  Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
+                       Command="{Binding DataContext.CheckDetailCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding SchemeId}" Cursor="Hand" Margin="0,0,5,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.PdfReportCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding SchemeId}" Cursor="Hand" >
+
+                                    <StackPanel Orientation="Horizontal">
+                                        <TextBlock  Text="生成pdf报表" VerticalAlignment="Center" Foreground="Blue"/>
+                                    </StackPanel>
+                                </Button>
+
+                            </UniformGrid>
+                        </DataTemplate>
+                    </DataGridTemplateColumn.CellTemplate>
+                </DataGridTemplateColumn>
+            </DataGrid.Columns>
+
+        </DataGrid>
+        <Grid Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center">
+            <wpfdev:Pagination IsLite="False"    Margin="0"  Width="auto" Height="30" HorizontalAlignment="Center"  
+                       Count="{Binding TotalCount,Mode=TwoWay}" 
+                       CountPerPage="{Binding CountPerPage,Mode=TwoWay}"
+                       Current="{Binding CurrentPage,Mode=TwoWay}"/>
+            <!--<hc:Pagination MaxPageCount="10" PageIndex="{Binding PageIndex}" IsJumpEnabled="True">
+                <hc:Interaction.Triggers>
+                    <hc:EventTrigger EventName="PageUpdated">
+                        <hc:EventToCommand Command="{Binding PageUpdatedCmd}" PassEventArgsToCommand="True" />
+                    </hc:EventTrigger>
+                </hc:Interaction.Triggers>
+            </hc:Pagination>-->
+        </Grid>
+
+
+    </Grid>
+</UserControl>
+

+ 28 - 0
BlankApp1/BlankApp1/Views/BusinessManageView/ResultQueryView.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PLCTool.Views.BusinessManageView
+{
+    /// <summary>
+    /// ResultQueryView.xaml 的交互逻辑
+    /// </summary>
+    public partial class ResultQueryView : UserControl
+    {
+        public ResultQueryView()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 31 - 0
BlankApp1/Model/Dto/DeviceDtlWithResultModel.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model.Dto
+{
+    public  class DeviceDtlWithResultModel:BasDeviceDto
+    {
+        public long RecordId { get; set; }
+        public DateTime StartTestTime { get; set; }
+
+        public DateTime FinishTestTime { get; set; }
+
+        public string SchemeName { get; set; }
+        
+        /// <summary>
+        /// 测试模式
+        /// </summary>
+        public string TestMode { get; set; }
+        public string TestResult { get; set; }
+
+        /// <summary>
+        /// Desc:测试记录明细状态。0:未测试。99:已测试。
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string TestStatus { get; set; }
+    }
+}