From 04b57294ce9b54d53311937c4949b2eae685bc7a Mon Sep 17 00:00:00 2001 From: lihanbo Date: Mon, 28 Oct 2024 17:56:13 +0800 Subject: [PATCH] =?UTF-8?q?105040=20=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E6=95=B0=E9=87=8F=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=A3=80=E6=9F=A5=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E6=97=B6=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sinvo.EplanHpD.Plugin.Test/CheckTest.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- Sinvo.EplanHpD.Plugin.WPFUI/MainWindow.xaml | 23 +++++++++++++++++-- .../Models/ExportModel.cs | 10 ++++++++ .../Properties/AssemblyInfo.cs | 6 ++--- .../ViewModel/MainViewModel.Check.cs | 4 ++-- .../ViewModel/MainViewModel.cs | 4 ++++ .../Properties/AssemblyInfo.cs | 4 ++-- 8 files changed, 46 insertions(+), 13 deletions(-) diff --git a/Sinvo.EplanHpD.Plugin.Test/CheckTest.cs b/Sinvo.EplanHpD.Plugin.Test/CheckTest.cs index 08888e8..a8a834f 100644 --- a/Sinvo.EplanHpD.Plugin.Test/CheckTest.cs +++ b/Sinvo.EplanHpD.Plugin.Test/CheckTest.cs @@ -77,7 +77,7 @@ namespace Sinvo.EplanHpD.Plugin.Test } - [TestMethod] + [TestMethod("检查包括D-PE的线")] public void CheckAllWithDPETest() { var vm = new MainViewModel(); @@ -178,7 +178,7 @@ w_00196 BK 黑色RV1.5-CE/定制 42012300001005 C45-1.5-CE/定制 4202010000 { WireName = "w_00196", WireColor = "BK", - WireModel = "黑色RV1.0-CE/定制", + WireModel = "黑色RV2.0-CE/定制", WireCode = "42012300001005", FrontTerminalModel = "C45-1.0-CE/定制", FrontTerminalMaterialCode = "42020100000382", diff --git a/Sinvo.EplanHpD.Plugin.Test/Properties/AssemblyInfo.cs b/Sinvo.EplanHpD.Plugin.Test/Properties/AssemblyInfo.cs index 3012aee..59f8eb6 100644 --- a/Sinvo.EplanHpD.Plugin.Test/Properties/AssemblyInfo.cs +++ b/Sinvo.EplanHpD.Plugin.Test/Properties/AssemblyInfo.cs @@ -16,5 +16,5 @@ using System.Runtime.InteropServices; [assembly: Guid("aec39474-528b-4da8-b650-99189acb7a2c")] // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.0.5")] +[assembly: AssemblyFileVersion("1.0.0.5")] diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/MainWindow.xaml b/Sinvo.EplanHpD.Plugin.WPFUI/MainWindow.xaml index 29a108d..a1a6dce 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/MainWindow.xaml +++ b/Sinvo.EplanHpD.Plugin.WPFUI/MainWindow.xaml @@ -350,8 +350,6 @@ - - @@ -425,6 +423,27 @@ IsChecked="{Binding FlagType, Converter={StaticResource FlagEnumConverter}, ConverterParameter={x:Static util:WireFlagType.Mix}}" /> + + + + + + + + + + + + + + + diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/Models/ExportModel.cs b/Sinvo.EplanHpD.Plugin.WPFUI/Models/ExportModel.cs index 2fa96ce..1427eef 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/Models/ExportModel.cs +++ b/Sinvo.EplanHpD.Plugin.WPFUI/Models/ExportModel.cs @@ -135,11 +135,21 @@ /// public string InsulationMaterialNo { get; set; } + /// + /// 绝缘软套型号数量 + /// + public string InsulationQuantity { get; set; } + /// /// 下单日期 /// public string OrderDate { get; set; } + /// + /// 交货日期 + /// + public string DeliveryDate { get; set; } + /// /// 是否忽略异常 /// diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/Properties/AssemblyInfo.cs b/Sinvo.EplanHpD.Plugin.WPFUI/Properties/AssemblyInfo.cs index 6c07f26..f847402 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/Properties/AssemblyInfo.cs +++ b/Sinvo.EplanHpD.Plugin.WPFUI/Properties/AssemblyInfo.cs @@ -46,6 +46,6 @@ using System.Windows; // 生成号 // 修订号 // -[assembly: AssemblyVersion("1.0.0.1")] -[assembly: AssemblyFileVersion("1.0.0.1")] -[assembly: AssemblyInformationalVersion("1.0.0.2")] \ No newline at end of file +[assembly: AssemblyVersion("1.0.0.5")] +[assembly: AssemblyFileVersion("1.0.0.5")] +[assembly: AssemblyInformationalVersion("1.0.0.5")] \ No newline at end of file diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/MainViewModel.Check.cs b/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/MainViewModel.Check.cs index 9ecc4a3..8049257 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/MainViewModel.Check.cs +++ b/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/MainViewModel.Check.cs @@ -93,7 +93,7 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.ViewModel if (item.Insulation != null && item.Insulation.Specification != null) { var match = Consts.regex.Match(item.WireModel); - if (!string.IsNullOrEmpty(match.Value)) + if (!string.IsNullOrEmpty(match?.Value) && match != null) { var itemWireDiameter = double.Parse(match.Value.Replace("RV", "")); var insMatch = Consts.dRegex.Match(item.Insulation.Specification); @@ -101,7 +101,7 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.ViewModel { if (itemWireDiameter < 1.5d) { - if (insMatch.Value != "V1.5") + if (insMatch.Value != "V-1.5") { SetItemError(item, "变色套(绝缘软套)大小与线径不匹配!"); } diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/MainViewModel.cs b/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/MainViewModel.cs index 3704c75..dd0c43c 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/MainViewModel.cs +++ b/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/MainViewModel.cs @@ -385,6 +385,7 @@ public partial class MainViewModel : INotifyPropertyChanged int seqNo = 1; var dataList = new List(); var nowDateStr = DateTime.Now.ToString("yyyy-MM-dd"); + var nowDeliveryDateStr = DateTime.Now.AddDays(7).ToString("yyyy-MM-dd"); //foreach (var stuffedDataModel in StuffedData) StuffedData.AsParallel().WithDegreeOfParallelism(1).ForAll(stuffedDataModel => { @@ -410,7 +411,10 @@ public partial class MainViewModel : INotifyPropertyChanged RearTerminalStripLength = stuffedDataModel.RearStripLength, InsulationModel = stuffedDataModel.Insulation?.Specification, InsulationMaterialNo = stuffedDataModel.Insulation?.MaterialCode, + InsulationQuantity = string.IsNullOrEmpty(stuffedDataModel.Insulation?.MaterialCode) ? "" : "2", OrderDate = nowDateStr, + DeliveryDate = nowDeliveryDateStr, + IsIgnoreError = stuffedDataModel.IsIgnore ? "是" : string.Empty }; seqNo++; diff --git a/Sinvo.EplanHpD.Plugin/Properties/AssemblyInfo.cs b/Sinvo.EplanHpD.Plugin/Properties/AssemblyInfo.cs index 4cd1420..71a2793 100644 --- a/Sinvo.EplanHpD.Plugin/Properties/AssemblyInfo.cs +++ b/Sinvo.EplanHpD.Plugin/Properties/AssemblyInfo.cs @@ -28,6 +28,6 @@ using System.Runtime.InteropServices; // 生成号 // 修订号 // -[assembly: AssemblyVersion("1.0.0.1")] +[assembly: AssemblyVersion("1.0.0.5")] [assembly: AssemblyFileVersion("1.0.0.1")] -[assembly: AssemblyInformationalVersion("1.0.0.2-preview")] \ No newline at end of file +[assembly: AssemblyInformationalVersion("1.0.0.2")] \ No newline at end of file