wanghan 1 an în urmă
părinte
comite
770669bd7f
28 a modificat fișierele cu 2291 adăugiri și 329 ștergeri
  1. 44 1
      LogForceTestApp.Modules.MainModule/DataHelp.cs
  2. 5 0
      LogForceTestApp.Modules.MainModule/LogoForceTestApp.Modules.MainModule.csproj
  3. 16 0
      LogForceTestApp.Modules.MainModule/Method/GVariable.cs
  4. 29 0
      LogForceTestApp.Modules.MainModule/Models/CustomerInfor.cs
  5. 1 0
      LogForceTestApp.Modules.MainModule/Models/InformationNew.cs
  6. 37 0
      LogForceTestApp.Modules.MainModule/Models/MulProductModel.cs
  7. 55 0
      LogForceTestApp.Modules.MainModule/Models/ProductModel.cs
  8. 199 15
      LogForceTestApp.Modules.MainModule/ViewModels/AccountPageViewModel.cs
  9. 62 14
      LogForceTestApp.Modules.MainModule/ViewModels/DataPageViewModel.cs
  10. 67 15
      LogForceTestApp.Modules.MainModule/ViewModels/KBWindowViewModel.cs
  11. 234 126
      LogForceTestApp.Modules.MainModule/ViewModels/MainPageViewModel.cs
  12. 173 42
      LogForceTestApp.Modules.MainModule/Views/AccountPage.xaml
  13. 2 0
      LogForceTestApp.Modules.MainModule/Views/AccountPage.xaml.cs
  14. 9 0
      LogForceTestApp.Modules.MainModule/Views/DataPage.xaml
  15. 120 89
      LogForceTestApp.Modules.MainModule/Views/MainPage.xaml
  16. 12 6
      LogForceTestApp.Modules.MainModule/Views/QualityTracing.xaml
  17. 8 4
      LogForceTestApp.Modules.MainModule/Views/StatementPage.xaml
  18. 1 0
      LogoForceTestApp/App.xaml.cs
  19. 51 2
      LogoForceTestApp/ViewModels/MainWindowViewModel.cs
  20. 5 5
      LogoForceTestApp/Views/MainWindow.xaml
  21. 10 9
      Repository/Entiies/Information.cs
  22. 544 0
      Repository/Migrations/20241217013918_2024-12-17-1.Designer.cs
  23. 22 0
      Repository/Migrations/20241217013918_2024-12-17-1.cs
  24. 547 0
      Repository/Migrations/20241218054316_2024-12-18-1.Designer.cs
  25. 22 0
      Repository/Migrations/20241218054316_2024-12-18-1.cs
  26. 6 0
      Repository/Migrations/TeamDataContextModelSnapshot.cs
  27. 2 1
      Repository/Quality.cs
  28. 8 0
      Repository/Repository.csproj

+ 44 - 1
LogForceTestApp.Modules.MainModule/DataHelp.cs

@@ -1,4 +1,5 @@
-using System;
+using Newtonsoft.Json;
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
@@ -9,6 +10,48 @@ namespace LogoForceTestApp.Modules.MainModule
 {
     public class DataHelp
     {
+        /// <summary>
+        /// 写入Json文件
+        /// </summary>
+        /// <param name="obj">对象</param>
+        /// <param name="path">文件路径</param>
+        public static void WriteJsonFile(object obj, string path)
+        {
+            if (!Directory.Exists(Path.GetDirectoryName(path)))
+            {
+                Directory.CreateDirectory(Path.GetDirectoryName(path));
+            }
+            using (StreamWriter sw = new StreamWriter(path))
+            {
+                string json = JsonConvert.SerializeObject(obj, Formatting.Indented);
+                sw.Write(JsonConvert.SerializeObject(obj, Newtonsoft.Json.Formatting.Indented));
+            }
+        }
+
+        /// <summary>
+        /// 读取Json文件
+        /// </summary>
+        /// <typeparam name="T">对象</typeparam>
+        /// <param name="path">文件路径</param>
+        /// <returns></returns>
+        /// <exception cref="Exception"></exception>
+        public static T ReadJsonFile<T>(string path)
+        {
+            if (File.Exists(path))
+            {
+                string buffer;
+                using (StreamReader sr = new StreamReader(path))
+                {
+                    buffer = sr.ReadToEnd();
+                }
+                return JsonConvert.DeserializeObject<T>(buffer);
+            }
+            else
+            {
+                throw new Exception($"文件不存在:[{path}]");
+            }
+        }
+
         //写csv
         public static bool Save(string fullPath, string fileName, string RowName, string Data)
         {

+ 5 - 0
LogForceTestApp.Modules.MainModule/LogoForceTestApp.Modules.MainModule.csproj

@@ -267,9 +267,13 @@
   <ItemGroup>
     <Compile Include="DataHelp.cs" />
     <Compile Include="InovanceTcp.cs" />
+    <Compile Include="Method\GVariable.cs" />
+    <Compile Include="Models\CustomerInfor.cs" />
     <Compile Include="Models\HouseDto.cs" />
     <Compile Include="Models\InformationNew.cs" />
+    <Compile Include="Models\MulProductModel.cs" />
     <Compile Include="Models\PictureInfo.cs" />
+    <Compile Include="Models\ProductModel.cs" />
     <Compile Include="PLC.cs" />
     <Compile Include="ValidationTemplate.cs" />
     <Compile Include="Converters\BooleanToBrush.cs" />
@@ -494,6 +498,7 @@
   <ItemGroup>
     <Resource Include="Views\persons.png" />
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>

+ 16 - 0
LogForceTestApp.Modules.MainModule/Method/GVariable.cs

@@ -0,0 +1,16 @@
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LogoForceTestApp.Modules.MainModule.Method
+{
+    public static class GVariable
+    {
+        public static string ProductTypeName;//产品类型
+        public static string ProductsConfig = "..//Config//ProductsConfig.cfg";//质量config
+        public static string CustomerCofig = "..//Config//CustomerCofig.cfg";//客户config
+    }
+}

+ 29 - 0
LogForceTestApp.Modules.MainModule/Models/CustomerInfor.cs

@@ -0,0 +1,29 @@
+using LogoForceTestApp.Modules.MainModule.Method;
+using Prism.Mvvm;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LogoForceTestApp.Modules.MainModule.Models
+{
+    public class CustomerInfor:BindableBase
+    {
+        public ObservableCollection<string> CustomerName { get; set; }
+        public CustomerInfor()
+        {
+            CustomerName = new ObservableCollection<string>();
+        }
+        public void ReadConfig()
+        {
+            var res = DataHelp.ReadJsonFile<CustomerInfor>(GVariable.CustomerCofig);
+            this.CustomerName = res.CustomerName;
+        }
+        public void WriteConfig()
+        {
+            DataHelp.WriteJsonFile(this, GVariable.CustomerCofig);
+        }
+    }
+}

+ 1 - 0
LogForceTestApp.Modules.MainModule/Models/InformationNew.cs

@@ -19,5 +19,6 @@ namespace LogoForceTestApp.Modules.MainModule.Models
         public string ItemCode { get; set; }
         public string OrderNo { get; set; }
         public string TestResult { get; set; }
+        public string WorkDev { get; set; }
     }
 }

+ 37 - 0
LogForceTestApp.Modules.MainModule/Models/MulProductModel.cs

@@ -0,0 +1,37 @@
+using LogoForceTestApp.Modules.MainModule.Method;
+using Prism.Mvvm;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LogoForceTestApp.Modules.MainModule.Models
+{
+    public class MulProductModel : BindableBase
+    {
+        private ObservableCollection<ProductModel> _ProductCollection;
+        public ObservableCollection<ProductModel> ProductCollection
+        {
+            get { return _ProductCollection; }
+            set { SetProperty(ref _ProductCollection, value); }
+        }
+
+        public MulProductModel()
+        {
+            ProductCollection = new ObservableCollection<ProductModel>();
+        }
+
+        public void SaveParame()
+        {
+            DataHelp.WriteJsonFile(this, GVariable.ProductsConfig);
+        }
+
+        public void LoadParame()
+        {
+            var res= DataHelp.ReadJsonFile<MulProductModel>(GVariable.ProductsConfig);
+            this.ProductCollection = res.ProductCollection;
+        }
+    }
+}

+ 55 - 0
LogForceTestApp.Modules.MainModule/Models/ProductModel.cs

@@ -0,0 +1,55 @@
+using Prism.Mvvm;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LogoForceTestApp.Modules.MainModule.Models
+{
+    public class ProductModel : BindableBase
+    {
+        private string _Name;
+        public string Name
+        {
+            get { return _Name; }
+            set { SetProperty(ref _Name, value); }
+        }
+        private int _NameNumber;
+        public int NameNumber
+        {
+            get { return _NameNumber; }
+            set { SetProperty(ref _NameNumber, value); }
+        }
+       
+
+        private ObservableCollection<string> _QuestionType1;
+        public ObservableCollection<string> QuestionType1
+        {
+            get { return _QuestionType1; }
+            set { SetProperty(ref _QuestionType1, value); }
+        }
+
+        private ObservableCollection<string> _QuestionType2;
+        public ObservableCollection<string> QuestionType2
+        {
+            get { return _QuestionType2; }
+            set { SetProperty(ref _QuestionType2, value); }
+        }
+
+        private ObservableCollection<string> _QuestionType3;
+        public ObservableCollection<string> QuestionType3
+        {
+            get { return _QuestionType3; }
+            set { SetProperty(ref _QuestionType3, value); }
+        }
+
+        public ProductModel()
+        {
+            QuestionType1 = new ObservableCollection<string>();
+            QuestionType2 = new ObservableCollection<string>();
+            QuestionType3 = new ObservableCollection<string>();
+        }
+    }
+}

+ 199 - 15
LogForceTestApp.Modules.MainModule/ViewModels/AccountPageViewModel.cs

@@ -1,10 +1,13 @@
 using LogoForceTestApp.Modules.MainModule.Models;
+using Newtonsoft.Json;
 using Prism.Commands;
+using Prism.Ioc;
 using Prism.Mvvm;
 using Repository;
 using Repository.Entiies;
 using System;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.Linq;
 using System.Security.Cryptography;
 using System.Text;
@@ -15,29 +18,210 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
 {
     public class AccountPageViewModel: BindableBase
     {
-        IRepository _repository;
-        public string IdAcc { get; set; }
-        public string ChangeP { get; set; }
-        public DelegateCommand PasswordCommand { get; set; }
-        public AccountPageViewModel(IRepository repository) 
+        private readonly IContainerProvider _container;
+
+        #region 属性
+
+        private MulProductModel _Products;
+        public MulProductModel Products
+        {
+            get { return _Products; }
+            set { SetProperty(ref _Products, value); }
+        }
+
+       
+        private string _PTName;
+        public string PTName
+        {
+            get { return _PTName; }
+            set { SetProperty(ref _PTName, value); }
+        }
+        private int _PTNameNumber;
+        public int PTNameNumber
+        {
+            get { return _PTNameNumber; }
+            set { SetProperty(ref _PTNameNumber, value); }
+        }
+        
+
+        private ObservableCollection<string> _Question1=new ObservableCollection<string>();
+        public ObservableCollection<string> Question1
+        {
+            get { return _Question1; }
+            set { SetProperty(ref _Question1, value); }
+        }
+
+        private ObservableCollection<string> _Question2 = new ObservableCollection<string>();
+        public ObservableCollection<string> Question2
+        {
+            get { return _Question2; }
+            set { SetProperty(ref _Question2, value); }
+        }
+
+        private ObservableCollection<string> _Question3 = new ObservableCollection<string>();
+        public ObservableCollection<string> Question3
+        {
+            get { return _Question3; }
+            set { SetProperty(ref _Question3, value); }
+        }
+
+        private int _Selected1;
+        public int Selected1
+        {
+            get { return _Selected1; }
+            set { SetProperty(ref _Selected1, value); }
+        }
+
+        private int _Selected2;
+        public int Selected2
+        {
+            get { return _Selected2; }
+            set { SetProperty(ref _Selected2, value); }
+        }
+
+        private int _Selected3;
+        public int Selected3
+        {
+            get { return _Selected3; }
+            set { SetProperty(ref _Selected3, value); }
+        }
+
+        private string _Text1;
+        public string Text1
+        {
+            get { return _Text1; }
+            set { SetProperty(ref _Text1, value); }
+        }
+
+        private string _Text2;
+        public string Text2
+        {
+            get { return _Text2; }
+            set { SetProperty(ref _Text2, value); }
+        }
+
+        private string _Text3;
+        public string Text3
         {
-            _repository = repository;
-            PasswordCommand = new DelegateCommand(ChangePassword);
+            get { return _Text3; }
+            set { SetProperty(ref _Text3, value); }
         }
+        #endregion
 
-        private void ChangePassword()
+        #region 命令
+        public DelegateCommand AddCmm { get; set; }
+        public DelegateCommand AcquireCmm { get; set; }
+        public DelegateCommand ModificationCmm { get; set; }
+
+
+        private DelegateCommand _RemoveQuestion1Command;
+        public DelegateCommand RemoveQuestion1Command =>
+            _RemoveQuestion1Command ?? (_RemoveQuestion1Command = new DelegateCommand(ExecuteRemoveQuestion1Command));
+
+        private DelegateCommand _RemoveQuestion2Command;
+        public DelegateCommand RemoveQuestion2Command =>
+            _RemoveQuestion2Command ?? (_RemoveQuestion2Command = new DelegateCommand(ExecuteRemoveQuestion2Command));
+
+        private DelegateCommand _RemoveQuestion3Command;
+        public DelegateCommand RemoveQuestion3Command =>
+            _RemoveQuestion3Command ?? (_RemoveQuestion3Command = new DelegateCommand(ExecuteRemoveQuestion3Command));
+        
+        private DelegateCommand<string> _AddQuesetion1;
+        public DelegateCommand<string> AddQuesetion1 =>
+            _AddQuesetion1 ?? (_AddQuesetion1 = new DelegateCommand<string>(ExecuteAddQuesetion1));
+        private DelegateCommand<string> _AddQuesetion2;
+        public DelegateCommand<string> AddQuesetion2 =>
+            _AddQuesetion2 ?? (_AddQuesetion2 = new DelegateCommand<string>(ExecuteAddQuesetion2));
+        private DelegateCommand<string> _AddQuesetion3;
+        public DelegateCommand<string> AddQuesetion3 =>
+            _AddQuesetion3 ?? (_AddQuesetion3 = new DelegateCommand<string>(ExecuteAddQuesetion3));
+
+        
+        #endregion
+
+        public AccountPageViewModel(IContainerProvider container) 
+        {
+            _container = container;
+
+            AddCmm = new DelegateCommand(AddProCmm);
+            AcquireCmm = new DelegateCommand(AcquireProCmm);
+            ModificationCmm = new DelegateCommand(ModificationProCmm);
+
+            Products = _container.Resolve<MulProductModel>();
+            if (Products == null)
+            {
+                Products = new MulProductModel();
+            }
+        }
+
+        private void ModificationProCmm()
+        {
+            var currentProduct = Products.ProductCollection.FirstOrDefault(p => p.Name == PTName);
+            if (currentProduct != null)
+            {
+                currentProduct.NameNumber = PTNameNumber;
+                currentProduct.QuestionType1= new ObservableCollection<string>(Question1);
+                currentProduct.QuestionType2= new ObservableCollection<string>(Question2);
+                currentProduct.QuestionType3= new ObservableCollection<string>(Question3);
+            }
+            Products.SaveParame();
+            MessageBox.Show("修改成功");
+        }
+
+        private void AcquireProCmm()
         {
-            System.Windows.Forms.DialogResult digres = MessageBox.Show("确认是否修改密码?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
-            if (digres == System.Windows.Forms.DialogResult.OK)
+            Products.LoadParame();
+            var currentProduct = Products.ProductCollection.FirstOrDefault(p => p.Name == PTName);
+            if (currentProduct != null)
             {
-                var change= _repository.GetFirstDefault<Account>(c => c.AccountID == IdAcc);//数据库查
-                change.ChangePassword = ChangeP;//改
-                _repository.Update(change);//更新  
+                PTNameNumber = currentProduct.NameNumber;
+                Question1 = currentProduct.QuestionType1;
+                Question2 = currentProduct.QuestionType2;
+                Question3 = currentProduct.QuestionType3;
             }
-            else
+        }
+
+        private void AddProCmm()
+        {
+            if (Products.ProductCollection.Count != 0)
             {
-                ChangeP = string.Empty;
+                Products.LoadParame();
             }
+            Products.ProductCollection.Add(new ProductModel() { Name = PTName, NameNumber=PTNameNumber,
+                QuestionType1 = Question1, QuestionType2 = Question2, QuestionType3 = Question3 });
+            Products.SaveParame();
+            MessageBox.Show("添加成功");
+        }
+
+        void ExecuteRemoveQuestion3Command()
+        {
+            if (Selected3 < 0) return;
+            Question3.RemoveAt(Selected3);
+        }
+        void ExecuteRemoveQuestion2Command()
+        {
+            if (Selected2 < 0) return;
+            Question2.RemoveAt(Selected2);
+        }
+        void ExecuteRemoveQuestion1Command()
+        {
+            if (Selected1 < 0) return;
+            Question1.RemoveAt(Selected1);
+        }
+        private void ExecuteAddQuesetion3(string str)
+        {
+            Question3.Add(str);
+            Text3 = string.Empty;
+        }
+        private void ExecuteAddQuesetion2(string str)
+        {
+            Question2.Add(str);
+            Text2 = string.Empty;
+        }
+        private void ExecuteAddQuesetion1(string str)
+        {
+            Question1.Add(str);
+            Text1 = string.Empty;
         }
     }
 }

+ 62 - 14
LogForceTestApp.Modules.MainModule/ViewModels/DataPageViewModel.cs

@@ -16,26 +16,64 @@ using System.Linq;
 using System.Threading.Tasks;
 using LiveChartsCore.Measure;
 using LiveChartsCore.SkiaSharpView.VisualElements;
+using System.Collections.ObjectModel;
+using LogoForceTestApp.Modules.MainModule.Method;
+using Prism.Ioc;
 
 namespace LogoForceTestApp.Modules.MainModule.ViewModels
 {
     public class DataPageViewModel : BindableBase
     {
         IRepository _repository;
+        IContainerProvider _container;
+        public string BillNo { get; set; }
         public DelegateCommand ChartCommand { get; set; }
         public DateTime StartDate { get; set; }
         public DateTime EndDate { get; set; }
-        public DataPageViewModel(IRepository repository)
+        private MulProductModel _Products;
+        public MulProductModel Products
+        {
+            get { return _Products; }
+            set { SetProperty(ref _Products, value); }
+        }
+        private ObservableCollection<string> _ProductProblem = new ObservableCollection<string>();
+        public ObservableCollection<string> ProductProblem
+        {
+            get { return _ProductProblem; }
+            set { SetProperty(ref _ProductProblem, value); }
+        }
+        private ObservableCollection<string> _ProcessProblem = new ObservableCollection<string>();
+        public ObservableCollection<string> ProcessProblem
+        {
+            get { return _ProcessProblem; }
+            set { SetProperty(ref _ProcessProblem, value); }
+        }
+        private ObservableCollection<string> _MaterialProblem = new ObservableCollection<string>();
+        public ObservableCollection<string> MaterialProblem
+        {
+            get { return _MaterialProblem; }
+            set { SetProperty(ref _MaterialProblem, value); }
+        }
+
+        public DataPageViewModel(IRepository repository, IContainerProvider container)
         {
             _repository = repository;
+            _container = container;
             StartDate = DateTime.Today;
             EndDate = DateTime.Today;
 
+            Products = _container.Resolve<MulProductModel>();
+            if (Products == null)
+            {
+                Products = new MulProductModel();
+            }
+
             //ChartCommand = new DelegateCommand(async () =>
             //{
             //    await ChartData();
             //});
             ChartCommand = new DelegateCommand(ChartData);
+            
         }
 
 
@@ -270,7 +308,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                 qua3 = new int[10] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
 
                 var endTime = end.AddDays(1);
-                var list = _repository.GetAllQuery<Quality>(c => c.DateQuality >= start && c.DateQuality <= endTime);
+                var list = _repository.GetAllQuery<Quality>(c => c.ProTName==BillNo);
                 if (list != null)
                 {
                     for (int i = 0; i < list.Count; i++)
@@ -293,9 +331,16 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                         qua3[6] = list[i].Q27 + qua3[6]; qua3[7] = list[i].Q28 + qua3[7];
                         qua3[8] = list[i].Q29 + qua3[8]; qua3[9] = list[i].Q30 + qua3[9];
                     }
-                    SerQuality1(qua1);
-                    SerQuality2(qua2);
-                    SerQuality3(qua3);
+                    var res1 = Products.ProductCollection.FirstOrDefault(p => p.Name == GVariable.ProductTypeName);
+                    if (res1 != null)
+                    {
+                        ProductProblem = res1.QuestionType1;
+                        ProcessProblem = res1.QuestionType2;
+                        MaterialProblem = res1.QuestionType3;
+                    }
+                    SerQuality1(qua1, ProductProblem);
+                    SerQuality2(qua2, ProcessProblem);
+                    SerQuality3(qua3, MaterialProblem);
                 }
             }
             catch (Exception)
@@ -304,9 +349,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             }
         }
         #region 生产问题
