wanghan пре 3 месеци
родитељ
комит
5a7285858a
1 измењених фајлова са 40 додато и 44 уклоњено
  1. 40 44
      LogForceTestApp.Modules.MainModule/ViewModels/MainPageViewModel.cs

+ 40 - 44
LogForceTestApp.Modules.MainModule/ViewModels/MainPageViewModel.cs

@@ -1467,7 +1467,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                     _repository.Update(res[i]);
                 }
             }
-            WriteCSV_Bind(procode, soleNum, proName, Order);
+            WriteCSV_Bind(procode, proName, Order);
         }
 
         #region 相同部分
@@ -1943,7 +1943,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             WorkDev = productNew.WorkDev
                         };
 
-                        WriteCSV_Pro(Operator1, "1号机台", pno, proName, Order, Material1);
+                        WriteCSV_Pro(Operator1, "1号机台", proName, Order, Material1);
                         InforNew.Add(productNew);
                         _repository.Add(product);
                         OperatorName(operName);
@@ -2001,7 +2001,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             TestResult = productNew.TestResult,
                             WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator2, "2号机台", pno, proName, Order, Material2);
+                        WriteCSV_Pro(Operator2, "2号机台", proName, Order, Material2);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2058,7 +2058,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             TestResult = productNew.TestResult,
                             WorkDev = productNew.WorkDev,
                         };
-                        WriteCSV_Pro(Operator3, "3号机台", pno, proName, Order, Material3);
+                        WriteCSV_Pro(Operator3, "3号机台", proName, Order, Material3);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2115,7 +2115,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             TestResult = productNew.TestResult,
                             WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator4, "4号机台", pno, proName, Order, Material4);
+                        WriteCSV_Pro(Operator4, "4号机台", proName, Order, Material4);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2172,7 +2172,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             TestResult = productNew.TestResult,
                             WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator5, "5号机台", pno, proName, Order, Material5);
+                        WriteCSV_Pro(Operator5, "5号机台", proName, Order, Material5);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2229,7 +2229,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             TestResult = productNew.TestResult,
                             WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator6, "6号机台", pno, proName, Order, Material6);
+                        WriteCSV_Pro(Operator6, "6号机台", proName, Order, Material6);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2286,7 +2286,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             TestResult = productNew.TestResult,
                             WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator7, "7号机台", pno, proName, Order, Material7);
+                        WriteCSV_Pro(Operator7, "7号机台", proName, Order, Material7);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2343,7 +2343,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             TestResult = productNew.TestResult,
                             WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator8, "8号机台", pno, proName, Order, Material8);
+                        WriteCSV_Pro(Operator8, "8号机台", proName, Order, Material8);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2400,7 +2400,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             TestResult = productNew.TestResult,
                             WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator9, "9号机台", pno, proName, Order, Material9);
+                        WriteCSV_Pro(Operator9, "9号机台", proName, Order, Material9);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2457,7 +2457,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             TestResult = productNew.TestResult,
                             WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator10, "10号机台", pno, proName, Order, Material10);
+                        WriteCSV_Pro(Operator10, "10号机台", proName, Order, Material10);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2514,7 +2514,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             TestResult = productNew.TestResult,
                             WorkDev = productNew.WorkDev,
                         };
-                        WriteCSV_Pro(Operator11, "11号机台", pno, proName, Order, Material11);
+                        WriteCSV_Pro(Operator11, "11号机台", proName, Order, Material11);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2571,7 +2571,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             TestResult = productNew.TestResult,
                             WorkDev = productNew.WorkDev,
                         };
-                        WriteCSV_Pro(Operator12, "12号机台", pno, proName, Order, Material12);
+                        WriteCSV_Pro(Operator12, "12号机台", proName, Order, Material12);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2628,7 +2628,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                             TestResult = productNew.TestResult,
                             WorkDev = productNew.WorkDev
                         };
-                        WriteCSV_Pro(Operator13, "13号机台", pno, proName, Order, Material13);
+                        WriteCSV_Pro(Operator13, "13号机台", proName, Order, Material13);
                         _repository.Add(product);
                         InforNew.Add(productNew);
                         OperatorName(operName);
@@ -2687,7 +2687,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
                                 TestResult = productNew.TestResult,
                                 WorkDev = productNew.WorkDev
                             };
-                            WriteCSV_Pro(Operator14, "14号机台", pno, proName, Order, Material14);
+                            WriteCSV_Pro(Operator14, "14号机台", proName, Order, Material14);
                             _repository.Add(product);
                             InforNew.Add(productNew);
                             OperatorName(operName);
