diff --git a/.gitignore b/.gitignore
index d6ce843..646c6c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,19 @@ shangjian/XGL.Data/obj/
shangjian/XGL.Data/bin/
shangjian/XGLFinishPro/obj/
shangjian/XGLFinishPro/bin/
+shangjian/CentralControl/bin/x86/Debug/BCrypt.Net-Next.dll
+shangjian/CentralControl/bin/x86/Debug/BCrypt.Net-Next.xml
+shangjian/CentralControl/bin/x86/Debug/Google.Protobuf.dll
+shangjian/CentralControl/bin/x86/Debug/Google.Protobuf.xml
+shangjian/CentralControl/bin/x86/Debug/log4net.dll
+shangjian/CentralControl/bin/x86/Debug/Newtonsoft.Json.dll
+shangjian/CentralControl/bin/x86/Debug/QRCoder.dll
+shangjian/CentralControl/bin/x86/Debug/System.Buffers.dll
+shangjian/CentralControl/bin/x86/Debug/System.Buffers.xml
+shangjian/CentralControl/bin/x86/Debug/System.Memory.dll
+shangjian/CentralControl/bin/x86/Debug/System.Memory.xml
+shangjian/CentralControl/bin/x86/Debug/System.Numerics.Vectors.dll
+shangjian/CentralControl/bin/x86/Debug/System.Numerics.Vectors.xml
+shangjian/CentralControl/bin/x86/Debug/System.Runtime.CompilerServices.Unsafe.dll
+shangjian/CentralControl/bin/x86/Debug/System.Runtime.CompilerServices.Unsafe.xml
+shangjian/CentralControl/bin/x86/Debug/config/log4net.config
diff --git a/shangjian/.vs/BL/v17/.suo b/shangjian/.vs/BL/v17/.suo
index dc8f773..4c3792a 100644
Binary files a/shangjian/.vs/BL/v17/.suo and b/shangjian/.vs/BL/v17/.suo differ
diff --git a/shangjian/AutoUpdate/obj/x86/Debug/AutoUpdate.csproj.AssemblyReference.cache b/shangjian/AutoUpdate/obj/x86/Debug/AutoUpdate.csproj.AssemblyReference.cache
index e6e493b..d46e79d 100644
Binary files a/shangjian/AutoUpdate/obj/x86/Debug/AutoUpdate.csproj.AssemblyReference.cache and b/shangjian/AutoUpdate/obj/x86/Debug/AutoUpdate.csproj.AssemblyReference.cache differ
diff --git a/shangjian/CentralControl/bin/Debug/CentralControl.exe b/shangjian/CentralControl/bin/Debug/CentralControl.exe
index 506d199..4a1cb54 100644
Binary files a/shangjian/CentralControl/bin/Debug/CentralControl.exe and b/shangjian/CentralControl/bin/Debug/CentralControl.exe differ
diff --git a/shangjian/CentralControl/bin/Debug/CentralControl.pdb b/shangjian/CentralControl/bin/Debug/CentralControl.pdb
index dd780b8..f73fb1a 100644
Binary files a/shangjian/CentralControl/bin/Debug/CentralControl.pdb and b/shangjian/CentralControl/bin/Debug/CentralControl.pdb differ
diff --git a/shangjian/CentralControl/bin/Debug/CommonFunc.dll b/shangjian/CentralControl/bin/Debug/CommonFunc.dll
index c788329..bbc8a24 100644
Binary files a/shangjian/CentralControl/bin/Debug/CommonFunc.dll and b/shangjian/CentralControl/bin/Debug/CommonFunc.dll differ
diff --git a/shangjian/CentralControl/bin/Debug/CommonFunc.pdb b/shangjian/CentralControl/bin/Debug/CommonFunc.pdb
index b207f18..c9cd744 100644
Binary files a/shangjian/CentralControl/bin/Debug/CommonFunc.pdb and b/shangjian/CentralControl/bin/Debug/CommonFunc.pdb differ
diff --git a/shangjian/CentralControl/bin/Debug/XGL.Data.dll b/shangjian/CentralControl/bin/Debug/XGL.Data.dll
index fb76a39..814481c 100644
Binary files a/shangjian/CentralControl/bin/Debug/XGL.Data.dll and b/shangjian/CentralControl/bin/Debug/XGL.Data.dll differ
diff --git a/shangjian/CentralControl/bin/Debug/XGL.Data.pdb b/shangjian/CentralControl/bin/Debug/XGL.Data.pdb
index fa9f67c..af8af9b 100644
Binary files a/shangjian/CentralControl/bin/Debug/XGL.Data.pdb and b/shangjian/CentralControl/bin/Debug/XGL.Data.pdb differ
diff --git a/shangjian/CentralControl/bin/x86/Debug/CentralControl.exe b/shangjian/CentralControl/bin/x86/Debug/CentralControl.exe
index 559b292..690f9ae 100644
Binary files a/shangjian/CentralControl/bin/x86/Debug/CentralControl.exe and b/shangjian/CentralControl/bin/x86/Debug/CentralControl.exe differ
diff --git a/shangjian/CentralControl/bin/x86/Debug/CentralControl.pdb b/shangjian/CentralControl/bin/x86/Debug/CentralControl.pdb
index e20ea2a..f07f36e 100644
Binary files a/shangjian/CentralControl/bin/x86/Debug/CentralControl.pdb and b/shangjian/CentralControl/bin/x86/Debug/CentralControl.pdb differ
diff --git a/shangjian/CentralControl/bin/x86/Debug/CommonFunc.dll b/shangjian/CentralControl/bin/x86/Debug/CommonFunc.dll
index 2886c68..89183ca 100644
Binary files a/shangjian/CentralControl/bin/x86/Debug/CommonFunc.dll and b/shangjian/CentralControl/bin/x86/Debug/CommonFunc.dll differ
diff --git a/shangjian/CentralControl/bin/x86/Debug/CommonFunc.dll.config b/shangjian/CentralControl/bin/x86/Debug/CommonFunc.dll.config
index 1d68493..714d405 100644
--- a/shangjian/CentralControl/bin/x86/Debug/CommonFunc.dll.config
+++ b/shangjian/CentralControl/bin/x86/Debug/CommonFunc.dll.config
@@ -1,9 +1,9 @@
-
+
-
+
-
-
+
+
diff --git a/shangjian/CentralControl/bin/x86/Debug/CommonFunc.pdb b/shangjian/CentralControl/bin/x86/Debug/CommonFunc.pdb
index e10b301..8589252 100644
Binary files a/shangjian/CentralControl/bin/x86/Debug/CommonFunc.pdb and b/shangjian/CentralControl/bin/x86/Debug/CommonFunc.pdb differ
diff --git a/shangjian/CentralControl/bin/x86/Debug/XGL.Data.dll b/shangjian/CentralControl/bin/x86/Debug/XGL.Data.dll
index 861c80d..5570847 100644
Binary files a/shangjian/CentralControl/bin/x86/Debug/XGL.Data.dll and b/shangjian/CentralControl/bin/x86/Debug/XGL.Data.dll differ
diff --git a/shangjian/CentralControl/bin/x86/Debug/XGL.Data.dll.config b/shangjian/CentralControl/bin/x86/Debug/XGL.Data.dll.config
index 1d68493..714d405 100644
--- a/shangjian/CentralControl/bin/x86/Debug/XGL.Data.dll.config
+++ b/shangjian/CentralControl/bin/x86/Debug/XGL.Data.dll.config
@@ -1,9 +1,9 @@
-
+
-
+
-
-
+
+
diff --git a/shangjian/CentralControl/bin/x86/Debug/XGL.Data.pdb b/shangjian/CentralControl/bin/x86/Debug/XGL.Data.pdb
index 391b815..7ee8643 100644
Binary files a/shangjian/CentralControl/bin/x86/Debug/XGL.Data.pdb and b/shangjian/CentralControl/bin/x86/Debug/XGL.Data.pdb differ
diff --git a/shangjian/CentralControl/bin/x86/Debug/XGL.Models.dll b/shangjian/CentralControl/bin/x86/Debug/XGL.Models.dll
index 56aca9a..1ab86b2 100644
Binary files a/shangjian/CentralControl/bin/x86/Debug/XGL.Models.dll and b/shangjian/CentralControl/bin/x86/Debug/XGL.Models.dll differ
diff --git a/shangjian/CentralControl/bin/x86/Debug/XGL.Models.dll.config b/shangjian/CentralControl/bin/x86/Debug/XGL.Models.dll.config
index 1d68493..714d405 100644
--- a/shangjian/CentralControl/bin/x86/Debug/XGL.Models.dll.config
+++ b/shangjian/CentralControl/bin/x86/Debug/XGL.Models.dll.config
@@ -1,9 +1,9 @@
-
+
-
+
-
-
+
+
diff --git a/shangjian/CentralControl/bin/x86/Debug/XGL.Models.pdb b/shangjian/CentralControl/bin/x86/Debug/XGL.Models.pdb
index 7382234..1b0f8fd 100644
Binary files a/shangjian/CentralControl/bin/x86/Debug/XGL.Models.pdb and b/shangjian/CentralControl/bin/x86/Debug/XGL.Models.pdb differ
diff --git a/shangjian/CentralControl/bin/x86/Debug/XGL.Thrift.dll b/shangjian/CentralControl/bin/x86/Debug/XGL.Thrift.dll
index 829e947..6594a30 100644
Binary files a/shangjian/CentralControl/bin/x86/Debug/XGL.Thrift.dll and b/shangjian/CentralControl/bin/x86/Debug/XGL.Thrift.dll differ
diff --git a/shangjian/CentralControl/bin/x86/Debug/XGL.Thrift.pdb b/shangjian/CentralControl/bin/x86/Debug/XGL.Thrift.pdb
index a117294..b867864 100644
Binary files a/shangjian/CentralControl/bin/x86/Debug/XGL.Thrift.pdb and b/shangjian/CentralControl/bin/x86/Debug/XGL.Thrift.pdb differ
diff --git a/shangjian/CentralControl/bin/x86/Debug/config/ConnectionConfig.Config b/shangjian/CentralControl/bin/x86/Debug/config/ConnectionConfig.Config
index a0666b5..8ae69c7 100644
--- a/shangjian/CentralControl/bin/x86/Debug/config/ConnectionConfig.Config
+++ b/shangjian/CentralControl/bin/x86/Debug/config/ConnectionConfig.Config
@@ -3,7 +3,10 @@
强烈建议:对数据库以及本软件的参数更改,不要在此页进行.可以通过系统配置页进行更新.
- PaoP+dgwEqUaq1V2KF/9wc67GebYpjoI36S0e0LfeZKTVoaSbwjaLsKBP8to7AobicOYfkwbFhbqioXL3Ijc0aMPTvvDQPJyBYIJCX+xTofwmr8zGBc2qvVbcIrk5c7kgBLSKqriIgGe1apyKOKy1rbDI6aTLN1q
+ vadMWi9D6ZBkwIr78LoLmGwiSCvVnpY3nMB7IyQlxFiV2OD5s5WUgOabwGwWK3THmyUqdarOD4hLgFIvnCg0Z5JcMnCcII6fP2O7usaxD2yxms2iG3eLDegOrDQOCCjq
+
+ vadMWi9D6ZBkwIr78LoLmGwiSCvVnpY3nMB7IyQlxFiV2OD5s5WUgOabwGwWK3THmyUqdarOD4hLgFIvnCg0Z5JcMnCcII6fP2O7usaxD2yxms2iG3eLDegOrDQOCCjq
+
diff --git a/shangjian/CentralControl/obj/Debug/CentralControl.csproj.AssemblyReference.cache b/shangjian/CentralControl/obj/Debug/CentralControl.csproj.AssemblyReference.cache
index 032c8ac..c4d46fa 100644
Binary files a/shangjian/CentralControl/obj/Debug/CentralControl.csproj.AssemblyReference.cache and b/shangjian/CentralControl/obj/Debug/CentralControl.csproj.AssemblyReference.cache differ
diff --git a/shangjian/CentralControl/obj/Debug/CentralControl.exe b/shangjian/CentralControl/obj/Debug/CentralControl.exe
index 506d199..4a1cb54 100644
Binary files a/shangjian/CentralControl/obj/Debug/CentralControl.exe and b/shangjian/CentralControl/obj/Debug/CentralControl.exe differ
diff --git a/shangjian/CentralControl/obj/Debug/CentralControl.pdb b/shangjian/CentralControl/obj/Debug/CentralControl.pdb
index dd780b8..f73fb1a 100644
Binary files a/shangjian/CentralControl/obj/Debug/CentralControl.pdb and b/shangjian/CentralControl/obj/Debug/CentralControl.pdb differ
diff --git a/shangjian/CentralControl/obj/x86/Debug/CentralControl.csproj.AssemblyReference.cache b/shangjian/CentralControl/obj/x86/Debug/CentralControl.csproj.AssemblyReference.cache
index 4c14eea..bb6cbe9 100644
Binary files a/shangjian/CentralControl/obj/x86/Debug/CentralControl.csproj.AssemblyReference.cache and b/shangjian/CentralControl/obj/x86/Debug/CentralControl.csproj.AssemblyReference.cache differ
diff --git a/shangjian/CentralControl/obj/x86/Debug/CentralControl.csproj.CoreCompileInputs.cache b/shangjian/CentralControl/obj/x86/Debug/CentralControl.csproj.CoreCompileInputs.cache
index 724aaac..3b38671 100644
--- a/shangjian/CentralControl/obj/x86/Debug/CentralControl.csproj.CoreCompileInputs.cache
+++ b/shangjian/CentralControl/obj/x86/Debug/CentralControl.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-15d12e7ab7b704ceb52fe4b956a6248dc9f6d5e6
+6704f71248fbfc9a6d3933febec6839d57cb3a95e7ed3efb546e880ac71a1d71
diff --git a/shangjian/CentralControl/obj/x86/Debug/CentralControl.csproj.FileListAbsolute.txt b/shangjian/CentralControl/obj/x86/Debug/CentralControl.csproj.FileListAbsolute.txt
index f327840..c4b14fb 100644
--- a/shangjian/CentralControl/obj/x86/Debug/CentralControl.csproj.FileListAbsolute.txt
+++ b/shangjian/CentralControl/obj/x86/Debug/CentralControl.csproj.FileListAbsolute.txt
@@ -208,3 +208,48 @@ D:\project\tianjinXGL\xgl\neitong\shangjian\CentralControl\obj\x86\Debug\Central
D:\project\tianjinXGL\xgl\neitong\shangjian\CentralControl\obj\x86\Debug\CentralControl.csproj.CopyComplete
D:\project\tianjinXGL\xgl\neitong\shangjian\CentralControl\obj\x86\Debug\CentralControl.exe
D:\project\tianjinXGL\xgl\neitong\shangjian\CentralControl\obj\x86\Debug\CentralControl.pdb
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\Config\log4net.config
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\snap7.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\config\ConnectionConfig.Config
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\NLog.config
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\CentralControl.exe.config
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\CentralControl.exe
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\CentralControl.pdb
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\CommonFunc.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\Google.Protobuf.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\MySql.Data.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\NLog.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\Thrift.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\XGL.Data.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\XGL.Models.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\XGL.Thrift.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\NPOI.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\log4net.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\QRCoder.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\NPOI.OOXML.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\Newtonsoft.Json.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\BCrypt.Net-Next.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\NPOI.OpenXmlFormats.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\NPOI.OpenXml4Net.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\System.Memory.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\System.Numerics.Vectors.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\System.Runtime.CompilerServices.Unsafe.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\System.Buffers.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\CommonFunc.pdb
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\CommonFunc.dll.config
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\XGL.Data.pdb
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\XGL.Data.dll.config
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\XGL.Models.pdb
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\XGL.Models.dll.config
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\XGL.Thrift.pdb
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\Google.Protobuf.xml
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\BCrypt.Net-Next.xml
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\System.Memory.xml
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\System.Numerics.Vectors.xml
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\System.Runtime.CompilerServices.Unsafe.xml
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\bin\x86\Debug\System.Buffers.xml
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\obj\x86\Debug\CentralControl.csproj.AssemblyReference.cache
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\obj\x86\Debug\CentralControl.csproj.CoreCompileInputs.cache
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\obj\x86\Debug\CentralControl.csproj.CopyComplete
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\obj\x86\Debug\CentralControl.exe
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\CentralControl\obj\x86\Debug\CentralControl.pdb
diff --git a/shangjian/CentralControl/obj/x86/Debug/CentralControl.exe b/shangjian/CentralControl/obj/x86/Debug/CentralControl.exe
index 559b292..690f9ae 100644
Binary files a/shangjian/CentralControl/obj/x86/Debug/CentralControl.exe and b/shangjian/CentralControl/obj/x86/Debug/CentralControl.exe differ
diff --git a/shangjian/CentralControl/obj/x86/Debug/CentralControl.pdb b/shangjian/CentralControl/obj/x86/Debug/CentralControl.pdb
index e20ea2a..f07f36e 100644
Binary files a/shangjian/CentralControl/obj/x86/Debug/CentralControl.pdb and b/shangjian/CentralControl/obj/x86/Debug/CentralControl.pdb differ
diff --git a/shangjian/CentralControl/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/shangjian/CentralControl/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 9b3e5e5..606ee24 100644
Binary files a/shangjian/CentralControl/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/shangjian/CentralControl/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/shangjian/CommonFunc/HMessageBox.xaml b/shangjian/CommonFunc/HMessageBox.xaml
index f00423d..16b45aa 100644
--- a/shangjian/CommonFunc/HMessageBox.xaml
+++ b/shangjian/CommonFunc/HMessageBox.xaml
@@ -3,9 +3,61 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:CommonFunc"
+ xmlns:local="clr-namespace:CommonFunc"
mc:Ignorable="d"
Title="HMessageBox" Height="210" Width="420" WindowStartupLocation="CenterScreen" WindowStyle="None" BorderThickness="1,1,1,1" ResizeMode="NoResize" Closed="Window_Closed" Loaded="Window_Loaded">
+
+
+
+
@@ -49,13 +101,13 @@
-
-
-
-
diff --git a/shangjian/CommonFunc/obj/x86/Debug/CommonFunc.csproj.CoreCompileInputs.cache b/shangjian/CommonFunc/obj/x86/Debug/CommonFunc.csproj.CoreCompileInputs.cache
index 1fe1010..6c0849b 100644
--- a/shangjian/CommonFunc/obj/x86/Debug/CommonFunc.csproj.CoreCompileInputs.cache
+++ b/shangjian/CommonFunc/obj/x86/Debug/CommonFunc.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-eafdca6ee748aec506bd217d6273757fffaf4aa4e66b7b29256414d0c9c09633
+0833b6f358da98cc490efe830530cdf2b7a5a4dedf80eb68fd5df4d5b3412661
diff --git a/shangjian/CommonFunc/obj/x86/Debug/CommonFunc_MarkupCompile.cache b/shangjian/CommonFunc/obj/x86/Debug/CommonFunc_MarkupCompile.cache
index 91851d3..a60eebb 100644
--- a/shangjian/CommonFunc/obj/x86/Debug/CommonFunc_MarkupCompile.cache
+++ b/shangjian/CommonFunc/obj/x86/Debug/CommonFunc_MarkupCompile.cache
@@ -13,7 +13,7 @@ DEBUG;TRACE
489050341
2-1355062061
27790667083
-44-239516262
+44231912980
HMessageBox.xaml;Tools\MachineRepairWin.xaml;Tools\PauseOrderWin.xaml;Tools\PauseRecoverWin.xaml;
False
diff --git a/shangjian/LanJu/obj/Debug/LanJu.csproj.AssemblyReference.cache b/shangjian/LanJu/obj/Debug/LanJu.csproj.AssemblyReference.cache
index d89fad1..6c695b1 100644
Binary files a/shangjian/LanJu/obj/Debug/LanJu.csproj.AssemblyReference.cache and b/shangjian/LanJu/obj/Debug/LanJu.csproj.AssemblyReference.cache differ
diff --git a/shangjian/LanJuLib/bin/Debug/CommonFunc.dll b/shangjian/LanJuLib/bin/Debug/CommonFunc.dll
index c788329..89183ca 100644
Binary files a/shangjian/LanJuLib/bin/Debug/CommonFunc.dll and b/shangjian/LanJuLib/bin/Debug/CommonFunc.dll differ
diff --git a/shangjian/LanJuLib/bin/Debug/CommonFunc.pdb b/shangjian/LanJuLib/bin/Debug/CommonFunc.pdb
index b207f18..8589252 100644
Binary files a/shangjian/LanJuLib/bin/Debug/CommonFunc.pdb and b/shangjian/LanJuLib/bin/Debug/CommonFunc.pdb differ
diff --git a/shangjian/LanJuLib/bin/Debug/XGL.Models.dll b/shangjian/LanJuLib/bin/Debug/XGL.Models.dll
index ef6d10b..1ab86b2 100644
Binary files a/shangjian/LanJuLib/bin/Debug/XGL.Models.dll and b/shangjian/LanJuLib/bin/Debug/XGL.Models.dll differ
diff --git a/shangjian/LanJuLib/bin/Debug/XGL.Models.pdb b/shangjian/LanJuLib/bin/Debug/XGL.Models.pdb
index 7b5f2df..1b0f8fd 100644
Binary files a/shangjian/LanJuLib/bin/Debug/XGL.Models.pdb and b/shangjian/LanJuLib/bin/Debug/XGL.Models.pdb differ
diff --git a/shangjian/LanJuLib/obj/Debug/LanJuLib.csproj.AssemblyReference.cache b/shangjian/LanJuLib/obj/Debug/LanJuLib.csproj.AssemblyReference.cache
index 27de418..1bf6be9 100644
Binary files a/shangjian/LanJuLib/obj/Debug/LanJuLib.csproj.AssemblyReference.cache and b/shangjian/LanJuLib/obj/Debug/LanJuLib.csproj.AssemblyReference.cache differ
diff --git a/shangjian/RestartApp/obj/Debug/RestartApp.csproj.AssemblyReference.cache b/shangjian/RestartApp/obj/Debug/RestartApp.csproj.AssemblyReference.cache
index 03498a4..293b360 100644
Binary files a/shangjian/RestartApp/obj/Debug/RestartApp.csproj.AssemblyReference.cache and b/shangjian/RestartApp/obj/Debug/RestartApp.csproj.AssemblyReference.cache differ
diff --git a/shangjian/WPFupdate/obj/Debug/WPFupdate.csproj.AssemblyReference.cache b/shangjian/WPFupdate/obj/Debug/WPFupdate.csproj.AssemblyReference.cache
index 03498a4..293b360 100644
Binary files a/shangjian/WPFupdate/obj/Debug/WPFupdate.csproj.AssemblyReference.cache and b/shangjian/WPFupdate/obj/Debug/WPFupdate.csproj.AssemblyReference.cache differ
diff --git a/shangjian/XGL.Data/DBService/FormingMachineService.cs b/shangjian/XGL.Data/DBService/FormingMachineService.cs
index a2c1440..5cec352 100644
--- a/shangjian/XGL.Data/DBService/FormingMachineService.cs
+++ b/shangjian/XGL.Data/DBService/FormingMachineService.cs
@@ -238,7 +238,7 @@ where res.taskcode = '0' and equipmentCode = 'C6' and res.OrderCode is not null
[operation_desc], [old_value], [new_value], [device_code],[remark],[order_code])
VALUES
('{CommonFunc.Common.GetUUID()}', '{LoginUser.UserId}', '{LoginUser.UserName}', '{type}', GetDate(),
- '工单状态更新-暂停', 'w2', '{status}', '{deviceCode}','{remark}','{orderCode}');";
+ '工单状态更新-恢复', 'w4', '{status}', '{deviceCode}','{remark}','{orderCode}');";
}
else
{
@@ -247,7 +247,7 @@ where res.taskcode = '0' and equipmentCode = 'C6' and res.OrderCode is not null
[operation_desc], [old_value], [new_value], [device_code],[remark],[order_code])
VALUES
('{CommonFunc.Common.GetUUID()}', '{LoginUser.UserId}', '{LoginUser.UserName}', '{type}', GetDate(),
- '工单状态更新-恢复', 'w4', '{status}', '{deviceCode}','{remark}','{orderCode}');";
+ '工单状态更新-暂停', 'w2', '{status}', '{deviceCode}','{remark}','{orderCode}');";
}
string sql = $@"update pro_order_workorder set status = '{status}' where workorder_code = '{orderCode}'";
sqlList.Add(sql);
@@ -624,7 +624,7 @@ VALUES
{userCount}, '{costCenter}','0','{batchCode}','{isEndReport}','{0}','{LoginUser.CurrDeviceIP}','{LoginUser.Version}');";
foreach (string item in GetAllWorkReportsForOrderAndChildren(selectRow["workorder_code"].ToString(), selectRow, orderQuntity, reportCode, costCenter, batchCode,
- isEndReport, deviceCode, lineName, workCount, workTimeDic, userCountDic,0))
+ isEndReport, deviceCode, lineName, workCount, workTimeDic, userCountDic, 0))
{
sqlList.Add(item);
}
@@ -681,33 +681,47 @@ VALUES
//赵啸林又说sap有问题,需要上位机修改报工标识2023-12-25,但仅在最终报工时,才更新此状态
if (isEndReport.Equals("1"))
{
- //更新订单状态为已报工;
- string updateOrderSql = $@"update pro_order_workorder set status = 'w3', update_by = '{LoginUser.UserName}',update_time = GETDATE() where belong_work_order = '{selectRow["workorder_code"]}' ";
- sqlList.Add(updateOrderSql);
+ //2024-04-15添加切线方案,暂停状态下不修改报工状态,=w4的时候,不加报工状态更新语句
+ if (!selectRow["status"].ToString().Equals("w4"))
+ {
+ //更新订单状态为已报工;
+ string updateOrderSql = $@"update pro_order_workorder set status = 'w3', update_by = '{LoginUser.UserName}',update_time = GETDATE() where belong_work_order = '{selectRow["workorder_code"]}' ";
+ sqlList.Add(updateOrderSql);
- //修改报工逻辑,最终报工时添加子母工单领料单状态更新2024-02-20
- if (subOrder != "") //有子单
- {
- //更新子单状态
- string updateSubOrderPrepareSql = $"update mes_prepare set status = 'L1' where workorder_code = '{subOrder}'";
- //更新母单状态
- string updateMainOrderPrepareSql = $"update mes_prepare set status = 'L1' where workorder_code = '{selectRow["workorder_code"]}'";
- sqlList.Add(updateSubOrderPrepareSql);
- sqlList.Add(updateMainOrderPrepareSql);
- }
- else //无子单
- {
- //更新母单状态
- string updateMainOrderPrepareSql = $"update mes_prepare set status = 'L1' where workorder_code = '{selectRow["workorder_code"]}'";
- sqlList.Add(updateMainOrderPrepareSql);
+ //修改报工逻辑,最终报工时添加子母工单领料单状态更新2024-02-20
+ //递归更新子单领料状态
+ foreach (var item in GetUpdatePrepareSql(selectRow["workorder_code"].ToString()))
+ {
+ sqlList.Add(item);
+ }
}
+ //if (subOrder != "") //有子单
+ //{
+
+ // //更新子单状态
+ // string updateSubOrderPrepareSql = $"update mes_prepare set status = 'L1' where workorder_code = '{subOrder}'";
+ // //更新母单状态
+ // string updateMainOrderPrepareSql = $"update mes_prepare set status = 'L1' where workorder_code = '{selectRow["workorder_code"]}'";
+ // sqlList.Add(updateSubOrderPrepareSql);
+ // sqlList.Add(updateMainOrderPrepareSql);
+ //}
+ //else //无子单
+ //{
+ // //更新母单状态
+ // string updateMainOrderPrepareSql = $"update mes_prepare set status = 'L1' where workorder_code = '{selectRow["workorder_code"]}'";
+ // sqlList.Add(updateMainOrderPrepareSql);
+ //}
}
#endregion
#region 批次报工状态更新
- //添加批次报工状态更新--2023-12-26
- string updateBatchOrderStatusSql = $@"update pro_order_workorder_batch set status = '0', update_by = '{LoginUser.UserName}',update_time = GETDATE() where workorder_id = '{selectRow["workorder_id"]}' and batch_code = '{batchCode}' ";
- sqlList.Add(updateBatchOrderStatusSql);
+ //2024-04-15添加切线方案,暂停状态下不修改报工状态,=w4的时候,不加报工状态更新语句
+ if (!selectRow["status"].ToString().Equals("w4"))
+ {
+ //添加批次报工状态更新--2023-12-26
+ string updateBatchOrderStatusSql = $@"update pro_order_workorder_batch set status = '0', update_by = '{LoginUser.UserName}',update_time = GETDATE() where workorder_id = '{selectRow["workorder_id"]}' and batch_code = '{batchCode}' ";
+ sqlList.Add(updateBatchOrderStatusSql);
+ }
#endregion
@@ -715,11 +729,29 @@ VALUES
}
List workReports = new List();
+ List updatePrepareSqlList = new List();
+ ///
+ /// 递归获取子单报工SQL
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
public List GetAllWorkReportsForOrderAndChildren(string orderId, DataRowView selectRow, string orderQuntity, string reportCode, string costCenter, string batchCode,
- string isEndReport, string deviceCode, string lineName, string workCount, Dictionary workTimeDic, Dictionary userCountDic,int sortNo)
+ string isEndReport, string deviceCode, string lineName, string workCount, Dictionary workTimeDic, Dictionary userCountDic, int sortNo)
{
-
+
//获取子工单的信息
string getSubOrderSql = $"select workorder_code,product_code,product_name,quantity_split,unit from pro_order_workorder where parent_order = '{orderId}'";
string subOrder = "";
@@ -736,7 +768,34 @@ VALUES
subQuntity = dtSubOrder.Tables[0].Rows[0]["quantity_split"].ToString();
subUnit = dtSubOrder.Tables[0].Rows[0]["unit"].ToString();
double rate = Convert.ToDouble(workCount) / Convert.ToDouble(orderQuntity);
- double subOrderQty = rate * Convert.ToDouble(subQuntity);
+ double subOrderQty = 0;
+ LogHelper.instance.log.Info("rate>>>" + rate);
+ //根据base_product_attach表里的报工比例,计算子单数量,又取消了
+ string sqlGetReportRate = $@"select isnull(report_rate,0) as report_rate from base_product where product_code = '{selectRow["product_code"]}'";
+ //DataSet dtReportRate = Utils.netClientDBHelper.getDataSet(sqlGetReportRate);
+
+ //string reportRate = "0";
+ //if (dtReportRate != null && dtReportRate.Tables.Count > 0 && dtReportRate.Tables[0].Rows.Count > 0)
+ //{
+ // reportRate = dtReportRate.Tables[0].Rows[0][0].ToString();
+ // LogHelper.instance.log.Info("获取到报工效率为:" + reportRate+",产品编码为:"+ selectRow["product_code"]+",子单数量为:"+ subQuntity);
+ //}
+ //if (sortNo < 3)
+ //{
+ // if (reportRate.Equals("0"))
+ // {
+ // subOrderQty = rate * Convert.ToDouble(subQuntity);
+ // }
+ // else
+ // {
+ // subOrderQty = Convert.ToDouble(reportRate) * Convert.ToDouble(subQuntity);
+ // }
+ //}
+ if (sortNo < 3)
+ {
+ subOrderQty = rate * Convert.ToDouble(subQuntity);
+ }
+
string subOrderSql = $@"INSERT INTO [dbo].[mes_report_work]
([id], [report_type], [report_code], [workorder_code], [product_code], [product_name],
[spec], [unit], [quantity], [quantity_feedback], [quantity_qualified], [quantity_unqualified],
@@ -752,10 +811,10 @@ VALUES
'无', '{workTimeDic[sortNo]}', '{deviceCode}', '{lineName}', N'{LoginUser.TeamCode}', '{selectRow["shift_id"]}',
NULL, NULL, NULL, NULL, '{LoginUser.UserName}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}',
'{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}', '0', NULL, 'prod',
- {userCountDic[sortNo]}, '{costCenter}','0','{batchCode}','{isEndReport}','{selectRow["workorder_code"]}','{LoginUser.CurrDeviceIP}','{LoginUser.Version}');";
+ {userCountDic[sortNo]}, '{costCenter}','0','{batchCode}','{isEndReport}','{orderId}','{LoginUser.CurrDeviceIP}','{LoginUser.Version}');";
workReports.Add(subOrderSql);
sortNo++;
- GetAllWorkReportsForOrderAndChildren(subOrder, selectRow, orderQuntity, reportCode, costCenter, batchCode, isEndReport, deviceCode, lineName, subQuntity, workTimeDic, userCountDic, sortNo);
+ GetAllWorkReportsForOrderAndChildren(subOrder, selectRow, orderQuntity, reportCode, costCenter, batchCode, isEndReport, deviceCode, lineName, subQuntity, workTimeDic, userCountDic, sortNo);
}
@@ -763,6 +822,23 @@ VALUES
}
+ public List GetUpdatePrepareSql(string orderId)
+ {
+ string updateMainOrderPrepareSql = $"update mes_prepare set status = 'L1', update_by = '{LoginUser.UserName}',update_time = GETDATE() where workorder_code = '{orderId}' and del_flag = '0'";
+ updatePrepareSqlList.Add(updateMainOrderPrepareSql);
+ //获取子工单的信息
+ string getSubOrderSql = $"select workorder_code,product_code,product_name,quantity_split,unit from pro_order_workorder where parent_order = '{orderId}'";
+ string subOrder = "";
+
+ DataSet dtSubOrder = Utils.netClientDBHelper.getDataSet(getSubOrderSql);
+ if (dtSubOrder != null && dtSubOrder.Tables.Count > 0 && dtSubOrder.Tables[0].Rows.Count > 0)
+ {
+ subOrder = dtSubOrder.Tables[0].Rows[0]["workorder_code"].ToString();
+ GetUpdatePrepareSql(subOrder);
+ }
+ return updatePrepareSqlList;
+ }
+
public bool ChangeShiftsInfo(string deviceCode)
{
//
@@ -836,7 +912,11 @@ VALUES
return sql;
}
-
+ ///
+ /// 获取母单的包工人数
+ ///
+ ///
+ ///
public DataTable GetFatherOrderUserCount(string orderCode)
{
string sql = $@"SELECT top 1 use_man FROM [dbo].[mes_report_work] where workorder_code = '{orderCode}' order by create_time";
@@ -849,6 +929,24 @@ VALUES
return null;
}
+ ///
+ /// 获取报工总数量
+ ///
+ ///
+ ///
+ public DataTable GetOrderReportSumQty(string orderCode)
+ {
+ string sql = $@"SELECT sum(quantity_feedback) FROM [dbo].[mes_report_work] where workorder_code = '{orderCode}' GROUP BY workorder_code";
+
+ DataSet dtset = Utils.netClientDBHelper.getDataSet(sql);
+ if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
+ {
+ return dtset.Tables[0];
+ }
+ return null;
+ }
+
+
public DataTable GetSubOrderCount(string orderCode)
{
//获取子工单的信息
diff --git a/shangjian/XGL.Data/DBServiceFinishProd/FinishProdDBService.cs b/shangjian/XGL.Data/DBServiceFinishProd/FinishProdDBService.cs
index 85abd26..422f99d 100644
--- a/shangjian/XGL.Data/DBServiceFinishProd/FinishProdDBService.cs
+++ b/shangjian/XGL.Data/DBServiceFinishProd/FinishProdDBService.cs
@@ -88,7 +88,7 @@ namespace XGL.Dats.DBServiceFinishProd
public DataTable GetUserInfoFromCloudServer(string userID)
{
string sql = $@"SELECT user_name,nick_name,sex FROM [dbo].[sys_user] where del_flag = '0' and user_name = '{userID}'";
- DataSet dtset = Utils.clientDBHelper.getDataSet(sql);
+ DataSet dtset = Utils.cloudDBHelper.getDataSet(sql);
if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
{
return dtset.Tables[0];
@@ -150,7 +150,7 @@ namespace XGL.Dats.DBServiceFinishProd
public DataTable GetOperationRecord(string v)
{
- string sql = $" select user_id,user_name,operation_type,operation_time,operation_desc,old_value,new_value,device_code,remark,order_code from mes_operation_log where device_code = '{v}'";
+ string sql = $" select user_id,user_name,operation_type,operation_time,operation_desc,old_value,new_value,device_code,remark,order_code from mes_operation_log where device_code = '{v}' order by operation_time desc";
DataSet dtset = Utils.netClientDBHelper.getDataSet(sql);
if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
{
@@ -169,7 +169,7 @@ remark, work_time, machine_code, machine_name, team_code, shift_code,
create_by, create_time, update_time, update_by, upload_time, upload_status,
upload_msg, prod_type, use_man, work_center
from mes_report_work
-where CONVERT(VARCHAR(10), create_time , 120)= CONVERT(VARCHAR(10), GetDate() , 120) and machine_code = '{deviceCode}'";
+where CONVERT(VARCHAR(10), create_time , 120)= CONVERT(VARCHAR(10), '{LoginUser.WorkDate}' , 120) and machine_code = '{deviceCode}'";
DataSet dtset = Utils.netClientDBHelper.getDataSet(sql);
if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
{
@@ -182,11 +182,12 @@ where CONVERT(VARCHAR(10), create_time , 120)= CONVERT(VARCHAR(10), GetDate() ,
public DataTable GetCosumeData(string workorder)
{
- string sql = $@"select '0' as qty,'' as remark, workorder_code, SUBSTRING(material_code, 8, LEN(material_code)) as material_code1,material_code,material_name,detail.prod_type,material_spc,detail.unit,quantity,
+ string sql = $@"select DISTINCT '0' as qty,'' as remark, pre.workorder_code, SUBSTRING(material_code, 8, LEN(material_code)) as material_code1,material_code,material_name,detail.prod_type,material_spc,detail.unit,quantity,
detail.create_by,detail.create_time,detail.update_by,detail.update_time,locator,need_date,
-recoil,fund_quanlity,detail.del_flag,parent_work_order
+recoil,fund_quanlity,detail.del_flag,parent_work_order,orders.workorder_code_sap
from mes_prepare_detail detail
LEFT JOIN mes_prepare pre on detail.prepare_id = pre.prepare_id
+left join pro_order_workorder orders on pre.workorder_code = orders.workorder_code and orders.del_flag = '0'
where detail.parent_work_order ='{workorder}' and detail.del_flag = '0'";
DataSet dtset = Utils.netClientDBHelper.getDataSet(sql);
if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
@@ -230,7 +231,35 @@ where detail.parent_work_order ='{workorder}' and detail.del_flag = '0'";
return null;
}
-
+
+ ///
+ /// 查询订单报工次数
+ ///
+ ///
+ ///
+ public DataTable GetBatchReportedCount(string workorder)
+ {
+ //string sql = $" select count(*) from mes_report_work where workorder_code = '{workorder}' AND del_flag='0'";
+ string sql = $@"select count(distinct batch) from mes_report_work where workorder_code = '{workorder}' AND del_flag='0';";
+ DataSet dtset = Utils.netClientDBHelper.getDataSet(sql);
+ if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
+ {
+ return dtset.Tables[0];
+ }
+ return null;
+ }
+
+ public bool IsLastBatchReport(string batchNo)
+ {
+ //string sql = $" select count(*) from mes_report_work where workorder_code = '{workorder}' AND del_flag='0'";
+ string sql = $@"select count(distinct batch) from mes_report_work where batch = '{batchNo}' AND del_flag='0';";
+ DataSet dtset = Utils.netClientDBHelper.getDataSet(sql);
+ if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
+ {
+ return dtset.Tables[0].Rows[0][0].ToString().Equals("0") ? true : false;
+ }
+ return true;
+ }
public DataTable GetFactoryInfo(string sitecode)
{
@@ -530,10 +559,11 @@ select a.TrayCode,a.ProductBarNo,a.carcode,a.createtime,a.lineno,b.HadNumber
{
string sql = $@"select workorder.factory_code,workorder.product_date as plan_time, workorder.workorder_id,workorder.workorder_code, product_code,product_name,
product_spc,shifts.shift_desc,prod_line_code,workorder.status,route_code,quantity_split,
-unit,workorder.shift_id ,batch.batch_code,batch.batch_quantity,sort_no, workorder.parent_order,batch.qc_status,batch.status as batchStatus,workorder_code_sap,salary_flag
+unit,workorder.shift_id ,batch.batch_code,batch.batch_quantity,sort_no, workorder.parent_order,batch.qc_status,isnull(batch.qc_result,'') qc_result,batch.status as batchStatus,workorder_code_sap,salary_flag,qty.batchQty,batch.batch_quantity - qty.batchQty as diffQty
from pro_order_workorder workorder WITH (NOLOCK)
left JOIN base_shifts_t shifts WITH (NOLOCK) on workorder.shift_id = shifts.shift_id
left JOIN pro_order_workorder_batch batch WITH (NOLOCK) on workorder.workorder_id = batch.workorder_id
+left join (SELECT sum(quantity_feedback) as batchQty,workorder_code,batch FROM [dbo].[mes_report_work] where del_flag = 0 GROUP BY workorder_code,batch) qty on qty.workorder_code = workorder.workorder_code and batch.batch_code = qty.batch
where 1=1 and batch.del_flag = 0 and workorder.del_flag = 0 and
workorder.parent_order ='0' and CONVERT(VARCHAR(10), workorder.product_date , 120)= CONVERT(VARCHAR(10), '{date}' , 120) and workorder.prod_line_code like '%{deviceCode}%' order by sort_no,batch_code";
@@ -601,13 +631,34 @@ where line_code = '{deviceCode}' and CONVERT(VARCHAR(10), Create_time , 120) = C
return null;
}
+
+ ///
+ /// 根据线体、产品获取工序列表
+ ///
+ ///
+ ///
+ ///
+ public DataTable GetUnitPriceDataNew(string deviceCode)
+ {
+ string sql = $@"select [workorder_code], [workorder_code_sap], [product_name], SUBSTRING([product_code], 8, LEN(product_code)) as product_code, [user_name], [nick_name], [childprocess_code], [childprocess_name] ,[create_by], [create_time], [line_code]
+from mes_unitprice_report
+where line_code = '{deviceCode}' and CONVERT(VARCHAR(10), Create_time , 120) = CONVERT(VARCHAR(10),GETDATE(), 120) ORDER BY childprocess_code,create_time";
+
+ DataSet dtset = Utils.netClientDBHelper.getDataSet(sql);
+ if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
+ {
+ return dtset.Tables[0];
+ }
+ return null;
+ }
+
///
/// 生成计件薪酬数据
///
///
///
public string GetCreateUnitPriceInfo(sys_user item,string workorderCode, string sapWorkorderCode,string productCode,string productName,string childProcessCode,string childProcessName,string deviceCode)
- {
+ {
string sql = $@"INSERT INTO [dbo].[mes_unitprice_report] (
[id],[workorder_code], [workorder_code_sap], [product_name], [product_code],
[user_name], [nick_name], [childprocess_code], [childprocess_name], [attr1],
@@ -624,6 +675,18 @@ where line_code = '{deviceCode}' and CONVERT(VARCHAR(10), Create_time , 120) = C
return sql;
}
+ public DataSet GetSapCode(string deviceCode)
+ {
+ string sapCodeSql = $"select sap_code from base_equipment where equipment_code = '{deviceCode}'";
+ string sapCode = "";
+ DataSet dtSapCode = Utils.netClientDBHelper.getDataSet(sapCodeSql);
+ if (dtSapCode != null && dtSapCode.Tables.Count > 0 && dtSapCode.Tables[0].Rows.Count > 0)
+ {
+ sapCode = dtSapCode.Tables[0].Rows[0]["sap_code"].ToString();
+ return dtSapCode;
+ }
+ return null;
+ }
public string GetUpdateUnitPriceSql(string workOrderCode)
{
string updateOrderSql = $@"update pro_order_workorder set salary_flag = '1', update_by = '{LoginUser.UserName}',update_time = GETDATE() where workorder_code = '{workOrderCode}' ";
@@ -829,7 +892,26 @@ where detail.parent_work_order = '{processid}'"; //where CONVERT(VARCHAR(10), w
}
return null;
}
-
+
+ ///
+ /// 获取当天产线活动中工单的数量
+ ///
+ ///
+ public DataTable GetActivedOrdersQty(string deviceCode, string workDate)
+ {
+ string sql = $@"select count(*)
+ from pro_order_workorder workorder
+ where CONVERT(VARCHAR(10), workorder.product_date , 120)= CONVERT(VARCHAR(10), '{workDate}' , 120)
+ and workorder.prod_line_code like '%{deviceCode}%' and workorder.del_flag = 0 and parent_order = '0' and workorder.status = 'w2'";
+
+ DataSet dtset = Utils.netClientDBHelper.getDataSet(sql);
+ if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
+ {
+ return dtset.Tables[0];
+ }
+ return null;
+ }
+
///
/// 更新湿料计划同步状态、工单状态
///
@@ -3295,11 +3377,7 @@ left join basedata_plcsetting f on a.PlcId5=f.Id
}
return Items;
}
-
-
-
-
-
+
diff --git a/shangjian/XGL.Data/XGL.Data.csproj b/shangjian/XGL.Data/XGL.Data.csproj
index 0316d54..09b26ff 100644
--- a/shangjian/XGL.Data/XGL.Data.csproj
+++ b/shangjian/XGL.Data/XGL.Data.csproj
@@ -57,6 +57,10 @@
..\packages\Google.Protobuf.3.5.1\lib\net45\Google.Protobuf.dll
+
+ False
+ ..\Libs\log4net.dll
+
..\packages\MySql.Data.6.8.8\lib\net40\MySql.Data.dll
diff --git a/shangjian/XGL.Data/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/shangjian/XGL.Data/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 507a273..fe98a35 100644
Binary files a/shangjian/XGL.Data/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/shangjian/XGL.Data/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/shangjian/XGL.Data/obj/x86/Debug/XGL.Data.csproj.CoreCompileInputs.cache b/shangjian/XGL.Data/obj/x86/Debug/XGL.Data.csproj.CoreCompileInputs.cache
index 8a18c33..1913d33 100644
--- a/shangjian/XGL.Data/obj/x86/Debug/XGL.Data.csproj.CoreCompileInputs.cache
+++ b/shangjian/XGL.Data/obj/x86/Debug/XGL.Data.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-2df19547b61eec50ce5622f682c721677c5685d3e9c6b57b48caf94d220efa28
+74d66cc74320b0a05442877ece03b5b66098c72c0f47ce1e84f8126b6da7ec2b
diff --git a/shangjian/XGL.Model/bin/x86/Debug/XGL.Models.dll b/shangjian/XGL.Model/bin/x86/Debug/XGL.Models.dll
index 66e44e0..1ab86b2 100644
Binary files a/shangjian/XGL.Model/bin/x86/Debug/XGL.Models.dll and b/shangjian/XGL.Model/bin/x86/Debug/XGL.Models.dll differ
diff --git a/shangjian/XGL.Model/bin/x86/Debug/XGL.Models.pdb b/shangjian/XGL.Model/bin/x86/Debug/XGL.Models.pdb
index e0aa4dc..1b0f8fd 100644
Binary files a/shangjian/XGL.Model/bin/x86/Debug/XGL.Models.pdb and b/shangjian/XGL.Model/bin/x86/Debug/XGL.Models.pdb differ
diff --git a/shangjian/XGL.Model/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/shangjian/XGL.Model/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 48e97da..99632a5 100644
Binary files a/shangjian/XGL.Model/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/shangjian/XGL.Model/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.csproj.AssemblyReference.cache b/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.csproj.AssemblyReference.cache
index 5f9f0ba..ba582fb 100644
Binary files a/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.csproj.AssemblyReference.cache and b/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.csproj.AssemblyReference.cache differ
diff --git a/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.csproj.CoreCompileInputs.cache b/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.csproj.CoreCompileInputs.cache
index 55b0017..13751d5 100644
--- a/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.csproj.CoreCompileInputs.cache
+++ b/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-da1f8a4ab9deae84872caf330dfa9c851f84a58d
+4ef8f3fe584abbf1a27a86fbab967f450baddb9bb9518d8c42d9654a4135d079
diff --git a/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.csproj.FileListAbsolute.txt b/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.csproj.FileListAbsolute.txt
index e2ca9ca..dce3f6c 100644
--- a/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.csproj.FileListAbsolute.txt
+++ b/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.csproj.FileListAbsolute.txt
@@ -72,3 +72,14 @@ F:\KHD\230620\shangjian\XGL.Model\obj\x86\Debug\XGL.Models.csproj.CoreCompileInp
F:\KHD\230620\shangjian\XGL.Model\obj\x86\Debug\XGL.Models.csproj.CopyComplete
F:\KHD\230620\shangjian\XGL.Model\obj\x86\Debug\XGL.Models.dll
F:\KHD\230620\shangjian\XGL.Model\obj\x86\Debug\XGL.Models.pdb
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\XGL.Model\bin\x86\Debug\XGL.Models.dll.config
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\XGL.Model\bin\x86\Debug\XGL.Models.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\XGL.Model\bin\x86\Debug\XGL.Models.pdb
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\XGL.Model\bin\x86\Debug\Google.Protobuf.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\XGL.Model\bin\x86\Debug\MySql.Data.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\XGL.Model\bin\x86\Debug\Google.Protobuf.xml
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\XGL.Model\obj\x86\Debug\XGL.Models.csproj.AssemblyReference.cache
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\XGL.Model\obj\x86\Debug\XGL.Models.csproj.CoreCompileInputs.cache
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\XGL.Model\obj\x86\Debug\XGL.Models.csproj.CopyComplete
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\XGL.Model\obj\x86\Debug\XGL.Models.dll
+D:\WorkSpace\KHD\Project\Lanju\Lanju-client\shangjian\XGL.Model\obj\x86\Debug\XGL.Models.pdb
diff --git a/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.dll b/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.dll
index 66e44e0..1ab86b2 100644
Binary files a/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.dll and b/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.dll differ
diff --git a/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.pdb b/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.pdb
index e0aa4dc..1b0f8fd 100644
Binary files a/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.pdb and b/shangjian/XGL.Model/obj/x86/Debug/XGL.Models.pdb differ
diff --git a/shangjian/XGL.Thrift/obj/Debug/XGL.Thrift.csproj.AssemblyReference.cache b/shangjian/XGL.Thrift/obj/Debug/XGL.Thrift.csproj.AssemblyReference.cache
index bbf53b4..d5df094 100644
Binary files a/shangjian/XGL.Thrift/obj/Debug/XGL.Thrift.csproj.AssemblyReference.cache and b/shangjian/XGL.Thrift/obj/Debug/XGL.Thrift.csproj.AssemblyReference.cache differ
diff --git a/shangjian/XGL/App.config b/shangjian/XGL/App.config
index 872a6c6..361d988 100644
--- a/shangjian/XGL/App.config
+++ b/shangjian/XGL/App.config
@@ -12,7 +12,7 @@
-
+
diff --git a/shangjian/XGL/LoginPage.xaml b/shangjian/XGL/LoginPage.xaml
index 343c875..dcbb75f 100644
--- a/shangjian/XGL/LoginPage.xaml
+++ b/shangjian/XGL/LoginPage.xaml
@@ -68,8 +68,8 @@
-
-
+
+
记住密码
diff --git a/shangjian/XGL/LoginPage.xaml.cs b/shangjian/XGL/LoginPage.xaml.cs
index 8f758d9..577979f 100644
--- a/shangjian/XGL/LoginPage.xaml.cs
+++ b/shangjian/XGL/LoginPage.xaml.cs
@@ -294,6 +294,7 @@ namespace XGL
{
try
{
+ btnCheckUpdate_Click(null, null);
username.Focus();
//dldh.IsActive = false;
this.dldh.Visibility = Visibility.Hidden;//遮罩层可见
@@ -364,7 +365,8 @@ namespace XGL
}
else
{
- MessageBox.Show("没有检测到新版本", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
+ if (sender != null)
+ MessageBox.Show("没有检测到新版本", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
diff --git a/shangjian/XGL/Views/LanJu_Operator.xaml.cs b/shangjian/XGL/Views/LanJu_Operator.xaml.cs
index 242b1c3..63c88c3 100644
--- a/shangjian/XGL/Views/LanJu_Operator.xaml.cs
+++ b/shangjian/XGL/Views/LanJu_Operator.xaml.cs
@@ -358,17 +358,18 @@ namespace XGL.Views
var selectedRow = dgWorkOrderInfo.SelectedItem as FoamingMacModel;
if (selectedRow == null)
{
- MessageBox.Show("请选择你要暂停的工单!", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Warning);
+ CustomMessageBox.Show("请选择你要暂停的工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
- MessageBoxResult result = MessageBox.Show("你确定要暂停该工单吗?", "温馨提示", MessageBoxButton.YesNo, MessageBoxImage.Information);
- if (result == MessageBoxResult.No)
+ CustomMessageBoxResult result = CustomMessageBox.Show("你确定要暂停该工单吗?", CustomMessageBoxButton.OKCancel, CustomMessageBoxIcon.Question);
+ //MessageBoxResult result = MessageBox.Show("你确定要暂停该工单吗?", "温馨提示", MessageBoxButton.YesNo, MessageBoxImage.Information);
+ if (result == CustomMessageBoxResult.Cancel)
return;
var workordercode = selectedRow.workorder_code;
string currStatus = selectedRow.status;
if(currStatus!="w2")
{
- MessageBox.Show("只有活动中的工单才支持暂停!", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Warning);
+ CustomMessageBox.Show("只有活动中的工单才支持暂停!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
PauseOrderWin pauseOrderWin = new PauseOrderWin();
@@ -385,14 +386,14 @@ namespace XGL.Views
var selectedRow = dgWorkOrderInfo.SelectedItem as FoamingMacModel;
if (selectedRow == null)
{
- MessageBox.Show("请选择你要恢复的工单!", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Warning);
+ CustomMessageBox.Show("请选择你要恢复的工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
var workordercode = selectedRow.workorder_code;
string currStatus = selectedRow.status;
if (currStatus != "w4")
{
- MessageBox.Show("只有暂停中的工单才支持恢复!", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Warning);
+ CustomMessageBox.Show("只有暂停中的工单才支持恢复!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
//MessageBoxResult result = MessageBox.Show("你确定要恢复该工单吗?", "温馨提示", MessageBoxButton.YesNo, MessageBoxImage.Information);
@@ -400,9 +401,7 @@ namespace XGL.Views
// return;
PauseOrderWin pauseOrderWin = new PauseOrderWin();
if (pauseOrderWin.ShowDialog() == true)
- {
-
-
+ {
formingMachineService.UpdateWorkOrder(workordercode, "w2", pauseOrderWin.remark, pauseOrderWin.type, deviceCode);
GetWorkOrderInfo();
}
diff --git a/shangjian/XGLFinishPro/App.config b/shangjian/XGLFinishPro/App.config
index b1c93a5..7044b4b 100644
--- a/shangjian/XGLFinishPro/App.config
+++ b/shangjian/XGLFinishPro/App.config
@@ -10,7 +10,7 @@
-
+
diff --git a/shangjian/XGLFinishPro/LoginPage.xaml b/shangjian/XGLFinishPro/LoginPage.xaml
index 9fb19e7..d5845d1 100644
--- a/shangjian/XGLFinishPro/LoginPage.xaml
+++ b/shangjian/XGLFinishPro/LoginPage.xaml
@@ -64,8 +64,8 @@
-
-
+
+
记住密码
diff --git a/shangjian/XGLFinishPro/LoginPage.xaml.cs b/shangjian/XGLFinishPro/LoginPage.xaml.cs
index ab2a228..dcee843 100644
--- a/shangjian/XGLFinishPro/LoginPage.xaml.cs
+++ b/shangjian/XGLFinishPro/LoginPage.xaml.cs
@@ -286,6 +286,7 @@ namespace XGLFinishPro
{
try
{
+ btnCheckUpdate_Click(null, null);
username.Focus();
//dldh.IsActive = false;
this.dldh.Visibility = Visibility.Hidden;//遮罩层可见
@@ -356,7 +357,8 @@ namespace XGLFinishPro
}
else
{
- MessageBox.Show("没有检测到新版本", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
+ if(sender != null)
+ MessageBox.Show("没有检测到新版本", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
diff --git a/shangjian/XGLFinishPro/Tools/MyValueConverter.cs b/shangjian/XGLFinishPro/Tools/MyValueConverter.cs
index 64211b2..11e9838 100644
--- a/shangjian/XGLFinishPro/Tools/MyValueConverter.cs
+++ b/shangjian/XGLFinishPro/Tools/MyValueConverter.cs
@@ -36,15 +36,27 @@ namespace XGLFinishPro.Tools
}
if (value.Equals("0") || string.IsNullOrEmpty(value.ToString()))
{
- return "未质检";
+ return "未首检";
}
if (value.Equals("1"))
{
- return "任务已创建";
+ return "首检中";
}
if (value.Equals("2"))
{
- return "质检完成";
+ return "首检完成";
+ }
+ if (value.Equals("Y"))
+ {
+ return "合格";
+ }
+ if (value.Equals("N"))
+ {
+ return "不合格";
+ }
+ if (value.Equals(" "))
+ {
+ return "";
}
return "未派";
}
diff --git a/shangjian/XGLFinishPro/Views/ExecReportWorkWin.xaml b/shangjian/XGLFinishPro/Views/ExecReportWorkWin.xaml
index 7816ae0..916acb1 100644
--- a/shangjian/XGLFinishPro/Views/ExecReportWorkWin.xaml
+++ b/shangjian/XGLFinishPro/Views/ExecReportWorkWin.xaml
@@ -3,12 +3,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:local="clr-namespace:XGLFinishPro.Views"
xmlns:convert="clr-namespace:XGLFinishPro.Tools"
mc:Ignorable="d"
- Title="CheckUserWin" Height="950" Width="1350" WindowStartupLocation="CenterScreen" WindowStyle="None" Loaded="Window_Loaded">
+ Title="CheckUserWin" Height="750" Width="1350" WindowStartupLocation="CenterScreen" WindowStyle="None" Loaded="Window_Loaded">
-
+
+
+
-
-
+
+
+
+
+
+
@@ -133,10 +200,10 @@
-
-
+
+
-
+
@@ -184,12 +251,12 @@
-->
-
+
-
+
@@ -211,11 +278,14 @@
-
+
-
+
-
-
+
@@ -251,31 +311,30 @@
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
diff --git a/shangjian/XGLFinishPro/Views/ExecReportWorkWin.xaml.cs b/shangjian/XGLFinishPro/Views/ExecReportWorkWin.xaml.cs
index a1a276e..0f964fa 100644
--- a/shangjian/XGLFinishPro/Views/ExecReportWorkWin.xaml.cs
+++ b/shangjian/XGLFinishPro/Views/ExecReportWorkWin.xaml.cs
@@ -48,6 +48,13 @@ namespace XGLFinishPro.Views
public string _siteCode = "";
DataRowView selectedRow = null;
+ int sortNo = 0; //定义一个整数,记录子集级数
+ Dictionary dynamicWorkTimeTextBoxes = new Dictionary();
+ Dictionary dynamicUserCountTextBoxes = new Dictionary();
+
+ Dictionary dicWorkTime = new Dictionary();
+ Dictionary dicUserCount = new Dictionary();
+ DataTable dtCosumeData = null;
public ExecReportWorkWin()
{
InitializeComponent();
@@ -83,8 +90,10 @@ namespace XGLFinishPro.Views
this._workOrdercode = selectedRow["workorder_code"].ToString();
this.lbCurrOrderNo.Content = selectedRow["workorder_code"].ToString();
this._workOrderId = selectedRow["workorder_id"].ToString();
- this.txtQuantity.Text = selectedRow["batch_quantity"].ToString();
+ object obi = selectedRow["batch_quantity"];
+
_orderQuntity = selectedRow["quantity_split"].ToString();
+ this.txtQuantity.Text = selectedRow["batch_quantity"].ToString();
this.comboBoxBatch.Text = selectedRow["batch_code"].ToString();
_siteCode = siteCode;
}
@@ -149,22 +158,56 @@ namespace XGLFinishPro.Views
this.txtUserCount.Focus();
return;
}
- if (!CheckWorkTimeDynamicTextBox())
+ if (dynamicWorkTimeTextBoxes.Count > 0)
{
- return;
+ if (!CheckWorkTimeDynamicTextBox())
+ {
+ return;
+ }
}
- if (!CheckUserCountDynamicTextBox())
+ if (dynamicWorkTimeTextBoxes.Count > 0)
{
- return;
+ if (!CheckUserCountDynamicTextBox())
+ {
+ return;
+ }
}
+
if (comboBoxBatch.Items.Count <= 2)//小于等于2的时候代表只有一个批次,必须最终报工
{
if (_isEndReport == false)
{
- this.tbMsg.Content = "该工单只有一个批次,必须勾选最终报工!";
- // return;
+ CustomMessageBoxResult result = CustomMessageBox.Show("该批次为最后一个批次,如果需要最终报工请点【取消】按钮!!!", CustomMessageBoxButton.OKCancel, CustomMessageBoxIcon.Warning);
+ if (result == CustomMessageBoxResult.Cancel)
+ return;
+ //this.tbMsg.Content = "该工单只有一个批次,必须勾选最终报工!";
+ // return;
}
}
+ else
+ {
+ //判断是否为最后一个批次,如果是最后一个批次,则必须最终报工
+ DataTable dtCount = userDbWareHouse.GetBatchReportedCount(_workOrdercode);
+ if (dtCount != null && dtCount.Rows.Count > 0)
+ {
+ int reportedCount = Convert.ToInt32(dtCount.Rows[0][0].ToString());
+ //下拉框里有一个空行,判断报工数量比批次号少1的时候,证明是最后一次报工,
+ if (reportedCount >= comboBoxBatch.Items.Count - 2)
+ {
+ //判断当前批次是不是已报工,针对一个批次多次报工实际不是最后一个批次的时候触发的提示,false 代表不是此批次最后一个批次
+ bool isLastBatch = userDbWareHouse.IsLastBatchReport(this.comboBoxBatch.Text);
+ if (_isEndReport == false && isLastBatch)
+ {
+ CustomMessageBoxResult result = CustomMessageBox.Show("该批次为最后一个批次,如果需要最终报工请点【取消】按钮!!!", CustomMessageBoxButton.OKCancel, CustomMessageBoxIcon.Warning);
+ if (result == CustomMessageBoxResult.Cancel)
+ return;
+ //this.tbMsg.Content = "该批次为最后一个批次,必须勾选最终报工!";
+ //return;
+ }
+ }
+ }
+ }
+
}
catch (Exception ex)
{
@@ -197,12 +240,12 @@ namespace XGLFinishPro.Views
else
{
CustomMessageBox.Show("报工失败", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
- LogHelper.instance.log.Error("报工失败:" + selectedRow["workorder_code"]);
+ LogHelper.instance.log.Error("报工失败1:" + selectedRow["workorder_code"]);
}
}
catch (Exception ex)
{
- LogHelper.instance.log.Error("报工失败:" + ex.Message + selectedRow["workorder_code"]);
+ LogHelper.instance.log.Error("报工失败2:" + ex.Message + selectedRow["workorder_code"]);
}
}
}
@@ -227,7 +270,7 @@ namespace XGLFinishPro.Views
catch (Exception ex)
{
CustomMessageBox.Show("报工失败"+ ex.Message, CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
- LogHelper.instance.log.Error("报工失败:" + ex.Message);
+ LogHelper.instance.log.Error("报工失败3:" + ex.Message);
}
}
@@ -246,7 +289,7 @@ namespace XGLFinishPro.Views
{
// 输入是一个有效的数字,包括小数
this.tbMsg.Content = "人员数量含有非法字符!";
- dynamicUserCountTextBoxes[i].Focus();
+ dynamicUserCountTextBoxes[i + 1].Focus();
isScucc = false;
}
else
@@ -269,7 +312,7 @@ namespace XGLFinishPro.Views
{
// 输入是一个有效的数字,包括小数
this.tbMsg.Content = "工时含有非法字符!";
- dynamicWorkTimeTextBoxes[i].Focus();
+ dynamicWorkTimeTextBoxes[i + 1].Focus();
isScucc = false;
}
else
@@ -283,25 +326,36 @@ namespace XGLFinishPro.Views
}
private bool ReportWork()
- {
+ {
//获取报工编码
string newReportCode = "";
- DataTable dtNewReportCode = formingMachineService.GetReportCode();
- if (dtNewReportCode == null || dtNewReportCode.Rows.Count == 0)
+ try
{
- newReportCode = DateTime.Now.ToString("yyyyMMdd") + "0001";
- }
- else
- {
- if (string.IsNullOrEmpty(dtNewReportCode.Rows[0]["report_code"].ToString()))
+ DataTable dtNewReportCode = formingMachineService.GetReportCode();
+ if (dtNewReportCode == null || dtNewReportCode.Rows.Count == 0)
{
newReportCode = DateTime.Now.ToString("yyyyMMdd") + "0001";
}
else
{
- newReportCode = (Convert.ToInt64(dtNewReportCode.Rows[0]["report_code"].ToString()) + 1).ToString();
+ if (string.IsNullOrEmpty(dtNewReportCode.Rows[0]["report_code"].ToString()))
+ {
+ newReportCode = DateTime.Now.ToString("yyyyMMdd") + "0001";
+ }
+ else
+ {
+ newReportCode = (Convert.ToInt64(dtNewReportCode.Rows[0]["report_code"].ToString()) + 1).ToString();
+ }
}
}
+ catch (Exception ex)
+ {
+ LogHelper.instance.log.Error("报工失败:获取报工编码时发生异常:" + ex.Message);
+ CustomMessageBox.Show("报工失败:获取报工编码时发生异常:" + ex.Message, CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
+ return false;
+ }
+
+
string isEndReport = _isEndReport == true ? "1" : "0";
//bool issucc = formingMachineService.ExecuteReportWork(selectedRow, _orderQuntity, _workQuntity, newReportCode, _workTime, _useMan, _costCenter, batchCode, isEndReport, _deviceCode);
@@ -346,12 +400,15 @@ namespace XGLFinishPro.Views
//获取第二列的值
int columnIndex = 1; // 列索引,这里假设为第一列
- if (_isEndReport.Value == true)
+ if (_isEndReport.Value == true || selectedRow["status"].ToString().Equals("w4"))//20240424添加预报工功能,暂停状态下添加消耗数据录入功能
{
+ CreateBaseQty();//将=0的根据公式填充进去;
foreach (var row in dgConsumeInfo.Items)
{
var selectedConsumeRow = (row as DataRowView);
+
var qty = selectedConsumeRow["qty"].ToString() == "" ? "0" : selectedConsumeRow["qty"].ToString();
+
var remark = selectedConsumeRow["remark"].ToString();
string insertConsumeSql = formingMachineService.GetInsertConsumeInfoSql(selectedConsumeRow, newReportCode, _siteCode);
@@ -444,12 +501,8 @@ namespace XGLFinishPro.Views
}
- int sortNo = 0; //定义一个整数,记录子集级数
- Dictionary dynamicWorkTimeTextBoxes = new Dictionary();
- Dictionary dynamicUserCountTextBoxes = new Dictionary();
- Dictionary dicWorkTime = new Dictionary();
- Dictionary dicUserCount = new Dictionary();
+
private bool GetSubOrder(string workorderID)
{
try
@@ -458,6 +511,7 @@ namespace XGLFinishPro.Views
DataTable dtSubOrders = userDbWareHouse.GetSubOrderInfo(workorderID);
if (dtSubOrders != null)
{
+ this.txtUserCount.Text = "4";
string sort = "";
switch (sortNo)
{
@@ -560,7 +614,7 @@ namespace XGLFinishPro.Views
myGrid.Children.Add(myStackPanelWorkTime2);
//将人数文本框存储到数据字典中
- dynamicUserCountTextBoxes.Add(sortNo, textBox);
+ dynamicUserCountTextBoxes.Add(sortNo, textBoxUserCount);
//stackPanelFather.Children.Add(myStackPanelWorkTime);
//}
@@ -619,8 +673,8 @@ namespace XGLFinishPro.Views
private void InitConsumeData()
{
- DataTable dt = userDbWareHouse.GetCosumeData(_workOrdercode);
- if (dt == null)
+ dtCosumeData = userDbWareHouse.GetCosumeData(_workOrdercode);
+ if (dtCosumeData == null || dtCosumeData.Rows.Count == 0)
{
this.tbMsg.Content = "没有找到该工单的消耗信息";
//CustomMessageBox.Show("没有维护成本中心,请联系管理员!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
@@ -628,8 +682,23 @@ namespace XGLFinishPro.Views
}
//绑定
- dgConsumeInfo.ItemsSource = dt.DefaultView;
+ dgConsumeInfo.ItemsSource = dtCosumeData.DefaultView;
+ }
+ private void CreateBaseQty()
+ {
+ if (_siteCode == "")
+ return;
+ //生成推荐实际消耗量
+ double rate = GetOrderRate();
+ if (rate == 0)
+ return;
+ foreach (System.Data.DataRow item in dtCosumeData.Rows)
+ {
+ //变更为只有等于0的时候才填值
+ if (item["qty"].ToString().Equals("0"))
+ item["qty"] = Math.Round(Convert.ToDouble(item["quantity"]) * rate, 2);
+ }
}
private void txtQuantity_TextChanged(object sender, TextChangedEventArgs e)
@@ -740,22 +809,27 @@ namespace XGLFinishPro.Views
int rowIndex = e.Row.GetIndex();
int colIndex = dgConsumeInfo.Columns.IndexOf(textColumn);
- // 获取输入的值
- string newValue = textBox.Text;
-
- // 执行你的验证逻辑,这里以整数为例
- if (!Regex.IsMatch(newValue, @"^\d+(\.\d+)?$"))
+ //只限制用量的那一列,其余的不加限制
+ if (colIndex == 7)
{
- // 输入的不是整数,可以执行相应的操作,例如还原之前的值或显示错误消息等
+ // 获取输入的值
+ string newValue = textBox.Text;
- CustomMessageBox.Show("请输入整数或者小数!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
+ // 执行你的验证逻辑,这里以整数为例
+ if (!Regex.IsMatch(newValue, @"^\d+(\.\d+)?$"))
+ {
+ // 输入的不是整数,可以执行相应的操作,例如还原之前的值或显示错误消息等
- // 还原之前的值
- dgConsumeInfo.CancelEdit();
+ CustomMessageBox.Show("请输入整数或者小数!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
- // 或者清除输入的值
- textBox.Text = string.Empty;
+ // 还原之前的值
+ dgConsumeInfo.CancelEdit();
+
+ // 或者清除输入的值
+ textBox.Text = string.Empty;
+ }
}
+
}
}
}
@@ -770,6 +844,8 @@ namespace XGLFinishPro.Views
if (xuanze9.IsChecked == true)
{
_isEndReport = true;
+
+ //dgConsumeInfo
}
else
{
@@ -777,6 +853,41 @@ namespace XGLFinishPro.Views
}
}
+ private double GetOrderRate()
+ {
+ if (string.IsNullOrEmpty(this.txtQuantity.Text))
+ {
+ this.tbMsg.Content = "报工数量不能为空";
+ this.txtQuantity.Focus();
+ return 0;
+ }
+
+ if (!Regex.IsMatch(this.txtQuantity.Text, @"^\d+(\.\d+)?$"))
+ {
+ // 输入是一个有效的数字,包括小数
+ this.tbMsg.Content = "报工数量非法字符!";
+ this.txtQuantity.Focus();
+ return 0;
+ }
+
+ double rate = 0;
+ string workOrder = this.lbCurrOrderNo.Content.ToString();
+ DataTable dt = formingMachineService.GetOrderReportSumQty(workOrder);
+ //如果没报过工,按照只有一个批次处理
+ if (dt == null || dt.Rows.Count == 0)
+ {
+ double qty = Convert.ToDouble(this.txtQuantity.Text);
+
+ rate = qty / Convert.ToDouble(_orderQuntity);
+ }
+ else
+ {
+ double qty = Convert.ToDouble(dt.Rows[0][0])+ Convert.ToDouble(this.txtQuantity.Text);
+ rate = qty / Convert.ToDouble(_orderQuntity);
+ }
+ return rate;
+ }
+
//private void txtFOUserCount_TextChanged(object sender, TextChangedEventArgs e)
//{
// if (!Regex.IsMatch(this.txtFOUserCount.Text, @"^\d+$"))
diff --git a/shangjian/XGLFinishPro/Views/LanJu_Operator.xaml b/shangjian/XGLFinishPro/Views/LanJu_Operator.xaml
index d7cb453..2306c47 100644
--- a/shangjian/XGLFinishPro/Views/LanJu_Operator.xaml
+++ b/shangjian/XGLFinishPro/Views/LanJu_Operator.xaml
@@ -501,10 +501,9 @@ Background="#F2F3F5"
-
-
+
@@ -515,13 +514,18 @@ Background="#F2F3F5"
-->
-
-
+
+
+
+
+
+
-
+
+
diff --git a/shangjian/XGLFinishPro/Views/LanJu_Operator.xaml.cs b/shangjian/XGLFinishPro/Views/LanJu_Operator.xaml.cs
index 3606755..e7f246e 100644
--- a/shangjian/XGLFinishPro/Views/LanJu_Operator.xaml.cs
+++ b/shangjian/XGLFinishPro/Views/LanJu_Operator.xaml.cs
@@ -14,6 +14,7 @@ using XGL.Models.Model;
using XGL.Models.Model.FoamingMac;
using XGL.Models.Model.OrderPrepare;
using XGL.Thrift;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace XGLFinishPro.Views
@@ -100,7 +101,7 @@ namespace XGLFinishPro.Views
timerDeciveState.Interval = Utils.GetAppSetting("GetDeviceStateInterval") == "" ? 15000 : Convert.ToInt32(Utils.GetAppSetting("GetDeviceStateInterval"));
timerDeciveState.Elapsed += TimerDeciveState_Elapsed;
timerDeciveState.Start();
- Complete_Click(null,null);
+ Complete_Click(null, null);
GetWorkOrderInfo();
}
string isbaiye;
@@ -303,7 +304,7 @@ namespace XGLFinishPro.Views
//var selectedRow = dgWorkOrderInfo.SelectedItem as FoamingMacModel;
if (selectedRow == null)
{
- MessageBox.Show("请选择你要暂停的工单!", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Warning);
+ CustomMessageBox.Show("请选择你要暂停的工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
@@ -311,23 +312,22 @@ namespace XGLFinishPro.Views
string currStatus = selectedRow["status"].ToString();//.status;
if (currStatus != "w2")
{
- MessageBox.Show("只有活动中的工单才支持暂停!", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Warning);
+ CustomMessageBox.Show("只有活动中的工单才支持暂停!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
PauseOrderWin pauseOrderWin = new PauseOrderWin();
if (pauseOrderWin.ShowDialog() == true)
{
- PauseRecoverOrderS(workordercode,"w4", pauseOrderWin);
+ PauseRecoverOrderS(workordercode, "w4", pauseOrderWin);
GetWorkOrderInfo();
}
//MessageBoxResult result = MessageBox.Show("你确定要暂停该工单吗?", "温馨提示", MessageBoxButton.YesNo, MessageBoxImage.Information);
//if (result == MessageBoxResult.No)
- // return;
-
+ // return;
}
- private bool PauseRecoverOrderS(string workordercode,string status, PauseOrderWin pauseOrderWin)
+ private bool PauseRecoverOrderS(string workordercode, string status, PauseOrderWin pauseOrderWin)
{
bool updatestatus = formingMachineService.UpdateWorkOrder(workordercode, status, pauseOrderWin.remark, pauseOrderWin.type, deviceCode);
if (!updatestatus)
@@ -353,14 +353,22 @@ namespace XGLFinishPro.Views
var selectedRow = (dgWorkOrderInfo.SelectedItem as DataRowView);
if (selectedRow == null)
{
- MessageBox.Show("请选择你要恢复的工单!", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Warning);
+ CustomMessageBox.Show("请选择你要恢复的工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
+
+ int orderCount = GetActivedOrdersCount(this.deviceCode, LoginUser.WorkDate);
+ if (orderCount >= 1)
+ {
+ CustomMessageBox.Show("已有活动中的工单,请先报工再开始下一个工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
+ return;
+ }
+
var workordercode = selectedRow["workorder_code"].ToString();//.workorder_code;
string currStatus = selectedRow["status"].ToString();//.status;
if (currStatus != "w4")
{
- MessageBox.Show("只有暂停中的工单才支持恢复!", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Warning);
+ CustomMessageBox.Show("只有暂停中的工单才支持恢复!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
//MessageBoxResult result = MessageBox.Show("你确定要恢复该工单吗?", "温馨提示", MessageBoxButton.YesNo, MessageBoxImage.Information);
@@ -439,20 +447,23 @@ namespace XGLFinishPro.Views
CustomMessageBox.Show("请选择你要报工的工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
- if (!selectedRow["status"].ToString().Equals("w2"))
+ if (!selectedRow["status"].ToString().Equals("w2") && !selectedRow["status"].ToString().Equals("w4"))
{
- CustomMessageBox.Show("你选择的工单不能报工!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
+ string status = selectedRow["status"].ToString();
+ string st = status.Equals("w1") ? "未派发" : status.Equals("w3") ? "已报工" : status.Equals("w0") ? "未派发" : "已暂停";
+ CustomMessageBox.Show("你选择的工单不能报工,请检查工单状态,当前工单状态为:"+ st, CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
- if (selectedRow["batchStatus"].ToString().Equals("0"))
- {
- CustomMessageBox.Show("你选择的该批次不能报工!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
- return;
- }
+ //20240424预报工功能,不能限制批次报工次数,
+ //if (selectedRow["batchStatus"].ToString().Equals("0"))
+ //{
+ // CustomMessageBox.Show("你选择的该批次不能报工!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
+ // return;
+ //}
- ExecReportWorkWin execReport = new ExecReportWorkWin(selectedRow, deviceCode, Utils.GetAppSetting("SiteCode")) ;
+ ExecReportWorkWin execReport = new ExecReportWorkWin(selectedRow, deviceCode, Utils.GetAppSetting("SiteCode"));
if (execReport.ShowDialog() == true)
{
@@ -518,7 +529,8 @@ namespace XGLFinishPro.Views
}
catch (Exception ex)
{
-
+ LogHelper.instance.log.Error("报工失败11>>" + ex.Message);
+ CustomMessageBox.Show("报工失败:" + ex.Message, CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
}
}
@@ -576,10 +588,21 @@ namespace XGLFinishPro.Views
{
if (status != "")
{
- CustomMessageBox.Show("该工单不符合条件,请选择其他的工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
+ string st = status.Equals("w1") ? "未派发" : status.Equals("w3") ? "已报工" : status.Equals("w0") ? "未派发" : "已暂停";
+ CustomMessageBox.Show("该工单不符合条件,请检查工单状态,当前工单状态为:" + st, CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
}
+ CustomMessageBoxResult result = CustomMessageBox.Show("你确定要开始工单么?", CustomMessageBoxButton.OKCancel, CustomMessageBoxIcon.Warning);
+ if (result == CustomMessageBoxResult.Cancel)
+ return;
+ //2024-04-23赵啸林要求添加一条产线同一天只能有一个活动状态下的工单,如果有未报工的则不允许开始新的工单
+ int orderCount = GetActivedOrdersCount(this.deviceCode, LoginUser.WorkDate);
+ if (orderCount >= 1)
+ {
+ CustomMessageBox.Show("已有活动中的工单,请先报工再开始下一个工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
+ return;
+ }
//更新工单状态
if (!UpdateOrderStatus(workorderID))
{
@@ -591,14 +614,24 @@ namespace XGLFinishPro.Views
string materialCode = (dgWorkOrderInfo.SelectedItem as DataRowView)["product_code"].ToString();
string materialDesc = (dgWorkOrderInfo.SelectedItem as DataRowView)["product_name"].ToString();
userDbWareHouse.InsertOperationLog(workorderID, "w2", "", "开始工单", deviceCode, materialCode, materialDesc);
- await CallCheckApi("checkTypeSCXJ");
- TimerDeciveState_Elapsed(null,null);
+ // await CallCheckApi("checkTypeSCXJ");20240403赵啸林因为切线方案调整,要求取消上位机生成巡检任务的功能;
+ TimerDeciveState_Elapsed(null, null);
}
}
+
+ private int GetActivedOrdersCount(string deviceCode, string workDate)
+ {
+ DataTable dtActivedOrdersQty = userDbWareHouse.GetActivedOrdersQty(deviceCode, workDate);
+ if (dtActivedOrdersQty == null)
+ return 0;
+ int count = Convert.ToInt32(dtActivedOrdersQty.Rows[0][0]);
+ return count;
+ }
+
private bool UpdateOrderStatus(string workorderID)
{
//更新工单状态
- var updatestatus = userDbWareHouse.UpdateSycnFlag(workorderID,deviceCode);
+ var updatestatus = userDbWareHouse.UpdateSycnFlag(workorderID, deviceCode);
if (!updatestatus)
{
CustomMessageBox.Show("开始工单失败!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
@@ -624,7 +657,7 @@ namespace XGLFinishPro.Views
}
}
-
+
private void GetQitaolv_Click(object sender, RoutedEventArgs e)
{
QitaoLvUC lanJu_QitaoLv = new QitaoLvUC(_workOrderCode);
@@ -642,8 +675,8 @@ namespace XGLFinishPro.Views
CustomMessageBox.Show("请对母单使用叫料功能!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
- }
-
+ }
+
private async void btnFirstCheck_Click(object sender, RoutedEventArgs e)
{
if (dgWorkOrderInfo.SelectedItems.Count == 0)
@@ -651,7 +684,8 @@ namespace XGLFinishPro.Views
CustomMessageBox.Show("请选择要首件检验的工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
-
+
+
try
{
string status1 = (dgWorkOrderInfo.SelectedItem as DataRowView)["workorder_code"].ToString();
@@ -661,22 +695,28 @@ namespace XGLFinishPro.Views
{
if (status != "")
{
- CustomMessageBox.Show("该工单不符合条件,请选择其他的工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
+ string st = status.Equals("w1") ? "未派发" : status.Equals("w3") ? "已报工" : status.Equals("w0") ? "未派发" : "已暂停";
+ CustomMessageBox.Show("该工单不符合条件,请检查工单状态,当前工单状态为:"+ st, CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
}
+ CustomMessageBoxResult result = CustomMessageBox.Show("你确定要首检么?", CustomMessageBoxButton.OKCancel, CustomMessageBoxIcon.Warning);
+ if (result == CustomMessageBoxResult.Cancel)
+ return;
- string qcStatus = (dgWorkOrderInfo.SelectedItem as DataRowView)["qc_status"].ToString();
- if (qcStatus.Equals("1") || qcStatus.Equals("2"))
- {
- if (qcStatus != "")
- {
- CustomMessageBox.Show("该工单已完成质检,请不要重复创建质检任务!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
- return;
- }
- }
+ //2024-04-16添加不限制首检确认的功能;
+ //string qcStatus = (dgWorkOrderInfo.SelectedItem as DataRowView)["qc_status"].ToString();
+
+ //if (qcStatus.Equals("1") || qcStatus.Equals("2"))
+ //{
+ // if (qcStatus != "")
+ // {
+ // CustomMessageBox.Show("该工单已完成质检,请不要重复创建质检任务!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
+ // return;
+ // }
+ //}
//首件检验
await CallCheckApi("checkTypeSC");
}
@@ -685,7 +725,7 @@ namespace XGLFinishPro.Views
LogHelper.instance.log.Error("首检检验发生异常>>" + ex.Message);
CustomMessageBox.Show("首检检验发生异常:" + ex.Message, CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
}
-
+
}
///
@@ -698,7 +738,7 @@ namespace XGLFinishPro.Views
string workorderCode = (dgWorkOrderInfo.SelectedItem as DataRowView)["workorder_code"].ToString();
string workorderID = (dgWorkOrderInfo.SelectedItem as DataRowView)["workorder_id"].ToString();
string batchCode = (dgWorkOrderInfo.SelectedItem as DataRowView)["batch_code"].ToString();
-
+
//调用首件检验接口
string apiUrl = formingMachineService.GetInterfaceUrl("createCheckProduceTask");
FirstCheckModel firstCheck = new FirstCheckModel();
@@ -714,7 +754,7 @@ namespace XGLFinishPro.Views
taskName = "首件检验任务";
firstCheck.incomeBatchNo = (dgWorkOrderInfo.SelectedItem as DataRowView)["batch_code"].ToString();
}
-
+
firstCheck.orderNo = workorderCode;
firstCheck.materialName = (dgWorkOrderInfo.SelectedItem as DataRowView)["product_name"].ToString();
firstCheck.materialCode = (dgWorkOrderInfo.SelectedItem as DataRowView)["product_code"].ToString();
@@ -741,7 +781,7 @@ namespace XGLFinishPro.Views
Rootobjectresu result = Utils.DeJson(await restClient.PostAsync(apiUrl, jsonContent));
-
+
if (result.code == 200)
{
//巡检
@@ -767,7 +807,7 @@ namespace XGLFinishPro.Views
LogHelper.instance.log.Info($"更新{taskName}状态失败>>" + result.msg);
}
}
-
+
}
else
{
@@ -782,7 +822,7 @@ namespace XGLFinishPro.Views
string apiUrl = formingMachineService.GetInterfaceUrl("machineRepair");
MachineRepairWin machineRepairWin = new MachineRepairWin(apiUrl);
machineRepairWin.ShowDialog();
-
+
}
private void btnSalaryCal_Click(object sender, RoutedEventArgs e)
@@ -811,7 +851,7 @@ namespace XGLFinishPro.Views
string workOrderCode = selectedRow["workorder_code"].ToString();
string sapWorkOrderCode = selectedRow["workorder_code_sap"].ToString();
- PieceSalaryCalWin pieceSalaryCalWin = new PieceSalaryCalWin(prodCode, prodName, deviceCode, workOrderCode,sapWorkOrderCode);
+ PieceSalaryCalWin pieceSalaryCalWin = new PieceSalaryCalWin(prodCode, prodName, deviceCode, workOrderCode, sapWorkOrderCode);
pieceSalaryCalWin.ShowDialog();
}
}
diff --git a/shangjian/XGLFinishPro/Views/LanJu_Paused.xaml b/shangjian/XGLFinishPro/Views/LanJu_Paused.xaml
index b8e9832..c2d1152 100644
--- a/shangjian/XGLFinishPro/Views/LanJu_Paused.xaml
+++ b/shangjian/XGLFinishPro/Views/LanJu_Paused.xaml
@@ -9,7 +9,7 @@
Width="1920"
Height="280"
mc:Ignorable="d" Loaded="UserControl_Loaded">
-
+
@@ -24,7 +24,8 @@
-
+
+
@@ -65,11 +66,11 @@
-
-
+
+
-
-
+
+
diff --git a/shangjian/XGLFinishPro/Views/PieceSalaryCalWin.xaml b/shangjian/XGLFinishPro/Views/PieceSalaryCalWin.xaml
index 2b0b869..2a13ef7 100644
--- a/shangjian/XGLFinishPro/Views/PieceSalaryCalWin.xaml
+++ b/shangjian/XGLFinishPro/Views/PieceSalaryCalWin.xaml
@@ -91,7 +91,7 @@
-
+
diff --git a/shangjian/XGLFinishPro/Views/PieceSalaryCalWin.xaml.cs b/shangjian/XGLFinishPro/Views/PieceSalaryCalWin.xaml.cs
index b635de9..daccd60 100644
--- a/shangjian/XGLFinishPro/Views/PieceSalaryCalWin.xaml.cs
+++ b/shangjian/XGLFinishPro/Views/PieceSalaryCalWin.xaml.cs
@@ -157,6 +157,14 @@ namespace XGLFinishPro.Views
private void Window_Loaded(object sender, RoutedEventArgs e)
{
+ //新增将LineCode改为SAPCode的功能;20240325
+ DataSet ds = prodDBService.GetSapCode(_deviceCode);
+ if (ds == null)
+ {
+ CustomMessageBox.Show("请维护该线体对应的SAP编码!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
+ return;
+ }
+ _deviceCode = ds.Tables[0].Rows[0][0].ToString();
this.lstSelectedStep.ItemsSource = GetStepData();
GetData();
}
@@ -167,7 +175,6 @@ namespace XGLFinishPro.Views
if (dt == null)
{
this.dgCreatedUserInfo.ItemsSource = null;
- CustomMessageBox.Show("请配置工序数据之后再试!!!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Question);
}
else
{
@@ -178,7 +185,7 @@ namespace XGLFinishPro.Views
private void btnCloseWin_Click(object sender, RoutedEventArgs e)
{
- if (CustomMessageBox.Show("确定要关闭此窗口吗?", CustomMessageBoxButton.YesNo, CustomMessageBoxIcon.Question) == CustomMessageBoxResult.No)
+ if (CustomMessageBox.Show("确定要关闭此窗口吗?", CustomMessageBoxButton.OKCancel, CustomMessageBoxIcon.Question) == CustomMessageBoxResult.Cancel)
return;
this.Close();
}
@@ -261,9 +268,11 @@ namespace XGLFinishPro.Views
CreateUnitPriceSqlList.Add(delSql);
//prodDBService.DelUnitPriceData(_workOrderCode, _childprocessCode, _deviceCode);
}
+
+ string sapCode = _deviceCode;//ds.Tables[0].Rows[0][0].ToString();
foreach (sys_user item in checkedRowsCache)
{
- string sql = prodDBService.GetCreateUnitPriceInfo(item, _workOrderCode, _sapWorkOrderCode, _productCode, _productName, _childprocessCode, _childprocessName,_deviceCode);
+ string sql = prodDBService.GetCreateUnitPriceInfo(item, _workOrderCode, _sapWorkOrderCode, _productCode, _productName, _childprocessCode, _childprocessName, sapCode);
CreateUnitPriceSqlList.Add(sql);
}
//之前如果已经插入了,先删除,
@@ -332,6 +341,8 @@ namespace XGLFinishPro.Views
if (dt == null)
{
+ CustomMessageBox.Show("请配置工序数据之后再试!!!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Question);
+
lstBoxStep.ItemsSource = null;
lstBoxStep.Items.Clear();
}