-        public void SerQuality1(int[] val)
+        public void SerQuality1(int[] val,ObservableCollection<string> xlabel)
         {
             SeriesQuality1[0].Values = val;
+            XAxes1[0].Labels = xlabel;
         }
 
         public ISeries[] SeriesQuality1 { get; set; } = new ISeries[]
@@ -333,8 +379,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         {
             new Axis
             {
-                Labels = new string[] { "螺丝未上紧","3D人脸无效" ,"螺丝漏打" ,"显示屏幕漏光" ,"胶体未打好",
-                    "对讲喇叭无声","执手过于松紧" ,"螺丝打变形" ,"理线错乱" ,"弹簧未装好" },
+                //Labels = new string[] { "螺丝未上紧","3D人脸无效" ,"螺丝漏打" ,"显示屏幕漏光" ,"胶体未打好",
+                //    "对讲喇叭无声","执手过于松紧" ,"螺丝打变形" ,"理线错乱" ,"弹簧未装好" },
                 LabelsPaint = new SolidColorPaint(new SKColor(0, 0, 0)),
                 LabelsRotation = 90,
                 TextSize = 12,
@@ -352,9 +398,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         };
         #endregion
         #region 工艺问题
-        public void SerQuality2(int[] val)
+        public void SerQuality2(int[] val, ObservableCollection<string> xlabel)
         {
             SeriesQuality2[0].Values = val;
+            XAxes2[0].Labels = xlabel;
         }
 
         public ISeries[] SeriesQuality2 { get; set; } = new ISeries[]
@@ -381,8 +428,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         {
             new Axis
             {
-                Labels = new string[] {"对讲无声","执手问题" ,"壳体脚位不平衡" ,"前板锁芯两孔位不一致" ,"后板显示屏水印",
-                    "电池异常耗电","喷漆过厚导致组装困难" ,"设计线路太长" ,"执手靠垫片改善" ,"锁芯顶杆没固定位置"},
+                //Labels = new string[] {"对讲无声","执手问题" ,"壳体脚位不平衡" ,"前板锁芯两孔位不一致" ,"后板显示屏水印",
+                //    "电池异常耗电","喷漆过厚导致组装困难" ,"设计线路太长" ,"执手靠垫片改善" ,"锁芯顶杆没固定位置"},
                 LabelsPaint = new SolidColorPaint(new SKColor(0, 0, 0)),
                 LabelsRotation = 90,
                 TextSize = 12,
@@ -400,9 +447,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         };
         #endregion
         #region 物料问题
-        public void SerQuality3(int[] val)
+        public void SerQuality3(int[] val, ObservableCollection<string> xlabel)
         {
             SeriesQuality3[0].Values = val;
+            XAxes3[0].Labels = xlabel;
         }
 
         public ISeries[] SeriesQuality3 { get; set; } = new ISeries[]
@@ -429,8 +477,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         {
             new Axis
             {
-                Labels = new string[] {"面板变形","电机异常" ,"屏幕异常" ,"物料毛刺" ,"大屏上支架变形",
-                    "壳料划痕","显示屏水印" , "壳体脚位不平横" ,"装饰圈气泡脱皮" ,"电池异常"},
+                //Labels = new string[] {"面板变形","电机异常" ,"屏幕异常" ,"物料毛刺" ,"大屏上支架变形",
+                //    "壳料划痕","显示屏水印" , "壳体脚位不平横" ,"装饰圈气泡脱皮" ,"电池异常"},
                 LabelsPaint = new SolidColorPaint(new SKColor(0, 0, 0)),
                 LabelsRotation = 90,
                 TextSize = 12,

+ 67 - 15
LogForceTestApp.Modules.MainModule/ViewModels/KBWindowViewModel.cs

@@ -30,6 +30,10 @@ using System.Threading;
 using Timer = System.Timers.Timer;
 using System.Windows.Forms;
 using Serilog;
+using Team.Utility;
+using Prism.Ioc;
+using System.Xml.Linq;
+using LogoForceTestApp.Modules.MainModule.Method;
 
 
 namespace LogoForceTestApp.Modules.MainModule.ViewModels
@@ -40,6 +44,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         IRepository repository; 
         private readonly ILogger _logger;
         private readonly IEventAggregator _eventAggregator;
+        private readonly IContainerProvider _container;
         public ObservableCollection<HouseDto> MyHouse { get; set; }
         private readonly IMapper _mapper;
         //private readonly List<House> _myHouse;
@@ -103,13 +108,40 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         public string SecondName { get; set; }
         public string ThirdName { get; set; }
         public string Fix { get; set; }
+
+        private MulProductModel _Products;
+        public MulProductModel Products
+        {
+            get { return _Products; }
+            set { SetProperty(ref _Products, value); }
+        }
+        private ObservableCollection<string> _ProductProblem = new ObservableCollection<string>();
+        public ObservableCollection<string> ProductProblem
+        {
+            get { return _ProductProblem; }
+            set { SetProperty(ref _ProductProblem, value); }
+        }
+        private ObservableCollection<string> _ProcessProblem = new ObservableCollection<string>();
+        public ObservableCollection<string> ProcessProblem
+        {
+            get { return _ProcessProblem; }
+            set { SetProperty(ref _ProcessProblem, value); }
+        }
+        private ObservableCollection<string> _MaterialProblem = new ObservableCollection<string>();
+        public ObservableCollection<string> MaterialProblem
+        {
+            get { return _MaterialProblem; }
+            set { SetProperty(ref _MaterialProblem, value); }
+        }
         #endregion
 
-        public KBWindowViewModel(IRepository repository, IEventAggregator eventAggregator, IMapper mapper, ILogger logger)
+        public KBWindowViewModel(IRepository repository, IEventAggregator eventAggregator, 
+            IMapper mapper, ILogger logger, IContainerProvider container)
         {
             this.repository = repository;
             this._eventAggregator = eventAggregator;
             _logger = logger;
+            this._container = container;
             Series = new List<ISeries>();
             #region timer
             _timer = new Timer();
@@ -140,13 +172,19 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             LiveChartsSkiaSharp.DefaultSKTypeface = skTypeface;
 
             #endregion
+
+            Products = _container.Resolve<MulProductModel>();
+            if (Products == null)
+            {
+                Products = new MulProductModel();
+            }
+
             _eventAggregator.GetEvent<AlarmEvent>().Subscribe(GetAlarmMessage);//接收另一个viewmodel的信息
             MyHouse = new ObservableCollection<HouseDto>();
             _mapper = mapper;
             _eventAggregator.GetEvent<OperatorNameEvent>().Subscribe(ShowPeope);
             _eventAggregator.GetEvent<QuestEvent>().Subscribe(ShowOrder);
             Task.Factory.StartNew(Main, TaskCreationOptions.LongRunning);
-
         }
         private void Main()
         {
@@ -320,13 +358,14 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
 
         #region 质量
         int[] qua1 = new int[10]; int[] qua2 = new int[10]; int[] qua3 = new int[10];
+        
         public void ShowQuality()
         {
             try
             {
                 //string str = DateTime.Now.ToString("yyyy/MM/dd");
                 DateTime dt = DateTime.Today;
-                var list = repository.GetFirstDefault<Quality>(c => c.DateQuality == dt);
+                var list = repository.GetFirstDefault<Quality>(c => c.QuPCode == BillNo);
                 if (list != null)
                 {
                     qua1[0] = list.Q1; qua1[1] = list.Q2; qua1[2] = list.Q3; qua1[3] = list.Q4; qua1[4] = list.Q5;
@@ -335,9 +374,19 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                     qua2[5] = list.Q16; qua2[6] = list.Q17; qua2[7] = list.Q18; qua2[8] = list.Q19; qua2[9] = list.Q20;
                     qua3[0] = list.Q21; qua3[1] = list.Q22; qua3[2] = list.Q23; qua3[3] = list.Q24; qua3[4] = list.Q25;
                     qua3[5] = list.Q26; qua3[6] = list.Q27; qua3[7] = list.Q28; qua3[8] = list.Q29; qua3[9] = list.Q30;
-                    SerQuality1(qua1);
-                    SerQuality2(qua2);
-                    SerQuality3(qua3);
+                    
+                    Thread.Sleep(200);
+                    var res1=Products.ProductCollection.FirstOrDefault(p => p.Name == GVariable.ProductTypeName);
+                    if (res1 != null)
+                    {
+                        ProductProblem = res1.QuestionType1;
+                        ProcessProblem = res1.QuestionType2;
+                        MaterialProblem = res1.QuestionType3;
+                    }
+                    
+                    SerQuality1(qua1, ProductProblem);
+                    SerQuality2(qua2, ProcessProblem);
+                    SerQuality3(qua3, MaterialProblem);
                 }
             }
             catch (Exception ex)
@@ -346,9 +395,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             }
         }
         #region 生产问题
-        public void SerQuality1(int[] val)
+        public void SerQuality1(int[] val,ObservableCollection<string> xlabel)
         {
             SeriesQuality1[0].Values = val;
+            XAxes1[0].Labels = xlabel;
         }
 
         public ISeries[] SeriesQuality1 { get; set; } = new ISeries[]
@@ -374,8 +424,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         {
             new Axis
             {
-                Labels = new string[] { "螺丝未上紧","3D人脸无效" ,"螺丝漏打" ,"显示屏幕漏光" ,"胶体未打好",
-                    "对讲喇叭无声","执手过于松紧" ,"螺丝打变形" ,"理线错乱" ,"弹簧未装好" },
+            //    Labels = new string[] { "螺丝未上紧","3D人脸无效" ,"螺丝漏打" ,"显示屏幕漏光" ,"胶体未打好",
+            //        "对讲喇叭无声","执手过于松紧" ,"螺丝打变形" ,"理线错乱" ,"弹簧未装好" },
                 LabelsPaint = new SolidColorPaint(new SKColor(100, 100, 100)),
                 LabelsRotation = 90,
                 TextSize = 12,
@@ -396,9 +446,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         };
         #endregion
         #region 工艺问题
-        public void SerQuality2(int[] val)
+        public void SerQuality2(int[] val, ObservableCollection<string> xlabel)
         {
             SeriesQuality2[0].Values = val;
+            XAxes2[0].Labels= xlabel;
         }
 
         public ISeries[] SeriesQuality2 { get; set; } = new ISeries[]
@@ -424,8 +475,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         {
             new Axis
             {
-                Labels = new string[] {"对讲无声","执手问题" ,"壳体脚位不平衡" ,"前板锁芯两孔位不一致" ,"后板显示屏水印",
-                    "电池异常耗电","喷漆过厚导致组装困难" ,"设计线路太长" ,"执手靠垫片改善" ,"锁芯顶杆没固定位置"},
+                //Labels = new string[] {"对讲无声","执手问题" ,"壳体脚位不平衡" ,"前板锁芯两孔位不一致" ,"后板显示屏水印",
+                //    "电池异常耗电","喷漆过厚导致组装困难" ,"设计线路太长" ,"执手靠垫片改善" ,"锁芯顶杆没固定位置"},
                 LabelsPaint = new SolidColorPaint(new SKColor(100, 100, 100)),
                 LabelsRotation = 90,
                 TextSize = 12,
@@ -446,9 +497,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         };
         #endregion
         #region 物料问题
-        public void SerQuality3(int[] val)
+        public void SerQuality3(int[] val, ObservableCollection<string> xlabel)
         {
             SeriesQuality3[0].Values = val;
+            XAxes3[0].Labels= xlabel;
         }
 
         public ISeries[] SeriesQuality3 { get; set; } = new ISeries[]
@@ -474,8 +526,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         {
             new Axis
             {
-                Labels = new string[] {"面板变形","电机异常" ,"屏幕异常" ,"物料毛刺" ,"大屏上支架变形",
-                    "壳料划痕","显示屏水印" , "壳体脚位不平横" ,"装饰圈气泡脱皮" ,"电池异常"},
+                //Labels = new string[] {"面板变形","电机异常" ,"屏幕异常" ,"物料毛刺" ,"大屏上支架变形",
+                //    "壳料划痕","显示屏水印" , "壳体脚位不平横" ,"装饰圈气泡脱皮" ,"电池异常"},
                 LabelsPaint = new SolidColorPaint(new SKColor(100, 100, 100)),
                 LabelsRotation = 90,
                 TextSize = 12,

+ 234 - 126
LogForceTestApp.Modules.MainModule/ViewModels/MainPageViewModel.cs

@@ -59,6 +59,11 @@ using System.Windows.Forms;
 using Application = System.Windows.Application;
 using LogoForceTestApp.Modules.MainModule.Views;
 using HslCommunication.BasicFramework;
+using Prism.Ioc;
+using System.Linq;
+using LogoForceTestApp.Modules.MainModule.Method;
+using System.Net.Sockets;
+using System.Xml.Linq;
 
 namespace LogoForceTestApp.Modules.MainModule.ViewModels
 {
@@ -84,7 +89,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         private readonly Dictionary<int, string> SignalMapper;
         private bool _firstStart = true;
         private ResettableTimer _resettableTimer;
-
+        private readonly IContainerProvider _container;
         public ObservableCollection<InformationNew> InforNew { get; set; }
 
 
@@ -104,13 +109,14 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             set { _connected = value; }
         }
 
+        
 
         public DelegateCommand QRCommand { get; set; }
         public DelegateCommand HouseCommand { get; set; }
         public DelegateCommand OutWorkCommand { get; set; }
         public DelegateCommand OrderCommand { get; set; }
-        //public string SelectedOrderName { get; set; }
-        //public ObservableCollection<string> OrderNames { get; set; }
+        public string SelectedClientName { get; set; }
+        public ObservableCollection<string> ClientNames { get; set; }
         public string Order { get; set; }
 
         public string LackHouse { get; set; }
@@ -183,6 +189,20 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         public ObservableCollection<string> listMaterial13 { get; set; }
         public ObservableCollection<string> listMaterial14 { get; set; }
         #endregion
+
+        private MulProductModel _Products;
+        public MulProductModel Products
+        {
+            get { return _Products; }
+            set { SetProperty(ref _Products, value); }
+        }
+        private CustomerInfor _Customer;
+        public CustomerInfor Customer
+        {
+            get { return _Customer; }
+            set { SetProperty(ref _Customer, value); }
+        }
+
         public string ProductCode { get; set; }
 
         string soleNum = null;
@@ -195,7 +215,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         public MainPageViewModel(IHttpClientFactory httpClientFactory, IScanService scanService,
             IModbusTcpSlaverService modbusTcpSlaverService, IStateService stateService, IRepository repository,
                 IWritableOptions<AppSettings> appSttings, IEventAggregator eventAggregator, PLC tcpNet,
-                ILogger logger, IWarningUpdateService warningUpdateService, IDialogService dialogService, TcpService tcpService)
+                ILogger logger, IWarningUpdateService warningUpdateService, IDialogService dialogService, TcpService tcpService,
+                IContainerProvider container)
         {
 
             _httpClientFactory = httpClientFactory;
@@ -211,11 +232,24 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             _logger = logger;
             _warningUpdateService = warningUpdateService;
             _dialogService = dialogService;
-            this.tcpService = tcpService;
+            this.tcpService = tcpService; 
+            _container = container;
             InforNew = new ObservableCollection<InformationNew>();
             HouseCommand = new DelegateCommand(UploadHouse);
             OutWorkCommand = new DelegateCommand(UploadOutWork);
             OrderCommand = new DelegateCommand(OrderEnter);
+            
+
+            Products = _container.Resolve<MulProductModel>();
+            if (Products == null)
+            {
+                Products = new MulProductModel();
+            }
+            Customer = _container.Resolve<CustomerInfor>();
+            if (Customer == null)
+            {
+                Customer = new CustomerInfor();
+            }
 
             Connected = tcpNet.Connect();
 
@@ -622,9 +656,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                     q[i] = 0;
                                 }
                             }
-                            //string str = DateTime.Now.ToString("yyyy/MM/dd");
-                            DateTime dt = DateTime.Today;
-                            var list = repository.GetFirstDefault<Quality>(c => c.DateQuality == dt);//查一个值
+                           
+                            var list = repository.GetFirstDefault<Quality>(c => c.QuPCode == Order);//查一个值
                             if (list != null)
                             {
                                 list.Q1 = list.Q1 + q[0];
@@ -666,7 +699,9 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                 var item = new Quality()
                                 {
                                     Id = Guid.NewGuid(),
-                                    DateQuality = dt,
+                                    DateQuality = DateTime.Today,
+                                    QuPCode = Order,
+                                    ProTName =GVariable.ProductTypeName,
                                     Q1 = q[0],
                                     Q2 = q[1],
                                     Q3 = q[2],
@@ -744,8 +779,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                     q[i] = 0;
                                 }
                             }
-                            DateTime dt = DateTime.Today;
-                            var list = repository.GetFirstDefault<Quality>(c => c.DateQuality == dt);//查一个值
+                            var list = repository.GetFirstDefault<Quality>(c => c.QuPCode == Order);//查一个值
                             if (list != null)
                             {
                                 list.Q1 = list.Q1 + q[0];
@@ -787,7 +821,9 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                 var item = new Quality()
                                 {
                                     Id = Guid.NewGuid(),
-                                    DateQuality = dt,
+                                    DateQuality = DateTime.Today,
+                                    QuPCode = Order,
+                                    ProTName = GVariable.ProductTypeName,
                                     Q1 = q[0],
                                     Q2 = q[1],
                                     Q3 = q[2],
@@ -865,8 +901,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                     q[i] = 0;
                                 }
                             }
-                            DateTime dt = DateTime.Today;
-                            var list = repository.GetFirstDefault<Quality>(c => c.DateQuality == dt);//查一个值
+                            var list = repository.GetFirstDefault<Quality>(c => c.QuPCode == Order);//查一个值
                             if (list != null)
                             {
                                 list.Q1 = list.Q1 + q[0];
@@ -908,7 +943,9 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                 var item = new Quality()
                                 {
                                     Id = Guid.NewGuid(),
-                                    DateQuality = dt,
+                                    DateQuality = DateTime.Today,
+                                    QuPCode = Order,
+                                    ProTName = GVariable.ProductTypeName,
                                     Q1 = q[0],
                                     Q2 = q[1],
                                     Q3 = q[2],
@@ -986,8 +1023,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                     q[i] = 0;
                                 }
                             }
-                            DateTime dt = DateTime.Today;
-                            var list = repository.GetFirstDefault<Quality>(c => c.DateQuality == dt);//查一个值
+                            var list = repository.GetFirstDefault<Quality>(c => c.QuPCode == Order);//查一个值
                             if (list != null)
                             {
                                 list.Q1 = list.Q1 + q[0];
@@ -1029,7 +1065,9 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                 var item = new Quality()
                                 {
                                     Id = Guid.NewGuid(),
-                                    DateQuality = dt,
+                                    DateQuality = DateTime.Today,
+                                    QuPCode = Order,
+                                    ProTName = GVariable.ProductTypeName,
                                     Q1 = q[0],
                                     Q2 = q[1],
                                     Q3 = q[2],
@@ -1114,7 +1152,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                     ProNo = "",
                                     ProCode = sp,
                                     OrderNo = "",
-                                    TestResult = "维修"
+                                    TestResult = "维修",
+                                    WorkDev = "1号维修机"
                                 };
                                 var product = new Information()
                                 {
@@ -1127,13 +1166,14 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                     ProNo = productNew.ProNo,
                                     ProCode = productNew.ProCode,
                                     OrderNo = productNew.OrderNo,
-                                    TestResult = productNew.TestResult
+                                    TestResult = productNew.TestResult,
+                                    WorkDev = productNew.WorkDev
                                 };
 
                                 InforNew.Add(productNew);
                                 _repository.Add(product);
                             }));
-                                WriteCSV_Repair(Operator19, sp, wu);
+                                WriteCSV_Repair(Operator19,SelectedClientName, sp, wu);
                                 client.Send("Rep:维修信息上传成功");
                                 WriteLog("维修1#维修信息上传成功");
                                 try
@@ -1188,7 +1228,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                         ProNo = "",
                                         ProCode = sp,
                                         OrderNo = "",
-                                        TestResult = "维修"
+                                        TestResult = "维修",
+                                        WorkDev = "2号维修机"
                                     };
                                     var product = new Information()
                                     {
@@ -1201,13 +1242,14 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                         ProNo = productNew.ProNo,
                                         ProCode = productNew.ProCode,
                                         OrderNo = productNew.OrderNo,
-                                        TestResult = productNew.TestResult
+                                        TestResult = productNew.TestResult,
+                                        WorkDev = productNew.WorkDev,
                                     };
 
                                     InforNew.Add(productNew);
                                     _repository.Add(product);
                                 }));
