瀏覽代碼

Merge branch 'KB-Mylar' of http://49.235.130.76/XXF_1122/DaisyNPILine into KB-Mylar

KWD 6 月之前
父節點
當前提交
868f07c82d

+ 2 - 0
TeamAAS-VM/Core/Management.cs

@@ -1198,6 +1198,8 @@ namespace TeamAAS_VP.Core
             if (currentProduct == null) return;
             if (currentProduct == null) return;
             try
             try
             {
             {
+                if (currentProduct.GlobalParamEx == null) currentProduct.GlobalParamEx = new Models.Product.ProductGlobalParamEx();
+                if (currentProduct.GlobalParamEx.DownPressure == null) currentProduct.GlobalParamEx.DownPressure = new PressureModel();
                 await plc.WriteNodeAsync(addressConfig.Down_Time.Address, currentProduct.GlobalParamEx.DownPressure.PressureTime);
                 await plc.WriteNodeAsync(addressConfig.Down_Time.Address, currentProduct.GlobalParamEx.DownPressure.PressureTime);
                 await plc.WriteNodeAsync(addressConfig.Down_WetOut_Num.Address, currentProduct.GlobalParamEx.DownPressure.PressureNum);
                 await plc.WriteNodeAsync(addressConfig.Down_WetOut_Num.Address, currentProduct.GlobalParamEx.DownPressure.PressureNum);
                 await plc.WriteNodeAsync(addressConfig.Down_WetOut_Num_max.Address, currentProduct.GlobalParamEx.DownPressure.PressureNumMax);
                 await plc.WriteNodeAsync(addressConfig.Down_WetOut_Num_max.Address, currentProduct.GlobalParamEx.DownPressure.PressureNumMax);

+ 1 - 1
TeamAAS-VM/Data/DatabaseInitializer.cs

@@ -26,7 +26,7 @@ namespace TeamAAS_VP.Data
                 // 创建数据库(如果不存在)
                 // 创建数据库(如果不存在)
                 _db.DbMaintenance.CreateDatabase();
                 _db.DbMaintenance.CreateDatabase();
                 // 创建表
                 // 创建表
-                _db.CodeFirst.InitTables(typeof(User), typeof(ProductionRecord), typeof(UserLoginRecord), typeof(AlarmRecord), typeof(LockResult), typeof(PhotoCaptureRecord), typeof(AssemblyRecord), typeof(ThrowRecord));
+                _db.CodeFirst.InitTables(typeof(User), typeof(ProductionRecord), typeof(UserLoginRecord), typeof(AlarmRecord), typeof(LockResult), typeof(PhotoCaptureRecord), typeof(AssemblyRecord), typeof(ThrowRecord), typeof(ProductWithMes));
 
 
                 // 创建索引
                 // 创建索引
                 CreateIndexes();
                 CreateIndexes();

+ 1 - 1
TeamAAS-VM/Models/Product/ProductGlobalParamEx.cs

@@ -4,7 +4,7 @@ namespace TeamAAS_VP.Models.Product
 {
 {
     public class ProductGlobalParamEx : BindableBase
     public class ProductGlobalParamEx : BindableBase
     {
     {
-        private PressureModel _DownPressure;
+        private PressureModel _DownPressure = new PressureModel();
         /// <summary>
         /// <summary>
         /// 保压
         /// 保压
         /// </summary>
         /// </summary>

+ 2 - 2
TeamAAS-VM/Services/MesService.cs

@@ -384,12 +384,12 @@ namespace TeamAAS_VP.Services
             if (device.F == "PTL")
             if (device.F == "PTL")
             {
             {
                 url = $"{device.MesUrl}?c=ADD_RECORD&line={device.Line}&station={device.Station}&fixtureid={device.FixtureId}&sn={sn}&f=PTL&comp={device.comp}:{comp}" +
                 url = $"{device.MesUrl}?c=ADD_RECORD&line={device.Line}&station={device.Station}&fixtureid={device.FixtureId}&sn={sn}&f=PTL&comp={device.comp}:{comp}" +
-                    $"&cc={cc}&assy_pressure={assypress}&result={res}&start_time={start_time.ToString("yyyy-MM-dd HH:mm:ss")}&stop_time={stop_time.ToString("yyyy-MM-dd HH:mm:ss")}";
+                    $"&CC={cc}&AssyPressure={assypress}&result={res}&start_time={start_time.ToString("yyyy-MM-dd HH:mm:ss")}&stop_time={stop_time.ToString("yyyy-MM-dd HH:mm:ss")}";
             }
             }
             else
             else
             {
             {
                 url = $"{device.MesUrl}?c=ADD_RECORD&line={device.Line}&station={device.Station}&fixtureid={device.FixtureId}&sn={sn}&f=PQC" +
                 url = $"{device.MesUrl}?c=ADD_RECORD&line={device.Line}&station={device.Station}&fixtureid={device.FixtureId}&sn={sn}&f=PQC" +
-                    $"&cc={cc}&assy_pressure={assypress}&result={res}&start_time={start_time.ToString("yyyy-MM-dd HH:mm:ss")}&stop_time={stop_time.ToString("yyyy-MM-dd HH:mm:ss")}";
+                    $"&CC={cc}&AssyPressure={assypress}&result={res}&start_time={start_time.ToString("yyyy-MM-dd HH:mm:ss")}&stop_time={stop_time.ToString("yyyy-MM-dd HH:mm:ss")}";
             }
             }
             LogHelper.WriteLogMes($"¡¾ÉÏ´«URL¡¿{url}");
             LogHelper.WriteLogMes($"¡¾ÉÏ´«URL¡¿{url}");
             SendTaskMessage($"¡¾ÉÏ´«URL¡¿{url}", MessageLevel.Info);
             SendTaskMessage($"¡¾ÉÏ´«URL¡¿{url}", MessageLevel.Info);

+ 1 - 1
TeamAAS-VM/Views/Product/ProductParams.xaml

@@ -120,7 +120,7 @@
                         <StackPanel Orientation="Vertical"
                         <StackPanel Orientation="Vertical"
                                     Margin="0">
                                     Margin="0">
                             <GroupBox Header="组装保压配置"
                             <GroupBox Header="组装保压配置"
-                                      Margin="20,0"
+                                      Margin="5"
                                       Width="200">
                                       Width="200">
                                 <Grid Margin="10">
                                 <Grid Margin="10">
                                     <Grid.ColumnDefinitions>
                                     <Grid.ColumnDefinitions>