Browse Source

修改后提交

谢翼翔 1 year ago
parent
commit
7c882981ac

+ 32 - 23
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmKanbanForPressBrakeEquipment.xaml.cs

@@ -137,11 +137,6 @@ namespace SCADA_DAQ.Customer
             //    - TimeSpan.FromSeconds(DeviceStateCodeStopBetweenTime("亚威PBC折弯机", "维修时间")));
             //var baiChaoTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("百超折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("百超折弯机", "维修时间"))
             //    - TimeSpan.FromSeconds(DeviceStateCodeStopBetweenTime("百超折弯机", "维修时间")));
-            var firstYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威一号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("1号YaWei折弯机", "维修时间")));
-            var secondYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威二号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("2号YaWei折弯机", "维修时间")));
-            var thirdYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威三号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("3号YaWei折弯机", "维修时间")));
-            var pbcYaWweiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威PBC折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("亚威PBC折弯机", "维修时间")));
-            var baiChaoTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("百超折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("百超折弯机", "维修时间")));
 
             //double totalTimeOfDay = TimeSpan.Parse(DateTime.Now.ToString("HH:mm:ss")).TotalSeconds;
             //var firstYaWeiStopTime = totalTimeOfDay - firstYaWeiRunTime - firstYaWeiMoldTime - DevicScheduleStop("1号YaWei折弯机")
@@ -155,6 +150,19 @@ namespace SCADA_DAQ.Customer
             //var baiChaoStopTime = totalTimeOfDay - baiChaoRunTime - baiChaoMoldTime - DevicScheduleStop("百超折弯机")
             //    - DevicMainTableTime("百超折弯机").TotalSeconds - DeviceTimeValue("百超折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("百超折弯机", "维修时间");//百超折弯机折弯机等待时间
 
+            var firstYaWeiTimeMaintenanceTableDouble = DevicMainTableTime("亚威一号折弯机").TotalSeconds + DeviceTimeValue("1号YaWei折弯机", "维修时间");
+            var secondYaWeiTimeMaintenanceTableDouble = DevicMainTableTime("亚威二号折弯机").TotalSeconds + DeviceTimeValue("2号YaWei折弯机", "维修时间");
+            var thirdYaWeiTimeMaintenanceTableDouble = DevicMainTableTime("亚威三号折弯机").TotalSeconds + DeviceTimeValue("3号YaWei折弯机", "维修时间");
+            var pbcYaWweiTimeMaintenanceTableDouble = DevicMainTableTime("亚威PBC折弯机").TotalSeconds + DeviceTimeValue("亚威PBC折弯机", "维修时间");
+            var baiChaoTimeMaintenanceTableDouble = DevicMainTableTime("百超折弯机").TotalSeconds + DeviceTimeValue("百超折弯机", "维修时间");
+
+            var firstYaWeiTimeMaintenanceTable = TimeSpan.FromSeconds(Math.Round(firstYaWeiTimeMaintenanceTableDouble)).ToString();
+            var secondYaWeiTimeMaintenanceTable = TimeSpan.FromSeconds(Math.Round(secondYaWeiTimeMaintenanceTableDouble)).ToString();
+            var thirdYaWeiTimeMaintenanceTable = TimeSpan.FromSeconds(Math.Round(thirdYaWeiTimeMaintenanceTableDouble)).ToString();
+            var pbcYaWweiTimeMaintenanceTable = TimeSpan.FromSeconds(Math.Round(pbcYaWweiTimeMaintenanceTableDouble)).ToString();
+            var baiChaoTimeMaintenanceTable = TimeSpan.FromSeconds(Math.Round(baiChaoTimeMaintenanceTableDouble)).ToString();
+
+
             var firstYaWeiStopTime = DeviceTimeValue("1号YaWei折弯机", "停止标志位")- DevicMainTableTime("亚威一号折弯机").TotalSeconds;//1号YaWei折弯机等待时间
             var sencondYaWeiStopTime = DeviceTimeValue("2号YaWei折弯机", "停止标志位") - DevicMainTableTime("亚威二号折弯机").TotalSeconds;//2号YaWei折弯机等待时间
             var thirdYaWweiStopTime = DeviceTimeValue("3号YaWei折弯机", "停止标志位") - DevicMainTableTime("亚威三号折弯机").TotalSeconds; //3号YaWei折弯机等待时间
@@ -384,7 +392,7 @@ namespace SCADA_DAQ.Customer
 
             try
             {
-                if (e.ChangeType == SCADA.CommonLib.DateTimeChangeType.SecondChanged &&
+                if (e.ChangeType == SCADA.CommonLib.DateTimeChangeType.MinuteChanged &&
                             e.TimeFlag.Minute % 1 == 0)
                 {
                     GetDBData();
@@ -415,23 +423,24 @@ namespace SCADA_DAQ.Customer
                     var pbcYaWweiRepairTime = "倒计时" + DeviceRepairTime("亚威PBC折弯机").ToString() + "天";//亚威PBC折弯机设备保养信息
                     var baiChaoRepairTime = "倒计时" + DeviceRepairTime("百超折弯机").ToString() + "天";//百超折弯机设备保养信息
 
-                    var firstYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威一号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("1号YaWei折弯机", "维修时间")));
-                    var secondYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威二号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("2号YaWei折弯机", "维修时间")));
-                    var thirdYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威三号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("3号YaWei折弯机", "维修时间")));
-                    var pbcYaWweiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威PBC折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("亚威PBC折弯机", "维修时间")));
-                    var baiChaoTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("百超折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("百超折弯机", "维修时间")));
-
-                    //double totalTimeOfDay = TimeSpan.Parse(DateTime.Now.ToString("HH:mm:ss")).TotalSeconds;
-                    //var firstYaWeiStopTime = totalTimeOfDay - firstYaWeiRunTime - firstYaWeiMoldTime - DevicScheduleStop("1号YaWei折弯机")
-                    //    - DevicMainTableTime("亚威一号折弯机").TotalSeconds - DeviceTimeValue("1号YaWei折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("1号YaWei折弯机", "维修时间");//1号YaWei折弯机等待时间
-                    //var sencondYaWeiStopTime = totalTimeOfDay - sencondYaWeiRunTime - sencondYaWeiMoldTime - DevicScheduleStop("2号YaWei折弯机")
-                    //    - DevicMainTableTime("亚威二号折弯机").TotalSeconds - DeviceTimeValue("2号YaWei折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("2号YaWei折弯机", "维修时间");//2号YaWei折弯机等待时间
-                    //var thirdYaWweiStopTime = totalTimeOfDay - thirdYaWweiRunTime - thirdYaWweiMoldTime - DevicScheduleStop("3号YaWei折弯机")
-                    //    - DevicMainTableTime("亚威三号折弯机").TotalSeconds - DeviceTimeValue("3号YaWei折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("3号YaWei折弯机", "维修时间"); //3号YaWei折弯机等待时间
-                    //var pbcYaWweiStopTime = totalTimeOfDay - pbcYaWweiRunTime - pbcYaWweiMoldTime - DevicScheduleStop("亚威PBC折弯机")
-                    //    - DevicMainTableTime("亚威PBC折弯机").TotalSeconds - DeviceTimeValue("亚威PBC折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("亚威PBC折弯机", "维修时间");//亚威PBC折弯机等待时间
-                    //var baiChaoStopTime = totalTimeOfDay - baiChaoRunTime - baiChaoMoldTime - DevicScheduleStop("百超折弯机")
-                    //    - DevicMainTableTime("百超折弯机").TotalSeconds - DeviceTimeValue("百超折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("百超折弯机", "维修时间");//百超折弯机折弯机等待时间
+                    //var firstYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威一号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("1号YaWei折弯机", "维修时间")));
+                    //var secondYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威二号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("2号YaWei折弯机", "维修时间")));
+                    //var thirdYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威三号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("3号YaWei折弯机", "维修时间")));
+                    //var pbcYaWweiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威PBC折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("亚威PBC折弯机", "维修时间")));
+                    //var baiChaoTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("百超折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("百超折弯机", "维修时间")));
+
+                    var firstYaWeiTimeMaintenanceTableDouble = DevicMainTableTime("亚威一号折弯机").TotalSeconds + DeviceTimeValue("1号YaWei折弯机", "维修时间");
+                    var secondYaWeiTimeMaintenanceTableDouble = DevicMainTableTime("亚威二号折弯机").TotalSeconds + DeviceTimeValue("2号YaWei折弯机", "维修时间");
+                    var thirdYaWeiTimeMaintenanceTableDouble = DevicMainTableTime("亚威三号折弯机").TotalSeconds + DeviceTimeValue("3号YaWei折弯机", "维修时间");
+                    var pbcYaWweiTimeMaintenanceTableDouble = DevicMainTableTime("亚威PBC折弯机").TotalSeconds + DeviceTimeValue("亚威PBC折弯机", "维修时间");
+                    var baiChaoTimeMaintenanceTableDouble = DevicMainTableTime("百超折弯机").TotalSeconds + DeviceTimeValue("百超折弯机", "维修时间");
+
+                    var firstYaWeiTimeMaintenanceTable = TimeSpan.FromSeconds(Math.Round(firstYaWeiTimeMaintenanceTableDouble)).ToString();
+                    var secondYaWeiTimeMaintenanceTable = TimeSpan.FromSeconds(Math.Round(secondYaWeiTimeMaintenanceTableDouble)).ToString();
+                    var thirdYaWeiTimeMaintenanceTable = TimeSpan.FromSeconds(Math.Round(thirdYaWeiTimeMaintenanceTableDouble)).ToString();
+                    var pbcYaWweiTimeMaintenanceTable = TimeSpan.FromSeconds(Math.Round(pbcYaWweiTimeMaintenanceTableDouble)).ToString();
+                    var baiChaoTimeMaintenanceTable = TimeSpan.FromSeconds(Math.Round(baiChaoTimeMaintenanceTableDouble)).ToString();
+
                     var firstYaWeiStopTime = DeviceTimeValue("1号YaWei折弯机", "停止标志位") - DevicMainTableTime("亚威一号折弯机").TotalSeconds;//1号YaWei折弯机等待时间
                     var sencondYaWeiStopTime = DeviceTimeValue("2号YaWei折弯机", "停止标志位") - DevicMainTableTime("亚威二号折弯机").TotalSeconds;//2号YaWei折弯机等待时间
                     var thirdYaWweiStopTime = DeviceTimeValue("3号YaWei折弯机", "停止标志位") - DevicMainTableTime("亚威三号折弯机").TotalSeconds; //3号YaWei折弯机等待时间

+ 17 - 9
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmPunchingMachineEquipmentKanban.xaml.cs

@@ -70,16 +70,19 @@ namespace SCADA_DAQ.Customer
             string[] punchingMachine = { "运行", "等待", "报警/维修", "换模" };
             var kimFangyuanRepairTime = "倒计时" + DeviceRepairTime("金方圆铜排冲剪机").ToString() + "天";//金方圆铜排冲剪机设备保养信息
             var highmachineRepairTime = "倒计时" + DeviceRepairTime("高机铜排冲剪机").ToString() + "天";//高机铜排冲剪机设备保养信息
-            var kimFangyuanArlamTimeSpanString = Convert.ToString(DevicMainTableTime("金方圆铜排冲剪机")
-                + TimeSpan.FromSeconds(DeviceTimeValue("金方圆数控母线冲孔机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("金方圆数控母线冲孔机")));//获取金方圆铜排冲剪机设备维修时间
+            //var kimFangyuanArlamTimeSpanString = Convert.ToString(DevicMainTableTime("金方圆铜排冲剪机")
+            //    + TimeSpan.FromSeconds(DeviceTimeValue("金方圆数控母线冲孔机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("金方圆数控母线冲孔机")));//获取金方圆铜排冲剪机设备维修时间
 
-            var highmachineArlamTimeSpanString = Convert.ToString(DevicMainTableTime("高机铜排冲剪机")
-                + TimeSpan.FromSeconds(DeviceTimeValue("高机母线冲剪机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("高机母线冲剪机")));//获取高机铜排冲剪机设备维修时间
+            //var highmachineArlamTimeSpanString = Convert.ToString(DevicMainTableTime("高机铜排冲剪机")
+            //    + TimeSpan.FromSeconds(DeviceTimeValue("高机母线冲剪机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("高机母线冲剪机")));//获取高机铜排冲剪机设备维修时间
 
             var kimFangyuanArlamDouble = DeviceAlarmTime("金方圆数控母线冲孔机")
                 + DeviceTimeValue("金方圆数控母线冲孔机", "维修时间") + DevicMainTableTime("金方圆铜排冲剪机").TotalSeconds;
             var highmachineArlamDouble = DeviceAlarmTime("高机母线冲剪机")
                 + DeviceTimeValue("高机母线冲剪机", "维修时间") + DevicMainTableTime("高机铜排冲剪机").TotalSeconds;
+            var kimFangyuanArlamTimeSpanString = TimeSpan.FromSeconds(Math.Round(kimFangyuanArlamDouble)).ToString();//获取金方圆铜排冲剪机设备维修时间
+
+            var highmachineArlamTimeSpanString = TimeSpan.FromSeconds(Math.Round(highmachineArlamDouble)).ToString();//获取高机铜排冲剪机设备维修时间
 
             var kimFangyuanRunTime = DeviceTimeValue("金方圆数控母线冲孔机", "运行标志位");//金方圆数控母线冲孔机运行时间
             var kimFangyuanRunTimeSpan = TimeSpan.FromSeconds(Math.Round(kimFangyuanRunTime)).ToString();
@@ -321,7 +324,7 @@ namespace SCADA_DAQ.Customer
 
             try
             {
-                if (e.ChangeType == SCADA.CommonLib.DateTimeChangeType.SecondChanged &&
+                if (e.ChangeType == SCADA.CommonLib.DateTimeChangeType.MinuteChanged  &&
                             e.TimeFlag.Minute % 1 == 0)
                 {
                     GetDBData();
@@ -332,17 +335,22 @@ namespace SCADA_DAQ.Customer
                     GetDeviceStopTime();
                      var kimFangyuanRepairTime = "倒计时" + DeviceRepairTime("金方圆铜排冲剪机").ToString() + "天";//金方圆铜排冲剪机设备保养信息
                     var highmachineRepairTime = "倒计时" + DeviceRepairTime("高机铜排冲剪机").ToString() + "天";//高机铜排冲剪机设备保养信息
-                    var kimFangyuanArlamTimeSpanString = Convert.ToString(DevicMainTableTime("金方圆铜排冲剪机")
-                        + TimeSpan.FromSeconds(DeviceTimeValue("金方圆数控母线冲孔机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("金方圆数控母线冲孔机")));//获取金方圆铜排冲剪机设备维修时间
+                     //var kimFangyuanArlamTimeSpanString = Convert.ToString(DevicMainTableTime("金方圆铜排冲剪机")
+                   // + TimeSpan.FromSeconds(DeviceTimeValue("金方圆数控母线冲孔机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("金方圆数控母线冲孔机")));//获取金方圆铜排冲剪机设备维修时间
 
-                    var highmachineArlamTimeSpanString = Convert.ToString(DevicMainTableTime("高机铜排冲剪机")
-                        + TimeSpan.FromSeconds(DeviceTimeValue("高机母线冲剪机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("高机母线冲剪机")));//获取高机铜排冲剪机设备维修时间
+                    //var highmachineArlamTimeSpanString = Convert.ToString((DevicMainTableTime("高机铜排冲剪机"))
+                    //    + TimeSpan.FromSeconds(DeviceTimeValue("高机母线冲剪机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("高机母线冲剪机")));//获取高机铜排冲剪机设备维修时间
+             
 
                     var kimFangyuanArlamDouble = DeviceAlarmTime("金方圆数控母线冲孔机")
                         + DeviceTimeValue("金方圆数控母线冲孔机", "维修时间") + DevicMainTableTime("金方圆铜排冲剪机").TotalSeconds;
                     var highmachineArlamDouble = DeviceAlarmTime("高机母线冲剪机")
                         + DeviceTimeValue("高机母线冲剪机", "维修时间") + DevicMainTableTime("高机铜排冲剪机").TotalSeconds;
 
+                    var kimFangyuanArlamTimeSpanString = TimeSpan.FromSeconds(Math.Round(kimFangyuanArlamDouble)).ToString();//获取金方圆铜排冲剪机设备维修时间
+
+                    var highmachineArlamTimeSpanString = TimeSpan.FromSeconds(Math.Round(highmachineArlamDouble)).ToString();//获取高机铜排冲剪机设备维修时间
+
                     var kimFangyuanRunTime = DeviceTimeValue("金方圆数控母线冲孔机", "运行标志位");//金方圆数控母线冲孔机运行时间
                     var kimFangyuanRunTimeSpan = TimeSpan.FromSeconds(Math.Round(kimFangyuanRunTime)).ToString();
 

+ 18 - 18
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Views/Dashboard/LaserAndDigitalPunchingEquipmentWidget.xaml.cs

@@ -46,7 +46,7 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
         public LaserAndDigitalPunchingEquipmentWidget()
         {
             InitializeComponent();
-            Env.Schedual.DateTimeChanged += Schedual_DateTimeChanged;
+         
             GetDBData();
             GetTableTime();
             GetScheduleStopTime();
@@ -60,19 +60,24 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
             var siemensRepairTime = "倒计时" + DeviceRepairTime("西门子840D数冲").ToString() + "天";//西门子设备保养信息
             var behwifRepairTime = "倒计时" + DeviceRepairTime("倍福数冲机").ToString() + "天";//倍福数冲设备保养信息
 
-            var laserArlamString = Convert.ToString(DevicMainTableTime("激光机")
-                + TimeSpan.FromSeconds(DeviceTimeValue("激光机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("激光机")));
-
-            var siemensArlamString = Convert.ToString(DevicMainTableTime("西门子840D数冲")
-                + TimeSpan.FromSeconds(DeviceTimeValue("西门子840D数冲", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("西门子840D数冲")));
+            //var laserArlamString = Convert.ToString(DevicMainTableTime("激光机")
+            //    + TimeSpan.FromSeconds(DeviceTimeValue("激光机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("激光机")));
 
-            var behwiftArlamString = Convert.ToString(DevicMainTableTime("倍福数冲机")
-                + TimeSpan.FromSeconds(DeviceTimeValue("倍福数冲机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("倍福数冲机")));
+            //var siemensArlamString = Convert.ToString(DevicMainTableTime("西门子840D数冲")
+            //    + TimeSpan.FromSeconds(DeviceTimeValue("西门子840D数冲", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("西门子840D数冲")));
 
+            //var behwiftArlamString = Convert.ToString(DevicMainTableTime("倍福数冲机")
+            //    + TimeSpan.FromSeconds(DeviceTimeValue("倍福数冲机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("倍福数冲机")));
+            Env.Schedual.DateTimeChanged += Schedual_DateTimeChanged;
             var laserArlamDouble = DeviceAlarmTime("激光机") + DevicMainTableTime("激光机").TotalSeconds + DeviceTimeValue("激光机", "维修时间");
             var siemensArlamDouble = DeviceAlarmTime("西门子840D数冲") + DevicMainTableTime("西门子840D数冲").TotalSeconds + DeviceTimeValue("西门子840D数冲", "维修时间");
             var bewiftArlamDouble = DeviceAlarmTime("倍福数冲机") + DevicMainTableTime("倍福数冲机").TotalSeconds + DeviceTimeValue("倍福数冲机", "维修时间");
 
+            var laserArlamString = TimeSpan.FromSeconds(Math.Round(laserArlamDouble)).ToString();
+
+            var siemensArlamString = TimeSpan.FromSeconds(Math.Round(siemensArlamDouble)).ToString();
+
+            var behwiftArlamString = TimeSpan.FromSeconds(Math.Round(bewiftArlamDouble)).ToString();
 
             var laserRunTime = DeviceTimeValue("激光机", "运行标志位");//激光机运行时间
             var laserRunTimeSpan = TimeSpan.FromSeconds(Math.Round(laserRunTime)).ToString();
@@ -449,7 +454,7 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
 
             try
             {
-                if (e.ChangeType == SCADA.CommonLib.DateTimeChangeType.SecondChanged &&
+                if (e.ChangeType == SCADA.CommonLib.DateTimeChangeType.MinuteChanged   &&
                             e.TimeFlag.Minute % 2 == 0)
 
                 {
@@ -467,19 +472,14 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
                     var siemensRepairTime = "倒计时" + DeviceRepairTime("西门子840D数冲").ToString() + "天";//西门子设备保养信息
                     var behwifRepairTime = "倒计时" + DeviceRepairTime("倍福数冲机").ToString() + "天";//倍福数冲设备保养信息
 
-                    var laserArlamString = Convert.ToString(DevicMainTableTime("激光机")
-                        + TimeSpan.FromSeconds(DeviceTimeValue("激光机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("激光机")));
-
-                    var siemensArlamString = Convert.ToString(DevicMainTableTime("西门子840D数冲")
-                        + TimeSpan.FromSeconds(DeviceTimeValue("西门子840D数冲", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("西门子840D数冲")));
-
-                    var behwiftArlamString = Convert.ToString(DevicMainTableTime("倍福数冲机")
-                        + TimeSpan.FromSeconds(DeviceTimeValue("倍福数冲机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("倍福数冲机")));
-
                     var laserArlamDouble = DeviceAlarmTime("激光机") + DevicMainTableTime("激光机").TotalSeconds + DeviceTimeValue("激光机", "维修时间");
                     var siemensArlamDouble = DeviceAlarmTime("西门子840D数冲") + DevicMainTableTime("西门子840D数冲").TotalSeconds + DeviceTimeValue("西门子840D数冲", "维修时间");
                     var bewiftArlamDouble = DeviceAlarmTime("倍福数冲机") + DevicMainTableTime("倍福数冲机").TotalSeconds + DeviceTimeValue("倍福数冲机", "维修时间");
+                    var laserArlamString = TimeSpan.FromSeconds(Math.Round(laserArlamDouble)).ToString();
+
+                    var siemensArlamString = TimeSpan.FromSeconds(Math.Round(siemensArlamDouble)).ToString();
 
+                    var behwiftArlamString = TimeSpan.FromSeconds(Math.Round(bewiftArlamDouble)).ToString();
 
                     var laserRunTime = DeviceTimeValue("激光机", "运行标志位");//激光机运行时间
                     var laserRunTimeSpan = TimeSpan.FromSeconds(Math.Round(laserRunTime)).ToString();

+ 1 - 1
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Views/Dashboard/YaweiPressBrakeOneWidget.xaml.cs

@@ -291,7 +291,7 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
         {
             try
             {
-                if (e.ChangeType == SCADA.CommonLib.DateTimeChangeType.SecondChanged &&
+                if (e.ChangeType == SCADA.CommonLib.DateTimeChangeType.MinuteChanged  &&
                             e.TimeFlag.Minute % 1 == 0)
                 {
                     GetDBData();