-                                WriteCSV_Repair(Operator20, sp, wu);
+                                WriteCSV_Repair(Operator20, SelectedClientName, sp, wu);
                                 client.Send("Rep:维修信息上传成功");
                                 WriteLog("维修2#维修信息上传成功");
                                 try
@@ -1262,7 +1304,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                         ProNo = "",
                                         ProCode = sp,
                                         OrderNo = "",
-                                        TestResult = "维修"
+                                        TestResult = "维修",
+                                        WorkDev = "3号维修机"
                                     };
                                     var product = new Information()
                                     {
@@ -1275,13 +1318,14 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                         ProNo = productNew.ProNo,
                                         ProCode = productNew.ProCode,
                                         OrderNo = productNew.OrderNo,
-                                        TestResult = productNew.TestResult
+                                        TestResult = productNew.TestResult,
+                                        WorkDev = productNew.WorkDev,
                                     };
 
                                     InforNew.Add(productNew);
                                     _repository.Add(product);
                                 }));
-                                WriteCSV_Repair(Operator21, sp, wu);
+                                WriteCSV_Repair(Operator21, SelectedClientName, sp, wu);
                                 client.Send("Rep:维修信息上传成功");
                                 WriteLog("维修3#维修信息上传成功");
                                 try
@@ -1383,6 +1427,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             myBackUpThread.Start();
         }
 