@@ -3100,11 +3100,11 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
 
         #region WriteCSV
         //生产信息
-        public void WriteCSV_Pro(string idPeople, string devNum, string proNo, string proType, string order, string Wu)
+        public void WriteCSV_Pro(string idPeople, string devNum, string proType, string order, string Wu)
         {
             string s1, s2, s3, s4,
-                s11, s12, s13, s14, s15, s16, s17,
-                s21, s22, s23, s24, s25, s26, s27;
+                s11, s12, s13, s14, s15, s16,
+                s21, s22, s23, s24, s25, s26;
             //
             string path = "D:\\Result\\生产信息\\";
             if (!Directory.Exists(path))
@@ -3115,33 +3115,31 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             s11 = "时间";
             s12 = "人员ID";
             s13 = "作业机台";
-            s14 = "产品编号";
-            s15 = "产品类型";
-            s16 = "订单编号";
-            s17 = "物料码";
+            s14 = "产品类型";
+            s15 = "订单编号";
+            s16 = "物料码";
             //
-            s21 = DateTime.Now.ToString("HH:mm:ss");
+            s21 = DateTime.Now.ToString();
             s22 = idPeople;
             s23 = devNum;
-            s24 = proNo;
-            s25 = proType;
-            s26 = order;
-            s27 = Wu;
+            s24 = proType;
+            s25 = order;
+            s26 = Wu;
             //=========================
             s1 = path;
             s2 = DateTime.Now.ToString("yyyyMMdd"); //表格命名以天记录
-            s3 = s11 + "," + s12 + "," + s13 + "," + s14 + "," + s15 + "," + s16 + "," + s17;
-            s4 = s21 + "," + s22 + "," + s23 + "," + s24 + "," + s25 + "," + s26 + "," + s27;
+            s3 = s11 + "," + s12 + "," + s13 + "," + s14 + "," + s15 + "," + s16;
+            s4 = s21 + "," + s22 + "," + s23 + "," + s24 + "," + s25 + "," + s26;
             //
             DataHelp.Save(s1, s2, s3, s4);
         }
 
         //绑定信息
-        public void WriteCSV_Bind(string proCode, string proNo, string proType, string order)
+        public void WriteCSV_Bind(string proCode, string proType, string order)
         {
             string s1, s2, s3, s4,
-                s11, s12, s13, s14, s15,
-                s21, s22, s23, s24, s25;
+                s11, s12, s13, s14,
+                s21, s22, s23, s24;
             //
             string path = "D:\\Result\\绑定信息\\";
             if (!Directory.Exists(path))
@@ -3151,20 +3149,18 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             //
             s11 = "时间";
             s12 = "产品码";
-            s13 = "产品编号";
-            s14 = "产品类型";
-            s15 = "订单编号";
+            s13 = "产品类型";
+            s14 = "订单编号";
             //
-            s21 = DateTime.Now.ToString("HH:mm:ss");
+            s21 = DateTime.Now.ToString();
             s22 = proCode;
-            s23 = proNo;
-            s24 = proType;
-            s25 = order;
+            s23 = proType;
+            s24 = order;
             //=========================
             s1 = path;
             s2 = DateTime.Now.ToString("yyyyMMdd"); //表格命名以天记录
-            s3 = s11 + "," + s12 + "," + s13 + "," + s14 + "," + s15;
-            s4 = s21 + "," + s22 + "," + s23 + "," + s24 + "," + s25;
+            s3 = s11 + "," + s12 + "," + s13 + "," + s14;
+            s4 = s21 + "," + s22 + "," + s23 + "," + s24;
             //
             DataHelp.Save(s1, s2, s3, s4);
         }
@@ -3187,7 +3183,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             s13 = "产品码";
             s14 = "检测结果";
             //
-            s21 = DateTime.Now.ToString("HH:mm:ss");
+            s21 = DateTime.Now.ToString();
             s22 = idPeople;
             s23 = proCode;
             s24 = res;
@@ -3214,12 +3210,12 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
             }
             //
             s11 = "时间";
-            s12 = "维修人员id";
+            s12 = "维修人员ID";
             s13 = "客户";
             s14 = "产品码";
             s15 = "维修物料";
             //
-            s21 = DateTime.Now.ToString("HH:mm:ss");
+            s21 = DateTime.Now.ToString();
             s22 = idPeople;
             s23 = client;
             s24 = proCode;