+        
+
         public void Bind(string procode)
         {
             var res = _repository.GetAllQuery<Information>(c => c.ProNo == soleNum);
@@ -1417,7 +1463,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = "",
                             ProCode = sp,
                             OrderNo = Order,
-                            TestResult = result
+                            TestResult = result,
+                            WorkDev = "检测机台"
                         };
                         var product = new Information()
                         {
@@ -1430,7 +1477,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev,
                         };
 
                         InforNew.Add(productNew);
@@ -1554,7 +1602,16 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         }
         #endregion
 
-        bool mybool = false;
+        //public string ShowClient()
+        //{
+        //    //Customer.CustomerName.Add("AAAAA");
+        //    //Customer.CustomerName.Add("BBBBB");
+        //    //Customer.CustomerName.Add("CCCCC");
+        //    //Customer.WriteConfig();
+        //    Customer.ReadConfig();
+        //    ClientNames = Customer.CustomerName;
+        //    return SelectedClientName;
+        //}
 
 
         private async void _timer_Elapsed1()
@@ -1570,6 +1627,9 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             tcpNet.WriteInt(1500, 0);
                         }
                     }
+
+                    Customer.ReadConfig();
+                    ClientNames = Customer.CustomerName;
                 }
                 catch (Exception ex)
                 {
@@ -1625,7 +1685,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
         {
             try
             {
-                fbarcode.Clear();
+                Order=Order.ToUpper();
+
                 Quest(Order);
 
                 var customRepo = new CustomRepository();
@@ -1652,10 +1713,9 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                 ErrS = 0
                             };
                             _repository.Add(outp);
-                            //
-                            Task.Factory.StartNew(PrintCode, TaskCreationOptions.LongRunning);
-
-                            //
+                            
+                            //Task.Factory.StartNew(PrintCode, TaskCreationOptions.LongRunning);//打印产品码
+                            
                             var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == DateTime.Today);
                             if (allnumbers != null)
                             {
@@ -1689,6 +1749,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             try
             {
                 //打印产品码
+                fbarcode.Clear();
                 var customRepo = new CustomRepository();
                 var t_pda = customRepo.GetAllQuery<t_PDABarCodeSign>(c => c.FBillNo == Order);
                 if (t_pda != null)
@@ -1795,6 +1856,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                 _logger.Error("SendPro:" + ex);
             }
         }
+
         string p1 = null, p2 = null, p3 = null, p4 = null, p5 = null, p6 = null, p7 = null,
             p8 = null, p9 = null, p10 = null, p11 = null, p12 = null, p13 = null, p14 = null;
 
@@ -1836,7 +1898,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev="1号机台"
                         };
                         var product = new Information()
                         {
@@ -1849,10 +1912,11 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev=productNew.WorkDev
                         };
 
-                        WriteCSV_Pro(Operator1, pno, proName, Order, Material1);
+                        WriteCSV_Pro(Operator1, "1号机台", pno, proName, Order, Material1);
                         InforNew.Add(productNew);
                         _repository.Add(product);
                         OperatorName(operName);
@@ -1893,7 +1957,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev = "2号机台"
                         };
                         var product = new Information()
                         {
@@ -1906,9 +1971,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator2, pno, proName, Order, Material2);
+                        WriteCSV_Pro(Operator2, "2号机台", pno, proName, Order, Material2);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -1948,7 +2014,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev = "3号机台"
                         };
                         var product = new Information()
                         {
@@ -1961,9 +2028,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev,
                         };
-                        WriteCSV_Pro(Operator3, pno, proName, Order, Material3);
+                        WriteCSV_Pro(Operator3, "3号机台",pno, proName, Order, Material3);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2003,7 +2071,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev = "4号机台"
                         };
                         var product = new Information()
                         {
@@ -2016,9 +2085,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator4, pno, proName, Order, Material4);
+                        WriteCSV_Pro(Operator4, "4号机台", pno, proName, Order, Material4);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2058,7 +2128,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev = "5号机台"
                         };
                         var product = new Information()
                         {
@@ -2071,9 +2142,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator5, pno, proName, Order, Material5);
+                        WriteCSV_Pro(Operator5, "5号机台", pno, proName, Order, Material5);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2113,7 +2185,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev = "6号机台"
                         };
                         var product = new Information()
                         {
@@ -2126,9 +2199,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator6, pno, proName, Order, Material6);
+                        WriteCSV_Pro(Operator6, "6号机台", pno, proName, Order, Material6);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2168,7 +2242,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev = "7号机台"
                         };
                         var product = new Information()
                         {
@@ -2181,9 +2256,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator7, pno, proName, Order, Material7);
+                        WriteCSV_Pro(Operator7, "7号机台", pno, proName, Order, Material7);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2223,7 +2299,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev = "8号机台"
                         };
                         var product = new Information()
                         {
@@ -2236,9 +2313,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator8, pno, proName, Order, Material8);
+                        WriteCSV_Pro(Operator8, "8号机台", pno, proName, Order, Material8);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2278,7 +2356,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev = "9号机台"
                         };
                         var product = new Information()
                         {
@@ -2291,9 +2370,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator9, pno, proName, Order, Material9);
+                        WriteCSV_Pro(Operator9, "9号机台", pno, proName, Order, Material9);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2333,7 +2413,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev = "10号机台"
                         };
                         var product = new Information()
                         {
@@ -2346,9 +2427,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator10, pno, proName, Order, Material10);
+                        WriteCSV_Pro(Operator10, "10号机台", pno, proName, Order, Material10);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2388,7 +2470,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev = "11号机台"
                         };
                         var product = new Information()
                         {
@@ -2401,9 +2484,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev,
                         };
-                        WriteCSV_Pro(Operator11, pno, proName, Order, Material11);
+                        WriteCSV_Pro(Operator11, "11号机台", pno, proName, Order, Material11);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2443,7 +2527,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev = "12号机台"
                         };
                         var product = new Information()
                         {
@@ -2456,9 +2541,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev,
                         };
-                        WriteCSV_Pro(Operator12, pno, proName, Order, Material12);
+                        WriteCSV_Pro(Operator12, "12号机台", pno, proName, Order, Material12);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2498,7 +2584,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = pno,
                             ProCode = "",
                             OrderNo = Order,
-                            TestResult = ""
+                            TestResult = "",
+                            WorkDev = "13号机台"
                         };
                         var product = new Information()
                         {
@@ -2511,9 +2598,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             ProNo = productNew.ProNo,
                             ProCode = productNew.ProCode,
                             OrderNo = productNew.OrderNo,
-                            TestResult = productNew.TestResult
+                            TestResult = productNew.TestResult,
+                            WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator13, pno, proName, Order, Material13);
+                        WriteCSV_Pro(Operator13, "13号机台", pno, proName, Order, Material13);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2555,7 +2643,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                 ProNo = pno,
                                 ProCode = "",
                                 OrderNo = Order,
-                                TestResult = ""
+                                TestResult = "",
+                                WorkDev = "14号机台"
                             };
                             var product = new Information()
                             {
@@ -2568,9 +2657,10 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                 ProNo = productNew.ProNo,
                                 ProCode = productNew.ProCode,
                                 OrderNo = productNew.OrderNo,
-                                TestResult = productNew.TestResult
+                                TestResult = productNew.TestResult,
+                                WorkDev = productNew.WorkDev
                             };
-                            WriteCSV_Pro(Operator14, pno, proName, Order, Material14);
+                            WriteCSV_Pro(Operator14, "14号机台", pno, proName, Order, Material14);
                             _repository.Add(product);
                             InforNew.Add(productNew);
                             OperatorName(operName);
@@ -2779,6 +2869,12 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                 {
                     //切换产品
                     int type = tcpNet.ReadInt(1000);
+                    var currentProduct = Products.ProductCollection.FirstOrDefault(p => p.NameNumber == type);
+                    if (currentProduct != null)
+                    {
+                        GVariable.ProductTypeName = currentProduct.Name;
+                    }
+
                     if (a != type && type != -1)
                     {
                         Change();
@@ -2808,33 +2904,41 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             string time = ts.TotalMinutes.ToString("0.00");	//将时间差转换为分钟
             return time;
         }
+
+        
         public void Change()
         {
             int type = tcpNet.ReadInt(1000);
-            switch (type)
-            {
-                case 1:
-                    proName = "P60";
-                    break;
-                case 2:
-                    proName = "P70";
-                    break;
-                case 3:
-                    proName = "P80";
-                    break;
-                case 4:
-                    proName = "P90";
-                    break;
-                case 5:
-                    proName = "T29";
-                    break;
-                case 6:
-                    proName = "DH-88";
-                    break;
-                case 7:
-                    proName = "QL-1";
-                    break;
+            var currentProduct = Products.ProductCollection.FirstOrDefault(p => p.NameNumber == type);
+            if (currentProduct != null)
+            {
+                proName = currentProduct.Name;
+                GVariable.ProductTypeName = proName;
             }
+            //switch (type)
+            //{
+            //    case 1:
+            //        proName = "P60";
+            //        break;
+            //    case 2:
+            //        proName = "P70";
+            //        break;
+            //    case 3:
+            //        proName = "P80";
+            //        break;
+            //    case 4:
+            //        proName = "P90";
+            //        break;
+            //    case 5:
+            //        proName = "T29";
+            //        break;
+            //    case 6:
+            //        proName = "DH-88";
+            //        break;
+            //    case 7:
+            //        proName = "QL-1";
+            //        break;
+            //}
             if (tcpNet.ReadBool("1001.0"))
             {
                 SendPro("192.168.10.1", proName);
@@ -2967,11 +3071,11 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
 
         #region WriteCSV
         //生产信息
-        public void WriteCSV_Pro(string idPeople, string proNo, string proType, string order, string Wu)
+        public void WriteCSV_Pro(string idPeople, string devNum,string proNo, string proType, string order, string Wu)
         {
             string s1, s2, s3, s4,
-                s11, s12, s13, s14, s15, s16,
-                s21, s22, s23, s24, s25, s26;
+                s11, s12, s13, s14, s15, s16, s17,
+                s21, s22, s23, s24, s25, s26, s27;
             //
             string path = "D:\\Result\\生产信息\\";
             if (!Directory.Exists(path))
@@ -2981,22 +3085,24 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             //
             s11 = "时间";
             s12 = "人员ID";
-            s13 = "产品编号";
-            s14 = "产品类型";
-            s15 = "订单编号";
-            s16 = "物料码";
+            s13 = "作业机台";
+            s14 = "产品编号";
+            s15 = "产品类型";
+            s16 = "订单编号";
+            s17 = "物料码";
             //
             s21 = DateTime.Now.ToString("HH:mm:ss");
             s22 = idPeople;
-            s23 = proNo;
-            s24 = proType;
-            s25 = order;
-            s26 = Wu;
+            s23 = devNum;
+            s24 = proNo;
+            s25 = proType;
+            s26 = order;
+            s27 = Wu;
             //=========================
             s1 = path;
             s2 = DateTime.Now.ToString("yyyyMMdd"); //表格命名以天记录
-            s3 = s11 + "," + s12 + "," + s13;
-            s4 = s21 + "," + s22 + "," + s23;
+            s3 = s11 + "," + s12 + "," + s13 + "," + s14 + "," + s15 + "," + s16 + "," + s17;
+            s4 = s21 + "," + s22 + "," + s23 + "," + s24 + "," + s25 + "," + s26 + "," + s27;
             //
             DataHelp.Save(s1, s2, s3, s4);
         }
@@ -3028,8 +3134,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             //=========================
             s1 = path;
             s2 = DateTime.Now.ToString("yyyyMMdd"); //表格命名以天记录
-            s3 = s11 + "," + s12 + "," + s13;
-            s4 = s21 + "," + s22 + "," + s23;
+            s3 = s11 + "," + s12 + "," + s13 + "," + s14 + "," + s15;
+            s4 = s21 + "," + s22 + "," + s23 + "," + s24 + "," + s25;
             //
             DataHelp.Save(s1, s2, s3, s4);
         }
@@ -3059,18 +3165,18 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             //=========================
             s1 = path;
             s2 = DateTime.Now.ToString("yyyyMMdd"); //表格命名以天记录
-            s3 = s11 + "," + s12 + "," + s13;
-            s4 = s21 + "," + s22 + "," + s23;
+            s3 = s11 + "," + s12 + "," + s13 + "," + s14;
+            s4 = s21 + "," + s22 + "," + s23 + "," + s24;
             //
             DataHelp.Save(s1, s2, s3, s4);
         }
 
         //维修信息
-        public void WriteCSV_Repair(string idPeople, string proCode, string wu)
+        public void WriteCSV_Repair(string idPeople,string client, string proCode, string wu)
         {
             string s1, s2, s3, s4,
-                s11, s12, s13, s14,
-                s21, s22, s23, s24;
+                s11, s12, s13, s14, s15,
+                s21, s22, s23, s24, s25;
             //
             string path = "D:\\Result\\维修信息\\";
             if (!Directory.Exists(path))
@@ -3080,18 +3186,20 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             //
             s11 = "时间";
             s12 = "维修人员id";
-            s13 = "产品码";
-            s14 = "维修物料";
+            s13 = "客户";
+            s14 = "产品码";
+            s15 = "维修物料";
             //
             s21 = DateTime.Now.ToString("HH:mm:ss");
             s22 = idPeople;
-            s23 = proCode;
-            s24 = wu;
+            s23 = client;
+            s24 = proCode;
+            s25 = wu;
             //=========================
             s1 = path;
             s2 = DateTime.Now.ToString("yyyyMMdd"); //表格命名以天记录
-            s3 = s11 + "," + s12 + "," + s13;
-            s4 = s21 + "," + s22 + "," + s23;
+            s3 = s11 + "," + s12 + "," + s13 + "," + s14 + "," + s15;
+            s4 = s21 + "," + s22 + "," + s23 + "," + s24 + "," + s25;
             //
             DataHelp.Save(s1, s2, s3, s4);
         }

+ 173 - 42
LogForceTestApp.Modules.MainModule/Views/AccountPage.xaml

@@ -1,54 +1,185 @@
 <UserControl x:Class="LogoForceTestApp.Modules.MainModule.Views.AccountPage"
              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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:LogoForceTestApp.Modules.MainModule.Views"
              xmlns:hc="https://handyorg.github.io/handycontrol"
-             mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800">
+             mc:Ignorable="d">
     <Grid>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition />
-            <ColumnDefinition />
-            <ColumnDefinition />
-        </Grid.ColumnDefinitions>
         <Grid.RowDefinitions>
+            <RowDefinition Height="80" />
             <RowDefinition />
-            <RowDefinition />
+            <RowDefinition Height="80" />
         </Grid.RowDefinitions>
-        <GroupBox Header="修改密码">
-            <StackPanel>
-            <hc:TextBox  hc:InfoElement.Necessary="True"
-                         hc:InfoElement.Placeholder="请输入账户ID"
-                         hc:InfoElement.ShowClearButton="True"
-                         hc:InfoElement.Title="账   户"
-                         hc:InfoElement.TitlePlacement="Left"
-                         hc:InfoElement.TitleWidth="80"
-                         Width="350"
-                         Margin="0,16,0,0" 
-                         Height="35"
-                         FontSize="18"
-                         Text="{Binding IdAcc}"/>
-            <hc:TextBox  hc:InfoElement.Necessary="True"
-                         hc:InfoElement.Placeholder="请输入密码"
-                         hc:InfoElement.ShowClearButton="True"
-                         hc:InfoElement.Title="密   码"
-                         hc:InfoElement.TitlePlacement="Left"
-                         hc:InfoElement.TitleWidth="80"
-                         Width="350"
-                         Margin="0,16,0,0"
-                         Height="35"
-                         FontSize="18"
-                         Text="{Binding ChangeP}"/>
-                <Button Width="100"
-                        Height="38"
-                        Margin="0,16,4,0"
-                        Command="{Binding PasswordCommand}"
-                        Content="修改密码"
-                        IsDefault="True"
-                        FontSize="18"/>
+
+        <StackPanel Orientation="Horizontal"
+                    VerticalAlignment="Center"
+                    HorizontalAlignment="Center">
+            <TextBlock Text="产品型号:"
+                       FontSize="16"
+                       Margin="10"
+                       VerticalAlignment="Center"
+                       HorizontalAlignment="Center" />
+            <TextBox FontSize="16"
+                     Margin="10"
+                     Width="200"
+                     Height="30"
+                     VerticalAlignment="Center"
+                     HorizontalAlignment="Center"
+                     Text="{Binding PTName}"/>
+            <TextBlock Text="序号:"
+                       FontSize="16"
+                       Margin="10"
+                       VerticalAlignment="Center"
+                       HorizontalAlignment="Center" />
+            <TextBox FontSize="16"
+                     Margin="10"
+                     Width="100"
+                     Height="30"
+                     VerticalAlignment="Center"
+                     HorizontalAlignment="Center"
+                     Text="{Binding PTNameNumber}" />
+            <Button Content="获取当前产品质量问题"
+                    Width="200"
+                    Height="40"
+                    FontSize="16"
+                    Margin="10"
+                    Command="{Binding AcquireCmm}"/>
+        </StackPanel>
+
+        <Grid Grid.Row="1">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition />
+                <ColumnDefinition />
+                <ColumnDefinition />
+            </Grid.ColumnDefinitions>
+            <StackPanel Orientation="Vertical"
+                        Margin="20">
+                <TextBlock Text="生产问题"
+                           FontSize="16"
+                           Margin="5"
+                           VerticalAlignment="Center"
+                           HorizontalAlignment="Center" />
+                <ListBox Width="500"
+                         Height="550"
+                         Margin="5" 
+                         Name="listBox1"
+                         ItemsSource="{Binding Question1}"
+                         SelectedIndex="{Binding Selected1}"/>
+                <Button Content="删除"
+                        Width="60"
+                        Height="35"
+                        FontSize="16"
+                        Margin="5"
+                        Command="{Binding RemoveQuestion1Command}"/>
+                <StackPanel Orientation="Horizontal"
+                            Margin="5">
+                    <TextBox Width="400"
+                             Height="30"
+                             Margin="10,0"
+                             Name="textBox1"
+                             Text="{Binding Text1}"/>
+                    <Button Content="添加"
+                            Width="60"
+                            Height="35"
+                            FontSize="16"
+                            Margin="10,0"
+                            Command="{Binding AddQuesetion1}"
+                            CommandParameter="{Binding ElementName=textBox1,Path=Text}" />
+                </StackPanel>
+            </StackPanel>
+
+            <StackPanel Orientation="Vertical"
+                        Margin="20"
+                        Grid.Column="1">
+                <TextBlock Text="工艺问题"
+                           FontSize="16"
+                           Margin="5"
+                           VerticalAlignment="Center"
+                           HorizontalAlignment="Center" />
+                <ListBox Width="500"
+                         Height="550"
+                         Margin="5"
+                         Name="listBox2"
+                         ItemsSource="{Binding Question2}"
+                         SelectedIndex="{Binding Selected2}" />
+                <Button Content="删除"
+                        Width="60"
+                        Height="35"
+                        FontSize="16"
+                        Margin="5"
+                        Command="{Binding RemoveQuestion2Command}" />
+                <StackPanel Orientation="Horizontal"
+                            Margin="5">
+                    <TextBox Width="400"
+                             Height="30"
+                             Margin="10,0"
+                             Name="textBox2"
+                             Text="{Binding Text2}" />
+                    <Button Content="添加"
+                            Width="60"
+                            Height="35"
+                            FontSize="16"
+                            Margin="10,0"
+                            Command="{Binding AddQuesetion2}"
+                            CommandParameter="{Binding ElementName=textBox2,Path=Text}" />
+                </StackPanel>
+            </StackPanel>
+
+            <StackPanel Orientation="Vertical"
+                        Margin="20"
+                        Grid.Column="2">
+                <TextBlock Text="物料问题"
+                           FontSize="16"
+                           Margin="5"
+                           VerticalAlignment="Center"
+                           HorizontalAlignment="Center" />
+                <ListBox Width="500"
+                         Height="550"
+                         Margin="5"
+                         Name="listBox3"
+                         ItemsSource="{Binding Question3}"
+                         SelectedIndex="{Binding Selected3}" />
+                <Button Content="删除"
+                        Width="60"
+                        Height="35"
+                        FontSize="16"
+                        Margin="5"
+                        Command="{Binding RemoveQuestion3Command}"/>
+                <StackPanel Orientation="Horizontal"
+                            Margin="5">
+                    <TextBox Width="400"
+                             Height="30"
+                             Margin="10,0"
+                             Name="textBox3"
+                             Text="{Binding Text3}" />
+                    <Button Content="添加"
+                            Width="60"
+                            Height="35"
+                            FontSize="16"
+                            Margin="10,0"
+                            Command="{Binding AddQuesetion3}"
+                            CommandParameter="{Binding ElementName=textBox3,Path=Text}" />
+                </StackPanel>
             </StackPanel>
-        </GroupBox>
+        </Grid>
+        <StackPanel Grid.Row="2"
+                    Orientation="Horizontal"
+                    VerticalAlignment="Center"
+                    HorizontalAlignment="Center">
+            <Button Content="修改"
+                    Width="80"
+                    Height="40"
+                    FontSize="16"
+                    Margin="10"
+                    Command="{Binding ModificationCmm}"/>
+            <Button Content="添加"
+                    Width="80"
+                    Height="40"
+                    FontSize="16"
+                    Margin="10" 
+                    Command="{Binding AddCmm}"/>
+        </StackPanel>
     </Grid>
 </UserControl>

+ 2 - 0
LogForceTestApp.Modules.MainModule/Views/AccountPage.xaml.cs

@@ -24,5 +24,7 @@ namespace LogoForceTestApp.Modules.MainModule.Views
         {
             InitializeComponent();
         }
+
+        
     }
 }

+ 9 - 0
LogForceTestApp.Modules.MainModule/Views/DataPage.xaml

@@ -30,6 +30,14 @@
             <hc:DatePicker Margin="4,0"
                            hc:InfoElement.Title="选择结束时间"
                            SelectedDate="{Binding EndDate}" />
+            <TextBlock Text="订单:"
+                       Margin="5"
+                       FontSize="16"
+                       VerticalAlignment="Center" />
+            <TextBox Width="100"
+                     Height="35"
+                     Margin="5"
+                     Text="{Binding BillNo}" />
             <Button Margin="5"
                     VerticalAlignment="Center"
                     Command="{Binding ChartCommand}"
@@ -37,6 +45,7 @@
                     Height="35"
                     Content="生成报表" />
         </StackPanel>
+        
         <Border Grid.Row="1"
                 BorderThickness="1"
                 BorderBrush="#7F82BB">

+ 120 - 89
LogForceTestApp.Modules.MainModule/Views/MainPage.xaml

@@ -72,19 +72,22 @@
                           IsReadOnly="True"
                           ItemsSource="{Binding InforNew}">
                     <DataGrid.Columns>
-                        <DataGridTextColumn Width="*"
-                                            Binding="{Binding ProNo}"
-                                            Header="产品编号" />
                         <DataGridTextColumn Width="*"
                                             Binding="{Binding OperatorCode}"
                                             Header="员工ID" />
                         <DataGridTextColumn Width="*"
-                                            Binding="{Binding SpendTime}"
-                                            Header="用时" />
+                                            Binding="{Binding WorkDev}"
+                                            Header="作业机台" />
+                        <DataGridTextColumn Width="*"
+                                            Binding="{Binding OrderNo}"
+                                            Header="订单编号" />
                         <DataGridTextColumn Width="*"
                                             Binding="{Binding ProType}"
                                             Header="产品类型" />
                         <DataGridTextColumn Width="*"
+                                            Binding="{Binding SpendTime}"
+                                            Header="用时" />
+                        <DataGridTextColumn Width="1.5*"
                                             Binding="{Binding ItemCode}"
                                             Header="物料码" />
                     </DataGrid.Columns>
@@ -132,75 +135,75 @@
                     </Grid.RowDefinitions>
                     <!--#region 线边仓 -->
                     <Border BorderThickness="0,0,0,1"
-                            BorderBrush="#6A5ACD"
+                            BorderBrush="LightGray"
                             Grid.Row="0">
                         <Grid>
-                        <Grid.ColumnDefinitions>
-                            <ColumnDefinition />
-                            <ColumnDefinition />
-                        </Grid.ColumnDefinitions>
-                        <Grid.RowDefinitions>
-                            <RowDefinition />
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition />
+                                <ColumnDefinition />
+                            </Grid.ColumnDefinitions>
+                            <Grid.RowDefinitions>
+                                <RowDefinition />
                                 <RowDefinition />
                             </Grid.RowDefinitions>
-                        <StackPanel Orientation="Horizontal"
-                                    Grid.Column="0"
-                                    Grid.Row="0">
-                            <TextBlock Text="缺料订单数"
-                                       VerticalAlignment="Center"
-                                       FontSize="20"
-                                       Margin="5" />
-                            <TextBox Width="200"
-                                     Height="40"
-                                     FontSize="20"
-                                     VerticalAlignment="Center"
-                                     Margin="5"
-                                     Text="{Binding LackHouse,UpdateSourceTrigger=PropertyChanged}" />
-                        </StackPanel>
-                        <StackPanel Orientation="Horizontal"
+                            <StackPanel Orientation="Horizontal"
+                                        Grid.Column="0"
+                                        Grid.Row="0">
+                                <TextBlock Text="缺料订单数"
+                                           VerticalAlignment="Center"
+                                           FontSize="16"
+                                           Margin="5" />
+                                <TextBox Width="200"
+                                         Height="40"
+                                         FontSize="16"
+                                         VerticalAlignment="Center"
+                                         Margin="5"
+                                         Text="{Binding LackHouse,UpdateSourceTrigger=PropertyChanged}" />
+                            </StackPanel>
+                            <StackPanel Orientation="Horizontal"
+                                        Grid.Column="1"
+                                        Grid.Row="0">
+                                <TextBlock Text="已领料订单数"
+                                           VerticalAlignment="Center"
+                                           FontSize="16"
+                                           Margin="5" />
+                                <TextBox Width="200"
+                                         Height="40"
+                                         FontSize="16"
+                                         VerticalAlignment="Center"
+                                         Margin="5"
+                                         Text="{Binding UsedHouse,UpdateSourceTrigger=PropertyChanged}" />
+                            </StackPanel>
+                            <StackPanel Orientation="Horizontal"
+                                        Grid.Column="0"
+                                        Grid.Row="1">
+                                <TextBlock Text="当日订单数"
+                                           VerticalAlignment="Center"
+                                           FontSize="16"
+                                           Margin="5" />
+                                <TextBox Width="200"
+                                         Height="40"
+                                         FontSize="16"
+                                         VerticalAlignment="Center"
+                                         Margin="5"
+                                         Text="{Binding TotalHouse,UpdateSourceTrigger=PropertyChanged}" />
+                            </StackPanel>
+                            <Button Content="上传线边仓(当日)"
+                                    VerticalAlignment="Center"
+                                    Margin="5"
+                                    Width="200"
+                                    Height="40"
+                                    FontSize="16"
+                                    Style="{StaticResource BtnStyle}"
+                                    Command="{Binding HouseCommand}"
                                     Grid.Column="1"
-                                    Grid.Row="0">
-                            <TextBlock Text="已领料订单数"
-                                       VerticalAlignment="Center"
-                                       FontSize="20"
-                                       Margin="5" />
-                            <TextBox Width="200"
-                                     Height="40"
-                                     FontSize="20"
-                                     VerticalAlignment="Center"
-                                     Margin="5"
-                                     Text="{Binding UsedHouse,UpdateSourceTrigger=PropertyChanged}" />
-                        </StackPanel>
-                        <StackPanel Orientation="Horizontal"
-                                    Grid.Column="0"
-                                    Grid.Row="1">
-                            <TextBlock Text="当日订单数"
-                                       VerticalAlignment="Center"
-                                       FontSize="20"
-                                       Margin="5" />
-                            <TextBox Width="200"
-                                     Height="40"
-                                     FontSize="20"
-                                     VerticalAlignment="Center"
-                                     Margin="5"
-                                     Text="{Binding TotalHouse,UpdateSourceTrigger=PropertyChanged}" />
-                        </StackPanel>
-                        <Button Content="上传线边仓(当日)"
-                                VerticalAlignment="Center"
-                                Margin="5"
-                                Width="180"
-                                Height="40"
-                                FontSize="20"
-                                Style="{StaticResource BtnStyle}"
-                                Command="{Binding HouseCommand}"
-                                Grid.Column="1"
-                                Grid.Row="1" />
+                                    Grid.Row="1" />
                         </Grid>
                     </Border>
                     <!--#endregion-->
                     <!--#region 出勤 -->
                     <Border BorderThickness="0,0,0,1"
-                            BorderBrush="#6A5ACD"
+                            BorderBrush="LightGray"
                             Grid.Row="1">
                         <Grid>
                             <Grid.ColumnDefinitions>
@@ -216,11 +219,11 @@
                                         Grid.Row="0">
                                 <TextBlock Text="实到人数"
                                            VerticalAlignment="Center"
-                                           FontSize="20"
+                                           FontSize="16"
                                            Margin="5" />
                                 <TextBox Width="200"
                                          Height="40"
-                                         FontSize="20"
+                                         FontSize="16"
                                          VerticalAlignment="Center"
                                          Margin="5"
                                          Text="{Binding ActPer,UpdateSourceTrigger=PropertyChanged}" />
@@ -230,11 +233,11 @@
                                         Grid.Row="0">
                                 <TextBlock Text="请假人数"
                                            VerticalAlignment="Center"
-                                           FontSize="20"
+                                           FontSize="16"
                                            Margin="5" />
                                 <TextBox Width="200"
                                          Height="40"
-                                         FontSize="20"
+                                         FontSize="16"
                                          VerticalAlignment="Center"
                                          Margin="5"
                                          Text="{Binding FallPer,UpdateSourceTrigger=PropertyChanged}" />
@@ -244,11 +247,11 @@
                                         Grid.Row="1">
                                 <TextBlock Text="旷工人数"
                                            VerticalAlignment="Center"
-                                           FontSize="20"
+                                           FontSize="16"
                                            Margin="5" />
                                 <TextBox Width="200"
                                          Height="40"
-                                         FontSize="20"
+                                         FontSize="16"
                                          VerticalAlignment="Center"
                                          Margin="5"
                                          Text="{Binding AbsPer,UpdateSourceTrigger=PropertyChanged}" />
@@ -256,9 +259,9 @@
                             <Button Content="上传出勤信息"
                                     VerticalAlignment="Center"
                                     Margin="5"
-                                    Width="150"
+                                    Width="200"
                                     Height="40"
-                                    FontSize="20"
+                                    FontSize="16"
                                     Style="{StaticResource BtnStyle}"
                                     Command="{Binding OutWorkCommand}"
                                     Grid.Column="1"
@@ -268,7 +271,7 @@
                     <!--#endregion-->
                     <!--#region 当前生产订单 -->
                     <Border BorderThickness="0,0,0,0"
-                            BorderBrush="#6A5ACD"
+                            BorderBrush="LightGray"
                             Grid.Row="2">
                         <Grid>
                             <Grid.ColumnDefinitions>
@@ -277,33 +280,61 @@
                             </Grid.ColumnDefinitions>
                             <Grid.RowDefinitions>
                                 <RowDefinition />
+                                <RowDefinition />
                             </Grid.RowDefinitions>
-                            <!--<hc:ComboBox HorizontalAlignment="Center"
+                            <StackPanel Orientation="Horizontal"
+                                        Grid.Column="0"
+                                        Grid.Row="0"
+                                        HorizontalAlignment="Center"
+                                        VerticalAlignment="Center">
+                                <TextBlock Text="订单"
+                                           VerticalAlignment="Center" />
+                                <TextBox Width="200"
+                                         Height="40"
+                                         FontSize="16"
                                          VerticalAlignment="Center"
-                                         Margin="4,0"
-                                         Width="200"
-                                         SelectedItem="{Binding SelectedOrderName}"
-                                         ItemsSource="{Binding OrderNames}"
-                                         FontSize="20"
-                                         Grid.Column="0"
-                                         Grid.Row="0" />-->
-                            <TextBox Width="200"
-                                     Height="40"
-                                     FontSize="20"
-                                     VerticalAlignment="Center"
-                                     HorizontalAlignment="Center"
-                                     Margin="5"
-                                     Text="{Binding Order,UpdateSourceTrigger=PropertyChanged}" />
+                                         HorizontalAlignment="Center"
+                                         Margin="5"
+                                         Text="{Binding Order,UpdateSourceTrigger=PropertyChanged}" />
+                            </StackPanel>
                             <Button Content="确认当前生产订单"
                                     VerticalAlignment="Center"
                                     Margin="5"
                                     Width="200"
                                     Height="40"
-                                    FontSize="20"
+                                    FontSize="16"
                                     Style="{StaticResource BtnStyle}"
                                     Command="{Binding OrderCommand}"
                                     Grid.Column="1"
                                     Grid.Row="0" />
+
+                            <StackPanel Orientation="Horizontal"
+                                        Grid.Column="0"
+                                        Grid.Row="1"
+                                        HorizontalAlignment="Center"
+                                        VerticalAlignment="Center">
+                                <TextBlock Text="客户"
+                                           VerticalAlignment="Center" />
+                                <hc:ComboBox HorizontalAlignment="Center"
+                                             VerticalAlignment="Center"
+                                             Margin="4,0"
+                                             Width="200"
+                                             Height="40"
+                                             SelectedItem="{Binding SelectedClientName}"
+                                             ItemsSource="{Binding ClientNames}"
+                                             FontSize="16" />
+                            </StackPanel>
+                            <!--<Button Content="添加新客户"
+                                    VerticalAlignment="Center"
+                                    Margin="5"
+                                    Width="200"
+                                    Height="40"
+                                    FontSize="16"
+                                    Style="{StaticResource BtnStyle}"
+                                    Command="{Binding AddClientCommand}"
+                                    Grid.Column="1"
+                                    Grid.Row="1" />-->
+
                         </Grid>
                     </Border>
                     <!--#endregion-->

+ 12 - 6
LogForceTestApp.Modules.MainModule/Views/QualityTracing.xaml

@@ -24,6 +24,10 @@
             <hc:DatePicker Margin="4,0"
                            hc:InfoElement.Title="选择结束时间"
                            SelectedDate="{Binding SelectedEndDate}" />
+            <TextBlock Text="人员ID:"
+                       Margin="5"
+                       FontSize="16"
+                       VerticalAlignment="Center" />
             <TextBox Width="200"
                      VerticalAlignment="Center"
                      FontSize="20"
@@ -36,7 +40,7 @@
                     Content="查询" />
         </StackPanel>
 
-        <GroupBox Header="产品单价(元/个)"
+        <!--<GroupBox Header="产品单价(元/个)"
                   Grid.Row="1">
             <StackPanel Orientation="Horizontal"
                         VerticalAlignment="Center">
@@ -90,7 +94,7 @@
                          Width="100"
                          Height="30" />
             </StackPanel>
-        </GroupBox>
+        </GroupBox>-->
         <GroupBox Header="信息显示"
                   Grid.Row="2">
             <Grid>
@@ -116,7 +120,7 @@
                                FontSize="16"
                                Margin="3"
                                VerticalAlignment="Center" />
-                    <TextBlock Text="P60:"
+                    <!--<TextBlock Text="P60:"
                                FontSize="16"
                                Margin="20,3,0,3"
                                VerticalAlignment="Center" />
@@ -171,9 +175,9 @@
                     <TextBlock Text="{Binding QL1Num}"
                                FontSize="16"
                                Margin="3"
-                               VerticalAlignment="Center" />
+                               VerticalAlignment="Center" />-->
                 </StackPanel>
-                <StackPanel Grid.Column="1"
+                <!--<StackPanel Grid.Column="1"
                             Orientation="Horizontal">
                     <Button Margin="4,0"
                             VerticalAlignment="Center"
@@ -184,7 +188,7 @@
                                FontSize="16"
                                Margin="3"
                                VerticalAlignment="Center" />
-                </StackPanel>
+                </StackPanel>-->
             </Grid>
         </GroupBox>
 
@@ -197,6 +201,8 @@
                                     Header="日期" />
                 <DataGridTextColumn Binding="{Binding OperatorCode}"
                                     Header="员工码" />
+                <DataGridTextColumn Binding="{Binding WorkDev}"
+                                    Header="工作机台" />
                 <DataGridTextColumn Binding="{Binding OrderNo}"
                                     Header="订单编号" />
                 <DataGridTextColumn Binding="{Binding ProType}"

+ 8 - 4
LogForceTestApp.Modules.MainModule/Views/StatementPage.xaml

@@ -30,6 +30,10 @@
             <hc:DatePicker Margin="4,0"
                            hc:InfoElement.Title="选择结束时间"
                            SelectedDate="{Binding SelectedEndDate}" />
+            <TextBlock Text="产品码:"
+                       Margin="5"
+                       FontSize="16"
+                       VerticalAlignment="Center" />
             <TextBox Width="200"
                      VerticalAlignment="Center"
                      FontSize="20"
@@ -48,18 +52,18 @@
             <DataGrid.Columns>
                 <DataGridTextColumn Binding="{Binding CreateTime}"
                                     Header="日期" />
+                <DataGridTextColumn Binding="{Binding OperatorCode}"
+                                    Header="员工ID" />
+                <DataGridTextColumn Binding="{Binding WorkDev}"
+                                    Header="工作机台" />
                 <DataGridTextColumn Binding="{Binding OrderNo}"
                                     Header="订单编号" />
                 <DataGridTextColumn Binding="{Binding ProType}"
                                     Header="产品型号" />
                 <DataGridTextColumn Binding="{Binding ProCode}"
                                     Header="产品码" />
-                <DataGridTextColumn Binding="{Binding ProNo}"
-                                    Header="产品编号" />
                 <DataGridTextColumn Binding="{Binding TestResult}"
                                     Header="检测结果" />
-                <DataGridTextColumn Binding="{Binding OperatorCode}"
-                                    Header="员工码" />
                 <DataGridTextColumn Binding="{Binding SpendTime}"
                                     Header="用时(秒)" />
                 <DataGridTextColumn Binding="{Binding ItemCode}"

+ 1 - 0
LogoForceTestApp/App.xaml.cs

@@ -70,6 +70,7 @@ namespace LogoForceTestApp
         protected override void RegisterTypes(IContainerRegistry containerRegistry)
         {
             containerRegistry.RegisterSingleton<KBWindow>();
+            containerRegistry.RegisterSingleton<MulProductModel>();
             containerRegistry.RegisterInstance(_log);
 
             containerRegistry.RegisterSingleton<IRepository, Repository.Repository>();

+ 51 - 2
LogoForceTestApp/ViewModels/MainWindowViewModel.cs

@@ -14,16 +14,28 @@ using Repository;
 using Team.Utility;
 using System.Reflection;
 using System.Data.SqlClient;
+using Prism.Ioc;
+using System.ComponentModel;
+using DryIoc;
+using System.Linq;
 
 namespace LogoForceTestApp.ViewModels
 {
     public class MainWindowViewModel : BindableBase
     {
-        private string _title = "LogoForceTestApp";
+        private string _title = "江苏新惕姆智能装备有限公司";
         private readonly IRegionManager _regionManager;
         private readonly IEventAggregator _eventAggregator;
         private readonly IRepository _repository;
         private readonly IWritableOptions<AppSettings> _appSettings;
+        private readonly IContainerProvider _container;
+
+        private MulProductModel _Products;
+        public MulProductModel Products
+        {
+            get { return _Products; }
+            set { SetProperty(ref _Products, value); }
+        }
 
         public string Title
         {
@@ -37,6 +49,14 @@ namespace LogoForceTestApp.ViewModels
             get { return _runResultState; }
             set { SetProperty(ref _runResultState, value); }
         }
+
+        private ProductModel _CurrentProduct;
+        public ProductModel CurrentProduct
+        {
+            get { return _CurrentProduct; }
+            set { SetProperty(ref _CurrentProduct, value); }
+        }
+
         public string LoginMessage { get; set; }
         public DelegateCommand LogCommand { get; set; }
         public DelegateCommand DataCommand { get; set; }
@@ -51,8 +71,9 @@ namespace LogoForceTestApp.ViewModels
         public Brush LoinBrush { get; set; }
 
         public MainWindowViewModel(IRegionManager regionManager, IEventAggregator eventAggregator,
-            IRepository repository,IWritableOptions<AppSettings> appSettings)
+            IRepository repository,IWritableOptions<AppSettings> appSettings,IContainerProvider container)
         {
+            _container= container;
             var version=Assembly.GetExecutingAssembly().GetName().Version;
             Title = Title+"-" + version.ToString();
             DataCommand = new DelegateCommand(GoDataPage);
@@ -135,6 +156,34 @@ namespace LogoForceTestApp.ViewModels
             {
                 UpdateLoginMessage();
             });
+            //Products = _container.Resolve<MulProductModel>();
+            //if (Products==null)
+            //{
+            //    Products = new MulProductModel();
+            //}
+            //Products.LoadParame();
+
+
+            //CurrentProduct = Products.ProductCollection.FirstOrDefault(p=>p.Name=="123");
+
+            //Products.ProductCollection.Add(new ProductModel() { Name="123"});
+            //Products.ProductCollection[Products.ProductCollection.Count - 1].QuestionType1.Add("问题1");
+            //Products.ProductCollection[Products.ProductCollection.Count - 1].QuestionType1.Add("问题2");
+            //Products.ProductCollection[Products.ProductCollection.Count - 1].QuestionType1.Add("问题3");
+            //Products.ProductCollection[Products.ProductCollection.Count - 1].QuestionType1.Add("问题4");
+
+            //Products.ProductCollection.Add(new ProductModel() { Name = "321" });
+            //Products.ProductCollection[Products.ProductCollection.Count - 1].QuestionType1.Add("问题1");
+            //Products.ProductCollection[Products.ProductCollection.Count - 1].QuestionType1.Add("问题2");
+            //Products.ProductCollection[Products.ProductCollection.Count - 1].QuestionType1.Add("问题3");
+            //Products.ProductCollection[Products.ProductCollection.Count - 1].QuestionType1.Add("问题4");
+
+            //Products.ProductCollection.Add(new ProductModel() { Name = "234" });
+            //Products.ProductCollection[Products.ProductCollection.Count - 1].QuestionType1.Add("问题1");
+            //Products.ProductCollection[Products.ProductCollection.Count - 1].QuestionType1.Add("问题2");
+            //Products.ProductCollection[Products.ProductCollection.Count - 1].QuestionType1.Add("问题3");
+            //Products.ProductCollection[Products.ProductCollection.Count - 1].QuestionType1.Add("问题4");
+
 
         }
 

+ 5 - 5
LogoForceTestApp/Views/MainWindow.xaml

@@ -83,11 +83,11 @@
                                            Height="80"
                                            Kind="SolidCalendarMinus" />
                 </Button>-->
-                <!--<Button Command="{Binding AccountCommand}">
-                    <icon:PackIconMaterial Width="80"
-                                           Height="80"
-                                           Kind="AccountCog" />
-                </Button>-->
+                <Button Command="{Binding AccountCommand}">
+                    <icon:PackIconBoxIcons Width="80"
+                                                Height="80"
+                                                Kind="RegularDuplicate" />
+                </Button>
             </StackPanel>
 
             <TextBlock Grid.Column="1"

+ 10 - 9
Repository/Entiies/Information.cs

@@ -9,14 +9,15 @@ namespace Repository.Entiies
     public class Information
     {
         public Guid Id { get; set; }
-        public DateTime CreateTime { get; set; }
-        public string OperatorCode { get; set; }
-        public string ProCode { get; set; }
-        public double SpendTime { get; set; }
-        public string ProType { get; set; }
-        public string ProNo { get; set; }
-        public string ItemCode { get; set; }
-        public string OrderNo { get; set; }
-        public string TestResult { get; set; }
+        public DateTime CreateTime { get; set; }//创建时间
+        public string OperatorCode { get; set; }//员工id
+        public string ProCode { get; set; }//产品码
+        public double SpendTime { get; set; }//用时
+        public string ProType { get; set; }//产品类型
+        public string ProNo { get; set; }//产品编号
+        public string ItemCode { get; set; }//物料码
+        public string OrderNo { get; set; }//订单编号
+        public string TestResult { get; set; }//测试结果
+        public string WorkDev { get; set; }//机台
     }
 }

+ 544 - 0
Repository/Migrations/20241217013918_2024-12-17-1.Designer.cs

@@ -0,0 +1,544 @@
+// <auto-generated />
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Repository;
+
+namespace Repository.Migrations
+{
+    [DbContext(typeof(TeamDataContext))]
+    [Migration("20241217013918_2024-12-17-1")]
+    partial class _202412171
+    {
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
+        {
+#pragma warning disable 612, 618
+            modelBuilder
+                .HasAnnotation("ProductVersion", "3.1.32");
+
+            modelBuilder.Entity("Repository.DeviceStatus", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<double>("AlarmTime")
+                        .HasColumnType("REAL");
+
+                    b.Property<DateTime>("DateDS")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("DeviceStatus");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.Account", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("AccountID")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ChangePassword")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Accounts");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.AllNumber", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("DateA")
+                        .HasColumnType("TEXT");
+
+                    b.Property<double>("ErrA")
+                        .HasColumnType("REAL");
+
+                    b.Property<double>("NgA")
+                        .HasColumnType("REAL");
+
+                    b.Property<double>("OkA")
+                        .HasColumnType("REAL");
+
+                    b.Property<double>("PlanA")
+                        .HasColumnType("REAL");
+
+                    b.Property<double>("RealityA")
+                        .HasColumnType("REAL");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("AllNumbers");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.House", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("DateH")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("LackH")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("TotalH")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("UsedH")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Houses");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.Information", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("CreateTime")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ItemCode")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("OperatorCode")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("OrderNo")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ProCode")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ProNo")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ProType")
+                        .HasColumnType("TEXT");
+
+                    b.Property<double>("SpendTime")
+                        .HasColumnType("REAL");
+
+                    b.Property<string>("TestResult")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("WorkDev")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Informations");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.OutofWork", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("Absenteeism")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Actual")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<DateTime>("DateOutWork")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("FallIll")
+                        .HasColumnType("INTEGER");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("OutofWorks");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.ParamLog", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Content")
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("Occured")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("OperateAction")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<string>("OperateObject")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("UserName")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("ParamLogs");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.Person", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("EmployeeName")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ProProcess")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("WorkTime")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("Yield")
+                        .HasColumnType("INTEGER");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Persons");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.ProStatus", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("DateS")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("ErrS")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("NgS")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("OkS")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<string>("OrdNoS")
+                        .HasColumnType("TEXT");
+
+                    b.Property<double>("PlanS")
+                        .HasColumnType("REAL");
+
+                    b.Property<int>("RealityS")
+                        .HasColumnType("INTEGER");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("ProStatus");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.Quality", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("DateQuality")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("Q1")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q10")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q11")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q12")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q13")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q14")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q15")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q16")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q17")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q18")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q19")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q2")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q20")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q21")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q22")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q23")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q24")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q25")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q26")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q27")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q28")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q29")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q3")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q30")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q4")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q5")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q6")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q7")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q8")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q9")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<string>("QuPCode")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Qualitys");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.StatisticsLog", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("RequestCode")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("RequstType")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<DateTime>("Timestamp")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("TraceState")
+                        .HasColumnType("INTEGER");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("StatisticsLogs");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.TestResult", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Barcode")
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("Datetime")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("Juge")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<double>("Result")
+                        .HasColumnType("REAL");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("ProductResult");
+                });
+
+            modelBuilder.Entity("Repository.LocalFile2Db", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Count")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("MaterialName")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("MaterialNum")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Num")
+                        .HasColumnType("TEXT");
+
+                    b.Property<Guid?>("SopFileID")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Unit")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("SopFileID");
+
+                    b.ToTable("LocalFile2");
+                });
+
+            modelBuilder.Entity("Repository.LocalFile3Db", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("After")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Before")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Equipment")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Inn")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("LookOut")
+                        .HasColumnType("TEXT");
+
+                    b.Property<Guid?>("SopFileID")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("SopFileID");
+
+                    b.ToTable("LocalFile3");
+                });
+
+            modelBuilder.Entity("Repository.LocalFileDb", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Date")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Edition")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("FileNum")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Name")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("People")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Process")
+                        .HasColumnType("TEXT");
+
+                    b.Property<Guid?>("SopFileID")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Type")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("WorkTime")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("SopFileID");
+
+                    b.ToTable("LocalFile");
+                });
+
+            modelBuilder.Entity("Repository.SopFile", b =>
+                {
+                    b.Property<Guid>("ID")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ProductName")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("ID");
+
+                    b.ToTable("SopFiles");
+                });
+
+            modelBuilder.Entity("Repository.LocalFile2Db", b =>
+                {
+                    b.HasOne("Repository.SopFile", "SopFile")
+                        .WithMany("LocalFile2Db")
+                        .HasForeignKey("SopFileID");
+                });
+
+            modelBuilder.Entity("Repository.LocalFile3Db", b =>
+                {
+                    b.HasOne("Repository.SopFile", "SopFile")
+                        .WithMany("LocalFile3Db")
+                        .HasForeignKey("SopFileID");
+                });
+
+            modelBuilder.Entity("Repository.LocalFileDb", b =>
+                {
+                    b.HasOne("Repository.SopFile", "SopFile")
+                        .WithMany("LocalFileDb")
+                        .HasForeignKey("SopFileID");
+                });
+#pragma warning restore 612, 618
+        }
+    }
+}

+ 22 - 0
Repository/Migrations/20241217013918_2024-12-17-1.cs

@@ -0,0 +1,22 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace Repository.Migrations
+{
+    public partial class _202412171 : Migration
+    {
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.AddColumn<string>(
+                name: "WorkDev",
+                table: "Informations",
+                nullable: true);
+        }
+
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropColumn(
+                name: "WorkDev",
+                table: "Informations");
+        }
+    }
+}

+ 547 - 0
Repository/Migrations/20241218054316_2024-12-18-1.Designer.cs

@@ -0,0 +1,547 @@
+// <auto-generated />
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Repository;
+
+namespace Repository.Migrations
+{
+    [DbContext(typeof(TeamDataContext))]
+    [Migration("20241218054316_2024-12-18-1")]
+    partial class _202412181
+    {
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
+        {
+#pragma warning disable 612, 618
+            modelBuilder
+                .HasAnnotation("ProductVersion", "3.1.32");
+
+            modelBuilder.Entity("Repository.DeviceStatus", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<double>("AlarmTime")
+                        .HasColumnType("REAL");
+
+                    b.Property<DateTime>("DateDS")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("DeviceStatus");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.Account", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("AccountID")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ChangePassword")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Accounts");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.AllNumber", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("DateA")
+                        .HasColumnType("TEXT");
+
+                    b.Property<double>("ErrA")
+                        .HasColumnType("REAL");
+
+                    b.Property<double>("NgA")
+                        .HasColumnType("REAL");
+
+                    b.Property<double>("OkA")
+                        .HasColumnType("REAL");
+
+                    b.Property<double>("PlanA")
+                        .HasColumnType("REAL");
+
+                    b.Property<double>("RealityA")
+                        .HasColumnType("REAL");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("AllNumbers");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.House", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("DateH")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("LackH")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("TotalH")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("UsedH")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Houses");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.Information", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("CreateTime")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ItemCode")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("OperatorCode")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("OrderNo")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ProCode")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ProNo")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ProType")
+                        .HasColumnType("TEXT");
+
+                    b.Property<double>("SpendTime")
+                        .HasColumnType("REAL");
+
+                    b.Property<string>("TestResult")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("WorkDev")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Informations");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.OutofWork", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("Absenteeism")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Actual")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<DateTime>("DateOutWork")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("FallIll")
+                        .HasColumnType("INTEGER");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("OutofWorks");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.ParamLog", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Content")
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("Occured")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("OperateAction")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<string>("OperateObject")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("UserName")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("ParamLogs");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.Person", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("EmployeeName")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ProProcess")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("WorkTime")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("Yield")
+                        .HasColumnType("INTEGER");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Persons");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.ProStatus", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("DateS")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("ErrS")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("NgS")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("OkS")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<string>("OrdNoS")
+                        .HasColumnType("TEXT");
+
+                    b.Property<double>("PlanS")
+                        .HasColumnType("REAL");
+
+                    b.Property<int>("RealityS")
+                        .HasColumnType("INTEGER");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("ProStatus");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.Quality", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("DateQuality")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ProTName")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("Q1")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q10")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q11")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q12")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q13")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q14")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q15")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q16")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q17")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q18")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q19")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q2")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q20")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q21")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q22")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q23")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q24")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q25")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q26")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q27")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q28")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q29")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q3")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q30")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q4")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q5")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q6")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q7")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q8")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("Q9")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<string>("QuPCode")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Qualitys");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.StatisticsLog", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("RequestCode")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<int>("RequstType")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<DateTime>("Timestamp")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("TraceState")
+                        .HasColumnType("INTEGER");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("StatisticsLogs");
+                });
+
+            modelBuilder.Entity("Repository.Entiies.TestResult", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Barcode")
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("Datetime")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("Juge")
+                        .HasColumnType("INTEGER");
+
+                    b.Property<double>("Result")
+                        .HasColumnType("REAL");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("ProductResult");
+                });
+
+            modelBuilder.Entity("Repository.LocalFile2Db", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Count")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("MaterialName")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("MaterialNum")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Num")
+                        .HasColumnType("TEXT");
+
+                    b.Property<Guid?>("SopFileID")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Unit")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("SopFileID");
+
+                    b.ToTable("LocalFile2");
+                });
+
+            modelBuilder.Entity("Repository.LocalFile3Db", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("After")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Before")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Equipment")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Inn")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("LookOut")
+                        .HasColumnType("TEXT");
+
+                    b.Property<Guid?>("SopFileID")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("SopFileID");
+
+                    b.ToTable("LocalFile3");
+                });
+
+            modelBuilder.Entity("Repository.LocalFileDb", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Date")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Edition")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("FileNum")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Name")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("People")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Process")
+                        .HasColumnType("TEXT");
+
+                    b.Property<Guid?>("SopFileID")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Type")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("WorkTime")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("SopFileID");
+
+                    b.ToTable("LocalFile");
+                });
+
+            modelBuilder.Entity("Repository.SopFile", b =>
+                {
+                    b.Property<Guid>("ID")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ProductName")
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("ID");
+
+                    b.ToTable("SopFiles");
+                });
+
+            modelBuilder.Entity("Repository.LocalFile2Db", b =>
+                {
+                    b.HasOne("Repository.SopFile", "SopFile")
+                        .WithMany("LocalFile2Db")
+                        .HasForeignKey("SopFileID");
+                });
+
+            modelBuilder.Entity("Repository.LocalFile3Db", b =>
+                {
+                    b.HasOne("Repository.SopFile", "SopFile")
+                        .WithMany("LocalFile3Db")
+                        .HasForeignKey("SopFileID");
+                });
+
+            modelBuilder.Entity("Repository.LocalFileDb", b =>
+                {
+                    b.HasOne("Repository.SopFile", "SopFile")
+                        .WithMany("LocalFileDb")
+                        .HasForeignKey("SopFileID");
+                });
+#pragma warning restore 612, 618
+        }
+    }
+}

+ 22 - 0
Repository/Migrations/20241218054316_2024-12-18-1.cs

@@ -0,0 +1,22 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace Repository.Migrations
+{
+    public partial class _202412181 : Migration
+    {
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.AddColumn<string>(
+                name: "ProTName",
+                table: "Qualitys",
+                nullable: true);
+        }
+
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropColumn(
+                name: "ProTName",
+                table: "Qualitys");
+        }
+    }
+}

+ 6 - 0
Repository/Migrations/TeamDataContextModelSnapshot.cs

@@ -135,6 +135,9 @@ namespace Repository.Migrations
                     b.Property<string>("TestResult")
                         .HasColumnType("TEXT");
 
+                    b.Property<string>("WorkDev")
+                        .HasColumnType("TEXT");
+
                     b.HasKey("Id");
 
                     b.ToTable("Informations");
@@ -253,6 +256,9 @@ namespace Repository.Migrations
                     b.Property<DateTime>("DateQuality")
                         .HasColumnType("TEXT");
 
+                    b.Property<string>("ProTName")
+                        .HasColumnType("TEXT");
+
                     b.Property<int>("Q1")
                         .HasColumnType("INTEGER");
 

+ 2 - 1
Repository/Quality.cs

@@ -6,7 +6,8 @@ namespace Repository.Entiies
     {
         public Guid Id { get; set; }
         public DateTime DateQuality { get; set; }
-        public string QuPCode {  get; set; }
+        public string QuPCode {  get; set; }//订单
+        public string ProTName { get; set; }//产品型号
         public int Q1 { get; set; }
         public int Q2 { get; set; }
         public int Q3 { get; set; }

+ 8 - 0
Repository/Repository.csproj

@@ -231,6 +231,14 @@
     <Compile Include="Migrations\20241019092706_20241019.Designer.cs">
       <DependentUpon>20241019092706_20241019.cs</DependentUpon>
     </Compile>
+    <Compile Include="Migrations\20241217013918_2024-12-17-1.cs" />
+    <Compile Include="Migrations\20241217013918_2024-12-17-1.Designer.cs">
+      <DependentUpon>20241217013918_2024-12-17-1.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Migrations\20241218054316_2024-12-18-1.cs" />
+    <Compile Include="Migrations\20241218054316_2024-12-18-1.Designer.cs">
+      <DependentUpon>20241218054316_2024-12-18-1.cs</DependentUpon>
+    </Compile>
     <Compile Include="Migrations\TeamDataContextModelSnapshot.cs" />
     <Compile Include="OutofWork.cs" />
     <Compile Include="Person.cs" />